@plasmicpkgs/commerce 0.0.247 → 0.0.248

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/api/endpoints/cart.d.ts +4 -4
  2. package/dist/api/endpoints/catalog/products.d.ts +4 -4
  3. package/dist/api/index.d.ts +75 -75
  4. package/dist/api/operations.d.ts +130 -130
  5. package/dist/api/utils/errors.d.ts +10 -10
  6. package/dist/api/utils/is-allowed-method.d.ts +3 -3
  7. package/dist/api/utils/is-allowed-operation.d.ts +6 -6
  8. package/dist/api/utils/types.d.ts +34 -34
  9. package/dist/cart/use-add-item.d.ts +5 -5
  10. package/dist/cart/use-cart.d.ts +5 -5
  11. package/dist/cart/use-remove-item.d.ts +5 -5
  12. package/dist/cart/use-update-item.d.ts +5 -5
  13. package/dist/commerce.cjs.development.js +23 -20
  14. package/dist/commerce.cjs.development.js.map +1 -1
  15. package/dist/commerce.cjs.production.min.js +1 -1
  16. package/dist/commerce.cjs.production.min.js.map +1 -1
  17. package/dist/commerce.d.ts +43 -43
  18. package/dist/commerce.esm.js +23 -20
  19. package/dist/commerce.esm.js.map +1 -1
  20. package/dist/contexts.d.ts +26 -26
  21. package/dist/index.d.ts +46 -46
  22. package/dist/product/use-price.d.ts +26 -26
  23. package/dist/product/use-product.d.ts +5 -5
  24. package/dist/product/use-search.d.ts +6 -6
  25. package/dist/registerAddToCartButton.d.ts +10 -10
  26. package/dist/registerCart.d.ts +12 -12
  27. package/dist/registerCartProvider.d.ts +6 -6
  28. package/dist/registerCategoryCollection.d.ts +20 -20
  29. package/dist/registerCategoryField.d.ts +11 -11
  30. package/dist/registerCategoryLink.d.ts +12 -12
  31. package/dist/registerCategoryMedia.d.ts +11 -11
  32. package/dist/registerProductBox.d.ts +18 -18
  33. package/dist/registerProductCollection.d.ts +29 -29
  34. package/dist/registerProductLink.d.ts +12 -12
  35. package/dist/registerProductMedia.d.ts +14 -14
  36. package/dist/registerProductMediaCollection.d.ts +11 -11
  37. package/dist/registerProductPrice.d.ts +10 -10
  38. package/dist/registerProductQuantity.d.ts +11 -11
  39. package/dist/registerProductSlider.d.ts +14 -14
  40. package/dist/registerProductTextField.d.ts +11 -11
  41. package/dist/registerProductVariantPicker.d.ts +10 -10
  42. package/dist/registerable.d.ts +4 -4
  43. package/dist/site/use-brands.d.ts +5 -5
  44. package/dist/site/use-categories.d.ts +5 -5
  45. package/dist/types/cart.d.ts +157 -157
  46. package/dist/types/checkout.d.ts +57 -57
  47. package/dist/types/common.d.ts +13 -13
  48. package/dist/types/customer/address.d.ts +110 -110
  49. package/dist/types/customer/card.d.ts +113 -113
  50. package/dist/types/customer/index.d.ts +24 -24
  51. package/dist/types/index.d.ts +12 -12
  52. package/dist/types/login.d.ts +27 -27
  53. package/dist/types/logout.d.ts +17 -17
  54. package/dist/types/page.d.ts +24 -24
  55. package/dist/types/product.d.ts +117 -117
  56. package/dist/types/signup.d.ts +23 -23
  57. package/dist/types/site.d.ts +55 -55
  58. package/dist/types/wishlist.d.ts +83 -83
  59. package/dist/utils/default-fetcher.d.ts +4 -4
  60. package/dist/utils/default-product.d.ts +2 -2
  61. package/dist/utils/define-property.d.ts +21 -21
  62. package/dist/utils/errors.d.ts +27 -27
  63. package/dist/utils/get-product-price.d.ts +2 -2
  64. package/dist/utils/types.d.ts +99 -99
  65. package/dist/utils/use-data.d.ts +13 -13
  66. package/dist/utils/use-extra-features.d.ts +1 -1
  67. package/dist/utils/use-hook.d.ts +7 -7
  68. package/package.json +5 -5
