@commercetools/history-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.
- package/CHANGELOG.md +28 -0
- package/README.md +112 -22
- package/dist/commercetools-history-sdk.browser.cjs.js +127 -198
- package/dist/commercetools-history-sdk.browser.esm.js +127 -198
- package/dist/commercetools-history-sdk.cjs.dev.js +127 -198
- package/dist/commercetools-history-sdk.cjs.prod.js +127 -198
- package/dist/commercetools-history-sdk.esm.js +127 -198
- package/dist/declarations/src/ctp/ctp-client.d.ts +2 -2
- package/dist/declarations/src/generated/client/api-root.d.ts +18 -25
- package/dist/declarations/src/generated/client/by-project-key-by-resource-type-by-id-request-builder.d.ts +48 -54
- package/dist/declarations/src/generated/client/by-project-key-by-resource-type-request-builder.d.ts +51 -57
- package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +50 -56
- package/dist/declarations/src/generated/index.d.ts +12 -19
- package/dist/declarations/src/generated/models/change-value.d.ts +332 -339
- package/dist/declarations/src/generated/models/change.d.ts +4492 -4499
- package/dist/declarations/src/generated/models/common.d.ts +1115 -1121
- package/dist/declarations/src/generated/models/label.d.ts +83 -90
- package/dist/declarations/src/generated/shared/utils/common-types.d.ts +26 -33
- package/dist/declarations/src/generated/shared/utils/middleware.d.ts +8 -15
- package/dist/declarations/src/generated/shared/utils/requests-utils.d.ts +13 -20
- package/dist/declarations/src/generated/shared/utils/uri-utils.d.ts +7 -14
- package/dist/declarations/src/index.d.ts +2 -2
- package/package.json +9 -7
|
@@ -1,339 +1,332 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
*/
|
|
334
|
-
readonly validFrom: string;
|
|
335
|
-
/**
|
|
336
|
-
*
|
|
337
|
-
*/
|
|
338
|
-
readonly validUntil: string;
|
|
339
|
-
}
|
|
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 { Address, DeliveryItem, LocalizedString, Money, Parcel, Reference, SelectionMode } from './common';
|
|
7
|
+
export declare type ChangeTargetChangeValue = ChangeTargetCustomLineItemsChangeValue | ChangeTargetLineItemsChangeValue | ChangeTargetMultiBuyCustomLineItemsChangeValue | ChangeTargetMultiBuyLineItemsChangeValue | ChangeTargetShippingChangeValue;
|
|
8
|
+
export declare type ChangeValueChangeValue = ChangeValueAbsoluteChangeValue | ChangeValueExternalChangeValue | ChangeValueGiftLineItemChangeValue | ChangeValueRelativeChangeValue;
|
|
9
|
+
export interface AssetChangeValue {
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
readonly id: string;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
readonly name: LocalizedString;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Shape of the value for cart discounts line item and custom line items target.
|
|
21
|
+
*/
|
|
22
|
+
export interface ChangeTargetCustomLineItemsChangeValue {
|
|
23
|
+
readonly type: 'customLineItems';
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
readonly predicate: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Shape of the value for cart discounts line item target.
|
|
31
|
+
*/
|
|
32
|
+
export interface ChangeTargetLineItemsChangeValue {
|
|
33
|
+
readonly type: 'lineItems';
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
readonly predicate: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Shape of the value for cart discounts multiBuyCustomLineItems target.
|
|
41
|
+
*/
|
|
42
|
+
export interface ChangeTargetMultiBuyCustomLineItemsChangeValue {
|
|
43
|
+
readonly type: 'multiBuyCustomLineItems';
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
readonly predicate: string;
|
|
48
|
+
/**
|
|
49
|
+
* Quantity of line items that need to be present in order to trigger an application of this discount.
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
readonly triggerQuantity: number;
|
|
53
|
+
/**
|
|
54
|
+
* Quantity of line items that are discounted per application of this discount.
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
readonly discountedQuantity: number;
|
|
58
|
+
/**
|
|
59
|
+
* Maximum number of applications of this discount.
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
readonly maxOccurrence: number;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
readonly selectionMode: SelectionMode;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Shape of the value for cart discounts multiBuyLineItems target.
|
|
70
|
+
*/
|
|
71
|
+
export interface ChangeTargetMultiBuyLineItemsChangeValue {
|
|
72
|
+
readonly type: 'multiBuyLineItems';
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
readonly predicate: string;
|
|
77
|
+
/**
|
|
78
|
+
* Quantity of line items that need to be present in order to trigger an application of this discount.
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
readonly triggerQuantity: number;
|
|
82
|
+
/**
|
|
83
|
+
* Quantity of line items that are discounted per application of this discount.
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
readonly discountedQuantity: number;
|
|
87
|
+
/**
|
|
88
|
+
* Maximum number of applications of this discount.
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
readonly maxOccurrence: number;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
*/
|
|
95
|
+
readonly selectionMode: SelectionMode;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Shape of the value for cart discounts shipping target.
|
|
99
|
+
*/
|
|
100
|
+
export interface ChangeTargetShippingChangeValue {
|
|
101
|
+
readonly type: 'shipping';
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Shape of the value for cart discounts absolute value.
|
|
105
|
+
*/
|
|
106
|
+
export interface ChangeValueAbsoluteChangeValue {
|
|
107
|
+
readonly type: 'absolute';
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
readonly money: Money[];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Shape of the value for product discounts external value.
|
|
115
|
+
*/
|
|
116
|
+
export interface ChangeValueExternalChangeValue {
|
|
117
|
+
readonly type: 'external';
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Shape of the value for cart discounts gift line item value.
|
|
121
|
+
*/
|
|
122
|
+
export interface ChangeValueGiftLineItemChangeValue {
|
|
123
|
+
readonly type: 'giftLineItem';
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
*/
|
|
127
|
+
readonly product: Reference;
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
*/
|
|
131
|
+
readonly variantId: number;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
readonly supplyChannel?: Reference;
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
*/
|
|
139
|
+
readonly distributionChannel: Reference;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Shape of the value for cart discounts relative value.
|
|
143
|
+
*/
|
|
144
|
+
export interface ChangeValueRelativeChangeValue {
|
|
145
|
+
readonly type: 'relative';
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
*/
|
|
149
|
+
readonly permyriad: number;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Only available if `expand` is set to true
|
|
153
|
+
*/
|
|
154
|
+
export interface CustomFieldExpandedValue {
|
|
155
|
+
/**
|
|
156
|
+
* Name of a custom field.
|
|
157
|
+
*
|
|
158
|
+
*/
|
|
159
|
+
readonly name: string;
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
*/
|
|
163
|
+
readonly value: any;
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
*/
|
|
167
|
+
readonly label: LocalizedString;
|
|
168
|
+
}
|
|
169
|
+
export interface CustomShippingMethodChangeValue {
|
|
170
|
+
/**
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
readonly name: string;
|
|
174
|
+
}
|
|
175
|
+
export interface DeliveryChangeValue {
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
*/
|
|
179
|
+
readonly items: DeliveryItem[];
|
|
180
|
+
/**
|
|
181
|
+
*
|
|
182
|
+
*/
|
|
183
|
+
readonly address: Address;
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
*/
|
|
187
|
+
readonly parcels: Parcel[];
|
|
188
|
+
}
|
|
189
|
+
export interface EnumValue {
|
|
190
|
+
/**
|
|
191
|
+
*
|
|
192
|
+
*/
|
|
193
|
+
readonly key: string;
|
|
194
|
+
/**
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
readonly label: string;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Shape of the value for action `changeFieldDefinitionOrder`
|
|
201
|
+
*/
|
|
202
|
+
export interface FieldDefinitionOrderValue {
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
*/
|
|
206
|
+
readonly name: string;
|
|
207
|
+
/**
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
210
|
+
readonly label: LocalizedString;
|
|
211
|
+
}
|
|
212
|
+
export interface InventoryQuantityValue {
|
|
213
|
+
/**
|
|
214
|
+
*
|
|
215
|
+
*/
|
|
216
|
+
readonly quantityOnStock: number;
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
readonly availableQuantity: number;
|
|
221
|
+
}
|
|
222
|
+
export interface LocalizedEnumValue {
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
*/
|
|
226
|
+
readonly key: string;
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
*/
|
|
230
|
+
readonly label: LocalizedString;
|
|
231
|
+
}
|
|
232
|
+
export interface ParcelChangeValue {
|
|
233
|
+
/**
|
|
234
|
+
*
|
|
235
|
+
*/
|
|
236
|
+
readonly id: string;
|
|
237
|
+
/**
|
|
238
|
+
*
|
|
239
|
+
*/
|
|
240
|
+
readonly createdAt: string;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Shape of the cart classification shipping input rate value.
|
|
244
|
+
*/
|
|
245
|
+
export interface SetCartClassificationShippingRateInputValue {
|
|
246
|
+
/**
|
|
247
|
+
*
|
|
248
|
+
*/
|
|
249
|
+
readonly type: string;
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
*/
|
|
253
|
+
readonly key: string;
|
|
254
|
+
/**
|
|
255
|
+
*
|
|
256
|
+
*/
|
|
257
|
+
readonly label: LocalizedString;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Shape of the cart score shipping input rate value.
|
|
261
|
+
*/
|
|
262
|
+
export interface SetCartScoreShippingRateInputValue {
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
*/
|
|
266
|
+
readonly type: string;
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
*/
|
|
270
|
+
readonly score: number;
|
|
271
|
+
}
|
|
272
|
+
export interface ShippingMethodChangeValue {
|
|
273
|
+
/**
|
|
274
|
+
*
|
|
275
|
+
*/
|
|
276
|
+
readonly id: string;
|
|
277
|
+
/**
|
|
278
|
+
*
|
|
279
|
+
*/
|
|
280
|
+
readonly name: string;
|
|
281
|
+
}
|
|
282
|
+
export interface ShoppingListLineItemValue {
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
*/
|
|
286
|
+
readonly id: string;
|
|
287
|
+
/**
|
|
288
|
+
*
|
|
289
|
+
*/
|
|
290
|
+
readonly name: LocalizedString;
|
|
291
|
+
/**
|
|
292
|
+
*
|
|
293
|
+
*/
|
|
294
|
+
readonly variantId: number;
|
|
295
|
+
}
|
|
296
|
+
export interface TextLineItemValue {
|
|
297
|
+
/**
|
|
298
|
+
*
|
|
299
|
+
*/
|
|
300
|
+
readonly id: string;
|
|
301
|
+
/**
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
304
|
+
readonly name: LocalizedString;
|
|
305
|
+
}
|
|
306
|
+
export interface TransactionChangeValue {
|
|
307
|
+
/**
|
|
308
|
+
*
|
|
309
|
+
*/
|
|
310
|
+
readonly id: string;
|
|
311
|
+
/**
|
|
312
|
+
*
|
|
313
|
+
*/
|
|
314
|
+
readonly interactionId: string;
|
|
315
|
+
/**
|
|
316
|
+
*
|
|
317
|
+
*/
|
|
318
|
+
readonly timestamp: string;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Shape of the value for `setValidFromAndUntil` action
|
|
322
|
+
*/
|
|
323
|
+
export interface ValidFromAndUntilValue {
|
|
324
|
+
/**
|
|
325
|
+
*
|
|
326
|
+
*/
|
|
327
|
+
readonly validFrom: string;
|
|
328
|
+
/**
|
|
329
|
+
*
|
|
330
|
+
*/
|
|
331
|
+
readonly validUntil: string;
|
|
332
|
+
}
|