@plasmicpkgs/commerce 0.0.1 → 0.0.5
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.
- package/README.md +1 -0
- package/dist/api/endpoints/cart.d.ts +4 -0
- package/dist/api/endpoints/catalog/products.d.ts +4 -0
- package/dist/api/index.d.ts +75 -0
- package/dist/api/operations.d.ts +130 -0
- package/dist/api/utils/errors.d.ts +10 -0
- package/dist/api/utils/is-allowed-method.d.ts +3 -0
- package/dist/api/utils/is-allowed-operation.d.ts +6 -0
- package/dist/api/utils/types.d.ts +34 -0
- package/dist/cart/use-add-item.d.ts +5 -6
- package/dist/cart/use-cart.d.ts +5 -6
- package/dist/cart/use-remove-item.d.ts +5 -6
- package/dist/cart/use-update-item.d.ts +5 -6
- package/dist/commerce.cjs.development.js +1933 -0
- package/dist/commerce.cjs.development.js.map +1 -0
- package/dist/commerce.cjs.production.min.js +2 -0
- package/dist/commerce.cjs.production.min.js.map +1 -0
- package/dist/commerce.d.ts +41 -0
- package/dist/commerce.esm.js +1908 -0
- package/dist/commerce.esm.js.map +1 -0
- package/dist/contexts.d.ts +10 -7
- package/dist/index.d.ts +25 -71
- package/dist/index.js +7 -28
- package/dist/product/use-price.d.ts +26 -26
- package/dist/product/use-search.d.ts +6 -6
- package/dist/registerAddToCartButton.d.ts +9 -0
- package/dist/registerProductCollection.d.ts +18 -11
- package/dist/registerProductMedia.d.ts +10 -0
- package/dist/registerProductPrice.d.ts +9 -0
- package/dist/registerProductQuantity.d.ts +11 -0
- package/dist/registerProductTextField.d.ts +10 -0
- package/dist/registerProductVariantPicker.d.ts +9 -0
- package/dist/registerUseCart.d.ts +9 -0
- package/dist/registerable.d.ts +4 -4
- package/dist/site/use-brands.d.ts +5 -0
- package/dist/site/use-categories.d.ts +5 -0
- package/dist/types/cart.d.ts +157 -157
- package/dist/types/checkout.d.ts +57 -57
- package/dist/types/common.d.ts +13 -13
- package/dist/types/customer/address.d.ts +110 -110
- package/dist/types/customer/card.d.ts +113 -113
- package/dist/types/customer/index.d.ts +24 -24
- package/dist/types/index.d.ts +12 -12
- package/dist/types/login.d.ts +27 -27
- package/dist/types/logout.d.ts +17 -17
- package/dist/types/page.d.ts +24 -24
- package/dist/types/product.d.ts +102 -99
- package/dist/types/signup.d.ts +23 -23
- package/dist/types/site.d.ts +41 -17
- package/dist/types/wishlist.d.ts +83 -83
- package/dist/utils/default-fetcher.d.ts +4 -4
- package/dist/utils/define-property.d.ts +21 -21
- package/dist/utils/errors.d.ts +27 -27
- package/dist/utils/get-product-price.d.ts +2 -0
- package/dist/utils/types.d.ts +95 -94
- package/dist/utils/use-data.d.ts +12 -12
- package/dist/utils/use-hook.d.ts +6 -6
- package/package.json +13 -13
- package/dist/auth/use-login.d.ts +0 -6
- package/dist/auth/use-login.js +0 -9
- package/dist/auth/use-logout.d.ts +0 -6
- package/dist/auth/use-logout.js +0 -9
- package/dist/auth/use-signup.d.ts +0 -6
- package/dist/auth/use-signup.js +0 -9
- package/dist/cart/use-add-item.js +0 -9
- package/dist/cart/use-cart.js +0 -18
- package/dist/cart/use-remove-item.js +0 -9
- package/dist/cart/use-update-item.js +0 -9
- package/dist/checkout/use-checkout.d.ts +0 -6
- package/dist/checkout/use-checkout.js +0 -18
- package/dist/checkout/use-submit-checkout.d.ts +0 -6
- package/dist/checkout/use-submit-checkout.js +0 -9
- package/dist/contexts.js +0 -46
- package/dist/customer/address/use-add-item.d.ts +0 -6
- package/dist/customer/address/use-add-item.js +0 -9
- package/dist/customer/address/use-addresses.d.ts +0 -6
- package/dist/customer/address/use-addresses.js +0 -18
- package/dist/customer/address/use-remove-item.d.ts +0 -6
- package/dist/customer/address/use-remove-item.js +0 -9
- package/dist/customer/address/use-update-item.d.ts +0 -6
- package/dist/customer/address/use-update-item.js +0 -9
- package/dist/customer/card/use-add-item.d.ts +0 -6
- package/dist/customer/card/use-add-item.js +0 -9
- package/dist/customer/card/use-cards.d.ts +0 -6
- package/dist/customer/card/use-cards.js +0 -18
- package/dist/customer/card/use-remove-item.d.ts +0 -6
- package/dist/customer/card/use-remove-item.js +0 -9
- package/dist/customer/card/use-update-item.d.ts +0 -6
- package/dist/customer/card/use-update-item.js +0 -9
- package/dist/customer/use-customer.d.ts +0 -6
- package/dist/customer/use-customer.js +0 -9
- package/dist/product/use-price.js +0 -33
- package/dist/product/use-search.js +0 -9
- package/dist/registerProductCollection.js +0 -42
- package/dist/registerProductImage.d.ts +0 -13
- package/dist/registerProductImage.js +0 -37
- package/dist/registerable.js +0 -0
- package/dist/tsconfig.tsbuildinfo +0 -2970
- package/dist/types/cart.js +0 -0
- package/dist/types/checkout.js +0 -0
- package/dist/types/common.js +0 -0
- package/dist/types/customer/address.js +0 -0
- package/dist/types/customer/card.js +0 -0
- package/dist/types/customer/index.js +0 -2
- package/dist/types/index.js +0 -11
- package/dist/types/login.js +0 -0
- package/dist/types/logout.js +0 -0
- package/dist/types/page.js +0 -0
- package/dist/types/product.js +0 -0
- package/dist/types/signup.js +0 -0
- package/dist/types/site.js +0 -0
- package/dist/types/wishlist.js +0 -0
- package/dist/utils/default-fetcher.js +0 -3
- package/dist/utils/define-property.js +0 -4
- package/dist/utils/errors.js +0 -24
- package/dist/utils/types.js +0 -0
- package/dist/utils/use-data.js +0 -43
- package/dist/utils/use-hook.js +0 -37
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
export interface Address {
|
|
2
|
-
id: string;
|
|
3
|
-
mask: string;
|
|
4
|
-
}
|
|
5
|
-
export interface AddressFields {
|
|
6
|
-
type: string;
|
|
7
|
-
firstName: string;
|
|
8
|
-
lastName: string;
|
|
9
|
-
company: string;
|
|
10
|
-
streetNumber: string;
|
|
11
|
-
apartments: string;
|
|
12
|
-
zipCode: string;
|
|
13
|
-
city: string;
|
|
14
|
-
country: string;
|
|
15
|
-
}
|
|
16
|
-
export declare type CustomerAddressTypes = {
|
|
17
|
-
address?: Address;
|
|
18
|
-
fields: AddressFields;
|
|
19
|
-
};
|
|
20
|
-
export declare type GetAddressesHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
21
|
-
data: T['address'][] | null;
|
|
22
|
-
input: {};
|
|
23
|
-
fetcherInput: {
|
|
24
|
-
cartId?: string;
|
|
25
|
-
};
|
|
26
|
-
swrState: {
|
|
27
|
-
isEmpty: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export declare type AddItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
31
|
-
data: T['address'];
|
|
32
|
-
input?: T['fields'];
|
|
33
|
-
fetcherInput: T['fields'];
|
|
34
|
-
body: {
|
|
35
|
-
item: T['fields'];
|
|
36
|
-
};
|
|
37
|
-
actionInput: T['fields'];
|
|
38
|
-
};
|
|
39
|
-
export declare type UpdateItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
40
|
-
data: T['address'] | null;
|
|
41
|
-
input: {
|
|
42
|
-
item?: T['fields'];
|
|
43
|
-
wait?: number;
|
|
44
|
-
};
|
|
45
|
-
fetcherInput: {
|
|
46
|
-
itemId: string;
|
|
47
|
-
item: T['fields'];
|
|
48
|
-
};
|
|
49
|
-
body: {
|
|
50
|
-
itemId: string;
|
|
51
|
-
item: T['fields'];
|
|
52
|
-
};
|
|
53
|
-
actionInput: T['fields'] & {
|
|
54
|
-
id: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export declare type RemoveItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
58
|
-
data: T['address'] | null;
|
|
59
|
-
input: {
|
|
60
|
-
item?: T['address'];
|
|
61
|
-
};
|
|
62
|
-
fetcherInput: {
|
|
63
|
-
itemId: string;
|
|
64
|
-
};
|
|
65
|
-
body: {
|
|
66
|
-
itemId: string;
|
|
67
|
-
};
|
|
68
|
-
actionInput: {
|
|
69
|
-
id: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
export declare type CustomerAddressHooks<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
73
|
-
getAddresses: GetAddressesHook<T>;
|
|
74
|
-
addItem: AddItemHook<T>;
|
|
75
|
-
updateItem: UpdateItemHook<T>;
|
|
76
|
-
removeItem: RemoveItemHook<T>;
|
|
77
|
-
};
|
|
78
|
-
export declare type AddressHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = GetAddressesHook<T> & {
|
|
79
|
-
body: {
|
|
80
|
-
cartId?: string;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
export declare type AddItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = AddItemHook<T> & {
|
|
84
|
-
body: {
|
|
85
|
-
cartId: string;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
export declare type UpdateItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = UpdateItemHook<T> & {
|
|
89
|
-
data: T['address'];
|
|
90
|
-
body: {
|
|
91
|
-
cartId: string;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
export declare type RemoveItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = RemoveItemHook<T> & {
|
|
95
|
-
body: {
|
|
96
|
-
cartId: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
export declare type CustomerAddressHandlers<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
100
|
-
getAddresses: GetAddressesHook<T>;
|
|
101
|
-
addItem: AddItemHandler<T>;
|
|
102
|
-
updateItem: UpdateItemHandler<T>;
|
|
103
|
-
removeItem: RemoveItemHandler<T>;
|
|
104
|
-
};
|
|
105
|
-
export declare type CustomerAddressSchema<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
106
|
-
endpoint: {
|
|
107
|
-
options: {};
|
|
108
|
-
handlers: CustomerAddressHandlers<T>;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
1
|
+
export interface Address {
|
|
2
|
+
id: string;
|
|
3
|
+
mask: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AddressFields {
|
|
6
|
+
type: string;
|
|
7
|
+
firstName: string;
|
|
8
|
+
lastName: string;
|
|
9
|
+
company: string;
|
|
10
|
+
streetNumber: string;
|
|
11
|
+
apartments: string;
|
|
12
|
+
zipCode: string;
|
|
13
|
+
city: string;
|
|
14
|
+
country: string;
|
|
15
|
+
}
|
|
16
|
+
export declare type CustomerAddressTypes = {
|
|
17
|
+
address?: Address;
|
|
18
|
+
fields: AddressFields;
|
|
19
|
+
};
|
|
20
|
+
export declare type GetAddressesHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
21
|
+
data: T['address'][] | null;
|
|
22
|
+
input: {};
|
|
23
|
+
fetcherInput: {
|
|
24
|
+
cartId?: string;
|
|
25
|
+
};
|
|
26
|
+
swrState: {
|
|
27
|
+
isEmpty: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare type AddItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
31
|
+
data: T['address'];
|
|
32
|
+
input?: T['fields'];
|
|
33
|
+
fetcherInput: T['fields'];
|
|
34
|
+
body: {
|
|
35
|
+
item: T['fields'];
|
|
36
|
+
};
|
|
37
|
+
actionInput: T['fields'];
|
|
38
|
+
};
|
|
39
|
+
export declare type UpdateItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
40
|
+
data: T['address'] | null;
|
|
41
|
+
input: {
|
|
42
|
+
item?: T['fields'];
|
|
43
|
+
wait?: number;
|
|
44
|
+
};
|
|
45
|
+
fetcherInput: {
|
|
46
|
+
itemId: string;
|
|
47
|
+
item: T['fields'];
|
|
48
|
+
};
|
|
49
|
+
body: {
|
|
50
|
+
itemId: string;
|
|
51
|
+
item: T['fields'];
|
|
52
|
+
};
|
|
53
|
+
actionInput: T['fields'] & {
|
|
54
|
+
id: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export declare type RemoveItemHook<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
58
|
+
data: T['address'] | null;
|
|
59
|
+
input: {
|
|
60
|
+
item?: T['address'];
|
|
61
|
+
};
|
|
62
|
+
fetcherInput: {
|
|
63
|
+
itemId: string;
|
|
64
|
+
};
|
|
65
|
+
body: {
|
|
66
|
+
itemId: string;
|
|
67
|
+
};
|
|
68
|
+
actionInput: {
|
|
69
|
+
id: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export declare type CustomerAddressHooks<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
73
|
+
getAddresses: GetAddressesHook<T>;
|
|
74
|
+
addItem: AddItemHook<T>;
|
|
75
|
+
updateItem: UpdateItemHook<T>;
|
|
76
|
+
removeItem: RemoveItemHook<T>;
|
|
77
|
+
};
|
|
78
|
+
export declare type AddressHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = GetAddressesHook<T> & {
|
|
79
|
+
body: {
|
|
80
|
+
cartId?: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export declare type AddItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = AddItemHook<T> & {
|
|
84
|
+
body: {
|
|
85
|
+
cartId: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export declare type UpdateItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = UpdateItemHook<T> & {
|
|
89
|
+
data: T['address'];
|
|
90
|
+
body: {
|
|
91
|
+
cartId: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare type RemoveItemHandler<T extends CustomerAddressTypes = CustomerAddressTypes> = RemoveItemHook<T> & {
|
|
95
|
+
body: {
|
|
96
|
+
cartId: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export declare type CustomerAddressHandlers<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
100
|
+
getAddresses: GetAddressesHook<T>;
|
|
101
|
+
addItem: AddItemHandler<T>;
|
|
102
|
+
updateItem: UpdateItemHandler<T>;
|
|
103
|
+
removeItem: RemoveItemHandler<T>;
|
|
104
|
+
};
|
|
105
|
+
export declare type CustomerAddressSchema<T extends CustomerAddressTypes = CustomerAddressTypes> = {
|
|
106
|
+
endpoint: {
|
|
107
|
+
options: {};
|
|
108
|
+
handlers: CustomerAddressHandlers<T>;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
export interface Card {
|
|
2
|
-
id: string;
|
|
3
|
-
mask: string;
|
|
4
|
-
provider: string;
|
|
5
|
-
}
|
|
6
|
-
export interface CardFields {
|
|
7
|
-
cardHolder: string;
|
|
8
|
-
cardNumber: string;
|
|
9
|
-
cardExpireDate: string;
|
|
10
|
-
cardCvc: string;
|
|
11
|
-
firstName: string;
|
|
12
|
-
lastName: string;
|
|
13
|
-
company: string;
|
|
14
|
-
streetNumber: string;
|
|
15
|
-
zipCode: string;
|
|
16
|
-
city: string;
|
|
17
|
-
country: string;
|
|
18
|
-
}
|
|
19
|
-
export declare type CustomerCardTypes = {
|
|
20
|
-
card?: Card;
|
|
21
|
-
fields: CardFields;
|
|
22
|
-
};
|
|
23
|
-
export declare type GetCardsHook<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
24
|
-
data: T['card'][] | null;
|
|
25
|
-
input: {};
|
|
26
|
-
fetcherInput: {
|
|
27
|
-
cartId?: string;
|
|
28
|
-
};
|
|
29
|
-
swrState: {
|
|
30
|
-
isEmpty: boolean;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export declare type AddItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
34
|
-
data: T['card'];
|
|
35
|
-
input?: T['fields'];
|
|
36
|
-
fetcherInput: T['fields'];
|
|
37
|
-
body: {
|
|
38
|
-
item: T['fields'];
|
|
39
|
-
};
|
|
40
|
-
actionInput: T['fields'];
|
|
41
|
-
};
|
|
42
|
-
export declare type UpdateItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
43
|
-
data: T['card'] | null;
|
|
44
|
-
input: {
|
|
45
|
-
item?: T['fields'];
|
|
46
|
-
wait?: number;
|
|
47
|
-
};
|
|
48
|
-
fetcherInput: {
|
|
49
|
-
itemId: string;
|
|
50
|
-
item: T['fields'];
|
|
51
|
-
};
|
|
52
|
-
body: {
|
|
53
|
-
itemId: string;
|
|
54
|
-
item: T['fields'];
|
|
55
|
-
};
|
|
56
|
-
actionInput: T['fields'] & {
|
|
57
|
-
id: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
export declare type RemoveItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
61
|
-
data: T['card'] | null;
|
|
62
|
-
input: {
|
|
63
|
-
item?: T['card'];
|
|
64
|
-
};
|
|
65
|
-
fetcherInput: {
|
|
66
|
-
itemId: string;
|
|
67
|
-
};
|
|
68
|
-
body: {
|
|
69
|
-
itemId: string;
|
|
70
|
-
};
|
|
71
|
-
actionInput: {
|
|
72
|
-
id: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
export declare type CustomerCardHooks<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
76
|
-
getCards: GetCardsHook<T>;
|
|
77
|
-
addItem: AddItemHook<T>;
|
|
78
|
-
updateItem: UpdateItemHook<T>;
|
|
79
|
-
removeItem: RemoveItemHook<T>;
|
|
80
|
-
};
|
|
81
|
-
export declare type CardsHandler<T extends CustomerCardTypes = CustomerCardTypes> = GetCardsHook<T> & {
|
|
82
|
-
body: {
|
|
83
|
-
cartId?: string;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
export declare type AddItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = AddItemHook<T> & {
|
|
87
|
-
body: {
|
|
88
|
-
cartId: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export declare type UpdateItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = UpdateItemHook<T> & {
|
|
92
|
-
data: T['card'];
|
|
93
|
-
body: {
|
|
94
|
-
cartId: string;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
export declare type RemoveItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = RemoveItemHook<T> & {
|
|
98
|
-
body: {
|
|
99
|
-
cartId: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
export declare type CustomerCardHandlers<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
103
|
-
getCards: GetCardsHook<T>;
|
|
104
|
-
addItem: AddItemHandler<T>;
|
|
105
|
-
updateItem: UpdateItemHandler<T>;
|
|
106
|
-
removeItem: RemoveItemHandler<T>;
|
|
107
|
-
};
|
|
108
|
-
export declare type CustomerCardSchema<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
109
|
-
endpoint: {
|
|
110
|
-
options: {};
|
|
111
|
-
handlers: CustomerCardHandlers<T>;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
1
|
+
export interface Card {
|
|
2
|
+
id: string;
|
|
3
|
+
mask: string;
|
|
4
|
+
provider: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CardFields {
|
|
7
|
+
cardHolder: string;
|
|
8
|
+
cardNumber: string;
|
|
9
|
+
cardExpireDate: string;
|
|
10
|
+
cardCvc: string;
|
|
11
|
+
firstName: string;
|
|
12
|
+
lastName: string;
|
|
13
|
+
company: string;
|
|
14
|
+
streetNumber: string;
|
|
15
|
+
zipCode: string;
|
|
16
|
+
city: string;
|
|
17
|
+
country: string;
|
|
18
|
+
}
|
|
19
|
+
export declare type CustomerCardTypes = {
|
|
20
|
+
card?: Card;
|
|
21
|
+
fields: CardFields;
|
|
22
|
+
};
|
|
23
|
+
export declare type GetCardsHook<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
24
|
+
data: T['card'][] | null;
|
|
25
|
+
input: {};
|
|
26
|
+
fetcherInput: {
|
|
27
|
+
cartId?: string;
|
|
28
|
+
};
|
|
29
|
+
swrState: {
|
|
30
|
+
isEmpty: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare type AddItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
34
|
+
data: T['card'];
|
|
35
|
+
input?: T['fields'];
|
|
36
|
+
fetcherInput: T['fields'];
|
|
37
|
+
body: {
|
|
38
|
+
item: T['fields'];
|
|
39
|
+
};
|
|
40
|
+
actionInput: T['fields'];
|
|
41
|
+
};
|
|
42
|
+
export declare type UpdateItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
43
|
+
data: T['card'] | null;
|
|
44
|
+
input: {
|
|
45
|
+
item?: T['fields'];
|
|
46
|
+
wait?: number;
|
|
47
|
+
};
|
|
48
|
+
fetcherInput: {
|
|
49
|
+
itemId: string;
|
|
50
|
+
item: T['fields'];
|
|
51
|
+
};
|
|
52
|
+
body: {
|
|
53
|
+
itemId: string;
|
|
54
|
+
item: T['fields'];
|
|
55
|
+
};
|
|
56
|
+
actionInput: T['fields'] & {
|
|
57
|
+
id: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export declare type RemoveItemHook<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
61
|
+
data: T['card'] | null;
|
|
62
|
+
input: {
|
|
63
|
+
item?: T['card'];
|
|
64
|
+
};
|
|
65
|
+
fetcherInput: {
|
|
66
|
+
itemId: string;
|
|
67
|
+
};
|
|
68
|
+
body: {
|
|
69
|
+
itemId: string;
|
|
70
|
+
};
|
|
71
|
+
actionInput: {
|
|
72
|
+
id: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export declare type CustomerCardHooks<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
76
|
+
getCards: GetCardsHook<T>;
|
|
77
|
+
addItem: AddItemHook<T>;
|
|
78
|
+
updateItem: UpdateItemHook<T>;
|
|
79
|
+
removeItem: RemoveItemHook<T>;
|
|
80
|
+
};
|
|
81
|
+
export declare type CardsHandler<T extends CustomerCardTypes = CustomerCardTypes> = GetCardsHook<T> & {
|
|
82
|
+
body: {
|
|
83
|
+
cartId?: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export declare type AddItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = AddItemHook<T> & {
|
|
87
|
+
body: {
|
|
88
|
+
cartId: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export declare type UpdateItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = UpdateItemHook<T> & {
|
|
92
|
+
data: T['card'];
|
|
93
|
+
body: {
|
|
94
|
+
cartId: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export declare type RemoveItemHandler<T extends CustomerCardTypes = CustomerCardTypes> = RemoveItemHook<T> & {
|
|
98
|
+
body: {
|
|
99
|
+
cartId: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export declare type CustomerCardHandlers<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
103
|
+
getCards: GetCardsHook<T>;
|
|
104
|
+
addItem: AddItemHandler<T>;
|
|
105
|
+
updateItem: UpdateItemHandler<T>;
|
|
106
|
+
removeItem: RemoveItemHandler<T>;
|
|
107
|
+
};
|
|
108
|
+
export declare type CustomerCardSchema<T extends CustomerCardTypes = CustomerCardTypes> = {
|
|
109
|
+
endpoint: {
|
|
110
|
+
options: {};
|
|
111
|
+
handlers: CustomerCardHandlers<T>;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export * as Card from './card';
|
|
2
|
-
export * as Address from './address';
|
|
3
|
-
export declare type Customer = any;
|
|
4
|
-
export declare type CustomerTypes = {
|
|
5
|
-
customer: Customer;
|
|
6
|
-
};
|
|
7
|
-
export declare type CustomerHook<T extends CustomerTypes = CustomerTypes> = {
|
|
8
|
-
data: T['customer'] | null;
|
|
9
|
-
fetchData: {
|
|
10
|
-
customer: T['customer'];
|
|
11
|
-
} | null;
|
|
12
|
-
};
|
|
13
|
-
export declare type CustomerSchema<T extends CustomerTypes = CustomerTypes> = {
|
|
14
|
-
endpoint: {
|
|
15
|
-
options: {};
|
|
16
|
-
handlers: {
|
|
17
|
-
getLoggedInCustomer: {
|
|
18
|
-
data: {
|
|
19
|
-
customer: T['customer'];
|
|
20
|
-
} | null;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
1
|
+
export * as Card from './card';
|
|
2
|
+
export * as Address from './address';
|
|
3
|
+
export declare type Customer = any;
|
|
4
|
+
export declare type CustomerTypes = {
|
|
5
|
+
customer: Customer;
|
|
6
|
+
};
|
|
7
|
+
export declare type CustomerHook<T extends CustomerTypes = CustomerTypes> = {
|
|
8
|
+
data: T['customer'] | null;
|
|
9
|
+
fetchData: {
|
|
10
|
+
customer: T['customer'];
|
|
11
|
+
} | null;
|
|
12
|
+
};
|
|
13
|
+
export declare type CustomerSchema<T extends CustomerTypes = CustomerTypes> = {
|
|
14
|
+
endpoint: {
|
|
15
|
+
options: {};
|
|
16
|
+
handlers: {
|
|
17
|
+
getLoggedInCustomer: {
|
|
18
|
+
data: {
|
|
19
|
+
customer: T['customer'];
|
|
20
|
+
} | null;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as Cart from './cart';
|
|
2
|
-
import * as Checkout from './checkout';
|
|
3
|
-
import * as Common from './common';
|
|
4
|
-
import * as Customer from './customer';
|
|
5
|
-
import * as Login from './login';
|
|
6
|
-
import * as Logout from './logout';
|
|
7
|
-
import * as Page from './page';
|
|
8
|
-
import * as Product from './product';
|
|
9
|
-
import * as Signup from './signup';
|
|
10
|
-
import * as Site from './site';
|
|
11
|
-
import * as Wishlist from './wishlist';
|
|
12
|
-
export type { Cart, Checkout, Common, Customer, Login, Logout, Page, Product, Signup, Site, Wishlist, };
|
|
1
|
+
import * as Cart from './cart';
|
|
2
|
+
import * as Checkout from './checkout';
|
|
3
|
+
import * as Common from './common';
|
|
4
|
+
import * as Customer from './customer';
|
|
5
|
+
import * as Login from './login';
|
|
6
|
+
import * as Logout from './logout';
|
|
7
|
+
import * as Page from './page';
|
|
8
|
+
import * as Product from './product';
|
|
9
|
+
import * as Signup from './signup';
|
|
10
|
+
import * as Site from './site';
|
|
11
|
+
import * as Wishlist from './wishlist';
|
|
12
|
+
export type { Cart, Checkout, Common, Customer, Login, Logout, Page, Product, Signup, Site, Wishlist, };
|
package/dist/types/login.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export declare type LoginBody = {
|
|
2
|
-
email: string;
|
|
3
|
-
password: string;
|
|
4
|
-
};
|
|
5
|
-
export declare type LoginTypes = {
|
|
6
|
-
body: LoginBody;
|
|
7
|
-
};
|
|
8
|
-
export declare type LoginHook<T extends LoginTypes = LoginTypes> = {
|
|
9
|
-
data: null;
|
|
10
|
-
actionInput: LoginBody;
|
|
11
|
-
fetcherInput: LoginBody;
|
|
12
|
-
body: T['body'];
|
|
13
|
-
};
|
|
14
|
-
export declare type LoginSchema<T extends LoginTypes = LoginTypes> = {
|
|
15
|
-
endpoint: {
|
|
16
|
-
options: {};
|
|
17
|
-
handlers: {
|
|
18
|
-
login: LoginHook<T>;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare type LoginOperation = {
|
|
23
|
-
data: {
|
|
24
|
-
result?: string;
|
|
25
|
-
};
|
|
26
|
-
variables: unknown;
|
|
27
|
-
};
|
|
1
|
+
export declare type LoginBody = {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
};
|
|
5
|
+
export declare type LoginTypes = {
|
|
6
|
+
body: LoginBody;
|
|
7
|
+
};
|
|
8
|
+
export declare type LoginHook<T extends LoginTypes = LoginTypes> = {
|
|
9
|
+
data: null;
|
|
10
|
+
actionInput: LoginBody;
|
|
11
|
+
fetcherInput: LoginBody;
|
|
12
|
+
body: T['body'];
|
|
13
|
+
};
|
|
14
|
+
export declare type LoginSchema<T extends LoginTypes = LoginTypes> = {
|
|
15
|
+
endpoint: {
|
|
16
|
+
options: {};
|
|
17
|
+
handlers: {
|
|
18
|
+
login: LoginHook<T>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare type LoginOperation = {
|
|
23
|
+
data: {
|
|
24
|
+
result?: string;
|
|
25
|
+
};
|
|
26
|
+
variables: unknown;
|
|
27
|
+
};
|
package/dist/types/logout.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export declare type LogoutTypes = {
|
|
2
|
-
body: {
|
|
3
|
-
redirectTo?: string;
|
|
4
|
-
};
|
|
5
|
-
};
|
|
6
|
-
export declare type LogoutHook<T extends LogoutTypes = LogoutTypes> = {
|
|
7
|
-
data: null;
|
|
8
|
-
body: T['body'];
|
|
9
|
-
};
|
|
10
|
-
export declare type LogoutSchema<T extends LogoutTypes = LogoutTypes> = {
|
|
11
|
-
endpoint: {
|
|
12
|
-
options: {};
|
|
13
|
-
handlers: {
|
|
14
|
-
logout: LogoutHook<T>;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
1
|
+
export declare type LogoutTypes = {
|
|
2
|
+
body: {
|
|
3
|
+
redirectTo?: string;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export declare type LogoutHook<T extends LogoutTypes = LogoutTypes> = {
|
|
7
|
+
data: null;
|
|
8
|
+
body: T['body'];
|
|
9
|
+
};
|
|
10
|
+
export declare type LogoutSchema<T extends LogoutTypes = LogoutTypes> = {
|
|
11
|
+
endpoint: {
|
|
12
|
+
options: {};
|
|
13
|
+
handlers: {
|
|
14
|
+
logout: LogoutHook<T>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
package/dist/types/page.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export declare 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 declare type PageTypes = {
|
|
10
|
-
page: Page;
|
|
11
|
-
};
|
|
12
|
-
export declare type GetAllPagesOperation<T extends PageTypes = PageTypes> = {
|
|
13
|
-
data: {
|
|
14
|
-
pages: T['page'][];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare type GetPageOperation<T extends PageTypes = PageTypes> = {
|
|
18
|
-
data: {
|
|
19
|
-
page?: T['page'];
|
|
20
|
-
};
|
|
21
|
-
variables: {
|
|
22
|
-
id: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
1
|
+
export declare 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 declare type PageTypes = {
|
|
10
|
+
page: Page;
|
|
11
|
+
};
|
|
12
|
+
export declare type GetAllPagesOperation<T extends PageTypes = PageTypes> = {
|
|
13
|
+
data: {
|
|
14
|
+
pages: T['page'][];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare type GetPageOperation<T extends PageTypes = PageTypes> = {
|
|
18
|
+
data: {
|
|
19
|
+
page?: T['page'];
|
|
20
|
+
};
|
|
21
|
+
variables: {
|
|
22
|
+
id: string;
|
|
23
|
+
};
|
|
24
|
+
};
|