@commercetools/importapi-sdk 1.20.0 → 2.1.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.
- package/CHANGELOG.md +33 -0
- package/README.md +100 -18
- package/dist/commercetools-importapi-sdk.browser.cjs.js +1964 -2190
- package/dist/commercetools-importapi-sdk.browser.esm.js +1964 -2190
- package/dist/commercetools-importapi-sdk.cjs.dev.js +1964 -2190
- package/dist/commercetools-importapi-sdk.cjs.prod.js +1964 -2190
- package/dist/commercetools-importapi-sdk.esm.js +1964 -2190
- package/dist/declarations/src/ctp/ctp-client.d.ts +2 -2
- package/dist/declarations/src/generated/client/api-root.d.ts +18 -18
- package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +50 -52
- package/dist/declarations/src/generated/client/categories/by-project-key-categories-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/categories/by-project-key-categories-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/customers/by-project-key-customers-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/customers/by-project-key-customers-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/import-containers/by-project-key-categories-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-categories-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-customers-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-customers-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-import-containers-by-import-container-key-request-builder.d.ts +55 -55
- package/dist/declarations/src/generated/client/import-containers/by-project-key-import-containers-request-builder.d.ts +51 -51
- package/dist/declarations/src/generated/client/import-containers/by-project-key-order-patches-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-order-patches-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-orders-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-orders-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-prices-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-prices-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-product-drafts-import-containers-by-import-container-key-request-builder.d.ts +36 -36
- package/dist/declarations/src/generated/client/import-containers/by-project-key-product-drafts-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-product-types-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-product-types-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variant-patches-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variant-patches-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variants-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variants-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-containers/by-project-key-products-import-containers-by-import-container-key-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-products-import-containers-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-operations/by-project-key-categories-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-categories-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +49 -49
- package/dist/declarations/src/generated/client/import-operations/by-project-key-customers-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-customers-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-operations/by-project-key-import-containers-by-import-container-key-import-operations-request-builder.d.ts +45 -45
- package/dist/declarations/src/generated/client/import-operations/by-project-key-import-operations-by-id-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-operations/by-project-key-import-operations-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/import-operations/by-project-key-order-patches-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-order-patches-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-operations/by-project-key-orders-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-orders-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-operations/by-project-key-prices-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-prices-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-operations/by-project-key-product-drafts-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-product-drafts-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-operations/by-project-key-product-types-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-product-types-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-operations/by-project-key-product-variant-patches-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-product-variant-patches-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-operations/by-project-key-product-variants-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-product-variants-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-operations/by-project-key-products-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-products-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +48 -48
- package/dist/declarations/src/generated/client/import-sinks/by-project-key-import-sinks-by-import-sink-key-request-builder.d.ts +51 -51
- package/dist/declarations/src/generated/client/import-sinks/by-project-key-import-sinks-request-builder.d.ts +51 -51
- package/dist/declarations/src/generated/client/import-summaries/by-project-key-import-containers-by-import-container-key-import-summaries-request-builder.d.ts +35 -35
- package/dist/declarations/src/generated/client/import-summaries/by-project-key-import-summaries-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/import-summaries/by-project-key-import-summaries-request-builder.d.ts +26 -26
- package/dist/declarations/src/generated/client/order-patches/by-project-key-order-patches-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/order-patches/by-project-key-order-patches-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/orders/by-project-key-orders-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/orders/by-project-key-orders-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/prices/by-project-key-prices-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/prices/by-project-key-prices-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/product-drafts/by-project-key-product-drafts-import-sink-key-by-import-sink-key-request-builder.d.ts +38 -38
- package/dist/declarations/src/generated/client/product-drafts/by-project-key-product-drafts-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/product-types/by-project-key-product-types-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/product-types/by-project-key-product-types-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/product-variant-patches/by-project-key-product-variant-patches-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/product-variant-patches/by-project-key-product-variant-patches-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/product-variants/by-project-key-product-variants-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/product-variants/by-project-key-product-variants-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/client/products/by-project-key-products-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -37
- package/dist/declarations/src/generated/client/products/by-project-key-products-request-builder.d.ts +28 -28
- package/dist/declarations/src/generated/index.d.ts +25 -26
- package/dist/declarations/src/generated/models/categories.d.ts +79 -79
- package/dist/declarations/src/generated/models/common.d.ts +570 -570
- package/dist/declarations/src/generated/models/customers.d.ts +252 -252
- package/dist/declarations/src/generated/models/customfields.d.ts +260 -260
- package/dist/declarations/src/generated/models/errors.d.ts +356 -352
- package/dist/declarations/src/generated/models/importcontainers.d.ts +114 -114
- package/dist/declarations/src/generated/models/importoperations.d.ts +128 -128
- package/dist/declarations/src/generated/models/importrequests.d.ts +161 -175
- package/dist/declarations/src/generated/models/importsinks.d.ts +113 -113
- package/dist/declarations/src/generated/models/importsummaries.d.ts +55 -55
- package/dist/declarations/src/generated/models/order-patches.d.ts +227 -227
- package/dist/declarations/src/generated/models/orders.d.ts +778 -778
- package/dist/declarations/src/generated/models/prices.d.ts +130 -130
- package/dist/declarations/src/generated/models/productdrafts.d.ts +226 -224
- package/dist/declarations/src/generated/models/products.d.ts +181 -179
- package/dist/declarations/src/generated/models/producttypes.d.ts +173 -173
- package/dist/declarations/src/generated/models/productvariants.d.ts +529 -527
- package/dist/declarations/src/generated/shared/utils/common-types.d.ts +26 -26
- package/dist/declarations/src/generated/shared/utils/middleware.d.ts +8 -8
- package/dist/declarations/src/generated/shared/utils/requests-utils.d.ts +13 -13
- package/dist/declarations/src/generated/shared/utils/uri-utils.d.ts +7 -7
- package/dist/declarations/src/index.d.ts +2 -2
- package/package.json +5 -6
- package/dist/declarations/src/generated/client/import-containers/by-project-key-inventories-import-containers-by-import-container-key-request-builder.d.ts +0 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-inventories-import-containers-request-builder.d.ts +0 -26
- package/dist/declarations/src/generated/client/import-operations/by-project-key-inventories-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +0 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-inventories-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +0 -48
- package/dist/declarations/src/generated/client/inventories/by-project-key-inventories-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
- package/dist/declarations/src/generated/client/inventories/by-project-key-inventories-request-builder.d.ts +0 -28
- package/dist/declarations/src/generated/models/inventories.d.ts +0 -44
|
@@ -1,352 +1,356 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
-
*/
|
|
6
|
-
import { ProcessingState } from './common';
|
|
7
|
-
import { PriceImport } from './prices';
|
|
8
|
-
import { Attribute } from './productvariants';
|
|
9
|
-
/**
|
|
10
|
-
* The response in case of an error.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export interface ErrorResponse {
|
|
14
|
-
/**
|
|
15
|
-
* The http status code of the response.
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
readonly statusCode: number;
|
|
19
|
-
/**
|
|
20
|
-
* Describes the error.
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
readonly message: string;
|
|
24
|
-
/**
|
|
25
|
-
* This property is only used for OAuth2 errors.
|
|
26
|
-
* Contains the error code.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
readonly error?: string;
|
|
31
|
-
/**
|
|
32
|
-
* This property is only used for OAuth2 errors.
|
|
33
|
-
* Additional information to assist the client developer in
|
|
34
|
-
* understanding the error.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
readonly error_description?: string;
|
|
39
|
-
/**
|
|
40
|
-
* The errors that caused this error response.
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
readonly errors?: ErrorObject[];
|
|
45
|
-
}
|
|
46
|
-
export declare type ErrorObject = AccessDeniedError | ConcurrentModificationError | ContentionError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateFieldError | DuplicateVariantValuesError | GenericError | InsufficientScopeError | InvalidCredentialsError | InvalidFieldError | InvalidInput | InvalidJsonInput | InvalidOperation | InvalidScopeError | InvalidStateTransitionError | InvalidTokenError | RequiredFieldError | ResourceCreationError | ResourceDeletionError | ResourceNotFoundError | ResourceUpdateError;
|
|
47
|
-
/**
|
|
48
|
-
* This is the generic error code for access denied. In case of a wrong scope, an [InvalidScopeError](#invalidscopeerror) will be returned.
|
|
49
|
-
*/
|
|
50
|
-
export interface AccessDeniedError {
|
|
51
|
-
readonly code: 'access_denied';
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
readonly message: string;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
export interface InvalidScopeError {
|
|
62
|
-
readonly code: 'invalid_scope';
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
*/
|
|
66
|
-
readonly message: string;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* The resources in the request are not in the valid state for the operation.
|
|
70
|
-
* The client application should validate the constraints described in the error message before sending the request again.
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
export interface InvalidOperation {
|
|
74
|
-
readonly code: 'InvalidOperation';
|
|
75
|
-
/**
|
|
76
|
-
*
|
|
77
|
-
*/
|
|
78
|
-
readonly message: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* The `Unique` [Attribute Constraint](/../api/projects/productTypes#attributeconstraint-enum) was violated.
|
|
82
|
-
*/
|
|
83
|
-
export interface DuplicateAttributeValueError {
|
|
84
|
-
readonly code: 'DuplicateAttributeValue';
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
*/
|
|
88
|
-
readonly message: string;
|
|
89
|
-
/**
|
|
90
|
-
* The attribute in conflict.
|
|
91
|
-
*
|
|
92
|
-
*/
|
|
93
|
-
readonly attribute: Attribute;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* The `CombinationUnique` [Attribute Constraint](/../api/projects/productTypes#attributeconstraint-enum) was violated.
|
|
97
|
-
*/
|
|
98
|
-
export interface DuplicateAttributeValuesError {
|
|
99
|
-
readonly code: 'DuplicateAttributeValues';
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
*/
|
|
103
|
-
readonly message: string;
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
*/
|
|
107
|
-
readonly attributes: Attribute[];
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* The given value already exists for a field that is checked for unique values.
|
|
111
|
-
*/
|
|
112
|
-
export interface DuplicateFieldError {
|
|
113
|
-
readonly code: 'DuplicateField';
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
116
|
-
*/
|
|
117
|
-
readonly message: string;
|
|
118
|
-
/**
|
|
119
|
-
* The name of the field.
|
|
120
|
-
*
|
|
121
|
-
*/
|
|
122
|
-
readonly field?: string;
|
|
123
|
-
/**
|
|
124
|
-
* The offending duplicate value.
|
|
125
|
-
*
|
|
126
|
-
*/
|
|
127
|
-
readonly duplicateValue?: any;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* The given combination of values of a [Product Variant](/../api/projects/products#productvariant) conflicts with an existing one.
|
|
131
|
-
* Every [Product Variant](/../api/projects/products#productvariant) must have a distinct combination of SKU, prices, and custom attribute values.
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
export interface DuplicateVariantValuesError {
|
|
135
|
-
readonly code: 'DuplicateVariantValues';
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
*/
|
|
139
|
-
readonly message: string;
|
|
140
|
-
/**
|
|
141
|
-
* The offending variant values.
|
|
142
|
-
*
|
|
143
|
-
*/
|
|
144
|
-
readonly variantValues: VariantValues;
|
|
145
|
-
}
|
|
146
|
-
export interface VariantValues {
|
|
147
|
-
/**
|
|
148
|
-
*
|
|
149
|
-
*/
|
|
150
|
-
readonly sku?: string;
|
|
151
|
-
/**
|
|
152
|
-
*
|
|
153
|
-
*/
|
|
154
|
-
readonly prices: PriceImport[];
|
|
155
|
-
/**
|
|
156
|
-
*
|
|
157
|
-
*/
|
|
158
|
-
readonly attributes: Attribute[];
|
|
159
|
-
}
|
|
160
|
-
export interface InsufficientScopeError {
|
|
161
|
-
readonly code: 'insufficient_scope';
|
|
162
|
-
/**
|
|
163
|
-
*
|
|
164
|
-
*/
|
|
165
|
-
readonly message: string;
|
|
166
|
-
}
|
|
167
|
-
export interface InvalidCredentialsError {
|
|
168
|
-
readonly code: 'InvalidCredentials';
|
|
169
|
-
/**
|
|
170
|
-
*
|
|
171
|
-
*/
|
|
172
|
-
readonly message: string;
|
|
173
|
-
}
|
|
174
|
-
export interface InvalidTokenError {
|
|
175
|
-
readonly code: 'invalid_token';
|
|
176
|
-
/**
|
|
177
|
-
*
|
|
178
|
-
*/
|
|
179
|
-
readonly message: string;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* A given field is not supported.
|
|
183
|
-
* This error occurs, for example, if the field `variants`, which is not supported by [Product Import](/product#productimport), is sent to the Product Import endpoint.
|
|
184
|
-
*
|
|
185
|
-
*/
|
|
186
|
-
export interface InvalidFieldError {
|
|
187
|
-
readonly code: 'InvalidField';
|
|
188
|
-
/**
|
|
189
|
-
*
|
|
190
|
-
*/
|
|
191
|
-
readonly message: string;
|
|
192
|
-
/**
|
|
193
|
-
* The name of the field.
|
|
194
|
-
*
|
|
195
|
-
*/
|
|
196
|
-
readonly field: string;
|
|
197
|
-
/**
|
|
198
|
-
* The invalid value.
|
|
199
|
-
*
|
|
200
|
-
*/
|
|
201
|
-
readonly invalidValue: any;
|
|
202
|
-
/**
|
|
203
|
-
* The set of allowed values for the field, if any.
|
|
204
|
-
*
|
|
205
|
-
*/
|
|
206
|
-
readonly allowedValues?: any[];
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
readonly
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
readonly
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
readonly
|
|
239
|
-
/**
|
|
240
|
-
*
|
|
241
|
-
*/
|
|
242
|
-
readonly
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
readonly
|
|
250
|
-
/**
|
|
251
|
-
*
|
|
252
|
-
*/
|
|
253
|
-
readonly
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
readonly
|
|
261
|
-
/**
|
|
262
|
-
*
|
|
263
|
-
*/
|
|
264
|
-
readonly
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
readonly
|
|
272
|
-
/**
|
|
273
|
-
*
|
|
274
|
-
*/
|
|
275
|
-
readonly
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
readonly
|
|
286
|
-
/**
|
|
287
|
-
*
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
readonly
|
|
298
|
-
/**
|
|
299
|
-
*
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
*
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
readonly
|
|
323
|
-
/**
|
|
324
|
-
*
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
*
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
*
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
readonly
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
readonly
|
|
352
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
+
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
+
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
+
*/
|
|
6
|
+
import { ProcessingState } from './common';
|
|
7
|
+
import { PriceImport } from './prices';
|
|
8
|
+
import { Attribute } from './productvariants';
|
|
9
|
+
/**
|
|
10
|
+
* The response in case of an error.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export interface ErrorResponse {
|
|
14
|
+
/**
|
|
15
|
+
* The http status code of the response.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
readonly statusCode: number;
|
|
19
|
+
/**
|
|
20
|
+
* Describes the error.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
readonly message: string;
|
|
24
|
+
/**
|
|
25
|
+
* This property is only used for OAuth2 errors.
|
|
26
|
+
* Contains the error code.
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
readonly error?: string;
|
|
31
|
+
/**
|
|
32
|
+
* This property is only used for OAuth2 errors.
|
|
33
|
+
* Additional information to assist the client developer in
|
|
34
|
+
* understanding the error.
|
|
35
|
+
*
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
readonly error_description?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The errors that caused this error response.
|
|
41
|
+
*
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
readonly errors?: ErrorObject[];
|
|
45
|
+
}
|
|
46
|
+
export declare type ErrorObject = AccessDeniedError | ConcurrentModificationError | ContentionError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateFieldError | DuplicateVariantValuesError | GenericError | InsufficientScopeError | InvalidCredentialsError | InvalidFieldError | InvalidInput | InvalidJsonInput | InvalidOperation | InvalidScopeError | InvalidStateTransitionError | InvalidTokenError | RequiredFieldError | ResourceCreationError | ResourceDeletionError | ResourceNotFoundError | ResourceUpdateError;
|
|
47
|
+
/**
|
|
48
|
+
* This is the generic error code for access denied. In case of a wrong scope, an [InvalidScopeError](#invalidscopeerror) will be returned.
|
|
49
|
+
*/
|
|
50
|
+
export interface AccessDeniedError {
|
|
51
|
+
readonly code: 'access_denied';
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
readonly message: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export interface InvalidScopeError {
|
|
62
|
+
readonly code: 'invalid_scope';
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
readonly message: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The resources in the request are not in the valid state for the operation.
|
|
70
|
+
* The client application should validate the constraints described in the error message before sending the request again.
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
export interface InvalidOperation {
|
|
74
|
+
readonly code: 'InvalidOperation';
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
readonly message: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The `Unique` [Attribute Constraint](/../api/projects/productTypes#attributeconstraint-enum) was violated.
|
|
82
|
+
*/
|
|
83
|
+
export interface DuplicateAttributeValueError {
|
|
84
|
+
readonly code: 'DuplicateAttributeValue';
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
readonly message: string;
|
|
89
|
+
/**
|
|
90
|
+
* The attribute in conflict.
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
readonly attribute: Attribute;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The `CombinationUnique` [Attribute Constraint](/../api/projects/productTypes#attributeconstraint-enum) was violated.
|
|
97
|
+
*/
|
|
98
|
+
export interface DuplicateAttributeValuesError {
|
|
99
|
+
readonly code: 'DuplicateAttributeValues';
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
readonly message: string;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
readonly attributes: Attribute[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The given value already exists for a field that is checked for unique values.
|
|
111
|
+
*/
|
|
112
|
+
export interface DuplicateFieldError {
|
|
113
|
+
readonly code: 'DuplicateField';
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
readonly message: string;
|
|
118
|
+
/**
|
|
119
|
+
* The name of the field.
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
readonly field?: string;
|
|
123
|
+
/**
|
|
124
|
+
* The offending duplicate value.
|
|
125
|
+
*
|
|
126
|
+
*/
|
|
127
|
+
readonly duplicateValue?: any;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The given combination of values of a [Product Variant](/../api/projects/products#productvariant) conflicts with an existing one.
|
|
131
|
+
* Every [Product Variant](/../api/projects/products#productvariant) must have a distinct combination of SKU, prices, and custom attribute values.
|
|
132
|
+
*
|
|
133
|
+
*/
|
|
134
|
+
export interface DuplicateVariantValuesError {
|
|
135
|
+
readonly code: 'DuplicateVariantValues';
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
*/
|
|
139
|
+
readonly message: string;
|
|
140
|
+
/**
|
|
141
|
+
* The offending variant values.
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
144
|
+
readonly variantValues: VariantValues;
|
|
145
|
+
}
|
|
146
|
+
export interface VariantValues {
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
150
|
+
readonly sku?: string;
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
readonly prices: PriceImport[];
|
|
155
|
+
/**
|
|
156
|
+
*
|
|
157
|
+
*/
|
|
158
|
+
readonly attributes: Attribute[];
|
|
159
|
+
}
|
|
160
|
+
export interface InsufficientScopeError {
|
|
161
|
+
readonly code: 'insufficient_scope';
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
*/
|
|
165
|
+
readonly message: string;
|
|
166
|
+
}
|
|
167
|
+
export interface InvalidCredentialsError {
|
|
168
|
+
readonly code: 'InvalidCredentials';
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
readonly message: string;
|
|
173
|
+
}
|
|
174
|
+
export interface InvalidTokenError {
|
|
175
|
+
readonly code: 'invalid_token';
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
*/
|
|
179
|
+
readonly message: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* A given field is not supported.
|
|
183
|
+
* This error occurs, for example, if the field `variants`, which is not supported by [Product Import](/product#productimport), is sent to the Product Import endpoint.
|
|
184
|
+
*
|
|
185
|
+
*/
|
|
186
|
+
export interface InvalidFieldError {
|
|
187
|
+
readonly code: 'InvalidField';
|
|
188
|
+
/**
|
|
189
|
+
*
|
|
190
|
+
*/
|
|
191
|
+
readonly message: string;
|
|
192
|
+
/**
|
|
193
|
+
* The name of the field.
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
196
|
+
readonly field: string;
|
|
197
|
+
/**
|
|
198
|
+
* The invalid value.
|
|
199
|
+
*
|
|
200
|
+
*/
|
|
201
|
+
readonly invalidValue: any;
|
|
202
|
+
/**
|
|
203
|
+
* The set of allowed values for the field, if any.
|
|
204
|
+
*
|
|
205
|
+
*/
|
|
206
|
+
readonly allowedValues?: any[];
|
|
207
|
+
/**
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
210
|
+
readonly resourceIndex?: number;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* An invalid JSON input has been sent to the service.
|
|
214
|
+
* Either the JSON is syntactically incorrect or the JSON has an unexpected shape, for example, a required field is missing.
|
|
215
|
+
* The client application should validate the input according to the constraints described in the error message before sending the request again.
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
export interface InvalidJsonInput {
|
|
219
|
+
readonly code: 'InvalidJsonInput';
|
|
220
|
+
/**
|
|
221
|
+
*
|
|
222
|
+
*/
|
|
223
|
+
readonly message: string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* An invalid input has been sent to the service. The client application should validate the input according to the
|
|
227
|
+
* constraints described in the error message before sending the request again.
|
|
228
|
+
*
|
|
229
|
+
*/
|
|
230
|
+
export interface InvalidInput {
|
|
231
|
+
readonly code: 'InvalidInput';
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
*/
|
|
235
|
+
readonly message: string;
|
|
236
|
+
}
|
|
237
|
+
export interface ResourceNotFoundError {
|
|
238
|
+
readonly code: 'ResourceNotFound';
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
*/
|
|
242
|
+
readonly message: string;
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
*/
|
|
246
|
+
readonly resource?: any;
|
|
247
|
+
}
|
|
248
|
+
export interface ResourceCreationError {
|
|
249
|
+
readonly code: 'ResourceCreation';
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
*/
|
|
253
|
+
readonly message: string;
|
|
254
|
+
/**
|
|
255
|
+
*
|
|
256
|
+
*/
|
|
257
|
+
readonly resource?: any;
|
|
258
|
+
}
|
|
259
|
+
export interface ResourceUpdateError {
|
|
260
|
+
readonly code: 'ResourceUpdate';
|
|
261
|
+
/**
|
|
262
|
+
*
|
|
263
|
+
*/
|
|
264
|
+
readonly message: string;
|
|
265
|
+
/**
|
|
266
|
+
*
|
|
267
|
+
*/
|
|
268
|
+
readonly resource?: any;
|
|
269
|
+
}
|
|
270
|
+
export interface ResourceDeletionError {
|
|
271
|
+
readonly code: 'ResourceDeletion';
|
|
272
|
+
/**
|
|
273
|
+
*
|
|
274
|
+
*/
|
|
275
|
+
readonly message: string;
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
*/
|
|
279
|
+
readonly resource?: any;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* A required field is missing a value.
|
|
283
|
+
*/
|
|
284
|
+
export interface RequiredFieldError {
|
|
285
|
+
readonly code: 'RequiredField';
|
|
286
|
+
/**
|
|
287
|
+
*
|
|
288
|
+
*/
|
|
289
|
+
readonly message: string;
|
|
290
|
+
/**
|
|
291
|
+
* The name of the field.
|
|
292
|
+
*
|
|
293
|
+
*/
|
|
294
|
+
readonly field: string;
|
|
295
|
+
}
|
|
296
|
+
export interface InvalidStateTransitionError {
|
|
297
|
+
readonly code: 'InvalidTransition';
|
|
298
|
+
/**
|
|
299
|
+
*
|
|
300
|
+
*/
|
|
301
|
+
readonly message: string;
|
|
302
|
+
/**
|
|
303
|
+
* Every [Import Operation](/import-operation) is assigned with one of the following states.
|
|
304
|
+
*
|
|
305
|
+
*
|
|
306
|
+
*/
|
|
307
|
+
readonly currentState: ProcessingState;
|
|
308
|
+
/**
|
|
309
|
+
* Every [Import Operation](/import-operation) is assigned with one of the following states.
|
|
310
|
+
*
|
|
311
|
+
*
|
|
312
|
+
*/
|
|
313
|
+
readonly newState: ProcessingState;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* The request conflicts with the current state of the involved resources.
|
|
317
|
+
* This error typically occurs when the request attempts to modify a resource that is out of date, that is, it has been modified by another client since the last time it was retrieved by the system attempting to update it.
|
|
318
|
+
* The client application should resolve the conflict (with or without involving the end-user) before retrying the request.
|
|
319
|
+
*
|
|
320
|
+
*/
|
|
321
|
+
export interface ConcurrentModificationError {
|
|
322
|
+
readonly code: 'ConcurrentModification';
|
|
323
|
+
/**
|
|
324
|
+
*
|
|
325
|
+
*/
|
|
326
|
+
readonly message: string;
|
|
327
|
+
/**
|
|
328
|
+
* The version specified in the failed request.
|
|
329
|
+
*
|
|
330
|
+
*/
|
|
331
|
+
readonly specifiedVersion?: number;
|
|
332
|
+
/**
|
|
333
|
+
* The current version of the resource.
|
|
334
|
+
*
|
|
335
|
+
*/
|
|
336
|
+
readonly currentVersion: number;
|
|
337
|
+
/**
|
|
338
|
+
* The resource in conflict.
|
|
339
|
+
*
|
|
340
|
+
*/
|
|
341
|
+
readonly conflictedResource?: any;
|
|
342
|
+
}
|
|
343
|
+
export interface ContentionError {
|
|
344
|
+
readonly code: 'Contention';
|
|
345
|
+
/**
|
|
346
|
+
*
|
|
347
|
+
*/
|
|
348
|
+
readonly message: string;
|
|
349
|
+
}
|
|
350
|
+
export interface GenericError {
|
|
351
|
+
readonly code: 'Generic';
|
|
352
|
+
/**
|
|
353
|
+
*
|
|
354
|
+
*/
|
|
355
|
+
readonly message: string;
|
|
356
|
+
}
|