@gradientedge/commercetools-utils 4.11.2 → 4.12.1
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/dist/ge-commercetools-utils-browser.cjs.js +2 -0
- package/dist/ge-commercetools-utils-browser.cjs.js.map +1 -0
- package/dist/ge-commercetools-utils-browser.esm.js +2 -0
- package/dist/ge-commercetools-utils-browser.esm.js.map +1 -0
- package/dist/ge-commercetools-utils-node.cjs.js +2 -0
- package/dist/ge-commercetools-utils-node.cjs.js.map +1 -0
- package/dist/ge-commercetools-utils-node.esm.js +1 -0
- package/dist/typings/api/CommercetoolsApi.d.ts +436 -0
- package/dist/{api → typings/api}/index.d.ts +0 -1
- package/dist/typings/api/types.d.ts +12 -0
- package/dist/typings/auth/CommercetoolsAuth.d.ts +22 -0
- package/dist/typings/auth/CommercetoolsAuthApi.d.ts +21 -0
- package/dist/typings/auth/CommercetoolsGrant.d.ts +13 -0
- package/dist/{auth → typings/auth}/constants.d.ts +0 -4
- package/dist/{auth → typings/auth}/index.d.ts +0 -1
- package/dist/typings/auth/scopes.d.ts +2 -0
- package/dist/typings/auth/types.d.ts +43 -0
- package/dist/{auth → typings/auth}/utils.d.ts +0 -1
- package/dist/typings/constants.d.ts +1 -0
- package/dist/typings/error/CommercetoolsError.d.ts +16 -0
- package/dist/{error → typings/error}/index.d.ts +0 -1
- package/dist/typings/index.d.ts +6 -0
- package/dist/typings/models/cart-discount.d.ts +196 -0
- package/dist/typings/models/cart.d.ts +597 -0
- package/dist/typings/models/category.d.ts +166 -0
- package/dist/typings/models/channel.d.ts +103 -0
- package/dist/typings/models/common.d.ts +232 -0
- package/dist/typings/models/custom-object.d.ts +30 -0
- package/dist/typings/models/customer-group.d.ts +58 -0
- package/dist/typings/models/customer.d.ts +276 -0
- package/dist/typings/models/discount-code.d.ts +116 -0
- package/dist/typings/models/error.d.ts +412 -0
- package/dist/typings/models/extension.d.ts +78 -0
- package/dist/typings/models/graph-ql.d.ts +21 -0
- package/dist/typings/models/index.d.ts +33 -0
- package/dist/typings/models/inventory.d.ts +82 -0
- package/dist/typings/models/me.d.ts +481 -0
- package/dist/typings/models/message.d.ts +1823 -0
- package/dist/typings/models/order-edit.d.ts +565 -0
- package/dist/typings/models/order.d.ts +558 -0
- package/dist/typings/models/payment.d.ts +208 -0
- package/dist/typings/models/product-discount.d.ts +123 -0
- package/dist/typings/models/product-selection.d.ts +106 -0
- package/dist/typings/models/product-type.d.ts +216 -0
- package/dist/typings/models/product.d.ts +517 -0
- package/dist/typings/models/project.d.ts +108 -0
- package/dist/typings/models/review.d.ts +115 -0
- package/dist/typings/models/scalar-types.d.ts +4 -0
- package/dist/typings/models/shipping-method.d.ts +160 -0
- package/dist/typings/models/shopping-list.d.ts +217 -0
- package/dist/typings/models/state.d.ts +86 -0
- package/dist/typings/models/store.d.ts +121 -0
- package/dist/typings/models/subscription.d.ts +148 -0
- package/dist/typings/models/tax-category.d.ts +87 -0
- package/dist/typings/models/type.d.ts +182 -0
- package/dist/typings/models/zone.d.ts +65 -0
- package/dist/typings/types.d.ts +21 -0
- package/dist/typings/utils/format.d.ts +1 -0
- package/dist/{utils → typings/utils}/index.d.ts +0 -2
- package/dist/typings/utils/mask.d.ts +6 -0
- package/dist/typings/utils/useragent.d.ts +1 -0
- package/package.json +34 -19
- package/dist/api/CommercetoolsApi.d.ts +0 -1096
- package/dist/api/CommercetoolsApi.d.ts.map +0 -1
- package/dist/api/CommercetoolsApi.js +0 -1425
- package/dist/api/CommercetoolsApi.js.map +0 -1
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -15
- package/dist/api/index.js.map +0 -1
- package/dist/api/types.d.ts +0 -33
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js +0 -3
- package/dist/api/types.js.map +0 -1
- package/dist/auth/CommercetoolsAuth.d.ts +0 -182
- package/dist/auth/CommercetoolsAuth.d.ts.map +0 -1
- package/dist/auth/CommercetoolsAuth.js +0 -326
- package/dist/auth/CommercetoolsAuth.js.map +0 -1
- package/dist/auth/CommercetoolsAuthApi.d.ts +0 -74
- package/dist/auth/CommercetoolsAuthApi.d.ts.map +0 -1
- package/dist/auth/CommercetoolsAuthApi.js +0 -248
- package/dist/auth/CommercetoolsAuthApi.js.map +0 -1
- package/dist/auth/CommercetoolsGrant.d.ts +0 -66
- package/dist/auth/CommercetoolsGrant.d.ts.map +0 -1
- package/dist/auth/CommercetoolsGrant.js +0 -82
- package/dist/auth/CommercetoolsGrant.js.map +0 -1
- package/dist/auth/constants.d.ts.map +0 -1
- package/dist/auth/constants.js +0 -32
- package/dist/auth/constants.js.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -15
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/scopes.d.ts +0 -11
- package/dist/auth/scopes.d.ts.map +0 -1
- package/dist/auth/scopes.js +0 -30
- package/dist/auth/scopes.js.map +0 -1
- package/dist/auth/types.d.ts +0 -120
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js +0 -28
- package/dist/auth/types.js.map +0 -1
- package/dist/auth/utils.d.ts.map +0 -1
- package/dist/auth/utils.js +0 -15
- package/dist/auth/utils.js.map +0 -1
- package/dist/constants.d.ts +0 -6
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -9
- package/dist/constants.js.map +0 -1
- package/dist/error/CommercetoolsError.d.ts +0 -38
- package/dist/error/CommercetoolsError.d.ts.map +0 -1
- package/dist/error/CommercetoolsError.js +0 -117
- package/dist/error/CommercetoolsError.js.map +0 -1
- package/dist/error/index.d.ts.map +0 -1
- package/dist/error/index.js +0 -14
- package/dist/error/index.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -21
- package/dist/index.js.map +0 -1
- package/dist/types.d.ts +0 -44
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -16
- package/dist/types.js.map +0 -1
- package/dist/utils/format.d.ts +0 -11
- package/dist/utils/format.d.ts.map +0 -1
- package/dist/utils/format.js +0 -48
- package/dist/utils/format.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -17
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/isNode.d.ts +0 -2
- package/dist/utils/isNode.d.ts.map +0 -1
- package/dist/utils/isNode.js +0 -12
- package/dist/utils/isNode.js.map +0 -1
- package/dist/utils/mask.d.ts +0 -28
- package/dist/utils/mask.d.ts.map +0 -1
- package/dist/utils/mask.js +0 -56
- package/dist/utils/mask.js.map +0 -1
- package/dist/utils/useragent.d.ts +0 -10
- package/dist/utils/useragent.d.ts.map +0 -1
- package/dist/utils/useragent.js +0 -20
- package/dist/utils/useragent.js.map +0 -1
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import { ChannelReference, ChannelResourceIdentifier, ChannelRoleEnum } from './channel';
|
|
2
|
+
import { LocalizedString, Price, PriceDraft, Reference, ReferenceTypeId } from './common';
|
|
3
|
+
import { CustomerGroupReference } from './customer-group';
|
|
4
|
+
import { OrderEditPreviewFailure } from './order-edit';
|
|
5
|
+
import { Attribute } from './product';
|
|
6
|
+
export interface ErrorByExtension {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly key?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type ErrorObject = AccessDeniedError | AnonymousIdAlreadyInUseError | AttributeDefinitionAlreadyExistsError | AttributeDefinitionTypeConflictError | AttributeNameDoesNotExistError | BadGatewayError | ConcurrentModificationError | DiscountCodeNonApplicableError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateEnumValuesError | DuplicateFieldError | DuplicateFieldWithConflictingResourceError | DuplicatePriceScopeError | DuplicateVariantValuesError | EditPreviewFailedError | EnumKeyAlreadyExistsError | EnumKeyDoesNotExistError | EnumValueIsUsedError | EnumValuesMustMatchError | ExtensionBadResponseError | ExtensionNoResponseError | ExtensionUpdateActionsFailedError | ExternalOAuthFailedError | FeatureRemovedError | GeneralError | InsufficientScopeError | InternalConstraintViolatedError | InvalidCredentialsError | InvalidCurrentPasswordError | InvalidFieldError | InvalidInputError | InvalidItemShippingDetailsError | InvalidJsonInputError | InvalidOperationError | InvalidSubjectError | InvalidTokenError | LanguageUsedInStoresError | MatchingPriceNotFoundError | MaxResourceLimitExceededError | MissingRoleOnChannelError | MissingTaxRateForCountryError | NoMatchingProductDiscountFoundError | NotEnabledError | ObjectNotFoundError | OutOfStockError | OverCapacityError | PendingOperationError | PriceChangedError | ProjectNotConfiguredForLanguagesError | QueryComplexityLimitExceededError | QueryTimedOutError | ReferenceExistsError | ReferencedResourceNotFoundError | RequiredFieldError | ResourceNotFoundError | ResourceSizeLimitExceededError | SearchDeactivatedError | SearchExecutionFailureError | SearchFacetPathNotFoundError | SearchIndexingInProgressError | SemanticErrorError | ShippingMethodDoesNotMatchCartError | SyntaxErrorError | WeakPasswordError;
|
|
11
|
+
export interface AccessDeniedError {
|
|
12
|
+
readonly code: 'access_denied';
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
readonly message: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AnonymousIdAlreadyInUseError {
|
|
17
|
+
readonly code: 'AnonymousIdAlreadyInUse';
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
readonly message: string;
|
|
20
|
+
}
|
|
21
|
+
export interface AttributeDefinitionAlreadyExistsError {
|
|
22
|
+
readonly code: 'AttributeDefinitionAlreadyExists';
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
readonly message: string;
|
|
25
|
+
readonly conflictingProductTypeId: string;
|
|
26
|
+
readonly conflictingProductTypeName: string;
|
|
27
|
+
readonly conflictingAttributeName: string;
|
|
28
|
+
}
|
|
29
|
+
export interface AttributeDefinitionTypeConflictError {
|
|
30
|
+
readonly code: 'AttributeDefinitionTypeConflict';
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
readonly message: string;
|
|
33
|
+
readonly conflictingProductTypeId: string;
|
|
34
|
+
readonly conflictingProductTypeName: string;
|
|
35
|
+
readonly conflictingAttributeName: string;
|
|
36
|
+
}
|
|
37
|
+
export interface AttributeNameDoesNotExistError {
|
|
38
|
+
readonly code: 'AttributeNameDoesNotExist';
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
readonly message: string;
|
|
41
|
+
readonly invalidAttributeName: string;
|
|
42
|
+
}
|
|
43
|
+
export interface BadGatewayError {
|
|
44
|
+
readonly code: 'BadGateway';
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
readonly message: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ConcurrentModificationError {
|
|
49
|
+
readonly code: 'ConcurrentModification';
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
readonly message: string;
|
|
52
|
+
readonly currentVersion?: number;
|
|
53
|
+
}
|
|
54
|
+
export interface DiscountCodeNonApplicableError {
|
|
55
|
+
readonly code: 'DiscountCodeNonApplicable';
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
readonly message: string;
|
|
58
|
+
readonly discountCode?: string;
|
|
59
|
+
readonly reason?: string;
|
|
60
|
+
readonly dicountCodeId?: string;
|
|
61
|
+
readonly validFrom?: string;
|
|
62
|
+
readonly validUntil?: string;
|
|
63
|
+
readonly validityCheckTime?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface DuplicateAttributeValueError {
|
|
66
|
+
readonly code: 'DuplicateAttributeValue';
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
readonly message: string;
|
|
69
|
+
readonly attribute: Attribute;
|
|
70
|
+
}
|
|
71
|
+
export interface DuplicateAttributeValuesError {
|
|
72
|
+
readonly code: 'DuplicateAttributeValues';
|
|
73
|
+
[key: string]: any;
|
|
74
|
+
readonly message: string;
|
|
75
|
+
readonly attributes: Attribute[];
|
|
76
|
+
}
|
|
77
|
+
export interface DuplicateEnumValuesError {
|
|
78
|
+
readonly code: 'DuplicateEnumValues';
|
|
79
|
+
[key: string]: any;
|
|
80
|
+
readonly message: string;
|
|
81
|
+
readonly duplicates: string[];
|
|
82
|
+
}
|
|
83
|
+
export interface DuplicateFieldError {
|
|
84
|
+
readonly code: 'DuplicateField';
|
|
85
|
+
[key: string]: any;
|
|
86
|
+
readonly message: string;
|
|
87
|
+
readonly field?: string;
|
|
88
|
+
readonly duplicateValue?: any;
|
|
89
|
+
readonly conflictingResource?: Reference;
|
|
90
|
+
}
|
|
91
|
+
export interface DuplicateFieldWithConflictingResourceError {
|
|
92
|
+
readonly code: 'DuplicateFieldWithConflictingResource';
|
|
93
|
+
[key: string]: any;
|
|
94
|
+
readonly message: string;
|
|
95
|
+
readonly field: string;
|
|
96
|
+
readonly duplicateValue: any;
|
|
97
|
+
readonly conflictingResource: Reference;
|
|
98
|
+
}
|
|
99
|
+
export interface DuplicatePriceScopeError {
|
|
100
|
+
readonly code: 'DuplicatePriceScope';
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
readonly message: string;
|
|
103
|
+
readonly conflictingPrices: Price[];
|
|
104
|
+
}
|
|
105
|
+
export interface DuplicateVariantValuesError {
|
|
106
|
+
readonly code: 'DuplicateVariantValues';
|
|
107
|
+
[key: string]: any;
|
|
108
|
+
readonly message: string;
|
|
109
|
+
readonly variantValues: VariantValues;
|
|
110
|
+
}
|
|
111
|
+
export interface EditPreviewFailedError {
|
|
112
|
+
readonly code: 'EditPreviewFailed';
|
|
113
|
+
[key: string]: any;
|
|
114
|
+
readonly message: string;
|
|
115
|
+
readonly result: OrderEditPreviewFailure;
|
|
116
|
+
}
|
|
117
|
+
export interface EnumKeyAlreadyExistsError {
|
|
118
|
+
readonly code: 'EnumKeyAlreadyExists';
|
|
119
|
+
[key: string]: any;
|
|
120
|
+
readonly message: string;
|
|
121
|
+
readonly conflictingEnumKey: string;
|
|
122
|
+
readonly conflictingAttributeName: string;
|
|
123
|
+
}
|
|
124
|
+
export interface EnumKeyDoesNotExistError {
|
|
125
|
+
readonly code: 'EnumKeyDoesNotExist';
|
|
126
|
+
[key: string]: any;
|
|
127
|
+
readonly message: string;
|
|
128
|
+
readonly conflictingEnumKey: string;
|
|
129
|
+
readonly conflictingAttributeName: string;
|
|
130
|
+
}
|
|
131
|
+
export interface EnumValueIsUsedError {
|
|
132
|
+
readonly code: 'EnumValueIsUsed';
|
|
133
|
+
[key: string]: any;
|
|
134
|
+
readonly message: string;
|
|
135
|
+
}
|
|
136
|
+
export interface EnumValuesMustMatchError {
|
|
137
|
+
readonly code: 'EnumValuesMustMatch';
|
|
138
|
+
[key: string]: any;
|
|
139
|
+
readonly message: string;
|
|
140
|
+
}
|
|
141
|
+
export interface ErrorResponse {
|
|
142
|
+
readonly statusCode: number;
|
|
143
|
+
readonly message: string;
|
|
144
|
+
readonly error?: string;
|
|
145
|
+
readonly error_description?: string;
|
|
146
|
+
readonly errors?: ErrorObject[];
|
|
147
|
+
}
|
|
148
|
+
export interface ExtensionBadResponseError {
|
|
149
|
+
readonly code: 'ExtensionBadResponse';
|
|
150
|
+
[key: string]: any;
|
|
151
|
+
readonly message: string;
|
|
152
|
+
readonly localizedMessage?: LocalizedString;
|
|
153
|
+
readonly extensionExtraInfo?: any;
|
|
154
|
+
readonly errorByExtension: ErrorByExtension;
|
|
155
|
+
}
|
|
156
|
+
export interface ExtensionNoResponseError {
|
|
157
|
+
readonly code: 'ExtensionNoResponse';
|
|
158
|
+
[key: string]: any;
|
|
159
|
+
readonly message: string;
|
|
160
|
+
readonly extensionId: string;
|
|
161
|
+
readonly extensionKey?: string;
|
|
162
|
+
}
|
|
163
|
+
export interface ExtensionUpdateActionsFailedError {
|
|
164
|
+
readonly code: 'ExtensionUpdateActionsFailed';
|
|
165
|
+
[key: string]: any;
|
|
166
|
+
readonly message: string;
|
|
167
|
+
readonly localizedMessage?: LocalizedString;
|
|
168
|
+
readonly extensionExtraInfo?: any;
|
|
169
|
+
readonly errorByExtension: ErrorByExtension;
|
|
170
|
+
}
|
|
171
|
+
export interface ExternalOAuthFailedError {
|
|
172
|
+
readonly code: 'ExternalOAuthFailed';
|
|
173
|
+
[key: string]: any;
|
|
174
|
+
readonly message: string;
|
|
175
|
+
}
|
|
176
|
+
export interface FeatureRemovedError {
|
|
177
|
+
readonly code: 'FeatureRemoved';
|
|
178
|
+
[key: string]: any;
|
|
179
|
+
readonly message: string;
|
|
180
|
+
}
|
|
181
|
+
export interface GeneralError {
|
|
182
|
+
readonly code: 'General';
|
|
183
|
+
[key: string]: any;
|
|
184
|
+
readonly message: string;
|
|
185
|
+
}
|
|
186
|
+
export interface InsufficientScopeError {
|
|
187
|
+
readonly code: 'insufficient_scope';
|
|
188
|
+
[key: string]: any;
|
|
189
|
+
readonly message: string;
|
|
190
|
+
}
|
|
191
|
+
export interface InternalConstraintViolatedError {
|
|
192
|
+
readonly code: 'InternalConstraintViolated';
|
|
193
|
+
[key: string]: any;
|
|
194
|
+
readonly message: string;
|
|
195
|
+
}
|
|
196
|
+
export interface InvalidCredentialsError {
|
|
197
|
+
readonly code: 'InvalidCredentials';
|
|
198
|
+
[key: string]: any;
|
|
199
|
+
readonly message: string;
|
|
200
|
+
}
|
|
201
|
+
export interface InvalidCurrentPasswordError {
|
|
202
|
+
readonly code: 'InvalidCurrentPassword';
|
|
203
|
+
[key: string]: any;
|
|
204
|
+
readonly message: string;
|
|
205
|
+
}
|
|
206
|
+
export interface InvalidFieldError {
|
|
207
|
+
readonly code: 'InvalidField';
|
|
208
|
+
[key: string]: any;
|
|
209
|
+
readonly message: string;
|
|
210
|
+
readonly field: string;
|
|
211
|
+
readonly invalidValue: any;
|
|
212
|
+
readonly allowedValues?: any[];
|
|
213
|
+
}
|
|
214
|
+
export interface InvalidInputError {
|
|
215
|
+
readonly code: 'InvalidInput';
|
|
216
|
+
[key: string]: any;
|
|
217
|
+
readonly message: string;
|
|
218
|
+
}
|
|
219
|
+
export interface InvalidItemShippingDetailsError {
|
|
220
|
+
readonly code: 'InvalidItemShippingDetails';
|
|
221
|
+
[key: string]: any;
|
|
222
|
+
readonly message: string;
|
|
223
|
+
readonly subject: string;
|
|
224
|
+
readonly itemId: string;
|
|
225
|
+
}
|
|
226
|
+
export interface InvalidJsonInputError {
|
|
227
|
+
readonly code: 'InvalidJsonInput';
|
|
228
|
+
[key: string]: any;
|
|
229
|
+
readonly message: string;
|
|
230
|
+
}
|
|
231
|
+
export interface InvalidOperationError {
|
|
232
|
+
readonly code: 'InvalidOperation';
|
|
233
|
+
[key: string]: any;
|
|
234
|
+
readonly message: string;
|
|
235
|
+
}
|
|
236
|
+
export interface InvalidSubjectError {
|
|
237
|
+
readonly code: 'InvalidSubject';
|
|
238
|
+
[key: string]: any;
|
|
239
|
+
readonly message: string;
|
|
240
|
+
}
|
|
241
|
+
export interface InvalidTokenError {
|
|
242
|
+
readonly code: 'invalid_token';
|
|
243
|
+
[key: string]: any;
|
|
244
|
+
readonly message: string;
|
|
245
|
+
}
|
|
246
|
+
export interface LanguageUsedInStoresError {
|
|
247
|
+
readonly code: 'LanguageUsedInStores';
|
|
248
|
+
[key: string]: any;
|
|
249
|
+
readonly message: string;
|
|
250
|
+
}
|
|
251
|
+
export interface MatchingPriceNotFoundError {
|
|
252
|
+
readonly code: 'MatchingPriceNotFound';
|
|
253
|
+
[key: string]: any;
|
|
254
|
+
readonly message: string;
|
|
255
|
+
readonly productId: string;
|
|
256
|
+
readonly variantId: number;
|
|
257
|
+
readonly currency?: string;
|
|
258
|
+
readonly country?: string;
|
|
259
|
+
readonly customerGroup?: CustomerGroupReference;
|
|
260
|
+
readonly channel?: ChannelReference;
|
|
261
|
+
}
|
|
262
|
+
export interface MaxResourceLimitExceededError {
|
|
263
|
+
readonly code: 'MaxResourceLimitExceeded';
|
|
264
|
+
[key: string]: any;
|
|
265
|
+
readonly message: string;
|
|
266
|
+
readonly exceededResource: ReferenceTypeId;
|
|
267
|
+
}
|
|
268
|
+
export interface MissingRoleOnChannelError {
|
|
269
|
+
readonly code: 'MissingRoleOnChannel';
|
|
270
|
+
[key: string]: any;
|
|
271
|
+
readonly message: string;
|
|
272
|
+
readonly channel?: ChannelResourceIdentifier;
|
|
273
|
+
readonly missingRole: ChannelRoleEnum;
|
|
274
|
+
}
|
|
275
|
+
export interface MissingTaxRateForCountryError {
|
|
276
|
+
readonly code: 'MissingTaxRateForCountry';
|
|
277
|
+
[key: string]: any;
|
|
278
|
+
readonly message: string;
|
|
279
|
+
readonly taxCategoryId: string;
|
|
280
|
+
readonly country?: string;
|
|
281
|
+
readonly state?: string;
|
|
282
|
+
}
|
|
283
|
+
export interface NoMatchingProductDiscountFoundError {
|
|
284
|
+
readonly code: 'NoMatchingProductDiscountFound';
|
|
285
|
+
[key: string]: any;
|
|
286
|
+
readonly message: string;
|
|
287
|
+
}
|
|
288
|
+
export interface NotEnabledError {
|
|
289
|
+
readonly code: 'NotEnabled';
|
|
290
|
+
[key: string]: any;
|
|
291
|
+
readonly message: string;
|
|
292
|
+
}
|
|
293
|
+
export interface ObjectNotFoundError {
|
|
294
|
+
readonly code: 'ObjectNotFound';
|
|
295
|
+
[key: string]: any;
|
|
296
|
+
readonly message: string;
|
|
297
|
+
}
|
|
298
|
+
export interface OutOfStockError {
|
|
299
|
+
readonly code: 'OutOfStock';
|
|
300
|
+
[key: string]: any;
|
|
301
|
+
readonly message: string;
|
|
302
|
+
readonly lineItems: string[];
|
|
303
|
+
readonly skus: string[];
|
|
304
|
+
}
|
|
305
|
+
export interface OverCapacityError {
|
|
306
|
+
readonly code: 'OverCapacity';
|
|
307
|
+
[key: string]: any;
|
|
308
|
+
readonly message: string;
|
|
309
|
+
}
|
|
310
|
+
export interface PendingOperationError {
|
|
311
|
+
readonly code: 'PendingOperation';
|
|
312
|
+
[key: string]: any;
|
|
313
|
+
readonly message: string;
|
|
314
|
+
}
|
|
315
|
+
export interface PriceChangedError {
|
|
316
|
+
readonly code: 'PriceChanged';
|
|
317
|
+
[key: string]: any;
|
|
318
|
+
readonly message: string;
|
|
319
|
+
readonly lineItems: string[];
|
|
320
|
+
readonly shipping: boolean;
|
|
321
|
+
}
|
|
322
|
+
export interface ProjectNotConfiguredForLanguagesError {
|
|
323
|
+
readonly code: 'ProjectNotConfiguredForLanguages';
|
|
324
|
+
[key: string]: any;
|
|
325
|
+
readonly message: string;
|
|
326
|
+
readonly languages?: string[];
|
|
327
|
+
}
|
|
328
|
+
export interface QueryComplexityLimitExceededError {
|
|
329
|
+
readonly code: 'QueryComplexityLimitExceeded';
|
|
330
|
+
[key: string]: any;
|
|
331
|
+
readonly message: string;
|
|
332
|
+
}
|
|
333
|
+
export interface QueryTimedOutError {
|
|
334
|
+
readonly code: 'QueryTimedOut';
|
|
335
|
+
[key: string]: any;
|
|
336
|
+
readonly message: string;
|
|
337
|
+
}
|
|
338
|
+
export interface ReferenceExistsError {
|
|
339
|
+
readonly code: 'ReferenceExists';
|
|
340
|
+
[key: string]: any;
|
|
341
|
+
readonly message: string;
|
|
342
|
+
readonly referencedBy?: ReferenceTypeId;
|
|
343
|
+
}
|
|
344
|
+
export interface ReferencedResourceNotFoundError {
|
|
345
|
+
readonly code: 'ReferencedResourceNotFound';
|
|
346
|
+
[key: string]: any;
|
|
347
|
+
readonly message: string;
|
|
348
|
+
readonly typeId: ReferenceTypeId;
|
|
349
|
+
readonly id?: string;
|
|
350
|
+
readonly key?: string;
|
|
351
|
+
}
|
|
352
|
+
export interface RequiredFieldError {
|
|
353
|
+
readonly code: 'RequiredField';
|
|
354
|
+
[key: string]: any;
|
|
355
|
+
readonly message: string;
|
|
356
|
+
readonly field: string;
|
|
357
|
+
}
|
|
358
|
+
export interface ResourceNotFoundError {
|
|
359
|
+
readonly code: 'ResourceNotFound';
|
|
360
|
+
[key: string]: any;
|
|
361
|
+
readonly message: string;
|
|
362
|
+
}
|
|
363
|
+
export interface ResourceSizeLimitExceededError {
|
|
364
|
+
readonly code: 'ResourceSizeLimitExceeded';
|
|
365
|
+
[key: string]: any;
|
|
366
|
+
readonly message: string;
|
|
367
|
+
}
|
|
368
|
+
export interface SearchDeactivatedError {
|
|
369
|
+
readonly code: 'SearchDeactivated';
|
|
370
|
+
[key: string]: any;
|
|
371
|
+
readonly message: string;
|
|
372
|
+
}
|
|
373
|
+
export interface SearchExecutionFailureError {
|
|
374
|
+
readonly code: 'SearchExecutionFailure';
|
|
375
|
+
[key: string]: any;
|
|
376
|
+
readonly message: string;
|
|
377
|
+
}
|
|
378
|
+
export interface SearchFacetPathNotFoundError {
|
|
379
|
+
readonly code: 'SearchFacetPathNotFound';
|
|
380
|
+
[key: string]: any;
|
|
381
|
+
readonly message: string;
|
|
382
|
+
}
|
|
383
|
+
export interface SearchIndexingInProgressError {
|
|
384
|
+
readonly code: 'SearchIndexingInProgress';
|
|
385
|
+
[key: string]: any;
|
|
386
|
+
readonly message: string;
|
|
387
|
+
}
|
|
388
|
+
export interface SemanticErrorError {
|
|
389
|
+
readonly code: 'SemanticError';
|
|
390
|
+
[key: string]: any;
|
|
391
|
+
readonly message: string;
|
|
392
|
+
}
|
|
393
|
+
export interface ShippingMethodDoesNotMatchCartError {
|
|
394
|
+
readonly code: 'ShippingMethodDoesNotMatchCart';
|
|
395
|
+
[key: string]: any;
|
|
396
|
+
readonly message: string;
|
|
397
|
+
}
|
|
398
|
+
export interface SyntaxErrorError {
|
|
399
|
+
readonly code: 'SyntaxError';
|
|
400
|
+
[key: string]: any;
|
|
401
|
+
readonly message: string;
|
|
402
|
+
}
|
|
403
|
+
export interface VariantValues {
|
|
404
|
+
readonly sku?: string;
|
|
405
|
+
readonly prices: PriceDraft[];
|
|
406
|
+
readonly attributes: Attribute[];
|
|
407
|
+
}
|
|
408
|
+
export interface WeakPasswordError {
|
|
409
|
+
readonly code: 'WeakPassword';
|
|
410
|
+
[key: string]: any;
|
|
411
|
+
readonly message: string;
|
|
412
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { BaseResource, CreatedBy, LastModifiedBy, Reference } from './common';
|
|
2
|
+
export interface Extension 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 destination: ExtensionDestination;
|
|
11
|
+
readonly triggers: ExtensionTrigger[];
|
|
12
|
+
readonly timeoutInMs?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare type ExtensionAction = 'Create' | 'Update';
|
|
15
|
+
export declare type ExtensionDestination = AWSLambdaDestination | HttpDestination;
|
|
16
|
+
export interface AWSLambdaDestination {
|
|
17
|
+
readonly type: 'AWSLambda';
|
|
18
|
+
readonly arn: string;
|
|
19
|
+
readonly accessKey: string;
|
|
20
|
+
readonly accessSecret: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ExtensionDraft {
|
|
23
|
+
readonly key?: string;
|
|
24
|
+
readonly destination: ExtensionDestination;
|
|
25
|
+
readonly triggers: ExtensionTrigger[];
|
|
26
|
+
readonly timeoutInMs?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ExtensionInput {
|
|
29
|
+
readonly action: ExtensionAction;
|
|
30
|
+
readonly resource: Reference;
|
|
31
|
+
}
|
|
32
|
+
export interface ExtensionPagedQueryResponse {
|
|
33
|
+
readonly limit: number;
|
|
34
|
+
readonly count: number;
|
|
35
|
+
readonly total?: number;
|
|
36
|
+
readonly offset: number;
|
|
37
|
+
readonly results: Extension[];
|
|
38
|
+
}
|
|
39
|
+
export declare type ExtensionResourceTypeId = 'cart' | 'customer' | 'order' | 'payment';
|
|
40
|
+
export interface ExtensionTrigger {
|
|
41
|
+
readonly resourceTypeId: ExtensionResourceTypeId;
|
|
42
|
+
readonly actions: ExtensionAction[];
|
|
43
|
+
}
|
|
44
|
+
export interface ExtensionUpdate {
|
|
45
|
+
readonly version: number;
|
|
46
|
+
readonly actions: ExtensionUpdateAction[];
|
|
47
|
+
}
|
|
48
|
+
export declare type ExtensionUpdateAction = ExtensionChangeDestinationAction | ExtensionChangeTriggersAction | ExtensionSetKeyAction | ExtensionSetTimeoutInMsAction;
|
|
49
|
+
export interface HttpDestination {
|
|
50
|
+
readonly type: 'HTTP';
|
|
51
|
+
readonly url: string;
|
|
52
|
+
readonly authentication?: HttpDestinationAuthentication;
|
|
53
|
+
}
|
|
54
|
+
export declare type HttpDestinationAuthentication = AuthorizationHeaderAuthentication | AzureFunctionsAuthentication;
|
|
55
|
+
export interface AuthorizationHeaderAuthentication {
|
|
56
|
+
readonly type: 'AuthorizationHeader';
|
|
57
|
+
readonly headerValue: string;
|
|
58
|
+
}
|
|
59
|
+
export interface AzureFunctionsAuthentication {
|
|
60
|
+
readonly type: 'AzureFunctions';
|
|
61
|
+
readonly key: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ExtensionChangeDestinationAction {
|
|
64
|
+
readonly action: 'changeDestination';
|
|
65
|
+
readonly destination: ExtensionDestination;
|
|
66
|
+
}
|
|
67
|
+
export interface ExtensionChangeTriggersAction {
|
|
68
|
+
readonly action: 'changeTriggers';
|
|
69
|
+
readonly triggers: ExtensionTrigger[];
|
|
70
|
+
}
|
|
71
|
+
export interface ExtensionSetKeyAction {
|
|
72
|
+
readonly action: 'setKey';
|
|
73
|
+
readonly key?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface ExtensionSetTimeoutInMsAction {
|
|
76
|
+
readonly action: 'setTimeoutInMs';
|
|
77
|
+
readonly timeoutInMs?: number;
|
|
78
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface GraphQLError {
|
|
2
|
+
readonly message: string;
|
|
3
|
+
readonly locations: GraphQLErrorLocation[];
|
|
4
|
+
readonly path: any[];
|
|
5
|
+
}
|
|
6
|
+
export interface GraphQLErrorLocation {
|
|
7
|
+
readonly line: number;
|
|
8
|
+
readonly column: number;
|
|
9
|
+
}
|
|
10
|
+
export interface GraphQLRequest {
|
|
11
|
+
readonly query: string;
|
|
12
|
+
readonly operationName?: string;
|
|
13
|
+
readonly variables?: GraphQLVariablesMap;
|
|
14
|
+
}
|
|
15
|
+
export interface GraphQLResponse {
|
|
16
|
+
readonly data?: any;
|
|
17
|
+
readonly errors?: GraphQLError[];
|
|
18
|
+
}
|
|
19
|
+
export interface GraphQLVariablesMap {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export * from './cart';
|
|
2
|
+
export * from './cart-discount';
|
|
3
|
+
export * from './category';
|
|
4
|
+
export * from './channel';
|
|
5
|
+
export * from './common';
|
|
6
|
+
export * from './custom-object';
|
|
7
|
+
export * from './customer';
|
|
8
|
+
export * from './customer-group';
|
|
9
|
+
export * from './discount-code';
|
|
10
|
+
export * from './error';
|
|
11
|
+
export * from './extension';
|
|
12
|
+
export * from './graph-ql';
|
|
13
|
+
export * from './inventory';
|
|
14
|
+
export * from './me';
|
|
15
|
+
export * from './message';
|
|
16
|
+
export * from './order';
|
|
17
|
+
export * from './order-edit';
|
|
18
|
+
export * from './payment';
|
|
19
|
+
export * from './product';
|
|
20
|
+
export * from './product-discount';
|
|
21
|
+
export * from './product-selection';
|
|
22
|
+
export * from './product-type';
|
|
23
|
+
export * from './project';
|
|
24
|
+
export * from './review';
|
|
25
|
+
export * from './scalar-types';
|
|
26
|
+
export * from './shipping-method';
|
|
27
|
+
export * from './shopping-list';
|
|
28
|
+
export * from './state';
|
|
29
|
+
export * from './store';
|
|
30
|
+
export * from './subscription';
|
|
31
|
+
export * from './tax-category';
|
|
32
|
+
export * from './type';
|
|
33
|
+
export * from './zone';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ChannelReference, ChannelResourceIdentifier } from './channel';
|
|
2
|
+
import { BaseResource, CreatedBy, LastModifiedBy } from './common';
|
|
3
|
+
import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type';
|
|
4
|
+
export interface InventoryEntry extends BaseResource {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly version: number;
|
|
7
|
+
readonly createdAt: string;
|
|
8
|
+
readonly lastModifiedAt: string;
|
|
9
|
+
readonly lastModifiedBy?: LastModifiedBy;
|
|
10
|
+
readonly createdBy?: CreatedBy;
|
|
11
|
+
readonly sku: string;
|
|
12
|
+
readonly supplyChannel?: ChannelReference;
|
|
13
|
+
readonly quantityOnStock: number;
|
|
14
|
+
readonly availableQuantity: number;
|
|
15
|
+
readonly restockableInDays?: number;
|
|
16
|
+
readonly expectedDelivery?: string;
|
|
17
|
+
readonly custom?: CustomFields;
|
|
18
|
+
}
|
|
19
|
+
export interface InventoryEntryDraft {
|
|
20
|
+
readonly sku: string;
|
|
21
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
22
|
+
readonly quantityOnStock: number;
|
|
23
|
+
readonly restockableInDays?: number;
|
|
24
|
+
readonly expectedDelivery?: string;
|
|
25
|
+
readonly custom?: CustomFieldsDraft;
|
|
26
|
+
}
|
|
27
|
+
export interface InventoryEntryReference {
|
|
28
|
+
readonly typeId: 'inventory-entry';
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly obj?: InventoryEntry;
|
|
31
|
+
}
|
|
32
|
+
export interface InventoryEntryResourceIdentifier {
|
|
33
|
+
readonly typeId: 'inventory-entry';
|
|
34
|
+
readonly id?: string;
|
|
35
|
+
readonly key?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface InventoryEntryUpdate {
|
|
38
|
+
readonly version: number;
|
|
39
|
+
readonly actions: InventoryEntryUpdateAction[];
|
|
40
|
+
}
|
|
41
|
+
export declare type InventoryEntryUpdateAction = InventoryEntryAddQuantityAction | InventoryEntryChangeQuantityAction | InventoryEntryRemoveQuantityAction | InventoryEntrySetCustomFieldAction | InventoryEntrySetCustomTypeAction | InventoryEntrySetExpectedDeliveryAction | InventoryEntrySetRestockableInDaysAction | InventoryEntrySetSupplyChannelAction;
|
|
42
|
+
export interface InventoryPagedQueryResponse {
|
|
43
|
+
readonly limit: number;
|
|
44
|
+
readonly count: number;
|
|
45
|
+
readonly total?: number;
|
|
46
|
+
readonly offset: number;
|
|
47
|
+
readonly results: InventoryEntry[];
|
|
48
|
+
}
|
|
49
|
+
export interface InventoryEntryAddQuantityAction {
|
|
50
|
+
readonly action: 'addQuantity';
|
|
51
|
+
readonly quantity: number;
|
|
52
|
+
}
|
|
53
|
+
export interface InventoryEntryChangeQuantityAction {
|
|
54
|
+
readonly action: 'changeQuantity';
|
|
55
|
+
readonly quantity: number;
|
|
56
|
+
}
|
|
57
|
+
export interface InventoryEntryRemoveQuantityAction {
|
|
58
|
+
readonly action: 'removeQuantity';
|
|
59
|
+
readonly quantity: number;
|
|
60
|
+
}
|
|
61
|
+
export interface InventoryEntrySetCustomFieldAction {
|
|
62
|
+
readonly action: 'setCustomField';
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly value?: any;
|
|
65
|
+
}
|
|
66
|
+
export interface InventoryEntrySetCustomTypeAction {
|
|
67
|
+
readonly action: 'setCustomType';
|
|
68
|
+
readonly type?: TypeResourceIdentifier;
|
|
69
|
+
readonly fields?: FieldContainer;
|
|
70
|
+
}
|
|
71
|
+
export interface InventoryEntrySetExpectedDeliveryAction {
|
|
72
|
+
readonly action: 'setExpectedDelivery';
|
|
73
|
+
readonly expectedDelivery?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface InventoryEntrySetRestockableInDaysAction {
|
|
76
|
+
readonly action: 'setRestockableInDays';
|
|
77
|
+
readonly restockableInDays?: number;
|
|
78
|
+
}
|
|
79
|
+
export interface InventoryEntrySetSupplyChannelAction {
|
|
80
|
+
readonly action: 'setSupplyChannel';
|
|
81
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
82
|
+
}
|