@commercetools/importapi-sdk 1.18.0 → 2.0.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 (111) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +100 -18
  3. package/dist/commercetools-importapi-sdk.browser.cjs.js +2390 -1516
  4. package/dist/commercetools-importapi-sdk.browser.esm.js +2390 -1516
  5. package/dist/commercetools-importapi-sdk.cjs.dev.js +2390 -1516
  6. package/dist/commercetools-importapi-sdk.cjs.prod.js +2390 -1516
  7. package/dist/commercetools-importapi-sdk.esm.js +2390 -1516
  8. package/dist/declarations/src/ctp/ctp-client.d.ts +2 -2
  9. package/dist/declarations/src/generated/client/api-root.d.ts +18 -25
  10. package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +52 -55
  11. package/dist/declarations/src/generated/client/categories/by-project-key-categories-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -44
  12. package/dist/declarations/src/generated/client/categories/by-project-key-categories-request-builder.d.ts +28 -33
  13. package/dist/declarations/src/generated/client/customers/by-project-key-customers-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -44
  14. package/dist/declarations/src/generated/client/customers/by-project-key-customers-request-builder.d.ts +28 -33
  15. package/dist/declarations/src/generated/client/import-containers/by-project-key-categories-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  16. package/dist/declarations/src/generated/client/import-containers/by-project-key-categories-import-containers-request-builder.d.ts +26 -0
  17. package/dist/declarations/src/generated/client/import-containers/by-project-key-customers-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  18. package/dist/declarations/src/generated/client/import-containers/by-project-key-customers-import-containers-request-builder.d.ts +26 -0
  19. package/dist/declarations/src/generated/client/import-containers/by-project-key-import-containers-by-import-container-key-request-builder.d.ts +55 -0
  20. package/dist/declarations/src/generated/client/import-containers/by-project-key-import-containers-request-builder.d.ts +51 -0
  21. package/dist/declarations/src/generated/client/import-containers/by-project-key-inventories-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  22. package/dist/declarations/src/generated/client/import-containers/by-project-key-inventories-import-containers-request-builder.d.ts +26 -0
  23. package/dist/declarations/src/generated/client/import-containers/by-project-key-order-patches-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  24. package/dist/declarations/src/generated/client/import-containers/by-project-key-order-patches-import-containers-request-builder.d.ts +26 -0
  25. package/dist/declarations/src/generated/client/import-containers/by-project-key-orders-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  26. package/dist/declarations/src/generated/client/import-containers/by-project-key-orders-import-containers-request-builder.d.ts +26 -0
  27. package/dist/declarations/src/generated/client/import-containers/by-project-key-prices-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  28. package/dist/declarations/src/generated/client/import-containers/by-project-key-prices-import-containers-request-builder.d.ts +26 -0
  29. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-drafts-import-containers-by-import-container-key-request-builder.d.ts +36 -0
  30. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-drafts-import-containers-request-builder.d.ts +26 -0
  31. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-types-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  32. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-types-import-containers-request-builder.d.ts +26 -0
  33. 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 -0
  34. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variant-patches-import-containers-request-builder.d.ts +26 -0
  35. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variants-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  36. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variants-import-containers-request-builder.d.ts +26 -0
  37. package/dist/declarations/src/generated/client/import-containers/by-project-key-products-import-containers-by-import-container-key-request-builder.d.ts +35 -0
  38. package/dist/declarations/src/generated/client/import-containers/by-project-key-products-import-containers-request-builder.d.ts +26 -0
  39. 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 -44
  40. 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 -56
  41. 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 -44
  42. 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 -56
  43. package/dist/declarations/src/generated/client/import-operations/by-project-key-import-containers-by-import-container-key-import-operations-request-builder.d.ts +45 -0
  44. package/dist/declarations/src/generated/client/import-operations/by-project-key-import-operations-by-id-request-builder.d.ts +35 -0
  45. package/dist/declarations/src/generated/client/import-operations/by-project-key-import-operations-request-builder.d.ts +26 -0
  46. 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 +37 -44
  47. 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 +48 -56
  48. 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 -44
  49. 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 -56
  50. 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 -44
  51. 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 -56
  52. 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 -44
  53. 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 -56
  54. 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 -44
  55. 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 -56
  56. 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 -44
  57. 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 -56
  58. 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 -44
  59. 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 -55
  60. 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 -44
  61. 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 -55
  62. 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 -44
  63. 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 -56
  64. package/dist/declarations/src/generated/client/import-sinks/by-project-key-import-sinks-by-import-sink-key-request-builder.d.ts +51 -58
  65. package/dist/declarations/src/generated/client/import-sinks/by-project-key-import-sinks-request-builder.d.ts +51 -58
  66. package/dist/declarations/src/generated/client/import-summaries/by-project-key-import-containers-by-import-container-key-import-summaries-request-builder.d.ts +35 -0
  67. 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 -44
  68. package/dist/declarations/src/generated/client/import-summaries/by-project-key-import-summaries-request-builder.d.ts +26 -33
  69. package/dist/declarations/src/generated/client/inventories/by-project-key-inventories-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -44
  70. package/dist/declarations/src/generated/client/inventories/by-project-key-inventories-request-builder.d.ts +28 -33
  71. 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 -44
  72. package/dist/declarations/src/generated/client/order-patches/by-project-key-order-patches-request-builder.d.ts +28 -33
  73. package/dist/declarations/src/generated/client/orders/by-project-key-orders-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -44
  74. package/dist/declarations/src/generated/client/orders/by-project-key-orders-request-builder.d.ts +28 -33
  75. package/dist/declarations/src/generated/client/prices/by-project-key-prices-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -44
  76. package/dist/declarations/src/generated/client/prices/by-project-key-prices-request-builder.d.ts +28 -33
  77. 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 -45
  78. package/dist/declarations/src/generated/client/product-drafts/by-project-key-product-drafts-request-builder.d.ts +28 -33
  79. 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 -44
  80. package/dist/declarations/src/generated/client/product-types/by-project-key-product-types-request-builder.d.ts +28 -33
  81. 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 -44
  82. package/dist/declarations/src/generated/client/product-variant-patches/by-project-key-product-variant-patches-request-builder.d.ts +28 -33
  83. 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 -44
  84. package/dist/declarations/src/generated/client/product-variants/by-project-key-product-variants-request-builder.d.ts +28 -33
  85. package/dist/declarations/src/generated/client/products/by-project-key-products-import-sink-key-by-import-sink-key-request-builder.d.ts +37 -44
  86. package/dist/declarations/src/generated/client/products/by-project-key-products-request-builder.d.ts +28 -33
  87. package/dist/declarations/src/generated/index.d.ts +26 -32
  88. package/dist/declarations/src/generated/models/categories.d.ts +79 -86
  89. package/dist/declarations/src/generated/models/common.d.ts +570 -551
  90. package/dist/declarations/src/generated/models/customers.d.ts +252 -259
  91. package/dist/declarations/src/generated/models/customfields.d.ts +260 -267
  92. package/dist/declarations/src/generated/models/errors.d.ts +356 -359
  93. package/dist/declarations/src/generated/models/importcontainers.d.ts +114 -0
  94. package/dist/declarations/src/generated/models/importoperations.d.ts +128 -136
  95. package/dist/declarations/src/generated/models/importrequests.d.ts +175 -182
  96. package/dist/declarations/src/generated/models/importsinks.d.ts +113 -120
  97. package/dist/declarations/src/generated/models/importsummaries.d.ts +55 -57
  98. package/dist/declarations/src/generated/models/inventories.d.ts +44 -51
  99. package/dist/declarations/src/generated/models/order-patches.d.ts +227 -234
  100. package/dist/declarations/src/generated/models/orders.d.ts +778 -785
  101. package/dist/declarations/src/generated/models/prices.d.ts +130 -137
  102. package/dist/declarations/src/generated/models/productdrafts.d.ts +226 -231
  103. package/dist/declarations/src/generated/models/products.d.ts +181 -186
  104. package/dist/declarations/src/generated/models/producttypes.d.ts +173 -180
  105. package/dist/declarations/src/generated/models/productvariants.d.ts +529 -534
  106. package/dist/declarations/src/generated/shared/utils/common-types.d.ts +26 -33
  107. package/dist/declarations/src/generated/shared/utils/middleware.d.ts +8 -15
  108. package/dist/declarations/src/generated/shared/utils/requests-utils.d.ts +13 -20
  109. package/dist/declarations/src/generated/shared/utils/uri-utils.d.ts +7 -14
  110. package/dist/declarations/src/index.d.ts +2 -2
  111. package/package.json +8 -6