@@ -1,14 +1,14 @@
1
- import { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
- import React from "react";
3
- import { Registerable } from "./registerable";
4
- interface ProductSliderProps {
5
- className: string;
6
- slideContainer?: React.ReactNode;
7
- thumbsContainer?: React.ReactNode;
8
- thumbsVisible?: number;
9
- slideSelected?: number;
10
- }
11
- export declare const productSliderMeta: CodeComponentMeta<ProductSliderProps>;
12
- export declare function ProductSlider(props: ProductSliderProps): React.JSX.Element;
13
- export declare function registerProductSlider(loader?: Registerable, customProductSliderMeta?: CodeComponentMeta<ProductSliderProps>): void;
14
- export {};
1
+ import { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
+ import React from "react";
3
+ import { Registerable } from "./registerable";
4
+ interface ProductSliderProps {
5
+ className: string;
6
+ slideContainer?: React.ReactNode;
7
+ thumbsContainer?: React.ReactNode;
8
+ thumbsVisible?: number;
9
+ slideSelected?: number;
10
+ }
11
+ export declare const productSliderMeta: CodeComponentMeta<ProductSliderProps>;
12
+ export declare function ProductSlider(props: ProductSliderProps): React.JSX.Element;
13
+ export declare function registerProductSlider(loader?: Registerable, customProductSliderMeta?: CodeComponentMeta<ProductSliderProps>): void;
14
+ export {};
@@ -1,11 +1,11 @@
1
- import { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
- import React from "react";
3
- import { Registerable } from "./registerable";
4
- interface ProductTextFieldProps {
5
- className: string;
6
- field: string;
7
- }
8
- export declare const productTextFieldMeta: CodeComponentMeta<ProductTextFieldProps>;
9
- export declare function ProductTextField(props: ProductTextFieldProps): React.JSX.Element;
10
- export declare function registerTextField(loader?: Registerable, customProductTextFieldMeta?: CodeComponentMeta<ProductTextFieldProps>): void;
11
- export {};
1
+ import { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
+ import React from "react";
3
+ import { Registerable } from "./registerable";
4
+ interface ProductTextFieldProps {
5
+ className: string;
6
+ field: string;
7
+ }
8
+ export declare const productTextFieldMeta: CodeComponentMeta<ProductTextFieldProps>;
9
+ export declare function ProductTextField(props: ProductTextFieldProps): React.JSX.Element;
10
+ export declare function registerTextField(loader?: Registerable, customProductTextFieldMeta?: CodeComponentMeta<ProductTextFieldProps>): void;
11
+ export {};
@@ -1,10 +1,10 @@
1
- import { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
- import React from "react";
3
- import { Registerable } from "./registerable";
4
- interface ProductVariantPickerProps {
5
- className: string;
6
- }
7
- export declare const productVariantPickerMeta: CodeComponentMeta<ProductVariantPickerProps>;
8
- export declare function ProductVariantPicker(props: ProductVariantPickerProps): React.JSX.Element;
9
- export declare function registerProductVariantPicker(loader?: Registerable, customProductVariantPickerMeta?: CodeComponentMeta<ProductVariantPickerProps>): void;
10
- export {};
1
+ import { CodeComponentMeta } from "@plasmicapp/host/registerComponent";
2
+ import React from "react";
3
+ import { Registerable } from "./registerable";
4
+ interface ProductVariantPickerProps {
5
+ className: string;
6
+ }
7
+ export declare const productVariantPickerMeta: CodeComponentMeta<ProductVariantPickerProps>;
8
+ export declare function ProductVariantPicker(props: ProductVariantPickerProps): React.JSX.Element;
9
+ export declare function registerProductVariantPicker(loader?: Registerable, customProductVariantPickerMeta?: CodeComponentMeta<ProductVariantPickerProps>): void;
10
+ export {};
@@ -1,4 +1,4 @@
1
- import registerComponent from "@plasmicapp/host/registerComponent";
2
- export declare type Registerable = {
3
- registerComponent: typeof registerComponent;
4
- };
1
+ import registerComponent from "@plasmicapp/host/registerComponent";
2
+ export type Registerable = {
3
+ registerComponent: typeof registerComponent;
4
+ };
@@ -1,5 +1,5 @@
1
- import type { SWRHook } from '../utils/types';
2
- import { GetBrandsHook } from '../types/site';
3
- export declare type UseBrands<H extends SWRHook<GetBrandsHook<any>> = SWRHook<GetBrandsHook>> = ReturnType<H['useHook']>;
4
- declare const useBrands: UseBrands;
5
- export default useBrands;
1
+ import type { SWRHook } from '../utils/types';
2
+ import { GetBrandsHook } from '../types/site';
3
+ export type UseBrands<H extends SWRHook<GetBrandsHook<any>> = SWRHook<GetBrandsHook>> = ReturnType<H['useHook']>;
4
+ declare const useBrands: UseBrands;
5
+ export default useBrands;
@@ -1,5 +1,5 @@
1
- import type { SWRHook } from '../utils/types';
2
- import { GetCategoriesHook } from '../types/site';
3
- export declare type UseCategories<H extends SWRHook<GetCategoriesHook<any>> = SWRHook<GetCategoriesHook>> = ReturnType<H['useHook']>;
4
- declare const useCategories: UseCategories;
5
- export default useCategories;
1
+ import type { SWRHook } from '../utils/types';
2
+ import { GetCategoriesHook } from '../types/site';
3
+ export type UseCategories<H extends SWRHook<GetCategoriesHook<any>> = SWRHook<GetCategoriesHook>> = ReturnType<H['useHook']>;
4
+ declare const useCategories: UseCategories;
5
+ export default useCategories;
@@ -1,157 +1,157 @@
1
- import type { Discount, Measurement, Image } from "./common";
2
- export declare type SelectedOption = {
3
- id?: string;
4
- name: string;
5
- value: string;
6
- };
7
- export declare type LineItem = {
8
- id: string;
9
- variantId: string;
10
- productId: string;
11
- name: string;
12
- quantity: number;
13
- discounts: Discount[];
14
- path: string;
15
- variant: ProductVariant;
16
- options?: SelectedOption[];
17
- };
18
- export declare type ProductVariant = {
19
- id: string;
20
- sku: string;
21
- name: string;
22
- requiresShipping: boolean;
23
- price: number;
24
- listPrice: number;
25
- image?: Image;
26
- isInStock?: boolean;
27
- availableForSale?: boolean;
28
- weight?: Measurement;
29
- height?: Measurement;
30
- width?: Measurement;
31
- depth?: Measurement;
32
- };
33
- export declare type Cart = {
34
- id: string;
35
- customerId?: string;
36
- email?: string;
37
- createdAt: string;
38
- currency: {
39
- code: string;
40
- };
41
- taxesIncluded: boolean;
42
- lineItems: LineItem[];
43
- lineItemsSubtotalPrice: number;
44
- subtotalPrice: number;
45
- totalPrice: number;
46
- discounts?: Discount[];
47
- };
48
- /**
49
- * Base cart item body used for cart mutations
50
- */
51
- export declare type CartItemBody = {
52
- variantId: string;
53
- productId?: string;
54
- quantity?: number;
55
- };
56
- /**
57
- * Hooks schema
58
- */
59
- export declare type CartTypes = {
60
- cart?: Cart;
61
- item: LineItem;
62
- itemBody: CartItemBody;
63
- };
64
- export declare type CartHooks<T extends CartTypes = CartTypes> = {
65
- getCart: GetCartHook<T>;
66
- addItem: AddItemHook<T>;
67
- updateItem: UpdateItemHook<T>;
68
- removeItem: RemoveItemHook<T>;
69
- };
70
- export declare type GetCartHook<T extends CartTypes = CartTypes> = {
71
- data: T["cart"] | null;
72
- input: {};
73
- fetcherInput: {
74
- cartId?: string;
75
- };
76
- swrState: {
77
- isEmpty: boolean;
78
- };
79
- };
80
- export declare type AddItemHook<T extends CartTypes = CartTypes> = {
81
- data: T["cart"];
82
- input?: T["itemBody"];
83
- fetcherInput: T["itemBody"];
84
- body: {
85
- item: T["itemBody"];
86
- };
87
- actionInput: T["itemBody"];
88
- };
89
- export declare type UpdateItemHook<T extends CartTypes = CartTypes> = {
90
- data: T["cart"] | null;
91
- input: {
92
- item?: T["item"];
93
- wait?: number;
94
- };
95
- fetcherInput: {
96
- itemId: string;
97
- item: Partial<T["itemBody"]>;
98
- };
99
- body: {
100
- itemId: string;
101
- item: Partial<T["itemBody"]>;
102
- };
103
- actionInput: Partial<T["itemBody"]> & {
104
- id: string;
105
- };
106
- };
107
- export declare type RemoveItemHook<T extends CartTypes = CartTypes> = {
108
- data: T["cart"] | null;
109
- input: {
110
- item?: T["item"];
111
- };
112
- fetcherInput: {
113
- itemId: string;
114
- };
115
- body: {
116
- itemId: string;
117
- };
118
- actionInput: {
119
- id: string;
120
- };
121
- };
122
- /**
123
- * API Schema
124
- */
125
- export declare type CartSchema<T extends CartTypes = CartTypes> = {
126
- endpoint: {
127
- options: {};
128
- handlers: CartHandlers<T>;
129
- };
130
- };
131
- export declare type CartHandlers<T extends CartTypes = CartTypes> = {
132
- getCart: GetCartHandler<T>;
133
- addItem: AddItemHandler<T>;
134
- updateItem: UpdateItemHandler<T>;
135
- removeItem: RemoveItemHandler<T>;
136
- };
137
- export declare type GetCartHandler<T extends CartTypes = CartTypes> = GetCartHook<T> & {
138
- body: {
139
- cartId?: string;
140
- };
141
- };
142
- export declare type AddItemHandler<T extends CartTypes = CartTypes> = AddItemHook<T> & {
143
- body: {
144
- cartId: string;
145
- };
146
- };
147
- export declare type UpdateItemHandler<T extends CartTypes = CartTypes> = UpdateItemHook<T> & {
148
- data: T["cart"];
149
- body: {
150
- cartId: string;
151
- };
152
- };
153
- export declare type RemoveItemHandler<T extends CartTypes = CartTypes> = RemoveItemHook<T> & {
154
- body: {
155
- cartId: string;
156
- };
157
- };
1
+ import type { Discount, Measurement, Image } from "./common";
2
+ export type SelectedOption = {
3
+ id?: string;
4
+ name: string;
5
+ value: string;
6
+ };
7
+ export type LineItem = {
8
+ id: string;
9
+ variantId: string;
10
+ productId: string;
11
+ name: string;
12
+ quantity: number;
13
+ discounts: Discount[];
14
+ path: string;
15
+ variant: ProductVariant;
16
+ options?: SelectedOption[];
17
+ };
18
+ export type ProductVariant = {
19
+ id: string;
20
+ sku: string;
21
+ name: string;
22
+ requiresShipping: boolean;
23
+ price: number;
24
+ listPrice: number;
25
+ image?: Image;
26
+ isInStock?: boolean;
27
+ availableForSale?: boolean;
28
+ weight?: Measurement;
29
+ height?: Measurement;
30
+ width?: Measurement;
31
+ depth?: Measurement;
32
+ };
33
+ export type Cart = {
34
+ id: string;
35
+ customerId?: string;
36
+ email?: string;
37
+ createdAt: string;
38
+ currency: {
39
+ code: string;
40
+ };
41
+ taxesIncluded: boolean;
42
+ lineItems: LineItem[];
43
+ lineItemsSubtotalPrice: number;
44
+ subtotalPrice: number;
45
+ totalPrice: number;
46
+ discounts?: Discount[];
47
+ };
48
+ /**
49
+ * Base cart item body used for cart mutations
50
+ */
51
+ export type CartItemBody = {
52
+ variantId: string;
53
+ productId?: string;
54
+ quantity?: number;
55
+ };
56
+ /**
57
+ * Hooks schema
58
+ */
59
+ export type CartTypes = {
60
+ cart?: Cart;
61
+ item: LineItem;
62
+ itemBody: CartItemBody;
63
+ };
64
+ export type CartHooks<T extends CartTypes = CartTypes> = {
65
+ getCart: GetCartHook<T>;
66
+ addItem: AddItemHook<T>;
67
+ updateItem: UpdateItemHook<T>;
68
+ removeItem: RemoveItemHook<T>;
69
+ };
70
+ export type GetCartHook<T extends CartTypes = CartTypes> = {
71
+ data: T["cart"] | null;
72
+ input: {};
73
+ fetcherInput: {
74
+ cartId?: string;
75
+ };
76
+ swrState: {
77
+ isEmpty: boolean;
78
+ };
79
+ };
80
+ export type AddItemHook<T extends CartTypes = CartTypes> = {
81
+ data: T["cart"];
82
+ input?: T["itemBody"];
83
+ fetcherInput: T["itemBody"];
84
+ body: {
85
+ item: T["itemBody"];
86
+ };
87
+ actionInput: T["itemBody"];
88
+ };
89
+ export type UpdateItemHook<T extends CartTypes = CartTypes> = {
90
+ data: T["cart"] | null;
91
+ input: {
92
+ item?: T["item"];
93
+ wait?: number;
94
+ };
95
+ fetcherInput: {
96
+ itemId: string;
97
+ item: Partial<T["itemBody"]>;
98
+ };
99
+ body: {
100
+ itemId: string;
101
+ item: Partial<T["itemBody"]>;
102
+ };
103
+ actionInput: Partial<T["itemBody"]> & {
104
+ id: string;
105
+ };
106
+ };
107
+ export type RemoveItemHook<T extends CartTypes = CartTypes> = {
108
+ data: T["cart"] | null;
109
+ input: {
110
+ item?: T["item"];
111
+ };
112
+ fetcherInput: {
113
+ itemId: string;
114
+ };
115
+ body: {
116
+ itemId: string;
117
+ };
118
+ actionInput: {
119
+ id: string;
120
+ };
121
+ };
122
+ /**
123
+ * API Schema
124
+ */
125
+ export type CartSchema<T extends CartTypes = CartTypes> = {
126
+ endpoint: {
127
+ options: {};
128
+ handlers: CartHandlers<T>;
129
+ };
130
+ };
131
+ export type CartHandlers<T extends CartTypes = CartTypes> = {
132
+ getCart: GetCartHandler<T>;
133
+ addItem: AddItemHandler<T>;
134
+ updateItem: UpdateItemHandler<T>;
135
+ removeItem: RemoveItemHandler<T>;
136
+ };
137
+ export type GetCartHandler<T extends CartTypes = CartTypes> = GetCartHook<T> & {
138
+ body: {
139
+ cartId?: string;
140
+ };
141
+ };
142
+ export type AddItemHandler<T extends CartTypes = CartTypes> = AddItemHook<T> & {
143
+ body: {
144
+ cartId: string;
145
+ };
146
+ };
147
+ export type UpdateItemHandler<T extends CartTypes = CartTypes> = UpdateItemHook<T> & {
148
+ data: T["cart"];
149
+ body: {
150
+ cartId: string;
151
+ };
152
+ };
153
+ export type RemoveItemHandler<T extends CartTypes = CartTypes> = RemoveItemHook<T> & {
154
+ body: {
155
+ cartId: string;
156
+ };
157
+ };
@@ -1,57 +1,57 @@
1
- import type { UseSubmitCheckout } from '../checkout/use-submit-checkout';
2
- import type { Address, AddressFields } from './customer/address';
3
- import type { Card, CardFields } from './customer/card';
4
- export declare type Checkout = any;
5
- export declare type CheckoutTypes = {
6
- card?: Card | CardFields;
7
- address?: Address | AddressFields;
8
- checkout?: Checkout;
9
- hasPayment?: boolean;
10
- hasShipping?: boolean;
11
- };
12
- export declare type SubmitCheckoutHook<T extends CheckoutTypes = CheckoutTypes> = {
13
- data: T;
14
- input?: T;
15
- fetcherInput: T;
16
- body: {
17
- item: T;
18
- };
19
- actionInput: T;
20
- };
21
- export declare type GetCheckoutHook<T extends CheckoutTypes = CheckoutTypes> = {
22
- data: T['checkout'] | null;
23
- input: {};
24
- fetcherInput: {
25
- cartId?: string;
26
- };
27
- swrState: {
28
- isEmpty: boolean;
29
- };
30
- mutations: {
31
- submit: UseSubmitCheckout;
32
- };
33
- };
34
- export declare type CheckoutHooks<T extends CheckoutTypes = CheckoutTypes> = {
35
- submitCheckout?: SubmitCheckoutHook<T>;
36
- getCheckout: GetCheckoutHook<T>;
37
- };
38
- export declare type GetCheckoutHandler<T extends CheckoutTypes = CheckoutTypes> = GetCheckoutHook<T> & {
39
- body: {
40
- cartId: string;
41
- };
42
- };
43
- export declare type SubmitCheckoutHandler<T extends CheckoutTypes = CheckoutTypes> = SubmitCheckoutHook<T> & {
44
- body: {
45
- cartId: string;
46
- };
47
- };
48
- export declare type CheckoutHandlers<T extends CheckoutTypes = CheckoutTypes> = {
49
- getCheckout: GetCheckoutHandler<T>;
50
- submitCheckout?: SubmitCheckoutHandler<T>;
51
- };
52
- export declare type CheckoutSchema<T extends CheckoutTypes = CheckoutTypes> = {
53
- endpoint: {
54
- options: {};
55
- handlers: CheckoutHandlers<T>;
56
- };
57
- };
1
+ import type { UseSubmitCheckout } from '../checkout/use-submit-checkout';
2
+ import type { Address, AddressFields } from './customer/address';
3
+ import type { Card, CardFields } from './customer/card';
4
+ export type Checkout = any;
5
+ export type CheckoutTypes = {
6
+ card?: Card | CardFields;
7
+ address?: Address | AddressFields;
8
+ checkout?: Checkout;
9
+ hasPayment?: boolean;
10
+ hasShipping?: boolean;
11
+ };
12
+ export type SubmitCheckoutHook<T extends CheckoutTypes = CheckoutTypes> = {
13
+ data: T;
14
+ input?: T;
15
+ fetcherInput: T;
16
+ body: {
17
+ item: T;
18
+ };
19
+ actionInput: T;
20
+ };
21
+ export type GetCheckoutHook<T extends CheckoutTypes = CheckoutTypes> = {
22
+ data: T['checkout'] | null;
23
+ input: {};
24
+ fetcherInput: {
25
+ cartId?: string;
26
+ };
27
+ swrState: {
28
+ isEmpty: boolean;
29
+ };
30
+ mutations: {
31
+ submit: UseSubmitCheckout;
32
+ };
33
+ };
34
+ export type CheckoutHooks<T extends CheckoutTypes = CheckoutTypes> = {
35
+ submitCheckout?: SubmitCheckoutHook<T>;
36
+ getCheckout: GetCheckoutHook<T>;
37
+ };
38
+ export type GetCheckoutHandler<T extends CheckoutTypes = CheckoutTypes> = GetCheckoutHook<T> & {
39
+ body: {
40
+ cartId: string;
41
+ };
42
+ };
43
+ export type SubmitCheckoutHandler<T extends CheckoutTypes = CheckoutTypes> = SubmitCheckoutHook<T> & {
44
+ body: {
45
+ cartId: string;
46
+ };
47
+ };
48
+ export type CheckoutHandlers<T extends CheckoutTypes = CheckoutTypes> = {
49
+ getCheckout: GetCheckoutHandler<T>;
50
+ submitCheckout?: SubmitCheckoutHandler<T>;
51
+ };
52
+ export type CheckoutSchema<T extends CheckoutTypes = CheckoutTypes> = {
53
+ endpoint: {
54
+ options: {};
55
+ handlers: CheckoutHandlers<T>;
56
+ };
57
+ };
@@ -1,13 +1,13 @@
1
- export declare type Discount = {
2
- value: number;
3
- };
4
- export declare type Measurement = {
5
- value: number;
6
- unit: 'KILOGRAMS' | 'GRAMS' | 'POUNDS' | 'OUNCES';
7
- };
8
- export declare type Image = {
9
- url: string;
10
- altText?: string;
11
- width?: number;
12
- height?: number;
13
- };
1
+ export type Discount = {
2
+ value: number;
3
+ };
4
+ export type Measurement = {
5
+ value: number;
6
+ unit: 'KILOGRAMS' | 'GRAMS' | 'POUNDS' | 'OUNCES';
7
+ };
8
+ export type Image = {
9
+ url: string;
10
+ altText?: string;
11
+ width?: number;
12
+ height?: number;
13
+ };