@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,527 +1,529 @@
|
|
|
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
|
|
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
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
*
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
*
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
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
|
+
}
|