@gem-sdk/adapter-common 1.0.0 → 1.11.1-staging-ecd90c73

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.
@@ -1,17 +1,17 @@
1
- export type LogoutTypes = {
2
- body: {
3
- redirectTo?: string;
4
- };
5
- };
6
- export type LogoutHook<T extends LogoutTypes = LogoutTypes> = {
7
- data: null;
8
- body: T['body'];
9
- };
10
- export type LogoutSchema<T extends LogoutTypes = LogoutTypes> = {
11
- endpoint: {
12
- options: {};
13
- handlers: {
14
- logout: LogoutHook<T>;
15
- };
16
- };
17
- };
1
+ export type LogoutTypes = {
2
+ body: {
3
+ redirectTo?: string;
4
+ };
5
+ };
6
+ export type LogoutHook<T extends LogoutTypes = LogoutTypes> = {
7
+ data: null;
8
+ body: T['body'];
9
+ };
10
+ export type LogoutSchema<T extends LogoutTypes = LogoutTypes> = {
11
+ endpoint: {
12
+ options: {};
13
+ handlers: {
14
+ logout: LogoutHook<T>;
15
+ };
16
+ };
17
+ };
@@ -1,24 +1,24 @@
1
- export type Page = {
2
- id: string;
3
- name: string;
4
- url?: string;
5
- body: string;
6
- is_visible?: boolean;
7
- sort_order?: number;
8
- };
9
- export type PageTypes = {
10
- page: Page;
11
- };
12
- export type GetAllPagesOperation<T extends PageTypes = PageTypes> = {
13
- data: {
14
- pages: T['page'][];
15
- };
16
- };
17
- export type GetPageOperation<T extends PageTypes = PageTypes> = {
18
- data: {
19
- page?: T['page'];
20
- };
21
- variables: {
22
- id: string;
23
- };
24
- };
1
+ export type Page = {
2
+ id: string;
3
+ name: string;
4
+ url?: string;
5
+ body: string;
6
+ is_visible?: boolean;
7
+ sort_order?: number;
8
+ };
9
+ export type PageTypes = {
10
+ page: Page;
11
+ };
12
+ export type GetAllPagesOperation<T extends PageTypes = PageTypes> = {
13
+ data: {
14
+ pages: T['page'][];
15
+ };
16
+ };
17
+ export type GetPageOperation<T extends PageTypes = PageTypes> = {
18
+ data: {
19
+ page?: T['page'];
20
+ };
21
+ variables: {
22
+ id: string;
23
+ };
24
+ };
@@ -1,100 +1,100 @@
1
- export type ProductImage = {
2
- url: string;
3
- alt?: string;
4
- };
5
- export type ProductPrice = {
6
- value: number;
7
- currencyCode?: 'USD' | 'EUR' | 'ARS' | 'GBP' | string;
8
- retailPrice?: number;
9
- salePrice?: number;
10
- listPrice?: number;
11
- extendedSalePrice?: number;
12
- extendedListPrice?: number;
13
- };
14
- export type ProductOption = {
15
- __typename?: 'MultipleChoiceOption';
16
- id: string;
17
- displayName: string;
18
- values: ProductOptionValues[];
19
- };
20
- export type ProductOptionValues = {
21
- label: string;
22
- hexColors?: string[];
23
- };
24
- export type ProductVariant = {
25
- id: string | number;
26
- options: ProductOption[];
27
- availableForSale?: boolean;
28
- };
29
- export type Product = {
30
- id: string;
31
- name: string;
32
- description: string;
33
- descriptionHtml?: string;
34
- sku?: string;
35
- slug?: string;
36
- path?: string;
37
- images: ProductImage[];
38
- variants: ProductVariant[];
39
- price: ProductPrice;
40
- options: ProductOption[];
41
- vendor?: string;
42
- };
43
- export type SearchProductsBody = {
44
- search?: string;
45
- categoryId?: string | number;
46
- brandId?: string | number;
47
- sort?: string;
48
- locale?: string;
49
- };
50
- export type ProductTypes = {
51
- product: Product;
52
- searchBody: SearchProductsBody;
53
- };
54
- export type SearchProductsHook<T extends ProductTypes = ProductTypes> = {
55
- data: {
56
- products: T['product'][];
57
- found: boolean;
58
- };
59
- body: T['searchBody'];
60
- input: T['searchBody'];
61
- fetcherInput: T['searchBody'];
62
- };
63
- export type ProductsSchema<T extends ProductTypes = ProductTypes> = {
64
- endpoint: {
65
- options: {};
66
- handlers: {
67
- getProducts: SearchProductsHook<T>;
68
- };
69
- };
70
- };
71
- export type GetAllProductPathsOperation<T extends ProductTypes = ProductTypes> = {
72
- data: {
73
- products: Pick<T['product'], 'path'>[];
74
- };
75
- variables: {
76
- first?: number;
77
- };
78
- };
79
- export type GetAllProductsOperation<T extends ProductTypes = ProductTypes> = {
80
- data: {
81
- products: T['product'][];
82
- };
83
- variables: {
84
- relevance?: 'featured' | 'best_selling' | 'newest';
85
- ids?: string[];
86
- first?: number;
87
- };
88
- };
89
- export type GetProductOperation<T extends ProductTypes = ProductTypes> = {
90
- data: {
91
- product?: T['product'];
92
- };
93
- variables: {
94
- path: string;
95
- slug?: never;
96
- } | {
97
- path?: never;
98
- slug: string;
99
- };
100
- };
1
+ export type ProductImage = {
2
+ url: string;
3
+ alt?: string;
4
+ };
5
+ export type ProductPrice = {
6
+ value: number;
7
+ currencyCode?: 'USD' | 'EUR' | 'ARS' | 'GBP' | string;
8
+ retailPrice?: number;
9
+ salePrice?: number;
10
+ listPrice?: number;
11
+ extendedSalePrice?: number;
12
+ extendedListPrice?: number;
13
+ };
14
+ export type ProductOption = {
15
+ __typename?: 'MultipleChoiceOption';
16
+ id: string;
17
+ displayName: string;
18
+ values: ProductOptionValues[];
19
+ };
20
+ export type ProductOptionValues = {
21
+ label: string;
22
+ hexColors?: string[];
23
+ };
24
+ export type ProductVariant = {
25
+ id: string | number;
26
+ options: ProductOption[];
27
+ availableForSale?: boolean;
28
+ };
29
+ export type Product = {
30
+ id: string;
31
+ name: string;
32
+ description: string;
33
+ descriptionHtml?: string;
34
+ sku?: string;
35
+ slug?: string;
36
+ path?: string;
37
+ images: ProductImage[];
38
+ variants: ProductVariant[];
39
+ price: ProductPrice;
40
+ options: ProductOption[];
41
+ vendor?: string;
42
+ };
43
+ export type SearchProductsBody = {
44
+ search?: string;
45
+ categoryId?: string | number;
46
+ brandId?: string | number;
47
+ sort?: string;
48
+ locale?: string;
49
+ };
50
+ export type ProductTypes = {
51
+ product: Product;
52
+ searchBody: SearchProductsBody;
53
+ };
54
+ export type SearchProductsHook<T extends ProductTypes = ProductTypes> = {
55
+ data: {
56
+ products: T['product'][];
57
+ found: boolean;
58
+ };
59
+ body: T['searchBody'];
60
+ input: T['searchBody'];
61
+ fetcherInput: T['searchBody'];
62
+ };
63
+ export type ProductsSchema<T extends ProductTypes = ProductTypes> = {
64
+ endpoint: {
65
+ options: {};
66
+ handlers: {
67
+ getProducts: SearchProductsHook<T>;
68
+ };
69
+ };
70
+ };
71
+ export type GetAllProductPathsOperation<T extends ProductTypes = ProductTypes> = {
72
+ data: {
73
+ products: Pick<T['product'], 'path'>[];
74
+ };
75
+ variables: {
76
+ first?: number;
77
+ };
78
+ };
79
+ export type GetAllProductsOperation<T extends ProductTypes = ProductTypes> = {
80
+ data: {
81
+ products: T['product'][];
82
+ };
83
+ variables: {
84
+ relevance?: 'featured' | 'best_selling' | 'newest';
85
+ ids?: string[];
86
+ first?: number;
87
+ };
88
+ };
89
+ export type GetProductOperation<T extends ProductTypes = ProductTypes> = {
90
+ data: {
91
+ product?: T['product'];
92
+ };
93
+ variables: {
94
+ path: string;
95
+ slug?: never;
96
+ } | {
97
+ path?: never;
98
+ slug: string;
99
+ };
100
+ };
@@ -1,23 +1,23 @@
1
- export type SignupBody = {
2
- firstName: string;
3
- lastName: string;
4
- email: string;
5
- password: string;
6
- };
7
- export type SignupTypes = {
8
- body: SignupBody;
9
- };
10
- export type SignupHook<T extends SignupTypes = SignupTypes> = {
11
- data: null;
12
- body: T['body'];
13
- actionInput: T['body'];
14
- fetcherInput: T['body'];
15
- };
16
- export type SignupSchema<T extends SignupTypes = SignupTypes> = {
17
- endpoint: {
18
- options: {};
19
- handlers: {
20
- signup: SignupHook<T>;
21
- };
22
- };
23
- };
1
+ export type SignupBody = {
2
+ firstName: string;
3
+ lastName: string;
4
+ email: string;
5
+ password: string;
6
+ };
7
+ export type SignupTypes = {
8
+ body: SignupBody;
9
+ };
10
+ export type SignupHook<T extends SignupTypes = SignupTypes> = {
11
+ data: null;
12
+ body: T['body'];
13
+ actionInput: T['body'];
14
+ fetcherInput: T['body'];
15
+ };
16
+ export type SignupSchema<T extends SignupTypes = SignupTypes> = {
17
+ endpoint: {
18
+ options: {};
19
+ handlers: {
20
+ signup: SignupHook<T>;
21
+ };
22
+ };
23
+ };
@@ -1,21 +1,21 @@
1
- export type Category = {
2
- id: string;
3
- name: string;
4
- slug: string;
5
- path: string;
6
- };
7
- export type Brand = any;
8
- export type SiteTypes = {
9
- category: Category;
10
- brand: Brand;
11
- };
12
- export type GetSiteInfoOperation<T extends SiteTypes = SiteTypes> = {
13
- data: {
14
- categories: T['category'][];
15
- brands: T['brand'][];
16
- };
17
- };
18
- export type ProviderConfig = {
19
- storefrontUrl?: string;
20
- storefrontToken?: string;
21
- };
1
+ export type Category = {
2
+ id: string;
3
+ name: string;
4
+ slug: string;
5
+ path: string;
6
+ };
7
+ export type Brand = any;
8
+ export type SiteTypes = {
9
+ category: Category;
10
+ brand: Brand;
11
+ };
12
+ export type GetSiteInfoOperation<T extends SiteTypes = SiteTypes> = {
13
+ data: {
14
+ categories: T['category'][];
15
+ brands: T['brand'][];
16
+ };
17
+ };
18
+ export type ProviderConfig = {
19
+ storefrontUrl?: string;
20
+ storefrontToken?: string;
21
+ };
@@ -1,83 +1,83 @@
1
- export type Wishlist = any;
2
- export type WishlistItemBody = {
3
- variantId: string | number;
4
- productId: string;
5
- };
6
- export type WishlistTypes = {
7
- wishlist: Wishlist;
8
- itemBody: WishlistItemBody;
9
- };
10
- export type GetWishlistHook<T extends WishlistTypes = WishlistTypes> = {
11
- data: T['wishlist'] | null;
12
- body: {
13
- includeProducts?: boolean;
14
- };
15
- input: {
16
- includeProducts?: boolean;
17
- };
18
- fetcherInput: {
19
- customerId: string;
20
- includeProducts?: boolean;
21
- };
22
- swrState: {
23
- isEmpty: boolean;
24
- };
25
- };
26
- export type AddItemHook<T extends WishlistTypes = WishlistTypes> = {
27
- data: T['wishlist'];
28
- body: {
29
- item: T['itemBody'];
30
- };
31
- fetcherInput: {
32
- item: T['itemBody'];
33
- };
34
- actionInput: T['itemBody'];
35
- };
36
- export type RemoveItemHook<T extends WishlistTypes = WishlistTypes> = {
37
- data: T['wishlist'] | null;
38
- body: {
39
- itemId: string;
40
- };
41
- fetcherInput: {
42
- itemId: string;
43
- };
44
- actionInput: {
45
- id: string;
46
- };
47
- input: {
48
- wishlist?: {
49
- includeProducts?: boolean;
50
- };
51
- };
52
- };
53
- export type WishlistSchema<T extends WishlistTypes = WishlistTypes> = {
54
- endpoint: {
55
- options: {};
56
- handlers: {
57
- getWishlist: GetWishlistHook<T> & {
58
- data: T['wishlist'] | null;
59
- body: {
60
- customerToken?: string;
61
- };
62
- };
63
- addItem: AddItemHook<T> & {
64
- body: {
65
- customerToken?: string;
66
- };
67
- };
68
- removeItem: RemoveItemHook<T> & {
69
- body: {
70
- customerToken?: string;
71
- };
72
- };
73
- };
74
- };
75
- };
76
- export type GetCustomerWishlistOperation<T extends WishlistTypes = WishlistTypes> = {
77
- data: {
78
- wishlist?: T['wishlist'];
79
- };
80
- variables: {
81
- customerId: string;
82
- };
83
- };
1
+ export type Wishlist = any;
2
+ export type WishlistItemBody = {
3
+ variantId: string | number;
4
+ productId: string;
5
+ };
6
+ export type WishlistTypes = {
7
+ wishlist: Wishlist;
8
+ itemBody: WishlistItemBody;
9
+ };
10
+ export type GetWishlistHook<T extends WishlistTypes = WishlistTypes> = {
11
+ data: T['wishlist'] | null;
12
+ body: {
13
+ includeProducts?: boolean;
14
+ };
15
+ input: {
16
+ includeProducts?: boolean;
17
+ };
18
+ fetcherInput: {
19
+ customerId: string;
20
+ includeProducts?: boolean;
21
+ };
22
+ swrState: {
23
+ isEmpty: boolean;
24
+ };
25
+ };
26
+ export type AddItemHook<T extends WishlistTypes = WishlistTypes> = {
27
+ data: T['wishlist'];
28
+ body: {
29
+ item: T['itemBody'];
30
+ };
31
+ fetcherInput: {
32
+ item: T['itemBody'];
33
+ };
34
+ actionInput: T['itemBody'];
35
+ };
36
+ export type RemoveItemHook<T extends WishlistTypes = WishlistTypes> = {
37
+ data: T['wishlist'] | null;
38
+ body: {
39
+ itemId: string;
40
+ };
41
+ fetcherInput: {
42
+ itemId: string;
43
+ };
44
+ actionInput: {
45
+ id: string;
46
+ };
47
+ input: {
48
+ wishlist?: {
49
+ includeProducts?: boolean;
50
+ };
51
+ };
52
+ };
53
+ export type WishlistSchema<T extends WishlistTypes = WishlistTypes> = {
54
+ endpoint: {
55
+ options: {};
56
+ handlers: {
57
+ getWishlist: GetWishlistHook<T> & {
58
+ data: T['wishlist'] | null;
59
+ body: {
60
+ customerToken?: string;
61
+ };
62
+ };
63
+ addItem: AddItemHook<T> & {
64
+ body: {
65
+ customerToken?: string;
66
+ };
67
+ };
68
+ removeItem: RemoveItemHook<T> & {
69
+ body: {
70
+ customerToken?: string;
71
+ };
72
+ };
73
+ };
74
+ };
75
+ };
76
+ export type GetCustomerWishlistOperation<T extends WishlistTypes = WishlistTypes> = {
77
+ data: {
78
+ wishlist?: T['wishlist'];
79
+ };
80
+ variables: {
81
+ customerId: string;
82
+ };
83
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/adapter-common",
3
- "version": "1.0.0",
3
+ "version": "1.11.1-staging-ecd90c73",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"