types.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { InitialData } from '@vendure/core';
  2. /**
  3. * Creates a mutable version of a type with readonly properties.
  4. */
  5. export type Mutable<T> = { -readonly [K in keyof T]: T[K] };
  6. /**
  7. * @description
  8. * Configuration options used to initialize an instance of the {@link TestServer}.
  9. *
  10. * @docsCategory testing
  11. */
  12. export interface TestServerOptions {
  13. /**
  14. * @description
  15. * The path to an optional CSV file containing product data to import.
  16. */
  17. productsCsvPath?: string;
  18. /**
  19. * @description
  20. * An object containing non-product data which is used to populate the database.
  21. */
  22. initialData: InitialData;
  23. /**
  24. * @description
  25. * The number of fake Customers to populate into the database.
  26. *
  27. * @default 10
  28. */
  29. customerCount?: number;
  30. /**
  31. * @description
  32. * Set this to `true` to log some information about the database population process.
  33. *
  34. * @default false
  35. */
  36. logging?: boolean;
  37. }
  38. export type QueryParams = { [key: string]: string | number };