@gradientedge/commercetools-utils 4.11.3 → 4.13.0

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 (44) hide show
  1. package/dist/ge-commercetools-utils-browser.cjs.js +1 -1
  2. package/dist/ge-commercetools-utils-browser.cjs.js.map +1 -1
  3. package/dist/ge-commercetools-utils-browser.esm.js +1 -1
  4. package/dist/ge-commercetools-utils-browser.esm.js.map +1 -1
  5. package/dist/ge-commercetools-utils-node.cjs.js +1 -1
  6. package/dist/ge-commercetools-utils-node.cjs.js.map +1 -1
  7. package/dist/ge-commercetools-utils-node.esm.js +1 -1
  8. package/dist/typings/api/CommercetoolsApi.d.ts +1 -1
  9. package/dist/typings/index.d.ts +2 -2
  10. package/dist/typings/models/cart-discount.d.ts +196 -0
  11. package/dist/typings/models/cart.d.ts +597 -0
  12. package/dist/typings/models/category.d.ts +166 -0
  13. package/dist/typings/models/channel.d.ts +103 -0
  14. package/dist/typings/models/common.d.ts +232 -0
  15. package/dist/typings/models/custom-object.d.ts +30 -0
  16. package/dist/typings/models/customer-group.d.ts +58 -0
  17. package/dist/typings/models/customer.d.ts +284 -0
  18. package/dist/typings/models/discount-code.d.ts +116 -0
  19. package/dist/typings/models/error.d.ts +412 -0
  20. package/dist/typings/models/extension.d.ts +78 -0
  21. package/dist/typings/models/graph-ql.d.ts +21 -0
  22. package/dist/typings/models/index.d.ts +33 -0
  23. package/dist/typings/models/inventory.d.ts +82 -0
  24. package/dist/typings/models/me.d.ts +481 -0
  25. package/dist/typings/models/message.d.ts +1823 -0
  26. package/dist/typings/models/order-edit.d.ts +565 -0
  27. package/dist/typings/models/order.d.ts +558 -0
  28. package/dist/typings/models/payment.d.ts +208 -0
  29. package/dist/typings/models/product-discount.d.ts +123 -0
  30. package/dist/typings/models/product-selection.d.ts +106 -0
  31. package/dist/typings/models/product-type.d.ts +216 -0
  32. package/dist/typings/models/product.d.ts +517 -0
  33. package/dist/typings/models/project.d.ts +108 -0
  34. package/dist/typings/models/review.d.ts +115 -0
  35. package/dist/typings/models/scalar-types.d.ts +4 -0
  36. package/dist/typings/models/shipping-method.d.ts +160 -0
  37. package/dist/typings/models/shopping-list.d.ts +217 -0
  38. package/dist/typings/models/state.d.ts +86 -0
  39. package/dist/typings/models/store.d.ts +121 -0
  40. package/dist/typings/models/subscription.d.ts +148 -0
  41. package/dist/typings/models/tax-category.d.ts +87 -0
  42. package/dist/typings/models/type.d.ts +182 -0
  43. package/dist/typings/models/zone.d.ts +65 -0
  44. package/package.json +13 -14
