projection-schema.d.ts 597 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Projection schema.
  3. */
  4. export type ProjectionSchema = {
  5. [property: string]: boolean | ProjectionSchemaPropertyOptions | undefined;
  6. }
  7. /**
  8. * Projection schema property options.
  9. */
  10. export type ProjectionSchemaPropertyOptions = {
  11. select?: boolean;
  12. scopes?: ProjectionSchemaScopes;
  13. schema?: Function | ProjectionSchema;
  14. }
  15. /**
  16. * Projection schema scopes.
  17. */
  18. export type ProjectionSchemaScopes = {
  19. [scope: string]: boolean | ProjectionSchemaScopeOptions | undefined;
  20. }
  21. /**
  22. * Projection schema scope options.
  23. */
  24. export type ProjectionSchemaScopeOptions = {
  25. select?: boolean;
  26. }