@@ -1,534 +1,529 @@
1
- /**
2
- *
3
- * Generated file, please do not change!!!
4
- * From http://www.commercetools.com/ with love
5
- *
6
- * ,d88b.d88b,
7
- * 88888888888
8
- * `Y8888888Y'
9
- * `Y888Y'
10
- * `Y'
11
- *
12
- */
13
- import { Asset, Image, ImportResource, KeyReference, LocalizedString, ProductKeyReference, ProductVariantKeyReference, TypedMoney } from './common';
14
- /**
15
- * This type represents the value of an attribute of a product variant.
16
- * The name and type property must match the name and type property of an attribute definition of the product type.
17
- *
18
- */
19
- export declare type Attribute = BooleanAttribute | BooleanSetAttribute | DateAttribute | DateSetAttribute | DateTimeAttribute | DateTimeSetAttribute | EnumAttribute | EnumSetAttribute | LocalizableEnumAttribute | LocalizableEnumSetAttribute | LocalizableTextAttribute | LocalizableTextSetAttribute | MoneyAttribute | MoneySetAttribute | NumberAttribute | NumberSetAttribute | ReferenceAttribute | ReferenceSetAttribute | TextAttribute | TextSetAttribute | TimeAttribute | TimeSetAttribute;
20
- /**
21
- * This type represents an attribute whose value is either "true" or "false".
22
- *
23
- */
24
- export interface BooleanAttribute {
25
- readonly type: 'boolean';
26
- /**
27
- * The name of this attribute must match a name of the product types attribute definitions.
28
- * The name is required if this type is used in a product variant and must not be set when
29
- * used in a product variant patch.
30
- *
31
- *
32
- */
33
- readonly name?: string;
34
- /**
35
- *
36
- */
37
- readonly value: boolean;
38
- }
39
- /**
40
- * This type represents an attribute whose value is set of boolean values.
41
- *
42
- */
43
- export interface BooleanSetAttribute {
44
- readonly type: 'boolean-set';
45
- /**
46
- * The name of this attribute must match a name of the product types attribute definitions.
47
- * The name is required if this type is used in a product variant and must not be set when
48
- * used in a product variant patch.
49
- *
50
- *
51
- */
52
- readonly name?: string;
53
- /**
54
- *
55
- */
56
- readonly value: boolean[];
57
- }
58
- /**
59
- * This type represents an attribute whose value is a date.
60
- *
61
- */
62
- export interface DateAttribute {
63
- readonly type: 'date';
64
- /**
65
- * The name of this attribute must match a name of the product types attribute definitions.
66
- * The name is required if this type is used in a product variant and must not be set when
67
- * used in a product variant patch.
68
- *
69
- *
70
- */
71
- readonly name?: string;
72
- /**
73
- *
74
- */
75
- readonly value: string;
76
- }
77
- /**
78
- * This type represents an attribute whose value is a set of dates.
79
- *
80
- */
81
- export interface DateSetAttribute {
82
- readonly type: 'date-set';
83
- /**
84
- * The name of this attribute must match a name of the product types attribute definitions.
85
- * The name is required if this type is used in a product variant and must not be set when
86
- * used in a product variant patch.
87
- *
88
- *
89
- */
90
- readonly name?: string;
91
- /**
92
- *
93
- */
94
- readonly value: string[];
95
- }
96
- /**
97
- * This type represents an attribute whose value is a date with time.
98
- *
99
- */
100
- export interface DateTimeAttribute {
101
- readonly type: 'datetime';
102
- /**
103
- * The name of this attribute must match a name of the product types attribute definitions.
104
- * The name is required if this type is used in a product variant and must not be set when
105
- * used in a product variant patch.
106
- *
107
- *
108
- */
109
- readonly name?: string;
110
- /**
111
- *
112
- */
113
- readonly value: string;
114
- }
115
- /**
116
- * This type represents an attribute whose value is a set of dates with time.
117
- *
118
- */
119
- export interface DateTimeSetAttribute {
120
- readonly type: 'datetime-set';
121
- /**
122
- * The name of this attribute must match a name of the product types attribute definitions.
123
- * The name is required if this type is used in a product variant and must not be set when
124
- * used in a product variant patch.
125
- *
126
- *
127
- */
128
- readonly name?: string;
129
- /**
130
- *
131
- */
132
- readonly value: string[];
133
- }
134
- /**
135
- * This type represents an attribute whose value is an enum.
136
- * The attribute value refers to the key of the enum value.
137
- *
138
- */
139
- export interface EnumAttribute {
140
- readonly type: 'enum';
141
- /**
142
- * The name of this attribute must match a name of the product types attribute definitions.
143
- * The name is required if this type is used in a product variant and must not be set when
144
- * used in a product variant patch.
145
- *
146
- *
147
- */
148
- readonly name?: string;
149
- /**
150
- *
151
- */
152
- readonly value: string;
153
- }
154
- /**
155
- * This type represents an attribute whose value is an enum.
156
- * The attribute value refers to the key of the enum value.
157
- *
158
- */
159
- export interface EnumSetAttribute {
160
- readonly type: 'enum-set';
161
- /**
162
- * The name of this attribute must match a name of the product types attribute definitions.
163
- * The name is required if this type is used in a product variant and must not be set when
164
- * used in a product variant patch.
165
- *
166
- *
167
- */
168
- readonly name?: string;
169
- /**
170
- *
171
- */
172
- readonly value: string[];
173
- }
174
- /**
175
- * This type represents an attribute whose value is a localized enum.
176
- * The attribute value refers to the key of the enum value.
177
- *
178
- */
179
- export interface LocalizableEnumAttribute {
180
- readonly type: 'lenum';
181
- /**
182
- * The name of this attribute must match a name of the product types attribute definitions.
183
- * The name is required if this type is used in a product variant and must not be set when
184
- * used in a product variant patch.
185
- *
186
- *
187
- */
188
- readonly name?: string;
189
- /**
190
- *
191
- */
192
- readonly value: string;
193
- }
194
- /**
195
- * This type represents an attribute whose value is a localized enum.
196
- * The attribute value refers to the key of the enum value.
197
- *
198
- */
199
- export interface LocalizableEnumSetAttribute {
200
- readonly type: 'lenum-set';
201
- /**
202
- * The name of this attribute must match a name of the product types attribute definitions.
203
- * The name is required if this type is used in a product variant and must not be set when
204
- * used in a product variant patch.
205
- *
206
- *
207
- */
208
- readonly name?: string;
209
- /**
210
- *
211
- */
212
- readonly value: string[];
213
- }
214
- /**
215
- * This type represents an attribute whose value is a localized text.
216
- *
217
- */
218
- export interface LocalizableTextAttribute {
219
- readonly type: 'ltext';
220
- /**
221
- * The name of this attribute must match a name of the product types attribute definitions.
222
- * The name is required if this type is used in a product variant and must not be set when
223
- * used in a product variant patch.
224
- *
225
- *
226
- */
227
- readonly name?: string;
228
- /**
229
- * A localized string is a JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values the corresponding strings used for that language.
230
- * ```json
231
- * {
232
- * "de": "Hundefutter",
233
- * "en": "dog food"
234
- * }
235
- * ```
236
- *
237
- *
238
- */
239
- readonly value: LocalizedString;
240
- }
241
- /**
242
- * This type represents an attribute whose value is a localized text.
243
- *
244
- */
245
- export interface LocalizableTextSetAttribute {
246
- readonly type: 'ltext-set';
247
- /**
248
- * The name of this attribute must match a name of the product types attribute definitions.
249
- * The name is required if this type is used in a product variant and must not be set when
250
- * used in a product variant patch.
251
- *
252
- *
253
- */
254
- readonly name?: string;
255
- /**
256
- *
257
- */
258
- readonly value: LocalizedString[];
259
- }
260
- /**
261
- * This type represents an attribute whose value is a money object.
262
- *
263
- */
264
- export interface MoneyAttribute {
265
- readonly type: 'money';
266
- /**
267
- * The name of this attribute must match a name of the product types attribute definitions.
268
- * The name is required if this type is used in a product variant and must not be set when
269
- * used in a product variant patch.
270
- *
271
- *
272
- */
273
- readonly name?: string;
274
- /**
275
- *
276
- */
277
- readonly value: TypedMoney;
278
- }
279
- /**
280
- * This type represents an attribute whose value is a set of money objects.
281
- *
282
- */
283
- export interface MoneySetAttribute {
284
- readonly type: 'money-set';
285
- /**
286
- * The name of this attribute must match a name of the product types attribute definitions.
287
- * The name is required if this type is used in a product variant and must not be set when
288
- * used in a product variant patch.
289
- *
290
- *
291
- */
292
- readonly name?: string;
293
- /**
294
- * TypedMoney is what is called BaseMoney in the HTTP API.
295
- *
296
- *
297
- */
298
- readonly value: TypedMoney[];
299
- }
300
- /**
301
- * This type represents an attribute whose value is a number.
302
- *
303
- */
304
- export interface NumberAttribute {
305
- readonly type: 'number';
306
- /**
307
- * The name of this attribute must match a name of the product types attribute definitions.
308
- * The name is required if this type is used in a product variant and must not be set when
309
- * used in a product variant patch.
310
- *
311
- *
312
- */
313
- readonly name?: string;
314
- /**
315
- *
316
- */
317
- readonly value: number;
318
- }
319
- /**
320
- * This type represents an attribute whose value is a set of numbers.
321
- *
322
- */
323
- export interface NumberSetAttribute {
324
- readonly type: 'number-set';
325
- /**
326
- * The name of this attribute must match a name of the product types attribute definitions.
327
- * The name is required if this type is used in a product variant and must not be set when
328
- * used in a product variant patch.
329
- *
330
- *
331
- */
332
- readonly name?: string;
333
- /**
334
- *
335
- */
336
- readonly value: number[];
337
- }
338
- /**
339
- * This type represents an attribute whose value is a key reference.
340
- *
341
- */
342
- export interface ReferenceAttribute {
343
- readonly type: 'reference';
344
- /**
345
- * The name of this attribute must match a name of the product types attribute definitions.
346
- * The name is required if this type is used in a product variant and must not be set when
347
- * used in a product variant patch.
348
- *
349
- *
350
- */
351
- readonly name?: string;
352
- /**
353
- * References a resource by its key.
354
- *
355
- */
356
- readonly value: KeyReference;
357
- }
358
- /**
359
- * This type represents an attribute whose value is a set of references.
360
- *
361
- */
362
- export interface ReferenceSetAttribute {
363
- readonly type: 'reference-set';
364
- /**
365
- * The name of this attribute must match a name of the product types attribute definitions.
366
- * The name is required if this type is used in a product variant and must not be set when
367
- * used in a product variant patch.
368
- *
369
- *
370
- */
371
- readonly name?: string;
372
- /**
373
- *
374
- */
375
- readonly value: KeyReference[];
376
- }
377
- /**
378
- * This type represents an attribute whose value is a string.
379
- *
380
- */
381
- export interface TextAttribute {
382
- readonly type: 'text';
383
- /**
384
- * The name of this attribute must match a name of the product types attribute definitions.
385
- * The name is required if this type is used in a product variant and must not be set when
386
- * used in a product variant patch.
387
- *
388
- *
389
- */
390
- readonly name?: string;
391
- /**
392
- *
393
- */
394
- readonly value: string;
395
- }
396
- /**
397
- * This type represents an attribute whose value is a set of strings.
398
- *
399
- */
400
- export interface TextSetAttribute {
401
- readonly type: 'text-set';
402
- /**
403
- * The name of this attribute must match a name of the product types attribute definitions.
404
- * The name is required if this type is used in a product variant and must not be set when
405
- * used in a product variant patch.
406
- *
407
- *
408
- */
409
- readonly name?: string;
410
- /**
411
- *
412
- */
413
- readonly value: string[];
414
- }
415
- /**
416
- * This type represents an attribute whose value is a time.
417
- *
418
- */
419
- export interface TimeAttribute {
420
- readonly type: 'time';
421
- /**
422
- * The name of this attribute must match a name of the product types attribute definitions.
423
- * The name is required if this type is used in a product variant and must not be set when
424
- * used in a product variant patch.
425
- *
426
- *
427
- */
428
- readonly name?: string;
429
- /**
430
- *
431
- */
432
- readonly value: string;
433
- }
434
- /**
435
- * This type represents an attribute whose value is a set of times.
436
- *
437
- */
438
- export interface TimeSetAttribute {
439
- readonly type: 'time-set';
440
- /**
441
- * The name of this attribute must match a name of the product types attribute definitions.
442
- * The name is required if this type is used in a product variant and must not be set when
443
- * used in a product variant patch.
444
- *
445
- *
446
- */
447
- readonly name?: string;
448
- /**
449
- *
450
- */
451
- readonly value: string[];
452
- }
453
- /**
454
- * The data representation for a ProductVariant to be imported that is persisted as a [ProductVariant](/../api/projects/products#productvariant) in the Project.
455
- *
456
- */
457
- export interface ProductVariantImport extends ImportResource {
458
- /**
459
- * Maps to `ProductVariant.sku`.
460
- *
461
- *
462
- */
463
- readonly sku?: string;
464
- /**
465
- * Maps to `ProductVariant.isMasterVariant`.
466
- *
467
- *
468
- */
469
- readonly isMasterVariant: boolean;
470
- /**
471
- * Maps to `ProductVariant.attributes`.
472
- * The referenced attribute must be defined in an already existing ProductType in the commercetools project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `Unresolved`.
473
- *
474
- *
475
- */
476
- readonly attributes?: Attribute[];
477
- /**
478
- * Maps to `ProductVariant.images`.
479
- *
480
- *
481
- */
482
- readonly images?: Image[];
483
- /**
484
- * Maps to `ProductVariant.assets`.
485
- *
486
- *
487
- */
488
- readonly assets?: Asset[];
489
- /**
490
- * If there were updates, only the updates will be published to `staged` and `current` projection.
491
- *
492
- *
493
- */
494
- readonly publish?: boolean;
495
- /**
496
- * The [Product](/../api/projects/products#productvariant) to which this Product Variant belongs. Maps to `ProductVariant.product`.
497
- * The Reference to the [Product](/../api/projects/products#product) with which the ProductVariant is associated.
498
- * If referenced Product does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `Unresolved` until the necessary Product is created.
499
- *
500
- *
501
- */
502
- readonly product: ProductKeyReference;
503
- }
504
- /**
505
- * Representation for an update of a [ProductVariant](/../api/projects/products#productvariant). Use this type to import updates for existing
506
- * [ProductVariants](/../api/projects/products#productvariant) in a commercetools Project.
507
- *
508
- */
509
- export interface ProductVariantPatch {
510
- /**
511
- * The [ProductVariant](/../api/projects/products#productvariant) to which this patch is applied.
512
- * The Reference to the [ProductVariant](/../api/projects/products#productvariant) with which the ProductVariantPatch is associated.
513
- * If referenced ProductVariant does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `Unresolved` until the necessary ProductVariant is created.
514
- *
515
- *
516
- */
517
- readonly productVariant: ProductVariantKeyReference;
518
- /**
519
- * Maps to `ProductVariant.attributes`.
520
- * The referenced attribute must be defined in an already existing [ProductType](/../api/projects/productTypes#producttype) in the commercetools Project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `Unresolved`.
521
- *
522
- *
523
- */
524
- readonly attributes?: Attributes;
525
- /**
526
- * If `false`, the attribute changes are applied to both [current and staged projected representations](/../api/projects/productProjections#current--staged) of the [Product](/../api/projects/products#product).
527
- *
528
- *
529
- */
530
- readonly staged?: boolean;
531
- }
532
- export interface Attributes {
533
- [key: string]: Attribute | null;
534
- }
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 { Asset, Image, ImportResource, KeyReference, LocalizedString, ProductKeyReference, ProductVariantKeyReference, TypedMoney } from './common';
7
+ /**
8
+ * This type represents the value of an attribute of a product variant.
9
+ * The name and type property must match the name and type property of an attribute definition of the product type.
10
+ *
11
+ */
12
+ export declare type Attribute = BooleanAttribute | BooleanSetAttribute | DateAttribute | DateSetAttribute | DateTimeAttribute | DateTimeSetAttribute | EnumAttribute | EnumSetAttribute | LocalizableEnumAttribute | LocalizableEnumSetAttribute | LocalizableTextAttribute | LocalizableTextSetAttribute | MoneyAttribute | MoneySetAttribute | NumberAttribute | NumberSetAttribute | ReferenceAttribute | ReferenceSetAttribute | TextAttribute | TextSetAttribute | TimeAttribute | TimeSetAttribute;
13
+ /**
14
+ * This type represents an attribute whose value is either "true" or "false".
15
+ *
16
+ */
17
+ export interface BooleanAttribute {
18
+ readonly type: 'boolean';
19
+ /**
20
+ * The name of this attribute must match a name of the product types attribute definitions.
21
+ * The name is required if this type is used in a product variant and must not be set when
22
+ * used in a product variant patch.
23
+ *
24
+ *
25
+ */
26
+ readonly name?: string;
27
+ /**
28
+ *
29
+ */
30
+ readonly value: boolean;
31
+ }
32
+ /**
33
+ * This type represents an attribute whose value is set of boolean values.
34
+ *
35
+ */
36
+ export interface BooleanSetAttribute {
37
+ readonly type: 'boolean-set';
38
+ /**
39
+ * The name of this attribute must match a name of the product types attribute definitions.
40
+ * The name is required if this type is used in a product variant and must not be set when
41
+ * used in a product variant patch.
42
+ *
43
+ *
44
+ */
45
+ readonly name?: string;
46
+ /**
47
+ *
48
+ */
49
+ readonly value: boolean[];
50
+ }
51
+ /**
52
+ * This type represents an attribute whose value is a date.
53
+ *
54
+ */
55
+ export interface DateAttribute {
56
+ readonly type: 'date';
57
+ /**
58
+ * The name of this attribute must match a name of the product types attribute definitions.
59
+ * The name is required if this type is used in a product variant and must not be set when
60
+ * used in a product variant patch.
61
+ *
62
+ *
63
+ */
64
+ readonly name?: string;
65
+ /**
66
+ *
67
+ */
68
+ readonly value: string;
69
+ }
70
+ /**
71
+ * This type represents an attribute whose value is a set of dates.
72
+ *
73
+ */
74
+ export interface DateSetAttribute {
75
+ readonly type: 'date-set';
76
+ /**
77
+ * The name of this attribute must match a name of the product types attribute definitions.
78
+ * The name is required if this type is used in a product variant and must not be set when
79
+ * used in a product variant patch.
80
+ *
81
+ *
82
+ */
83
+ readonly name?: string;
84
+ /**
85
+ *
86
+ */
87
+ readonly value: string[];
88
+ }
89
+ /**
90
+ * This type represents an attribute whose value is a date with time.
91
+ *
92
+ */
93
+ export interface DateTimeAttribute {
94
+ readonly type: 'datetime';
95
+ /**
96
+ * The name of this attribute must match a name of the product types attribute definitions.
97
+ * The name is required if this type is used in a product variant and must not be set when
98
+ * used in a product variant patch.
99
+ *
100
+ *
101
+ */
102
+ readonly name?: string;
103
+ /**
104
+ *
105
+ */
106
+ readonly value: string;
107
+ }
108
+ /**
109
+ * This type represents an attribute whose value is a set of dates with time.
110
+ *
111
+ */
112
+ export interface DateTimeSetAttribute {
113
+ readonly type: 'datetime-set';
114
+ /**
115
+ * The name of this attribute must match a name of the product types attribute definitions.
116
+ * The name is required if this type is used in a product variant and must not be set when
117
+ * used in a product variant patch.
118
+ *
119
+ *
120
+ */
121
+ readonly name?: string;
122
+ /**
123
+ *
124
+ */
125
+ readonly value: string[];
126
+ }
127
+ /**
128
+ * This type represents an attribute whose value is an enum.
129
+ * The attribute value refers to the key of the enum value.
130
+ *
131
+ */
132
+ export interface EnumAttribute {
133
+ readonly type: 'enum';
134
+ /**
135
+ * The name of this attribute must match a name of the product types attribute definitions.
136
+ * The name is required if this type is used in a product variant and must not be set when
137
+ * used in a product variant patch.
138
+ *
139
+ *
140
+ */
141
+ readonly name?: string;
142
+ /**
143
+ *
144
+ */
145
+ readonly value: string;
146
+ }
147
+ /**
148
+ * This type represents an attribute whose value is an enum.
149
+ * The attribute value refers to the key of the enum value.
150
+ *
151
+ */
152
+ export interface EnumSetAttribute {
153
+ readonly type: 'enum-set';
154
+ /**
155
+ * The name of this attribute must match a name of the product types attribute definitions.
156
+ * The name is required if this type is used in a product variant and must not be set when
157
+ * used in a product variant patch.
158
+ *
159
+ *
160
+ */
161
+ readonly name?: string;
162
+ /**
163
+ *
164
+ */
165
+ readonly value: string[];
166
+ }
167
+ /**
168
+ * This type represents an attribute whose value is a localized enum.
169
+ * The attribute value refers to the key of the enum value.
170
+ *
171
+ */
172
+ export interface LocalizableEnumAttribute {
173
+ readonly type: 'lenum';
174
+ /**
175
+ * The name of this attribute must match a name of the product types attribute definitions.
176
+ * The name is required if this type is used in a product variant and must not be set when
177
+ * used in a product variant patch.
178
+ *
179
+ *
180
+ */
181
+ readonly name?: string;
182
+ /**
183
+ *
184
+ */
185
+ readonly value: string;
186
+ }
187
+ /**
188
+ * This type represents an attribute whose value is a localized enum.
189
+ * The attribute value refers to the key of the enum value.
190
+ *
191
+ */
192
+ export interface LocalizableEnumSetAttribute {
193
+ readonly type: 'lenum-set';
194
+ /**
195
+ * The name of this attribute must match a name of the product types attribute definitions.
196
+ * The name is required if this type is used in a product variant and must not be set when
197
+ * used in a product variant patch.
198
+ *
199
+ *
200
+ */
201
+ readonly name?: string;
202
+ /**
203
+ *
204
+ */
205
+ readonly value: string[];
206
+ }
207
+ /**
208
+ * This type represents an attribute whose value is a localized text.
209
+ *
210
+ */
211
+ export interface LocalizableTextAttribute {
212
+ readonly type: 'ltext';
213
+ /**
214
+ * The name of this attribute must match a name of the product types attribute definitions.
215
+ * The name is required if this type is used in a product variant and must not be set when
216
+ * used in a product variant patch.
217
+ *
218
+ *
219
+ */
220
+ readonly name?: string;
221
+ /**
222
+ * A localized string is a JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values the corresponding strings used for that language.
223
+ * ```json
224
+ * {
225
+ * "de": "Hundefutter",
226
+ * "en": "dog food"
227
+ * }
228
+ * ```
229
+ *
230
+ *
231
+ */
232
+ readonly value: LocalizedString;
233
+ }
234
+ /**
235
+ * This type represents an attribute whose value is a localized text.
236
+ *
237
+ */
238
+ export interface LocalizableTextSetAttribute {
239
+ readonly type: 'ltext-set';
240
+ /**
241
+ * The name of this attribute must match a name of the product types attribute definitions.
242
+ * The name is required if this type is used in a product variant and must not be set when
243
+ * used in a product variant patch.
244
+ *
245
+ *
246
+ */
247
+ readonly name?: string;
248
+ /**
249
+ *
250
+ */
251
+ readonly value: LocalizedString[];
252
+ }
253
+ /**
254
+ * This type represents an attribute whose value is a money object.
255
+ *
256
+ */
257
+ export interface MoneyAttribute {
258
+ readonly type: 'money';
259
+ /**
260
+ * The name of this attribute must match a name of the product types attribute definitions.
261
+ * The name is required if this type is used in a product variant and must not be set when
262
+ * used in a product variant patch.
263
+ *
264
+ *
265
+ */
266
+ readonly name?: string;
267
+ /**
268
+ *
269
+ */
270
+ readonly value: TypedMoney;
271
+ }
272
+ /**
273
+ * This type represents an attribute whose value is a set of money objects.
274
+ *
275
+ */
276
+ export interface MoneySetAttribute {
277
+ readonly type: 'money-set';
278
+ /**
279
+ * The name of this attribute must match a name of the product types attribute definitions.
280
+ * The name is required if this type is used in a product variant and must not be set when
281
+ * used in a product variant patch.
282
+ *
283
+ *
284
+ */
285
+ readonly name?: string;
286
+ /**
287
+ * TypedMoney is what is called BaseMoney in the HTTP API.
288
+ *
289
+ *
290
+ */
291
+ readonly value: TypedMoney[];
292
+ }
293
+ /**
294
+ * This type represents an attribute whose value is a number.
295
+ *
296
+ */
297
+ export interface NumberAttribute {
298
+ readonly type: 'number';
299
+ /**
300
+ * The name of this attribute must match a name of the product types attribute definitions.
301
+ * The name is required if this type is used in a product variant and must not be set when
302
+ * used in a product variant patch.
303
+ *
304
+ *
305
+ */
306
+ readonly name?: string;
307
+ /**
308
+ *
309
+ */
310
+ readonly value: number;
311
+ }
312
+ /**
313
+ * This type represents an attribute whose value is a set of numbers.
314
+ *
315
+ */
316
+ export interface NumberSetAttribute {
317
+ readonly type: 'number-set';
318
+ /**
319
+ * The name of this attribute must match a name of the product types attribute definitions.
320
+ * The name is required if this type is used in a product variant and must not be set when
321
+ * used in a product variant patch.
322
+ *
323
+ *
324
+ */
325
+ readonly name?: string;
326
+ /**
327
+ *
328
+ */
329
+ readonly value: number[];
330
+ }
331
+ /**
332
+ * This type represents an attribute whose value is a key reference.
333
+ *
334
+ */
335
+ export interface ReferenceAttribute {
336
+ readonly type: 'reference';
337
+ /**
338
+ * The name of this attribute must match a name of the product types attribute definitions.
339
+ * The name is required if this type is used in a product variant and must not be set when
340
+ * used in a product variant patch.
341
+ *
342
+ *
343
+ */
344
+ readonly name?: string;
345
+ /**
346
+ * References a resource by key.
347
+ *
348
+ */
349
+ readonly value: KeyReference;
350
+ }
351
+ /**
352
+ * This type represents an attribute whose value is a set of references.
353
+ *
354
+ */
355
+ export interface ReferenceSetAttribute {
356
+ readonly type: 'reference-set';
357
+ /**
358
+ * The name of this attribute must match a name of the product types attribute definitions.
359
+ * The name is required if this type is used in a product variant and must not be set when
360
+ * used in a product variant patch.
361
+ *
362
+ *
363
+ */
364
+ readonly name?: string;
365
+ /**
366
+ *
367
+ */
368
+ readonly value: KeyReference[];
369
+ }
370
+ /**
371
+ * This type represents an attribute whose value is a string.
372
+ *
373
+ */
374
+ export interface TextAttribute {
375
+ readonly type: 'text';
376
+ /**
377
+ * The name of this attribute must match a name of the product types attribute definitions.
378
+ * The name is required if this type is used in a product variant and must not be set when
379
+ * used in a product variant patch.
380
+ *
381
+ *
382
+ */
383
+ readonly name?: string;
384
+ /**
385
+ *
386
+ */
387
+ readonly value: string;
388
+ }
389
+ /**
390
+ * This type represents an attribute whose value is a set of strings.
391
+ *
392
+ */
393
+ export interface TextSetAttribute {
394
+ readonly type: 'text-set';
395
+ /**
396
+ * The name of this attribute must match a name of the product types attribute definitions.
397
+ * The name is required if this type is used in a product variant and must not be set when
398
+ * used in a product variant patch.
399
+ *
400
+ *
401
+ */
402
+ readonly name?: string;
403
+ /**
404
+ *
405
+ */
406
+ readonly value: string[];
407
+ }
408
+ /**
409
+ * This type represents an attribute whose value is a time.
410
+ *
411
+ */
412
+ export interface TimeAttribute {
413
+ readonly type: 'time';
414
+ /**
415
+ * The name of this attribute must match a name of the product types attribute definitions.
416
+ * The name is required if this type is used in a product variant and must not be set when
417
+ * used in a product variant patch.
418
+ *
419
+ *
420
+ */
421
+ readonly name?: string;
422
+ /**
423
+ *
424
+ */
425
+ readonly value: string;
426
+ }
427
+ /**
428
+ * This type represents an attribute whose value is a set of times.
429
+ *
430
+ */
431
+ export interface TimeSetAttribute {
432
+ readonly type: 'time-set';
433
+ /**
434
+ * The name of this attribute must match a name of the product types attribute definitions.
435
+ * The name is required if this type is used in a product variant and must not be set when
436
+ * used in a product variant patch.
437
+ *
438
+ *
439
+ */
440
+ readonly name?: string;
441
+ /**
442
+ *
443
+ */
444
+ readonly value: string[];
445
+ }
446
+ /**
447
+ * The data representation for a ProductVariant to be imported that is persisted as a [ProductVariant](/../api/projects/products#productvariant) in the Project.
448
+ *
449
+ */
450
+ export interface ProductVariantImport extends ImportResource {
451
+ /**
452
+ * Maps to `ProductVariant.sku`.
453
+ *
454
+ *
455
+ */
456
+ readonly sku?: string;
457
+ /**
458
+ * Maps to `ProductVariant.isMasterVariant`.
459
+ *
460
+ *
461
+ */
462
+ readonly isMasterVariant: boolean;
463
+ /**
464
+ * Maps to `ProductVariant.attributes`.
465
+ * The referenced attribute must be defined in an already existing ProductType in the commercetools project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `unresolved`.
466
+ *
467
+ *
468
+ */
469
+ readonly attributes?: Attribute[];
470
+ /**
471
+ * Maps to `ProductVariant.images`.
472
+ *
473
+ *
474
+ */
475
+ readonly images?: Image[];
476
+ /**
477
+ * Maps to `ProductVariant.assets`.
478
+ *
479
+ *
480
+ */
481
+ readonly assets?: Asset[];
482
+ /**
483
+ * If `publish` is set to either `true` or `false`, both staged and current projections are set to the same value provided by the import data.
484
+ * If `publish` is not set, the staged projection is set to the provided import data, but the current projection stays unchanged.
485
+ * However, if the import data contains no update, that is, if it matches the staged projection of the existing Product in the platform, the import induces no change in the existing Product whether `publish` is set or not.
486
+ *
487
+ *
488
+ */
489
+ readonly publish?: boolean;
490
+ /**
491
+ * The [Product](/../api/projects/products#productvariant) to which this Product Variant belongs. Maps to `ProductVariant.product`.
492
+ * The Reference to the [Product](/../api/projects/products#product) with which the ProductVariant is associated.
493
+ * If referenced Product does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Product is created.
494
+ *
495
+ *
496
+ */
497
+ readonly product: ProductKeyReference;
498
+ }
499
+ /**
500
+ * Representation for an update of a [ProductVariant](/../api/projects/products#productvariant). Use this type to import updates for existing
501
+ * [ProductVariants](/../api/projects/products#productvariant) in a commercetools Project.
502
+ *
503
+ */
504
+ export interface ProductVariantPatch {
505
+ /**
506
+ * The [ProductVariant](/../api/projects/products#productvariant) to which this patch is applied.
507
+ * The Reference to the [ProductVariant](/../api/projects/products#productvariant) with which the ProductVariantPatch is associated.
508
+ * If referenced ProductVariant does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary ProductVariant is created.
509
+ *
510
+ *
511
+ */
512
+ readonly productVariant: ProductVariantKeyReference;
513
+ /**
514
+ * Maps to `ProductVariant.attributes`.
515
+ * The referenced attribute must be defined in an already existing [ProductType](/../api/projects/productTypes#producttype) in the commercetools Project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `unresolved`.
516
+ *
517
+ *
518
+ */
519
+ readonly attributes?: Attributes;
520
+ /**
521
+ * If `false`, the attribute changes are applied to both [current and staged projected representations](/../api/projects/productProjections#current--staged) of the [Product](/../api/projects/products#product).
522
+ *
523
+ *
524
+ */
525
+ readonly staged?: boolean;
526
+ }
527
+ export interface Attributes {
528
+ [key: string]: Attribute | null;
529
+ }