@@ -0,0 +1,115 @@
1
+ import { ChannelReference, ChannelResourceIdentifier } from './channel';
2
+ import { BaseResource, CreatedBy, LastModifiedBy } from './common';
3
+ import { CustomerReference, CustomerResourceIdentifier } from './customer';
4
+ import { ProductReference, ProductResourceIdentifier } from './product';
5
+ import { StateReference, StateResourceIdentifier } from './state';
6
+ import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
7
+ export interface Review extends BaseResource {
8
+ readonly id: string;
9
+ readonly version: number;
10
+ readonly createdAt: string;
11
+ readonly lastModifiedAt: string;
12
+ readonly lastModifiedBy?: LastModifiedBy;
13
+ readonly createdBy?: CreatedBy;
14
+ readonly key?: string;
15
+ readonly uniquenessValue?: string;
16
+ readonly locale?: string;
17
+ readonly authorName?: string;
18
+ readonly title?: string;
19
+ readonly text?: string;
20
+ readonly target?: ProductReference | ChannelReference;
21
+ readonly includedInStatistics: boolean;
22
+ readonly rating?: number;
23
+ readonly state?: StateReference;
24
+ readonly customer?: CustomerReference;
25
+ readonly custom?: CustomFields;
26
+ }
27
+ export interface ReviewDraft {
28
+ readonly key?: string;
29
+ readonly uniquenessValue?: string;
30
+ readonly locale?: string;
31
+ readonly authorName?: string;
32
+ readonly title?: string;
33
+ readonly text?: string;
34
+ readonly target?: ProductResourceIdentifier | ChannelResourceIdentifier;
35
+ readonly state?: StateResourceIdentifier;
36
+ readonly rating?: number;
37
+ readonly customer?: CustomerResourceIdentifier;
38
+ readonly custom?: CustomFieldsDraft;
39
+ }
40
+ export interface ReviewPagedQueryResponse {
41
+ readonly limit: number;
42
+ readonly count: number;
43
+ readonly total?: number;
44
+ readonly offset: number;
45
+ readonly results: Review[];
46
+ }
47
+ export interface ReviewRatingStatistics {
48
+ readonly averageRating: number;
49
+ readonly highestRating: number;
50
+ readonly lowestRating: number;
51
+ readonly count: number;
52
+ readonly ratingsDistribution: any;
53
+ }
54
+ export interface ReviewReference {
55
+ readonly typeId: 'review';
56
+ readonly id: string;
57
+ readonly obj?: Review;
58
+ }
59
+ export interface ReviewResourceIdentifier {
60
+ readonly typeId: 'review';
61
+ readonly id?: string;
62
+ readonly key?: string;
63
+ }
64
+ export interface ReviewUpdate {
65
+ readonly version: number;
66
+ readonly actions: ReviewUpdateAction[];
67
+ }
68
+ export declare type ReviewUpdateAction = ReviewSetAuthorNameAction | ReviewSetCustomFieldAction | ReviewSetCustomTypeAction | ReviewSetCustomerAction | ReviewSetKeyAction | ReviewSetLocaleAction | ReviewSetRatingAction | ReviewSetTargetAction | ReviewSetTextAction | ReviewSetTitleAction | ReviewTransitionStateAction;
69
+ export interface ReviewSetAuthorNameAction {
70
+ readonly action: 'setAuthorName';
71
+ readonly authorName?: string;
72
+ }
73
+ export interface ReviewSetCustomFieldAction {
74
+ readonly action: 'setCustomField';
75
+ readonly name: string;
76
+ readonly value?: any;
77
+ }
78
+ export interface ReviewSetCustomTypeAction {
79
+ readonly action: 'setCustomType';
80
+ readonly type?: TypeResourceIdentifier;
81
+ readonly fields?: FieldContainer;
82
+ }
83
+ export interface ReviewSetCustomerAction {
84
+ readonly action: 'setCustomer';
85
+ readonly customer?: CustomerResourceIdentifier;
86
+ }
87
+ export interface ReviewSetKeyAction {
88
+ readonly action: 'setKey';
89
+ readonly key?: string;
90
+ }
91
+ export interface ReviewSetLocaleAction {
92
+ readonly action: 'setLocale';
93
+ readonly locale?: string;
94
+ }
95
+ export interface ReviewSetRatingAction {
96
+ readonly action: 'setRating';
97
+ readonly rating?: number;
98
+ }
99
+ export interface ReviewSetTargetAction {
100
+ readonly action: 'setTarget';
101
+ readonly target: ProductResourceIdentifier | ChannelResourceIdentifier;
102
+ }
103
+ export interface ReviewSetTextAction {
104
+ readonly action: 'setText';
105
+ readonly text?: string;
106
+ }
107
+ export interface ReviewSetTitleAction {
108
+ readonly action: 'setTitle';
109
+ readonly title?: string;
110
+ }
111
+ export interface ReviewTransitionStateAction {
112
+ readonly action: 'transitionState';
113
+ readonly state: StateResourceIdentifier;
114
+ readonly force?: boolean;
115
+ }
@@ -0,0 +1,4 @@
1
+ export declare type Expansion = string;
2
+ export declare type QueryPredicate = string;
3
+ export declare type Sort = string;
4
+ export declare type OrderSearchSorting = string;
@@ -0,0 +1,160 @@
1
+ import { BaseResource, CreatedBy, LastModifiedBy, LocalizedString, Money, TypedMoney } from './common';
2
+ import { TaxCategoryReference, TaxCategoryResourceIdentifier } from './tax-category';
3
+ import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
4
+ import { ZoneReference, ZoneResourceIdentifier } from './zone';
5
+ export interface PriceFunction {
6
+ readonly currencyCode: string;
7
+ readonly function: string;
8
+ }
9
+ export interface ShippingMethod extends BaseResource {
10
+ readonly id: string;
11
+ readonly version: number;
12
+ readonly createdAt: string;
13
+ readonly lastModifiedAt: string;
14
+ readonly lastModifiedBy?: LastModifiedBy;
15
+ readonly createdBy?: CreatedBy;
16
+ readonly key?: string;
17
+ readonly name: string;
18
+ readonly localizedName?: LocalizedString;
19
+ readonly description?: string;
20
+ readonly localizedDescription?: LocalizedString;
21
+ readonly taxCategory: TaxCategoryReference;
22
+ readonly zoneRates: ZoneRate[];
23
+ readonly isDefault: boolean;
24
+ readonly predicate?: string;
25
+ readonly custom?: CustomFields;
26
+ }
27
+ export interface ShippingMethodDraft {
28
+ readonly key?: string;
29
+ readonly name: string;
30
+ readonly localizedName?: LocalizedString;
31
+ readonly description?: string;
32
+ readonly localizedDescription?: LocalizedString;
33
+ readonly taxCategory: TaxCategoryResourceIdentifier;
34
+ readonly zoneRates: ZoneRateDraft[];
35
+ readonly isDefault: boolean;
36
+ readonly predicate?: string;
37
+ readonly custom?: CustomFieldsDraft;
38
+ }
39
+ export interface ShippingMethodPagedQueryResponse {
40
+ readonly limit?: number;
41
+ readonly count: number;
42
+ readonly total?: number;
43
+ readonly offset?: number;
44
+ readonly results: ShippingMethod[];
45
+ }
46
+ export interface ShippingMethodReference {
47
+ readonly typeId: 'shipping-method';
48
+ readonly id: string;
49
+ readonly obj?: ShippingMethod;
50
+ }
51
+ export interface ShippingMethodResourceIdentifier {
52
+ readonly typeId: 'shipping-method';
53
+ readonly id?: string;
54
+ readonly key?: string;
55
+ }
56
+ export interface ShippingMethodUpdate {
57
+ readonly version: number;
58
+ readonly actions: ShippingMethodUpdateAction[];
59
+ }
60
+ export declare type ShippingMethodUpdateAction = ShippingMethodAddShippingRateAction | ShippingMethodAddZoneAction | ShippingMethodChangeIsDefaultAction | ShippingMethodChangeNameAction | ShippingMethodChangeTaxCategoryAction | ShippingMethodRemoveShippingRateAction | ShippingMethodRemoveZoneAction | ShippingMethodSetCustomFieldAction | ShippingMethodSetCustomTypeAction | ShippingMethodSetDescriptionAction | ShippingMethodSetKeyAction | ShippingMethodSetLocalizedDescriptionAction | ShippingMethodSetLocalizedNameAction | ShippingMethodSetPredicateAction;
61
+ export interface ShippingRate {
62
+ readonly price: TypedMoney;
63
+ readonly freeAbove?: TypedMoney;
64
+ readonly isMatching?: boolean;
65
+ readonly tiers: ShippingRatePriceTier[];
66
+ }
67
+ export interface ShippingRateDraft {
68
+ readonly price: Money;
69
+ readonly freeAbove?: Money;
70
+ readonly tiers?: ShippingRatePriceTier[];
71
+ }
72
+ export declare type ShippingRatePriceTier = CartClassificationTier | CartScoreTier | CartValueTier;
73
+ export interface CartClassificationTier {
74
+ readonly type: 'CartClassification';
75
+ readonly value: string;
76
+ readonly price: Money;
77
+ readonly isMatching?: boolean;
78
+ }
79
+ export interface CartScoreTier {
80
+ readonly type: 'CartScore';
81
+ readonly score: number;
82
+ readonly price?: Money;
83
+ readonly priceFunction?: PriceFunction;
84
+ readonly isMatching?: boolean;
85
+ }
86
+ export interface CartValueTier {
87
+ readonly type: 'CartValue';
88
+ readonly minimumCentAmount: number;
89
+ readonly price: Money;
90
+ readonly isMatching?: boolean;
91
+ }
92
+ export declare type ShippingRateTierType = 'CartClassification' | 'CartScore' | 'CartValue';
93
+ export interface ZoneRate {
94
+ readonly zone: ZoneReference;
95
+ readonly shippingRates: ShippingRate[];
96
+ }
97
+ export interface ZoneRateDraft {
98
+ readonly zone: ZoneResourceIdentifier;
99
+ readonly shippingRates: ShippingRateDraft[];
100
+ }
101
+ export interface ShippingMethodAddShippingRateAction {
102
+ readonly action: 'addShippingRate';
103
+ readonly zone: ZoneResourceIdentifier;
104
+ readonly shippingRate: ShippingRateDraft;
105
+ }
106
+ export interface ShippingMethodAddZoneAction {
107
+ readonly action: 'addZone';
108
+ readonly zone: ZoneResourceIdentifier;
109
+ }
110
+ export interface ShippingMethodChangeIsDefaultAction {
111
+ readonly action: 'changeIsDefault';
112
+ readonly isDefault: boolean;
113
+ }
114
+ export interface ShippingMethodChangeNameAction {
115
+ readonly action: 'changeName';
116
+ readonly name: string;
117
+ }
118
+ export interface ShippingMethodChangeTaxCategoryAction {
119
+ readonly action: 'changeTaxCategory';
120
+ readonly taxCategory: TaxCategoryResourceIdentifier;
121
+ }
122
+ export interface ShippingMethodRemoveShippingRateAction {
123
+ readonly action: 'removeShippingRate';
124
+ readonly zone: ZoneResourceIdentifier;
125
+ readonly shippingRate: ShippingRateDraft;
126
+ }
127
+ export interface ShippingMethodRemoveZoneAction {
128
+ readonly action: 'removeZone';
129
+ readonly zone: ZoneResourceIdentifier;
130
+ }
131
+ export interface ShippingMethodSetCustomFieldAction {
132
+ readonly action: 'setCustomField';
133
+ readonly name: string;
134
+ readonly value?: any;
135
+ }
136
+ export interface ShippingMethodSetCustomTypeAction {
137
+ readonly action: 'setCustomType';
138
+ readonly type?: TypeResourceIdentifier;
139
+ readonly fields?: FieldContainer;
140
+ }
141
+ export interface ShippingMethodSetDescriptionAction {
142
+ readonly action: 'setDescription';
143
+ readonly description?: string;
144
+ }
145
+ export interface ShippingMethodSetKeyAction {
146
+ readonly action: 'setKey';
147
+ readonly key?: string;
148
+ }
149
+ export interface ShippingMethodSetLocalizedDescriptionAction {
150
+ readonly action: 'setLocalizedDescription';
151
+ readonly localizedDescription?: LocalizedString;
152
+ }
153
+ export interface ShippingMethodSetLocalizedNameAction {
154
+ readonly action: 'setLocalizedName';
155
+ readonly localizedName?: LocalizedString;
156
+ }
157
+ export interface ShippingMethodSetPredicateAction {
158
+ readonly action: 'setPredicate';
159
+ readonly predicate?: string;
160
+ }
@@ -0,0 +1,217 @@
1
+ import { BaseResource, CreatedBy, LastModifiedBy, LocalizedString } from './common';
2
+ import { CustomerReference, CustomerResourceIdentifier } from './customer';
3
+ import { ProductVariant } from './product';
4
+ import { ProductTypeReference } from './product-type';
5
+ import { StoreKeyReference, StoreResourceIdentifier } from './store';
6
+ import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
7
+ export interface ShoppingList extends BaseResource {
8
+ readonly id: string;
9
+ readonly version: number;
10
+ readonly createdAt: string;
11
+ readonly lastModifiedAt: string;
12
+ readonly lastModifiedBy?: LastModifiedBy;
13
+ readonly createdBy?: CreatedBy;
14
+ readonly custom?: CustomFields;
15
+ readonly customer?: CustomerReference;
16
+ readonly deleteDaysAfterLastModification?: number;
17
+ readonly description?: LocalizedString;
18
+ readonly key?: string;
19
+ readonly lineItems?: ShoppingListLineItem[];
20
+ readonly name: LocalizedString;
21
+ readonly slug?: LocalizedString;
22
+ readonly textLineItems?: TextLineItem[];
23
+ readonly anonymousId?: string;
24
+ readonly store?: StoreKeyReference;
25
+ }
26
+ export interface ShoppingListDraft {
27
+ readonly custom?: CustomFieldsDraft;
28
+ readonly customer?: CustomerResourceIdentifier;
29
+ readonly deleteDaysAfterLastModification?: number;
30
+ readonly description?: LocalizedString;
31
+ readonly key?: string;
32
+ readonly lineItems?: ShoppingListLineItemDraft[];
33
+ readonly name: LocalizedString;
34
+ readonly slug?: LocalizedString;
35
+ readonly textLineItems?: TextLineItemDraft[];
36
+ readonly anonymousId?: string;
37
+ readonly store?: StoreResourceIdentifier;
38
+ }
39
+ export interface ShoppingListLineItem {
40
+ readonly addedAt: string;
41
+ readonly custom?: CustomFields;
42
+ readonly deactivatedAt?: string;
43
+ readonly id: string;
44
+ readonly name: LocalizedString;
45
+ readonly productId: string;
46
+ readonly productSlug?: LocalizedString;
47
+ readonly productType: ProductTypeReference;
48
+ readonly quantity: number;
49
+ readonly variant?: ProductVariant;
50
+ readonly variantId?: number;
51
+ }
52
+ export interface ShoppingListLineItemDraft {
53
+ readonly addedAt?: string;
54
+ readonly custom?: CustomFieldsDraft;
55
+ readonly sku?: string;
56
+ readonly productId?: string;
57
+ readonly quantity?: number;
58
+ readonly variantId?: number;
59
+ }
60
+ export interface ShoppingListPagedQueryResponse {
61
+ readonly limit: number;
62
+ readonly count: number;
63
+ readonly total?: number;
64
+ readonly offset: number;
65
+ readonly results: ShoppingList[];
66
+ }
67
+ export interface ShoppingListReference {
68
+ readonly typeId: 'shopping-list';
69
+ readonly id: string;
70
+ readonly obj?: ShoppingList;
71
+ }
72
+ export interface ShoppingListResourceIdentifier {
73
+ readonly typeId: 'shopping-list';
74
+ readonly id?: string;
75
+ readonly key?: string;
76
+ }
77
+ export interface ShoppingListUpdate {
78
+ readonly version: number;
79
+ readonly actions: ShoppingListUpdateAction[];
80
+ }
81
+ export declare type ShoppingListUpdateAction = ShoppingListAddLineItemAction | ShoppingListAddTextLineItemAction | ShoppingListChangeLineItemQuantityAction | ShoppingListChangeLineItemsOrderAction | ShoppingListChangeNameAction | ShoppingListChangeTextLineItemNameAction | ShoppingListChangeTextLineItemQuantityAction | ShoppingListChangeTextLineItemsOrderAction | ShoppingListRemoveLineItemAction | ShoppingListRemoveTextLineItemAction | ShoppingListSetAnonymousIdAction | ShoppingListSetCustomFieldAction | ShoppingListSetCustomTypeAction | ShoppingListSetCustomerAction | ShoppingListSetDeleteDaysAfterLastModificationAction | ShoppingListSetDescriptionAction | ShoppingListSetKeyAction | ShoppingListSetLineItemCustomFieldAction | ShoppingListSetLineItemCustomTypeAction | ShoppingListSetSlugAction | ShoppingListSetStoreAction | ShoppingListSetTextLineItemCustomFieldAction | ShoppingListSetTextLineItemCustomTypeAction | ShoppingListSetTextLineItemDescriptionAction;
82
+ export interface TextLineItem {
83
+ readonly addedAt: string;
84
+ readonly custom?: CustomFields;
85
+ readonly description?: LocalizedString;
86
+ readonly id: string;
87
+ readonly name: LocalizedString;
88
+ readonly quantity: number;
89
+ }
90
+ export interface TextLineItemDraft {
91
+ readonly addedAt?: string;
92
+ readonly custom?: CustomFieldsDraft;
93
+ readonly description?: LocalizedString;
94
+ readonly name: LocalizedString;
95
+ readonly quantity?: number;
96
+ }
97
+ export interface ShoppingListAddLineItemAction {
98
+ readonly action: 'addLineItem';
99
+ readonly sku?: string;
100
+ readonly productId?: string;
101
+ readonly variantId?: number;
102
+ readonly quantity?: number;
103
+ readonly addedAt?: string;
104
+ readonly custom?: CustomFieldsDraft;
105
+ }
106
+ export interface ShoppingListAddTextLineItemAction {
107
+ readonly action: 'addTextLineItem';
108
+ readonly name: LocalizedString;
109
+ readonly description?: LocalizedString;
110
+ readonly quantity?: number;
111
+ readonly addedAt?: string;
112
+ readonly custom?: CustomFieldsDraft;
113
+ }
114
+ export interface ShoppingListChangeLineItemQuantityAction {
115
+ readonly action: 'changeLineItemQuantity';
116
+ readonly lineItemId: string;
117
+ readonly quantity: number;
118
+ }
119
+ export interface ShoppingListChangeLineItemsOrderAction {
120
+ readonly action: 'changeLineItemsOrder';
121
+ readonly lineItemOrder: string[];
122
+ }
123
+ export interface ShoppingListChangeNameAction {
124
+ readonly action: 'changeName';
125
+ readonly name: LocalizedString;
126
+ }
127
+ export interface ShoppingListChangeTextLineItemNameAction {
128
+ readonly action: 'changeTextLineItemName';
129
+ readonly textLineItemId: string;
130
+ readonly name: LocalizedString;
131
+ }
132
+ export interface ShoppingListChangeTextLineItemQuantityAction {
133
+ readonly action: 'changeTextLineItemQuantity';
134
+ readonly textLineItemId: string;
135
+ readonly quantity: number;
136
+ }
137
+ export interface ShoppingListChangeTextLineItemsOrderAction {
138
+ readonly action: 'changeTextLineItemsOrder';
139
+ readonly textLineItemOrder: string[];
140
+ }
141
+ export interface ShoppingListRemoveLineItemAction {
142
+ readonly action: 'removeLineItem';
143
+ readonly lineItemId: string;
144
+ readonly quantity?: number;
145
+ }
146
+ export interface ShoppingListRemoveTextLineItemAction {
147
+ readonly action: 'removeTextLineItem';
148
+ readonly textLineItemId: string;
149
+ readonly quantity?: number;
150
+ }
151
+ export interface ShoppingListSetAnonymousIdAction {
152
+ readonly action: 'setAnonymousId';
153
+ readonly anonymousId?: string;
154
+ }
155
+ export interface ShoppingListSetCustomFieldAction {
156
+ readonly action: 'setCustomField';
157
+ readonly name: string;
158
+ readonly value?: any;
159
+ }
160
+ export interface ShoppingListSetCustomTypeAction {
161
+ readonly action: 'setCustomType';
162
+ readonly type?: TypeResourceIdentifier;
163
+ readonly fields?: FieldContainer;
164
+ }
165
+ export interface ShoppingListSetCustomerAction {
166
+ readonly action: 'setCustomer';
167
+ readonly customer?: CustomerResourceIdentifier;
168
+ }
169
+ export interface ShoppingListSetDeleteDaysAfterLastModificationAction {
170
+ readonly action: 'setDeleteDaysAfterLastModification';
171
+ readonly deleteDaysAfterLastModification?: number;
172
+ }
173
+ export interface ShoppingListSetDescriptionAction {
174
+ readonly action: 'setDescription';
175
+ readonly description?: LocalizedString;
176
+ }
177
+ export interface ShoppingListSetKeyAction {
178
+ readonly action: 'setKey';
179
+ readonly key?: string;
180
+ }
181
+ export interface ShoppingListSetLineItemCustomFieldAction {
182
+ readonly action: 'setLineItemCustomField';
183
+ readonly lineItemId: string;
184
+ readonly name: string;
185
+ readonly value?: any;
186
+ }
187
+ export interface ShoppingListSetLineItemCustomTypeAction {
188
+ readonly action: 'setLineItemCustomType';
189
+ readonly lineItemId: string;
190
+ readonly type?: TypeResourceIdentifier;
191
+ readonly fields?: FieldContainer;
192
+ }
193
+ export interface ShoppingListSetSlugAction {
194
+ readonly action: 'setSlug';
195
+ readonly slug?: LocalizedString;
196
+ }
197
+ export interface ShoppingListSetStoreAction {
198
+ readonly action: 'setStore';
199
+ readonly store?: StoreResourceIdentifier;
200
+ }
201
+ export interface ShoppingListSetTextLineItemCustomFieldAction {
202
+ readonly action: 'setTextLineItemCustomField';
203
+ readonly textLineItemId: string;
204
+ readonly name: string;
205
+ readonly value?: any;
206
+ }
207
+ export interface ShoppingListSetTextLineItemCustomTypeAction {
208
+ readonly action: 'setTextLineItemCustomType';
209
+ readonly textLineItemId: string;
210
+ readonly type?: TypeResourceIdentifier;
211
+ readonly fields?: FieldContainer;
212
+ }
213
+ export interface ShoppingListSetTextLineItemDescriptionAction {
214
+ readonly action: 'setTextLineItemDescription';
215
+ readonly textLineItemId: string;
216
+ readonly description?: LocalizedString;
217
+ }
@@ -0,0 +1,86 @@
1
+ import { BaseResource, CreatedBy, LastModifiedBy, LocalizedString } from './common';
2
+ export interface State extends BaseResource {
3
+ readonly id: string;
4
+ readonly version: number;
5
+ readonly createdAt: string;
6
+ readonly lastModifiedAt: string;
7
+ readonly lastModifiedBy?: LastModifiedBy;
8
+ readonly createdBy?: CreatedBy;
9
+ readonly key: string;
10
+ readonly type: StateTypeEnum;
11
+ readonly name?: LocalizedString;
12
+ readonly description?: LocalizedString;
13
+ readonly initial: boolean;
14
+ readonly builtIn: boolean;
15
+ readonly roles?: StateRoleEnum[];
16
+ readonly transitions?: StateReference[];
17
+ }
18
+ export interface StateDraft {
19
+ readonly key: string;
20
+ readonly type: StateTypeEnum;
21
+ readonly name?: LocalizedString;
22
+ readonly description?: LocalizedString;
23
+ readonly initial?: boolean;
24
+ readonly roles?: StateRoleEnum[];
25
+ readonly transitions?: StateResourceIdentifier[];
26
+ }
27
+ export interface StatePagedQueryResponse {
28
+ readonly limit: number;
29
+ readonly offset: number;
30
+ readonly count: number;
31
+ readonly total?: number;
32
+ readonly results: State[];
33
+ }
34
+ export interface StateReference {
35
+ readonly typeId: 'state';
36
+ readonly id: string;
37
+ readonly obj?: State;
38
+ }
39
+ export interface StateResourceIdentifier {
40
+ readonly typeId: 'state';
41
+ readonly id?: string;
42
+ readonly key?: string;
43
+ }
44
+ export declare type StateRoleEnum = 'Return' | 'ReviewIncludedInStatistics';
45
+ export declare type StateTypeEnum = 'LineItemState' | 'OrderState' | 'PaymentState' | 'ProductState' | 'ReviewState';
46
+ export interface StateUpdate {
47
+ readonly version: number;
48
+ readonly actions: StateUpdateAction[];
49
+ }
50
+ export declare type StateUpdateAction = StateAddRolesAction | StateChangeInitialAction | StateChangeKeyAction | StateChangeTypeAction | StateRemoveRolesAction | StateSetDescriptionAction | StateSetNameAction | StateSetRolesAction | StateSetTransitionsAction;
51
+ export interface StateAddRolesAction {
52
+ readonly action: 'addRoles';
53
+ readonly roles: StateRoleEnum[];
54
+ }
55
+ export interface StateChangeInitialAction {
56
+ readonly action: 'changeInitial';
57
+ readonly initial: boolean;
58
+ }
59
+ export interface StateChangeKeyAction {
60
+ readonly action: 'changeKey';
61
+ readonly key: string;
62
+ }
63
+ export interface StateChangeTypeAction {
64
+ readonly action: 'changeType';
65
+ readonly type: StateTypeEnum;
66
+ }
67
+ export interface StateRemoveRolesAction {
68
+ readonly action: 'removeRoles';
69
+ readonly roles: StateRoleEnum[];
70
+ }
71
+ export interface StateSetDescriptionAction {
72
+ readonly action: 'setDescription';
73
+ readonly description: LocalizedString;
74
+ }
75
+ export interface StateSetNameAction {
76
+ readonly action: 'setName';
77
+ readonly name: LocalizedString;
78
+ }
79
+ export interface StateSetRolesAction {
80
+ readonly action: 'setRoles';
81
+ readonly roles: StateRoleEnum[];
82
+ }
83
+ export interface StateSetTransitionsAction {
84
+ readonly action: 'setTransitions';
85
+ readonly transitions?: StateResourceIdentifier[];
86
+ }