Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

productInterface.ts 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. export interface ProductData {
  2. category: string;
  3. name: string;
  4. image: string;
  5. description: string;
  6. place: string;
  7. process: string;
  8. people: string;
  9. pairing: string;
  10. available: boolean;
  11. isFeatured: boolean;
  12. price: number;
  13. customID: string;
  14. stripeID: string;
  15. }
  16. export interface ProductDataDB extends ProductData {
  17. id: string;
  18. _id: string;
  19. __v: number;
  20. }
  21. export interface FeaturedProductsResponseGet {
  22. message: string;
  23. featuredProducts: Array<ProductDataDB>;
  24. }
  25. export interface ProductsResponseGet {
  26. message: string;
  27. product: Array<ProductData>;
  28. productCount: number;
  29. next: string;
  30. previous: string;
  31. }
  32. export interface ProductsResponseError {
  33. message: string;
  34. }
  35. export interface ProductsResponsePost {
  36. message: string;
  37. product: ProductData;
  38. }
  39. interface SingleProductResponseGet {
  40. message: string;
  41. product: ProductDataDB;
  42. similarProducts: Array<ProductDataDB>;
  43. }
  44. export type SingleProductResponse =
  45. | SingleProductResponseGet
  46. | ProductsResponseError;
  47. export type ProductsResponse =
  48. | ProductsResponseGet
  49. | ProductsResponsePost
  50. | ProductsResponseError;
  51. export type FeaturedProductsResponse =
  52. | FeaturedProductsResponseGet
  53. | ProductsResponseError;