@clicktap/state 0.16.3 → 0.16.4

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.
@@ -8,39 +8,39 @@ export declare function refresh({ context, event, }: {
8
8
  id: string | null;
9
9
  accessToken: string | null;
10
10
  locale: string | null;
11
- checkoutSteps: import('../types').CheckoutStep[];
11
+ checkoutSteps: Array<import('../types').CheckoutStep>;
12
12
  baseCurrency: string | null;
13
13
  currency: string | null;
14
14
  currencyConversionRate: number | null;
15
15
  dateCreated: Date | null;
16
16
  dateLastUpdated: Date | null;
17
- items: Record<string, any>[] | null;
18
- promotions: Record<string, any>[] | null;
17
+ items: Array<Record<string, any>> | null;
18
+ promotions: Array<Record<string, any>> | null;
19
19
  shippingAddresses: {
20
- available: import('../types').QuoteAddress[];
21
- applied: {
22
- availableAddressId?: string | undefined;
20
+ available: Array<import('../types').QuoteAddress>;
21
+ applied: Array<{
22
+ availableAddressId?: string;
23
23
  address: import('../types').QuoteAddress;
24
- itemIds: Record<string, any>[];
25
- }[];
24
+ itemIds: Array<Record<string, any>>;
25
+ }>;
26
26
  };
27
27
  paymentMethods: {
28
- available: import('../types').PaymentMethod[];
29
- applied: {
28
+ available: Array<import('../types').PaymentMethod>;
29
+ applied: Array<{
30
30
  paymentMethod: import('../types').PaymentMethod;
31
- options: Record<string, any>[];
31
+ options: Array<Record<string, any>>;
32
32
  amount: number;
33
- }[];
33
+ }>;
34
34
  };
35
- shipments: {
35
+ shipments: Array<{
36
36
  id: string;
37
37
  shippingAddress: {
38
38
  id: string;
39
39
  address: import('../types').QuoteAddress;
40
40
  };
41
- items: Record<string, any>[];
41
+ items: Array<Record<string, any>>;
42
42
  shippingMethods: {
43
- available: {
43
+ available: Array<{
44
44
  shippingMethod: {
45
45
  id: string;
46
46
  code: string;
@@ -56,7 +56,7 @@ export declare function refresh({ context, event, }: {
56
56
  latestShipDate: Date;
57
57
  earliestArrivalDate: Date;
58
58
  latestArrivalDate: Date;
59
- }[];
59
+ }>;
60
60
  applied: {
61
61
  shippingMethod: {
62
62
  id: string;
@@ -75,7 +75,7 @@ export declare function refresh({ context, event, }: {
75
75
  latestArrivalDate: Date;
76
76
  };
77
77
  };
78
- }[];
78
+ }>;
79
79
  totals: {
80
80
  discount: number;
81
81
  taxAmount: number;
@@ -84,12 +84,12 @@ export declare function refresh({ context, event, }: {
84
84
  subtotal: number;
85
85
  grandTotal: number;
86
86
  } | null;
87
- appliedPriceRules: Record<string, any>[] | null;
88
- appliedPromotions: Record<string, any>[] | null;
89
- shippingMethods: Record<string, any>[] | null;
90
- storeCredit: Record<string, any>[] | null;
91
- rewards: Record<string, any>[] | null;
92
- giftCards: Record<string, any>[] | null;
87
+ appliedPriceRules: Array<Record<string, any>> | null;
88
+ appliedPromotions: Array<Record<string, any>> | null;
89
+ shippingMethods: Array<Record<string, any>> | null;
90
+ storeCredit: Array<Record<string, any>> | null;
91
+ rewards: Array<Record<string, any>> | null;
92
+ giftCards: Array<Record<string, any>> | null;
93
93
  user: {
94
94
  id: string | null;
95
95
  email: string | null;
@@ -99,8 +99,8 @@ export declare function refresh({ context, event, }: {
99
99
  }> | undefined;
100
100
  errors?: string[] | undefined;
101
101
  endpoints?: {
102
- client?: string | undefined;
103
- server?: string | undefined;
102
+ client?: string;
103
+ server?: string;
104
104
  } | undefined;
105
105
  graphql?: {
106
106
  refresh: {
@@ -132,20 +132,20 @@ export declare function refresh({ context, event, }: {
132
132
  items?: Record<string, any>[] | null | undefined;
133
133
  promotions?: Record<string, any>[] | null | undefined;
134
134
  shippingAddresses?: {
135
- available: import('../types').QuoteAddress[];
136
- applied: {
137
- availableAddressId?: string | undefined;
135
+ available: Array<import('../types').QuoteAddress>;
136
+ applied: Array<{
137
+ availableAddressId?: string;
138
138
  address: import('../types').QuoteAddress;
139
- itemIds: Record<string, any>[];
140
- }[];
139
+ itemIds: Array<Record<string, any>>;
140
+ }>;
141
141
  } | undefined;
142
142
  paymentMethods?: {
143
- available: import('../types').PaymentMethod[];
144
- applied: {
143
+ available: Array<import('../types').PaymentMethod>;
144
+ applied: Array<{
145
145
  paymentMethod: import('../types').PaymentMethod;
146
- options: Record<string, any>[];
146
+ options: Array<Record<string, any>>;
147
147
  amount: number;
148
- }[];
148
+ }>;
149
149
  } | undefined;
150
150
  shipments?: {
151
151
  id: string;
@@ -153,9 +153,9 @@ export declare function refresh({ context, event, }: {
153
153
  id: string;
154
154
  address: import('../types').QuoteAddress;
155
155
  };
156
- items: Record<string, any>[];
156
+ items: Array<Record<string, any>>;
157
157
  shippingMethods: {
158
- available: {
158
+ available: Array<{
159
159
  shippingMethod: {
160
160
  id: string;
161
161
  code: string;
@@ -171,7 +171,7 @@ export declare function refresh({ context, event, }: {
171
171
  latestShipDate: Date;
172
172
  earliestArrivalDate: Date;
173
173
  latestArrivalDate: Date;
174
- }[];
174
+ }>;
175
175
  applied: {
176
176
  shippingMethod: {
177
177
  id: string;
@@ -8,39 +8,39 @@ export declare function removeItems({ context, event, }: {
8
8
  id: string | null;
9
9
  accessToken: string | null;
10
10
  locale: string | null;
11
- checkoutSteps: import('../types').CheckoutStep[];
11
+ checkoutSteps: Array<import('../types').CheckoutStep>;
12
12
  baseCurrency: string | null;
13
13
  currency: string | null;
14
14
  currencyConversionRate: number | null;
15
15
  dateCreated: Date | null;
16
16
  dateLastUpdated: Date | null;
17
- items: Record<string, any>[] | null;
18
- promotions: Record<string, any>[] | null;
17
+ items: Array<Record<string, any>> | null;
18
+ promotions: Array<Record<string, any>> | null;
19
19
  shippingAddresses: {
20
- available: import('../types').QuoteAddress[];
21
- applied: {
22
- availableAddressId?: string | undefined;
20
+ available: Array<import('../types').QuoteAddress>;
21
+ applied: Array<{
22
+ availableAddressId?: string;
23
23
  address: import('../types').QuoteAddress;
24
- itemIds: Record<string, any>[];
25
- }[];
24
+ itemIds: Array<Record<string, any>>;
25
+ }>;
26
26
  };
27
27
  paymentMethods: {
28
- available: import('../types').PaymentMethod[];
29
- applied: {
28
+ available: Array<import('../types').PaymentMethod>;
29
+ applied: Array<{
30
30
  paymentMethod: import('../types').PaymentMethod;
31
- options: Record<string, any>[];
31
+ options: Array<Record<string, any>>;
32
32
  amount: number;
33
- }[];
33
+ }>;
34
34
  };
35
- shipments: {
35
+ shipments: Array<{
36
36
  id: string;
37
37
  shippingAddress: {
38
38
  id: string;
39
39
  address: import('../types').QuoteAddress;
40
40
  };
41
- items: Record<string, any>[];
41
+ items: Array<Record<string, any>>;
42
42
  shippingMethods: {
43
- available: {
43
+ available: Array<{
44
44
  shippingMethod: {
45
45
  id: string;
46
46
  code: string;
@@ -56,7 +56,7 @@ export declare function removeItems({ context, event, }: {
56
56
  latestShipDate: Date;
57
57
  earliestArrivalDate: Date;
58
58
  latestArrivalDate: Date;
59
- }[];
59
+ }>;
60
60
  applied: {
61
61
  shippingMethod: {
62
62
  id: string;
@@ -75,7 +75,7 @@ export declare function removeItems({ context, event, }: {
75
75
  latestArrivalDate: Date;
76
76
  };
77
77
  };
78
- }[];
78
+ }>;
79
79
  totals: {
80
80
  discount: number;
81
81
  taxAmount: number;
@@ -84,12 +84,12 @@ export declare function removeItems({ context, event, }: {
84
84
  subtotal: number;
85
85
  grandTotal: number;
86
86
  } | null;
87
- appliedPriceRules: Record<string, any>[] | null;
88
- appliedPromotions: Record<string, any>[] | null;
89
- shippingMethods: Record<string, any>[] | null;
90
- storeCredit: Record<string, any>[] | null;
91
- rewards: Record<string, any>[] | null;
92
- giftCards: Record<string, any>[] | null;
87
+ appliedPriceRules: Array<Record<string, any>> | null;
88
+ appliedPromotions: Array<Record<string, any>> | null;
89
+ shippingMethods: Array<Record<string, any>> | null;
90
+ storeCredit: Array<Record<string, any>> | null;
91
+ rewards: Array<Record<string, any>> | null;
92
+ giftCards: Array<Record<string, any>> | null;
93
93
  user: {
94
94
  id: string | null;
95
95
  email: string | null;
@@ -99,8 +99,8 @@ export declare function removeItems({ context, event, }: {
99
99
  }> | undefined;
100
100
  errors?: string[] | undefined;
101
101
  endpoints?: {
102
- client?: string | undefined;
103
- server?: string | undefined;
102
+ client?: string;
103
+ server?: string;
104
104
  } | undefined;
105
105
  graphql?: {
106
106
  refresh: {
@@ -132,20 +132,20 @@ export declare function removeItems({ context, event, }: {
132
132
  items?: Record<string, any>[] | null | undefined;
133
133
  promotions?: Record<string, any>[] | null | undefined;
134
134
  shippingAddresses?: {
135
- available: import('../types').QuoteAddress[];
136
- applied: {
137
- availableAddressId?: string | undefined;
135
+ available: Array<import('../types').QuoteAddress>;
136
+ applied: Array<{
137
+ availableAddressId?: string;
138
138
  address: import('../types').QuoteAddress;
139
- itemIds: Record<string, any>[];
140
- }[];
139
+ itemIds: Array<Record<string, any>>;
140
+ }>;
141
141
  } | undefined;
142
142
  paymentMethods?: {
143
- available: import('../types').PaymentMethod[];
144
- applied: {
143
+ available: Array<import('../types').PaymentMethod>;
144
+ applied: Array<{
145
145
  paymentMethod: import('../types').PaymentMethod;
146
- options: Record<string, any>[];
146
+ options: Array<Record<string, any>>;
147
147
  amount: number;
148
- }[];
148
+ }>;
149
149
  } | undefined;
150
150
  shipments?: {
151
151
  id: string;
@@ -153,9 +153,9 @@ export declare function removeItems({ context, event, }: {
153
153
  id: string;
154
154
  address: import('../types').QuoteAddress;
155
155
  };
156
- items: Record<string, any>[];
156
+ items: Array<Record<string, any>>;
157
157
  shippingMethods: {
158
- available: {
158
+ available: Array<{
159
159
  shippingMethod: {
160
160
  id: string;
161
161
  code: string;
@@ -171,7 +171,7 @@ export declare function removeItems({ context, event, }: {
171
171
  latestShipDate: Date;
172
172
  earliestArrivalDate: Date;
173
173
  latestArrivalDate: Date;
174
- }[];
174
+ }>;
175
175
  applied: {
176
176
  shippingMethod: {
177
177
  id: string;
@@ -16,20 +16,20 @@ export declare function syncAccessToken({ context, event, }: {
16
16
  items?: Record<string, any>[] | null | undefined;
17
17
  promotions?: Record<string, any>[] | null | undefined;
18
18
  shippingAddresses?: {
19
- available: import('../types').QuoteAddress[];
20
- applied: {
21
- availableAddressId?: string | undefined;
19
+ available: Array<import('../types').QuoteAddress>;
20
+ applied: Array<{
21
+ availableAddressId?: string;
22
22
  address: import('../types').QuoteAddress;
23
- itemIds: Record<string, any>[];
24
- }[];
23
+ itemIds: Array<Record<string, any>>;
24
+ }>;
25
25
  } | undefined;
26
26
  paymentMethods?: {
27
- available: import('../types').PaymentMethod[];
28
- applied: {
27
+ available: Array<import('../types').PaymentMethod>;
28
+ applied: Array<{
29
29
  paymentMethod: import('../types').PaymentMethod;
30
- options: Record<string, any>[];
30
+ options: Array<Record<string, any>>;
31
31
  amount: number;
32
- }[];
32
+ }>;
33
33
  } | undefined;
34
34
  shipments?: {
35
35
  id: string;
@@ -37,9 +37,9 @@ export declare function syncAccessToken({ context, event, }: {
37
37
  id: string;
38
38
  address: import('../types').QuoteAddress;
39
39
  };
40
- items: Record<string, any>[];
40
+ items: Array<Record<string, any>>;
41
41
  shippingMethods: {
42
- available: {
42
+ available: Array<{
43
43
  shippingMethod: {
44
44
  id: string;
45
45
  code: string;
@@ -55,7 +55,7 @@ export declare function syncAccessToken({ context, event, }: {
55
55
  latestShipDate: Date;
56
56
  earliestArrivalDate: Date;
57
57
  latestArrivalDate: Date;
58
- }[];
58
+ }>;
59
59
  applied: {
60
60
  shippingMethod: {
61
61
  id: string;
@@ -8,39 +8,39 @@ export declare function updateItems({ context, event, }: {
8
8
  id: string | null;
9
9
  accessToken: string | null;
10
10
  locale: string | null;
11
- checkoutSteps: import('../types').CheckoutStep[];
11
+ checkoutSteps: Array<import('../types').CheckoutStep>;
12
12
  baseCurrency: string | null;
13
13
  currency: string | null;
14
14
  currencyConversionRate: number | null;
15
15
  dateCreated: Date | null;
16
16
  dateLastUpdated: Date | null;
17
- items: Record<string, any>[] | null;
18
- promotions: Record<string, any>[] | null;
17
+ items: Array<Record<string, any>> | null;
18
+ promotions: Array<Record<string, any>> | null;
19
19
  shippingAddresses: {
20
- available: import('../types').QuoteAddress[];
21
- applied: {
22
- availableAddressId?: string | undefined;
20
+ available: Array<import('../types').QuoteAddress>;
21
+ applied: Array<{
22
+ availableAddressId?: string;
23
23
  address: import('../types').QuoteAddress;
24
- itemIds: Record<string, any>[];
25
- }[];
24
+ itemIds: Array<Record<string, any>>;
25
+ }>;
26
26
  };
27
27
  paymentMethods: {
28
- available: import('../types').PaymentMethod[];
29
- applied: {
28
+ available: Array<import('../types').PaymentMethod>;
29
+ applied: Array<{
30
30
  paymentMethod: import('../types').PaymentMethod;
31
- options: Record<string, any>[];
31
+ options: Array<Record<string, any>>;
32
32
  amount: number;
33
- }[];
33
+ }>;
34
34
  };
35
- shipments: {
35
+ shipments: Array<{
36
36
  id: string;
37
37
  shippingAddress: {
38
38
  id: string;
39
39
  address: import('../types').QuoteAddress;
40
40
  };
41
- items: Record<string, any>[];
41
+ items: Array<Record<string, any>>;
42
42
  shippingMethods: {
43
- available: {
43
+ available: Array<{
44
44
  shippingMethod: {
45
45
  id: string;
46
46
  code: string;
@@ -56,7 +56,7 @@ export declare function updateItems({ context, event, }: {
56
56
  latestShipDate: Date;
57
57
  earliestArrivalDate: Date;
58
58
  latestArrivalDate: Date;
59
- }[];
59
+ }>;
60
60
  applied: {
61
61
  shippingMethod: {
62
62
  id: string;
@@ -75,7 +75,7 @@ export declare function updateItems({ context, event, }: {
75
75
  latestArrivalDate: Date;
76
76
  };
77
77
  };
78
- }[];
78
+ }>;
79
79
  totals: {
80
80
  discount: number;
81
81
  taxAmount: number;
@@ -84,12 +84,12 @@ export declare function updateItems({ context, event, }: {
84
84
  subtotal: number;
85
85
  grandTotal: number;
86
86
  } | null;
87
- appliedPriceRules: Record<string, any>[] | null;
88
- appliedPromotions: Record<string, any>[] | null;
89
- shippingMethods: Record<string, any>[] | null;
90
- storeCredit: Record<string, any>[] | null;
91
- rewards: Record<string, any>[] | null;
92
- giftCards: Record<string, any>[] | null;
87
+ appliedPriceRules: Array<Record<string, any>> | null;
88
+ appliedPromotions: Array<Record<string, any>> | null;
89
+ shippingMethods: Array<Record<string, any>> | null;
90
+ storeCredit: Array<Record<string, any>> | null;
91
+ rewards: Array<Record<string, any>> | null;
92
+ giftCards: Array<Record<string, any>> | null;
93
93
  user: {
94
94
  id: string | null;
95
95
  email: string | null;
@@ -99,8 +99,8 @@ export declare function updateItems({ context, event, }: {
99
99
  }> | undefined;
100
100
  errors?: string[] | undefined;
101
101
  endpoints?: {
102
- client?: string | undefined;
103
- server?: string | undefined;
102
+ client?: string;
103
+ server?: string;
104
104
  } | undefined;
105
105
  graphql?: {
106
106
  refresh: {
@@ -132,20 +132,20 @@ export declare function updateItems({ context, event, }: {
132
132
  items?: Record<string, any>[] | null | undefined;
133
133
  promotions?: Record<string, any>[] | null | undefined;
134
134
  shippingAddresses?: {
135
- available: import('../types').QuoteAddress[];
136
- applied: {
137
- availableAddressId?: string | undefined;
135
+ available: Array<import('../types').QuoteAddress>;
136
+ applied: Array<{
137
+ availableAddressId?: string;
138
138
  address: import('../types').QuoteAddress;
139
- itemIds: Record<string, any>[];
140
- }[];
139
+ itemIds: Array<Record<string, any>>;
140
+ }>;
141
141
  } | undefined;
142
142
  paymentMethods?: {
143
- available: import('../types').PaymentMethod[];
144
- applied: {
143
+ available: Array<import('../types').PaymentMethod>;
144
+ applied: Array<{
145
145
  paymentMethod: import('../types').PaymentMethod;
146
- options: Record<string, any>[];
146
+ options: Array<Record<string, any>>;
147
147
  amount: number;
148
- }[];
148
+ }>;
149
149
  } | undefined;
150
150
  shipments?: {
151
151
  id: string;
@@ -153,9 +153,9 @@ export declare function updateItems({ context, event, }: {
153
153
  id: string;
154
154
  address: import('../types').QuoteAddress;
155
155
  };
156
- items: Record<string, any>[];
156
+ items: Array<Record<string, any>>;
157
157
  shippingMethods: {
158
- available: {
158
+ available: Array<{
159
159
  shippingMethod: {
160
160
  id: string;
161
161
  code: string;
@@ -171,7 +171,7 @@ export declare function updateItems({ context, event, }: {
171
171
  latestShipDate: Date;
172
172
  earliestArrivalDate: Date;
173
173
  latestArrivalDate: Date;
174
- }[];
174
+ }>;
175
175
  applied: {
176
176
  shippingMethod: {
177
177
  id: string;
@@ -20,5 +20,5 @@ export type AddItemsOutput = Partial<{
20
20
  }>;
21
21
  };
22
22
  }>;
23
- export declare const addItems: import('xstate').PromiseActorLogic<AddItemsSuccessEvent, AddItemsInput>;
23
+ export declare const addItems: import('xstate').PromiseActorLogic<AddItemsSuccessEvent, AddItemsInput, import('xstate').EventObject>;
24
24
  export default addItems;
@@ -18,5 +18,5 @@ export type RefreshOutput = Partial<{
18
18
  }>;
19
19
  };
20
20
  }>;
21
- export declare const refresh: import('xstate').PromiseActorLogic<RefreshSuccessEvent, RefreshInput>;
21
+ export declare const refresh: import('xstate').PromiseActorLogic<RefreshSuccessEvent, RefreshInput, import('xstate').EventObject>;
22
22
  export default refresh;
@@ -20,5 +20,5 @@ export type RemoveItemsOutput = Partial<{
20
20
  }>;
21
21
  };
22
22
  }>;
23
- export declare const removeItems: import('xstate').PromiseActorLogic<RemoveItemsSuccessEvent, RemoveItemsInput>;
23
+ export declare const removeItems: import('xstate').PromiseActorLogic<RemoveItemsSuccessEvent, RemoveItemsInput, import('xstate').EventObject>;
24
24
  export default removeItems;
@@ -20,5 +20,5 @@ export type UpdateItemsOutput = Partial<{
20
20
  }>;
21
21
  };
22
22
  }>;
23
- export declare const updateItems: import('xstate').PromiseActorLogic<UpdateItemsSuccessEvent, UpdateItemsInput>;
23
+ export declare const updateItems: import('xstate').PromiseActorLogic<UpdateItemsSuccessEvent, UpdateItemsInput, import('xstate').EventObject>;
24
24
  export default updateItems;