@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,778 +1,778 @@
|
|
|
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, CartDiscountKeyReference, ChannelKeyReference, CustomerGroupKeyReference, CustomerKeyReference, DiscountCodeKeyReference, DiscountedPrice, Image, LocalizedString, Money, PriceTier, ProductKeyReference, ProductVariantKeyReference, ShippingMethodKeyReference, StateKeyReference, TaxCategoryKeyReference, TypedMoney } from './common';
|
|
7
|
-
import { Custom } from './customfields';
|
|
8
|
-
import { SubRate, TaxRate } from './prices';
|
|
9
|
-
import { Attribute } from './productvariants';
|
|
10
|
-
/**
|
|
11
|
-
* The item's state.
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
export interface ItemState {
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
readonly quantity: number;
|
|
19
|
-
/**
|
|
20
|
-
* Maps to `ItemState.state`.
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
readonly state: StateKeyReference;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The item's shipping target.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
export interface ItemShippingTarget {
|
|
31
|
-
/**
|
|
32
|
-
* Maps to `ItemShippingTarget.addressKey`.
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
readonly addressKey: string;
|
|
37
|
-
/**
|
|
38
|
-
* Maps to `ItemShippingTarget.quantity`.
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
readonly quantity: number;
|
|
43
|
-
}
|
|
44
|
-
export interface ItemShippingDetailsDraft {
|
|
45
|
-
/**
|
|
46
|
-
* Maps to `ItemShippingDetailsDraft.targets`.
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
readonly targets: ItemShippingTarget[];
|
|
51
|
-
}
|
|
52
|
-
export interface LineItemPrice {
|
|
53
|
-
/**
|
|
54
|
-
* Maps to `Price.value`. TypedMoney is what is called BaseMoney in the HTTP API.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*/
|
|
58
|
-
readonly value: TypedMoney;
|
|
59
|
-
/**
|
|
60
|
-
* Maps to `Price.county`.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
readonly country?: string;
|
|
65
|
-
/**
|
|
66
|
-
* Maps to `Price.validFrom`.
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
readonly validFrom?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Maps to `Price.validUntil`.
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
readonly validUntil?: string;
|
|
77
|
-
/**
|
|
78
|
-
* References a customer group by
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*/
|
|
82
|
-
readonly customerGroup?: CustomerGroupKeyReference;
|
|
83
|
-
/**
|
|
84
|
-
* References a channel by
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*/
|
|
88
|
-
readonly channel?: ChannelKeyReference;
|
|
89
|
-
/**
|
|
90
|
-
* Sets a discounted price from an external service.
|
|
91
|
-
*
|
|
92
|
-
*/
|
|
93
|
-
readonly discounted?: DiscountedPrice;
|
|
94
|
-
/**
|
|
95
|
-
* The tiered prices for this price.
|
|
96
|
-
*
|
|
97
|
-
*/
|
|
98
|
-
readonly tiers?: PriceTier[];
|
|
99
|
-
/**
|
|
100
|
-
* Maps to `Price.custom`.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*/
|
|
104
|
-
readonly custom?: Custom;
|
|
105
|
-
}
|
|
106
|
-
export interface LineItemProductVariantImportDraft {
|
|
107
|
-
/**
|
|
108
|
-
* Maps to `ProductVariant.product`.
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*/
|
|
112
|
-
readonly productVariant?: ProductVariantKeyReference;
|
|
113
|
-
/**
|
|
114
|
-
* Maps to `ProductVariantImportDraft.sku`.
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*/
|
|
118
|
-
readonly sku?: string;
|
|
119
|
-
/**
|
|
120
|
-
* Maps to `ProductVariantImportDraft.prices`
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*/
|
|
124
|
-
readonly prices?: LineItemPrice[];
|
|
125
|
-
/**
|
|
126
|
-
* Maps to `ProductVariantImportDraft.attributes`
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*/
|
|
130
|
-
readonly attributes?: Attribute[];
|
|
131
|
-
/**
|
|
132
|
-
* Maps to `ProductVariantImportDraft.images`.
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*/
|
|
136
|
-
readonly images?: Image[];
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Represents an individual Line Item in an Order. A line item is a snapshot of a product at the time it was added to the order.
|
|
140
|
-
*
|
|
141
|
-
* You cannot create an Order that includes line item operations that do not exist in the Project or have been deleted.
|
|
142
|
-
* Products and Product Variants referenced by a line item must already exist in the commercetools Project.
|
|
143
|
-
*
|
|
144
|
-
*/
|
|
145
|
-
export interface LineItemImportDraft {
|
|
146
|
-
/**
|
|
147
|
-
* Maps to `LineItem.productId`.
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*/
|
|
151
|
-
readonly product?: ProductKeyReference;
|
|
152
|
-
/**
|
|
153
|
-
* Maps to `LineItem.name`.
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*/
|
|
157
|
-
readonly name: LocalizedString;
|
|
158
|
-
/**
|
|
159
|
-
* Maps to `ProductVariantImportDraft`.
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*/
|
|
163
|
-
readonly variant: LineItemProductVariantImportDraft;
|
|
164
|
-
/**
|
|
165
|
-
* Maps to `LineItem.price`.
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*/
|
|
169
|
-
readonly price: LineItemPrice;
|
|
170
|
-
/**
|
|
171
|
-
* Maps to `LineItem.quantity`.
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*/
|
|
175
|
-
readonly quantity: number;
|
|
176
|
-
/**
|
|
177
|
-
*
|
|
178
|
-
*/
|
|
179
|
-
readonly state?: ItemState[];
|
|
180
|
-
/**
|
|
181
|
-
* Maps to `LineItem.supplyChannel`.
|
|
182
|
-
* The Reference to the Supply [Channel](/../api/projects/channels#channel) with which the LineItem is associated.
|
|
183
|
-
* If referenced Supply Channel does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Supply Channel is created.
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*/
|
|
187
|
-
readonly supplyChannel?: ChannelKeyReference;
|
|
188
|
-
/**
|
|
189
|
-
* Maps to `LineItem.distributionChannel`.
|
|
190
|
-
* The Reference to the Distribution [Channel](/../api/projects/channels#channel) with which the LineItem is associated.
|
|
191
|
-
* If referenced CustomerGroup does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Distribution Channel is created.
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*/
|
|
195
|
-
readonly distributionChannel?: ChannelKeyReference;
|
|
196
|
-
/**
|
|
197
|
-
* Maps to `LineItem.taxRate`.
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*/
|
|
201
|
-
readonly taxRate?: TaxRate;
|
|
202
|
-
/**
|
|
203
|
-
* Maps to LineItem.shippingDetails.
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*/
|
|
207
|
-
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
208
|
-
}
|
|
209
|
-
export declare type ShippingRateTierType = 'CartClassification' | 'CartScore' | 'CartValue';
|
|
210
|
-
export declare type ShippingRatePriceTier = CartClassificationTier;
|
|
211
|
-
export interface CartClassificationTier {
|
|
212
|
-
readonly type: 'CartClassification';
|
|
213
|
-
/**
|
|
214
|
-
*
|
|
215
|
-
*/
|
|
216
|
-
readonly value: string;
|
|
217
|
-
/**
|
|
218
|
-
*
|
|
219
|
-
*/
|
|
220
|
-
readonly price: Money;
|
|
221
|
-
/**
|
|
222
|
-
*
|
|
223
|
-
*/
|
|
224
|
-
readonly tiers: ShippingRatePriceTier[];
|
|
225
|
-
/**
|
|
226
|
-
*
|
|
227
|
-
*/
|
|
228
|
-
readonly isMatching?: boolean;
|
|
229
|
-
}
|
|
230
|
-
export interface ShippingRateDraft {
|
|
231
|
-
/**
|
|
232
|
-
*
|
|
233
|
-
*/
|
|
234
|
-
readonly price: Money;
|
|
235
|
-
/**
|
|
236
|
-
*
|
|
237
|
-
*/
|
|
238
|
-
readonly freeAbove?: Money;
|
|
239
|
-
/**
|
|
240
|
-
*
|
|
241
|
-
*/
|
|
242
|
-
readonly tiers?: ShippingRatePriceTier[];
|
|
243
|
-
}
|
|
244
|
-
export interface ParcelMeasurements {
|
|
245
|
-
/**
|
|
246
|
-
*
|
|
247
|
-
*/
|
|
248
|
-
readonly heightInMillimeter?: number;
|
|
249
|
-
/**
|
|
250
|
-
*
|
|
251
|
-
*/
|
|
252
|
-
readonly lengthInMillimeter?: number;
|
|
253
|
-
/**
|
|
254
|
-
*
|
|
255
|
-
*/
|
|
256
|
-
readonly widthInMillimeter?: number;
|
|
257
|
-
/**
|
|
258
|
-
*
|
|
259
|
-
*/
|
|
260
|
-
readonly weightInGram?: number;
|
|
261
|
-
}
|
|
262
|
-
export interface TrackingData {
|
|
263
|
-
/**
|
|
264
|
-
*
|
|
265
|
-
*/
|
|
266
|
-
readonly trackingId?: string;
|
|
267
|
-
/**
|
|
268
|
-
*
|
|
269
|
-
*/
|
|
270
|
-
readonly carrier?: string;
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
273
|
-
*/
|
|
274
|
-
readonly provider?: string;
|
|
275
|
-
/**
|
|
276
|
-
*
|
|
277
|
-
*/
|
|
278
|
-
readonly providerTransaction?: string;
|
|
279
|
-
/**
|
|
280
|
-
*
|
|
281
|
-
*/
|
|
282
|
-
readonly isReturn?: boolean;
|
|
283
|
-
}
|
|
284
|
-
export interface DeliveryItem {
|
|
285
|
-
/**
|
|
286
|
-
*
|
|
287
|
-
*/
|
|
288
|
-
readonly id: string;
|
|
289
|
-
/**
|
|
290
|
-
*
|
|
291
|
-
*/
|
|
292
|
-
readonly quantity: number;
|
|
293
|
-
}
|
|
294
|
-
export interface Parcel {
|
|
295
|
-
/**
|
|
296
|
-
*
|
|
297
|
-
*/
|
|
298
|
-
readonly id: string;
|
|
299
|
-
/**
|
|
300
|
-
*
|
|
301
|
-
*/
|
|
302
|
-
readonly createdAt: string;
|
|
303
|
-
/**
|
|
304
|
-
*
|
|
305
|
-
*/
|
|
306
|
-
readonly measurements?: ParcelMeasurements;
|
|
307
|
-
/**
|
|
308
|
-
*
|
|
309
|
-
*/
|
|
310
|
-
readonly trackingData?: TrackingData;
|
|
311
|
-
/**
|
|
312
|
-
*
|
|
313
|
-
*/
|
|
314
|
-
readonly items?: DeliveryItem[];
|
|
315
|
-
}
|
|
316
|
-
export interface Delivery {
|
|
317
|
-
/**
|
|
318
|
-
*
|
|
319
|
-
*/
|
|
320
|
-
readonly id: string;
|
|
321
|
-
/**
|
|
322
|
-
*
|
|
323
|
-
*/
|
|
324
|
-
readonly createdAt: string;
|
|
325
|
-
/**
|
|
326
|
-
*
|
|
327
|
-
*/
|
|
328
|
-
readonly items: DeliveryItem[];
|
|
329
|
-
/**
|
|
330
|
-
*
|
|
331
|
-
*/
|
|
332
|
-
readonly parcels: Parcel[];
|
|
333
|
-
/**
|
|
334
|
-
*
|
|
335
|
-
*/
|
|
336
|
-
readonly address?: Address;
|
|
337
|
-
}
|
|
338
|
-
export interface DiscountedLineItemPortion {
|
|
339
|
-
/**
|
|
340
|
-
* References a cart discount by
|
|
341
|
-
*
|
|
342
|
-
*/
|
|
343
|
-
readonly discount: CartDiscountKeyReference;
|
|
344
|
-
/**
|
|
345
|
-
*
|
|
346
|
-
*/
|
|
347
|
-
readonly discountedAmount: Money;
|
|
348
|
-
}
|
|
349
|
-
export interface DiscountedLineItemPriceDraft {
|
|
350
|
-
/**
|
|
351
|
-
*
|
|
352
|
-
*/
|
|
353
|
-
readonly value: Money;
|
|
354
|
-
/**
|
|
355
|
-
*
|
|
356
|
-
*/
|
|
357
|
-
readonly includedDiscounts: DiscountedLineItemPortion[];
|
|
358
|
-
}
|
|
359
|
-
export declare type ShippingMethodState = 'DoesNotMatchCart' | 'MatchesCart';
|
|
360
|
-
/**
|
|
361
|
-
* Maps to an order's `shippingInfo` property. This field is usually populated by the cart assosciated with
|
|
362
|
-
* the order, but when importing orders you must provide a draft representation as a part of the OrderImport.
|
|
363
|
-
*
|
|
364
|
-
*/
|
|
365
|
-
export interface ShippingInfoImportDraft {
|
|
366
|
-
/**
|
|
367
|
-
*
|
|
368
|
-
*/
|
|
369
|
-
readonly shippingMethodName: string;
|
|
370
|
-
/**
|
|
371
|
-
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*/
|
|
375
|
-
readonly price: TypedMoney;
|
|
376
|
-
/**
|
|
377
|
-
*
|
|
378
|
-
*/
|
|
379
|
-
readonly shippingRate: ShippingRateDraft;
|
|
380
|
-
/**
|
|
381
|
-
*
|
|
382
|
-
*/
|
|
383
|
-
readonly taxRate?: TaxRate;
|
|
384
|
-
/**
|
|
385
|
-
* References a tax category by
|
|
386
|
-
*
|
|
387
|
-
*/
|
|
388
|
-
readonly taxCategory?: TaxCategoryKeyReference;
|
|
389
|
-
/**
|
|
390
|
-
* References a shipping method by
|
|
391
|
-
*
|
|
392
|
-
*/
|
|
393
|
-
readonly shippingMethod?: ShippingMethodKeyReference;
|
|
394
|
-
/**
|
|
395
|
-
* Note that you can not add a `DeliveryItem` on import, as `LineItems` and `CustomLineItems` are not yet referencable by an `id`.
|
|
396
|
-
*
|
|
397
|
-
*/
|
|
398
|
-
readonly deliveries?: Delivery[];
|
|
399
|
-
/**
|
|
400
|
-
*
|
|
401
|
-
*/
|
|
402
|
-
readonly discountedPrice?: DiscountedLineItemPriceDraft;
|
|
403
|
-
/**
|
|
404
|
-
*
|
|
405
|
-
*/
|
|
406
|
-
readonly shippingMethodState?: ShippingMethodState;
|
|
407
|
-
}
|
|
408
|
-
export interface ExternalTaxRateDraft {
|
|
409
|
-
/**
|
|
410
|
-
*
|
|
411
|
-
*/
|
|
412
|
-
readonly name: string;
|
|
413
|
-
/**
|
|
414
|
-
*
|
|
415
|
-
*/
|
|
416
|
-
readonly amount?: number;
|
|
417
|
-
/**
|
|
418
|
-
*
|
|
419
|
-
*/
|
|
420
|
-
readonly country: string;
|
|
421
|
-
/**
|
|
422
|
-
*
|
|
423
|
-
*/
|
|
424
|
-
readonly state?: string;
|
|
425
|
-
/**
|
|
426
|
-
*
|
|
427
|
-
*/
|
|
428
|
-
readonly subRates?: SubRate[];
|
|
429
|
-
/**
|
|
430
|
-
*
|
|
431
|
-
*/
|
|
432
|
-
readonly includedInPrice?: boolean;
|
|
433
|
-
}
|
|
434
|
-
export interface CustomLineItemTaxedPrice {
|
|
435
|
-
/**
|
|
436
|
-
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*/
|
|
440
|
-
readonly totalNet: TypedMoney;
|
|
441
|
-
/**
|
|
442
|
-
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*/
|
|
446
|
-
readonly totalGross: TypedMoney;
|
|
447
|
-
}
|
|
448
|
-
export interface CustomLineItemDraft {
|
|
449
|
-
/**
|
|
450
|
-
* 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.
|
|
451
|
-
* ```json
|
|
452
|
-
* {
|
|
453
|
-
* "de": "Hundefutter",
|
|
454
|
-
* "en": "dog food"
|
|
455
|
-
* }
|
|
456
|
-
* ```
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*/
|
|
460
|
-
readonly name: LocalizedString;
|
|
461
|
-
/**
|
|
462
|
-
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
*/
|
|
466
|
-
readonly money: TypedMoney;
|
|
467
|
-
/**
|
|
468
|
-
*
|
|
469
|
-
*/
|
|
470
|
-
readonly taxedPrice?: CustomLineItemTaxedPrice;
|
|
471
|
-
/**
|
|
472
|
-
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*/
|
|
476
|
-
readonly totalPrice: TypedMoney;
|
|
477
|
-
/**
|
|
478
|
-
*
|
|
479
|
-
*/
|
|
480
|
-
readonly slug: string;
|
|
481
|
-
/**
|
|
482
|
-
*
|
|
483
|
-
*/
|
|
484
|
-
readonly quantity: number;
|
|
485
|
-
/**
|
|
486
|
-
*
|
|
487
|
-
*/
|
|
488
|
-
readonly state?: ItemState[];
|
|
489
|
-
/**
|
|
490
|
-
* References a tax category by
|
|
491
|
-
*
|
|
492
|
-
*/
|
|
493
|
-
readonly taxCategory?: TaxCategoryKeyReference;
|
|
494
|
-
/**
|
|
495
|
-
*
|
|
496
|
-
*/
|
|
497
|
-
readonly taxRate?: TaxRate;
|
|
498
|
-
/**
|
|
499
|
-
*
|
|
500
|
-
*/
|
|
501
|
-
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
502
|
-
/**
|
|
503
|
-
*
|
|
504
|
-
*/
|
|
505
|
-
readonly discountedPricePerQuantity?: DiscountedLineItemPriceDraft[];
|
|
506
|
-
/**
|
|
507
|
-
*
|
|
508
|
-
*/
|
|
509
|
-
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
510
|
-
}
|
|
511
|
-
export interface TaxPortion {
|
|
512
|
-
/**
|
|
513
|
-
*
|
|
514
|
-
*/
|
|
515
|
-
readonly name?: string;
|
|
516
|
-
/**
|
|
517
|
-
*
|
|
518
|
-
*/
|
|
519
|
-
readonly rate: number;
|
|
520
|
-
/**
|
|
521
|
-
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
*/
|
|
525
|
-
readonly amount: TypedMoney;
|
|
526
|
-
}
|
|
527
|
-
export interface TaxedPrice {
|
|
528
|
-
/**
|
|
529
|
-
* Maps to `TaxedPrice.totalNet`.
|
|
530
|
-
*
|
|
531
|
-
*/
|
|
532
|
-
readonly totalNet: Money;
|
|
533
|
-
/**
|
|
534
|
-
* Maps to `TaxedPrice.totalGross`.
|
|
535
|
-
*
|
|
536
|
-
*/
|
|
537
|
-
readonly totalGross: Money;
|
|
538
|
-
/**
|
|
539
|
-
* Maps to `TaxedPrice.taxPortions`.
|
|
540
|
-
*
|
|
541
|
-
*/
|
|
542
|
-
readonly taxPortions: TaxPortion[];
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* Maps to `Order.taxMode`
|
|
546
|
-
*/
|
|
547
|
-
export declare type TaxMode = 'Disabled' | 'External' | 'ExternalAmount' | 'Platform';
|
|
548
|
-
/**
|
|
549
|
-
* Maps to `Order.orderState`.
|
|
550
|
-
*/
|
|
551
|
-
export declare type OrderState = 'Cancelled' | 'Complete' | 'Confirmed' | 'Open';
|
|
552
|
-
/**
|
|
553
|
-
* Maps to `Order.shipmentState`.
|
|
554
|
-
*/
|
|
555
|
-
export declare type ShipmentState = 'Backorder' | 'Delayed' | 'Partial' | 'Pending' | 'Ready' | 'Shipped';
|
|
556
|
-
/**
|
|
557
|
-
* Maps to `Order.paymentState`.
|
|
558
|
-
*/
|
|
559
|
-
export declare type PaymentState = 'BalanceDue' | 'CreditOwed' | 'Failed' | 'Paid' | 'Pending';
|
|
560
|
-
/**
|
|
561
|
-
* Maps to `Order.inventoryMode`.
|
|
562
|
-
*/
|
|
563
|
-
export declare type InventoryMode = 'ReserveOnOrder' | 'TrackOnly';
|
|
564
|
-
/**
|
|
565
|
-
* Maps to `Order.taxRoundingMode`.
|
|
566
|
-
*/
|
|
567
|
-
export declare type RoundingMode = 'HalfDown' | 'HalfEven' | 'HalfUp';
|
|
568
|
-
/**
|
|
569
|
-
* Maps to `Order.taxCalculationMode`.
|
|
570
|
-
*/
|
|
571
|
-
export declare type TaxCalculationMode = 'LineItemLevel' | 'UnitPriceLevel';
|
|
572
|
-
/**
|
|
573
|
-
* Maps to `Order.origin`.
|
|
574
|
-
*/
|
|
575
|
-
export declare type CartOrigin = 'Customer' | 'Merchant';
|
|
576
|
-
export interface SyncInfo {
|
|
577
|
-
/**
|
|
578
|
-
* Maps to `SyncInfo.channel`
|
|
579
|
-
*
|
|
580
|
-
*/
|
|
581
|
-
readonly channel: ChannelKeyReference;
|
|
582
|
-
/**
|
|
583
|
-
* Maps to `SyncInfo.externalId`
|
|
584
|
-
*
|
|
585
|
-
*/
|
|
586
|
-
readonly externalId?: string;
|
|
587
|
-
/**
|
|
588
|
-
* Maps to `SyncInfo.syncedAt`
|
|
589
|
-
*
|
|
590
|
-
*/
|
|
591
|
-
readonly syncedAt: string;
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* Maps to `DiscountCodeInfo.state`
|
|
595
|
-
*/
|
|
596
|
-
export declare type DiscountCodeState = 'ApplicationStoppedByPreviousDiscount' | 'DoesNotMatchCart' | 'MatchesCart' | 'MaxApplicationReached' | 'NotActive' | 'NotValid';
|
|
597
|
-
export interface DiscountCodeInfo {
|
|
598
|
-
/**
|
|
599
|
-
* References a discount code by
|
|
600
|
-
*
|
|
601
|
-
*/
|
|
602
|
-
readonly discountCode: DiscountCodeKeyReference;
|
|
603
|
-
/**
|
|
604
|
-
* Maps to `DiscountCodeInfo.state`
|
|
605
|
-
*
|
|
606
|
-
*/
|
|
607
|
-
readonly state?: DiscountCodeState;
|
|
608
|
-
}
|
|
609
|
-
export declare type ShippingRateInputType = 'Classification' | 'Score';
|
|
610
|
-
export declare type ShippingRateInput = ClassificationShippingRateInput | ScoreShippingRateInput;
|
|
611
|
-
export interface ClassificationShippingRateInput {
|
|
612
|
-
readonly type: 'Classification';
|
|
613
|
-
/**
|
|
614
|
-
*
|
|
615
|
-
*/
|
|
616
|
-
readonly key: string;
|
|
617
|
-
/**
|
|
618
|
-
* 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.
|
|
619
|
-
* ```json
|
|
620
|
-
* {
|
|
621
|
-
* "de": "Hundefutter",
|
|
622
|
-
* "en": "dog food"
|
|
623
|
-
* }
|
|
624
|
-
* ```
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
*/
|
|
628
|
-
readonly label: LocalizedString;
|
|
629
|
-
}
|
|
630
|
-
export interface ScoreShippingRateInput {
|
|
631
|
-
readonly type: 'Score';
|
|
632
|
-
/**
|
|
633
|
-
*
|
|
634
|
-
*/
|
|
635
|
-
readonly score: number;
|
|
636
|
-
}
|
|
637
|
-
/**
|
|
638
|
-
* The data representation for an Order to be imported that is persisted as an [Order](/../api/projects/orders#top) in the Project.
|
|
639
|
-
*
|
|
640
|
-
* In commercetools, you can import an Order using the
|
|
641
|
-
* [Create Order by Import](https://docs.commercetools.com/http-api-projects-orders-import.html#create-an-order-by-import)
|
|
642
|
-
* endpoint method instead of creating it from a Cart.
|
|
643
|
-
*
|
|
644
|
-
* An OrderImport is a snapshot of an order at the time it was imported.
|
|
645
|
-
*
|
|
646
|
-
*/
|
|
647
|
-
export interface OrderImport {
|
|
648
|
-
/**
|
|
649
|
-
* Maps to `Order.orderNumber`, String that uniquely identifies an order. It should be unique across a project. Once it's set it cannot be changed.
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*/
|
|
653
|
-
readonly orderNumber: string;
|
|
654
|
-
/**
|
|
655
|
-
*
|
|
656
|
-
*/
|
|
657
|
-
readonly customer?: CustomerKeyReference;
|
|
658
|
-
/**
|
|
659
|
-
* Maps to `Order.customerEmail`.
|
|
660
|
-
*
|
|
661
|
-
*
|
|
662
|
-
*/
|
|
663
|
-
readonly customerEmail?: string;
|
|
664
|
-
/**
|
|
665
|
-
* Maps to `Order.lineItems`.
|
|
666
|
-
*
|
|
667
|
-
*
|
|
668
|
-
*/
|
|
669
|
-
readonly lineItems?: LineItemImportDraft[];
|
|
670
|
-
/**
|
|
671
|
-
* Maps to `Order.customLineItems`
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
*/
|
|
675
|
-
readonly customLineItems?: CustomLineItemDraft[];
|
|
676
|
-
/**
|
|
677
|
-
* Maps to `Order.totalPrice`. TypedMoney is what is called BaseMoney in the HTTP API.
|
|
678
|
-
*
|
|
679
|
-
*
|
|
680
|
-
*/
|
|
681
|
-
readonly totalPrice: TypedMoney;
|
|
682
|
-
/**
|
|
683
|
-
* Maps to `Order.taxedPrice`.
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
*/
|
|
687
|
-
readonly taxedPrice?: TaxedPrice;
|
|
688
|
-
/**
|
|
689
|
-
* Maps to `Order.shippingAddress`.
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
*/
|
|
693
|
-
readonly shippingAddress?: Address;
|
|
694
|
-
/**
|
|
695
|
-
* Maps to `Order.billingAddress`.
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*/
|
|
699
|
-
readonly billingAddress?: Address;
|
|
700
|
-
/**
|
|
701
|
-
* Maps to `Order.customerGroup`.
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*/
|
|
705
|
-
readonly customerGroup?: CustomerGroupKeyReference;
|
|
706
|
-
/**
|
|
707
|
-
* Maps to `Order.country`.
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
*/
|
|
711
|
-
readonly country?: string;
|
|
712
|
-
/**
|
|
713
|
-
* Maps to `Order.orderState`.
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*/
|
|
717
|
-
readonly orderState?: OrderState;
|
|
718
|
-
/**
|
|
719
|
-
* Maps to `Order.shipmentState`.
|
|
720
|
-
*
|
|
721
|
-
*
|
|
722
|
-
*/
|
|
723
|
-
readonly shipmentState?: ShipmentState;
|
|
724
|
-
/**
|
|
725
|
-
* Maps to `Order.paymentState`.
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*/
|
|
729
|
-
readonly paymentState?: PaymentState;
|
|
730
|
-
/**
|
|
731
|
-
* Maps to `Order.shippingInfo`.
|
|
732
|
-
*
|
|
733
|
-
*
|
|
734
|
-
*/
|
|
735
|
-
readonly shippingInfo?: ShippingInfoImportDraft;
|
|
736
|
-
/**
|
|
737
|
-
* Maps to `Order.completedAt`.
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*/
|
|
741
|
-
readonly completedAt?: string;
|
|
742
|
-
/**
|
|
743
|
-
* Maps to `Order.custom`.
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
*/
|
|
747
|
-
readonly custom?: Custom;
|
|
748
|
-
/**
|
|
749
|
-
* Maps to `Order.inventoryMode`.
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*/
|
|
753
|
-
readonly inventoryMode?: InventoryMode;
|
|
754
|
-
/**
|
|
755
|
-
* Maps to `Order.taxRoundingMode`.
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
*/
|
|
759
|
-
readonly taxRoundingMode?: RoundingMode;
|
|
760
|
-
/**
|
|
761
|
-
* Maps to `Order.taxCalculationMode`.
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
*/
|
|
765
|
-
readonly taxCalculationMode?: TaxCalculationMode;
|
|
766
|
-
/**
|
|
767
|
-
* Maps to `Order.origin`.
|
|
768
|
-
*
|
|
769
|
-
*
|
|
770
|
-
*/
|
|
771
|
-
readonly origin?: CartOrigin;
|
|
772
|
-
/**
|
|
773
|
-
* Maps to `Order.itemShippingAddresses`.
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
*/
|
|
777
|
-
readonly itemShippingAddresses?: Address[];
|
|
778
|
-
}
|
|
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, CartDiscountKeyReference, ChannelKeyReference, CustomerGroupKeyReference, CustomerKeyReference, DiscountCodeKeyReference, DiscountedPrice, Image, LocalizedString, Money, PriceTier, ProductKeyReference, ProductVariantKeyReference, ShippingMethodKeyReference, StateKeyReference, TaxCategoryKeyReference, TypedMoney } from './common';
|
|
7
|
+
import { Custom } from './customfields';
|
|
8
|
+
import { SubRate, TaxRate } from './prices';
|
|
9
|
+
import { Attribute } from './productvariants';
|
|
10
|
+
/**
|
|
11
|
+
* The item's state.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export interface ItemState {
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
readonly quantity: number;
|
|
19
|
+
/**
|
|
20
|
+
* Maps to `ItemState.state`.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
readonly state: StateKeyReference;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The item's shipping target.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export interface ItemShippingTarget {
|
|
31
|
+
/**
|
|
32
|
+
* Maps to `ItemShippingTarget.addressKey`.
|
|
33
|
+
*
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
readonly addressKey: string;
|
|
37
|
+
/**
|
|
38
|
+
* Maps to `ItemShippingTarget.quantity`.
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
readonly quantity: number;
|
|
43
|
+
}
|
|
44
|
+
export interface ItemShippingDetailsDraft {
|
|
45
|
+
/**
|
|
46
|
+
* Maps to `ItemShippingDetailsDraft.targets`.
|
|
47
|
+
*
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
readonly targets: ItemShippingTarget[];
|
|
51
|
+
}
|
|
52
|
+
export interface LineItemPrice {
|
|
53
|
+
/**
|
|
54
|
+
* Maps to `Price.value`. TypedMoney is what is called BaseMoney in the HTTP API.
|
|
55
|
+
*
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
readonly value: TypedMoney;
|
|
59
|
+
/**
|
|
60
|
+
* Maps to `Price.county`.
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
readonly country?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Maps to `Price.validFrom`.
|
|
67
|
+
*
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
readonly validFrom?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Maps to `Price.validUntil`.
|
|
73
|
+
*
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
readonly validUntil?: string;
|
|
77
|
+
/**
|
|
78
|
+
* References a customer group by key.
|
|
79
|
+
*
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
readonly customerGroup?: CustomerGroupKeyReference;
|
|
83
|
+
/**
|
|
84
|
+
* References a channel by key.
|
|
85
|
+
*
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
readonly channel?: ChannelKeyReference;
|
|
89
|
+
/**
|
|
90
|
+
* Sets a discounted price from an external service.
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
readonly discounted?: DiscountedPrice;
|
|
94
|
+
/**
|
|
95
|
+
* The tiered prices for this price.
|
|
96
|
+
*
|
|
97
|
+
*/
|
|
98
|
+
readonly tiers?: PriceTier[];
|
|
99
|
+
/**
|
|
100
|
+
* Maps to `Price.custom`.
|
|
101
|
+
*
|
|
102
|
+
*
|
|
103
|
+
*/
|
|
104
|
+
readonly custom?: Custom;
|
|
105
|
+
}
|
|
106
|
+
export interface LineItemProductVariantImportDraft {
|
|
107
|
+
/**
|
|
108
|
+
* Maps to `ProductVariant.product`.
|
|
109
|
+
*
|
|
110
|
+
*
|
|
111
|
+
*/
|
|
112
|
+
readonly productVariant?: ProductVariantKeyReference;
|
|
113
|
+
/**
|
|
114
|
+
* Maps to `ProductVariantImportDraft.sku`.
|
|
115
|
+
*
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
readonly sku?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Maps to `ProductVariantImportDraft.prices`
|
|
121
|
+
*
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
readonly prices?: LineItemPrice[];
|
|
125
|
+
/**
|
|
126
|
+
* Maps to `ProductVariantImportDraft.attributes`
|
|
127
|
+
*
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
readonly attributes?: Attribute[];
|
|
131
|
+
/**
|
|
132
|
+
* Maps to `ProductVariantImportDraft.images`.
|
|
133
|
+
*
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
readonly images?: Image[];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Represents an individual Line Item in an Order. A line item is a snapshot of a product at the time it was added to the order.
|
|
140
|
+
*
|
|
141
|
+
* You cannot create an Order that includes line item operations that do not exist in the Project or have been deleted.
|
|
142
|
+
* Products and Product Variants referenced by a line item must already exist in the commercetools Project.
|
|
143
|
+
*
|
|
144
|
+
*/
|
|
145
|
+
export interface LineItemImportDraft {
|
|
146
|
+
/**
|
|
147
|
+
* Maps to `LineItem.productId`.
|
|
148
|
+
*
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
readonly product?: ProductKeyReference;
|
|
152
|
+
/**
|
|
153
|
+
* Maps to `LineItem.name`.
|
|
154
|
+
*
|
|
155
|
+
*
|
|
156
|
+
*/
|
|
157
|
+
readonly name: LocalizedString;
|
|
158
|
+
/**
|
|
159
|
+
* Maps to `ProductVariantImportDraft`.
|
|
160
|
+
*
|
|
161
|
+
*
|
|
162
|
+
*/
|
|
163
|
+
readonly variant: LineItemProductVariantImportDraft;
|
|
164
|
+
/**
|
|
165
|
+
* Maps to `LineItem.price`.
|
|
166
|
+
*
|
|
167
|
+
*
|
|
168
|
+
*/
|
|
169
|
+
readonly price: LineItemPrice;
|
|
170
|
+
/**
|
|
171
|
+
* Maps to `LineItem.quantity`.
|
|
172
|
+
*
|
|
173
|
+
*
|
|
174
|
+
*/
|
|
175
|
+
readonly quantity: number;
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
*/
|
|
179
|
+
readonly state?: ItemState[];
|
|
180
|
+
/**
|
|
181
|
+
* Maps to `LineItem.supplyChannel`.
|
|
182
|
+
* The Reference to the Supply [Channel](/../api/projects/channels#channel) with which the LineItem is associated.
|
|
183
|
+
* If referenced Supply Channel does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Supply Channel is created.
|
|
184
|
+
*
|
|
185
|
+
*
|
|
186
|
+
*/
|
|
187
|
+
readonly supplyChannel?: ChannelKeyReference;
|
|
188
|
+
/**
|
|
189
|
+
* Maps to `LineItem.distributionChannel`.
|
|
190
|
+
* The Reference to the Distribution [Channel](/../api/projects/channels#channel) with which the LineItem is associated.
|
|
191
|
+
* If referenced CustomerGroup does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Distribution Channel is created.
|
|
192
|
+
*
|
|
193
|
+
*
|
|
194
|
+
*/
|
|
195
|
+
readonly distributionChannel?: ChannelKeyReference;
|
|
196
|
+
/**
|
|
197
|
+
* Maps to `LineItem.taxRate`.
|
|
198
|
+
*
|
|
199
|
+
*
|
|
200
|
+
*/
|
|
201
|
+
readonly taxRate?: TaxRate;
|
|
202
|
+
/**
|
|
203
|
+
* Maps to LineItem.shippingDetails.
|
|
204
|
+
*
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
208
|
+
}
|
|
209
|
+
export declare type ShippingRateTierType = 'CartClassification' | 'CartScore' | 'CartValue';
|
|
210
|
+
export declare type ShippingRatePriceTier = CartClassificationTier;
|
|
211
|
+
export interface CartClassificationTier {
|
|
212
|
+
readonly type: 'CartClassification';
|
|
213
|
+
/**
|
|
214
|
+
*
|
|
215
|
+
*/
|
|
216
|
+
readonly value: string;
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
readonly price: Money;
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
*/
|
|
224
|
+
readonly tiers: ShippingRatePriceTier[];
|
|
225
|
+
/**
|
|
226
|
+
*
|
|
227
|
+
*/
|
|
228
|
+
readonly isMatching?: boolean;
|
|
229
|
+
}
|
|
230
|
+
export interface ShippingRateDraft {
|
|
231
|
+
/**
|
|
232
|
+
*
|
|
233
|
+
*/
|
|
234
|
+
readonly price: Money;
|
|
235
|
+
/**
|
|
236
|
+
*
|
|
237
|
+
*/
|
|
238
|
+
readonly freeAbove?: Money;
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
*/
|
|
242
|
+
readonly tiers?: ShippingRatePriceTier[];
|
|
243
|
+
}
|
|
244
|
+
export interface ParcelMeasurements {
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
*/
|
|
248
|
+
readonly heightInMillimeter?: number;
|
|
249
|
+
/**
|
|
250
|
+
*
|
|
251
|
+
*/
|
|
252
|
+
readonly lengthInMillimeter?: number;
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
*/
|
|
256
|
+
readonly widthInMillimeter?: number;
|
|
257
|
+
/**
|
|
258
|
+
*
|
|
259
|
+
*/
|
|
260
|
+
readonly weightInGram?: number;
|
|
261
|
+
}
|
|
262
|
+
export interface TrackingData {
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
*/
|
|
266
|
+
readonly trackingId?: string;
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
*/
|
|
270
|
+
readonly carrier?: string;
|
|
271
|
+
/**
|
|
272
|
+
*
|
|
273
|
+
*/
|
|
274
|
+
readonly provider?: string;
|
|
275
|
+
/**
|
|
276
|
+
*
|
|
277
|
+
*/
|
|
278
|
+
readonly providerTransaction?: string;
|
|
279
|
+
/**
|
|
280
|
+
*
|
|
281
|
+
*/
|
|
282
|
+
readonly isReturn?: boolean;
|
|
283
|
+
}
|
|
284
|
+
export interface DeliveryItem {
|
|
285
|
+
/**
|
|
286
|
+
*
|
|
287
|
+
*/
|
|
288
|
+
readonly id: string;
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
*/
|
|
292
|
+
readonly quantity: number;
|
|
293
|
+
}
|
|
294
|
+
export interface Parcel {
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
*/
|
|
298
|
+
readonly id: string;
|
|
299
|
+
/**
|
|
300
|
+
*
|
|
301
|
+
*/
|
|
302
|
+
readonly createdAt: string;
|
|
303
|
+
/**
|
|
304
|
+
*
|
|
305
|
+
*/
|
|
306
|
+
readonly measurements?: ParcelMeasurements;
|
|
307
|
+
/**
|
|
308
|
+
*
|
|
309
|
+
*/
|
|
310
|
+
readonly trackingData?: TrackingData;
|
|
311
|
+
/**
|
|
312
|
+
*
|
|
313
|
+
*/
|
|
314
|
+
readonly items?: DeliveryItem[];
|
|
315
|
+
}
|
|
316
|
+
export interface Delivery {
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
*/
|
|
320
|
+
readonly id: string;
|
|
321
|
+
/**
|
|
322
|
+
*
|
|
323
|
+
*/
|
|
324
|
+
readonly createdAt: string;
|
|
325
|
+
/**
|
|
326
|
+
*
|
|
327
|
+
*/
|
|
328
|
+
readonly items: DeliveryItem[];
|
|
329
|
+
/**
|
|
330
|
+
*
|
|
331
|
+
*/
|
|
332
|
+
readonly parcels: Parcel[];
|
|
333
|
+
/**
|
|
334
|
+
*
|
|
335
|
+
*/
|
|
336
|
+
readonly address?: Address;
|
|
337
|
+
}
|
|
338
|
+
export interface DiscountedLineItemPortion {
|
|
339
|
+
/**
|
|
340
|
+
* References a cart discount by key.
|
|
341
|
+
*
|
|
342
|
+
*/
|
|
343
|
+
readonly discount: CartDiscountKeyReference;
|
|
344
|
+
/**
|
|
345
|
+
*
|
|
346
|
+
*/
|
|
347
|
+
readonly discountedAmount: Money;
|
|
348
|
+
}
|
|
349
|
+
export interface DiscountedLineItemPriceDraft {
|
|
350
|
+
/**
|
|
351
|
+
*
|
|
352
|
+
*/
|
|
353
|
+
readonly value: Money;
|
|
354
|
+
/**
|
|
355
|
+
*
|
|
356
|
+
*/
|
|
357
|
+
readonly includedDiscounts: DiscountedLineItemPortion[];
|
|
358
|
+
}
|
|
359
|
+
export declare type ShippingMethodState = 'DoesNotMatchCart' | 'MatchesCart';
|
|
360
|
+
/**
|
|
361
|
+
* Maps to an order's `shippingInfo` property. This field is usually populated by the cart assosciated with
|
|
362
|
+
* the order, but when importing orders you must provide a draft representation as a part of the OrderImport.
|
|
363
|
+
*
|
|
364
|
+
*/
|
|
365
|
+
export interface ShippingInfoImportDraft {
|
|
366
|
+
/**
|
|
367
|
+
*
|
|
368
|
+
*/
|
|
369
|
+
readonly shippingMethodName: string;
|
|
370
|
+
/**
|
|
371
|
+
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
372
|
+
*
|
|
373
|
+
*
|
|
374
|
+
*/
|
|
375
|
+
readonly price: TypedMoney;
|
|
376
|
+
/**
|
|
377
|
+
*
|
|
378
|
+
*/
|
|
379
|
+
readonly shippingRate: ShippingRateDraft;
|
|
380
|
+
/**
|
|
381
|
+
*
|
|
382
|
+
*/
|
|
383
|
+
readonly taxRate?: TaxRate;
|
|
384
|
+
/**
|
|
385
|
+
* References a tax category by key.
|
|
386
|
+
*
|
|
387
|
+
*/
|
|
388
|
+
readonly taxCategory?: TaxCategoryKeyReference;
|
|
389
|
+
/**
|
|
390
|
+
* References a shipping method by key.
|
|
391
|
+
*
|
|
392
|
+
*/
|
|
393
|
+
readonly shippingMethod?: ShippingMethodKeyReference;
|
|
394
|
+
/**
|
|
395
|
+
* Note that you can not add a `DeliveryItem` on import, as `LineItems` and `CustomLineItems` are not yet referencable by an `id`.
|
|
396
|
+
*
|
|
397
|
+
*/
|
|
398
|
+
readonly deliveries?: Delivery[];
|
|
399
|
+
/**
|
|
400
|
+
*
|
|
401
|
+
*/
|
|
402
|
+
readonly discountedPrice?: DiscountedLineItemPriceDraft;
|
|
403
|
+
/**
|
|
404
|
+
*
|
|
405
|
+
*/
|
|
406
|
+
readonly shippingMethodState?: ShippingMethodState;
|
|
407
|
+
}
|
|
408
|
+
export interface ExternalTaxRateDraft {
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
*/
|
|
412
|
+
readonly name: string;
|
|
413
|
+
/**
|
|
414
|
+
*
|
|
415
|
+
*/
|
|
416
|
+
readonly amount?: number;
|
|
417
|
+
/**
|
|
418
|
+
*
|
|
419
|
+
*/
|
|
420
|
+
readonly country: string;
|
|
421
|
+
/**
|
|
422
|
+
*
|
|
423
|
+
*/
|
|
424
|
+
readonly state?: string;
|
|
425
|
+
/**
|
|
426
|
+
*
|
|
427
|
+
*/
|
|
428
|
+
readonly subRates?: SubRate[];
|
|
429
|
+
/**
|
|
430
|
+
*
|
|
431
|
+
*/
|
|
432
|
+
readonly includedInPrice?: boolean;
|
|
433
|
+
}
|
|
434
|
+
export interface CustomLineItemTaxedPrice {
|
|
435
|
+
/**
|
|
436
|
+
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
437
|
+
*
|
|
438
|
+
*
|
|
439
|
+
*/
|
|
440
|
+
readonly totalNet: TypedMoney;
|
|
441
|
+
/**
|
|
442
|
+
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
443
|
+
*
|
|
444
|
+
*
|
|
445
|
+
*/
|
|
446
|
+
readonly totalGross: TypedMoney;
|
|
447
|
+
}
|
|
448
|
+
export interface CustomLineItemDraft {
|
|
449
|
+
/**
|
|
450
|
+
* 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.
|
|
451
|
+
* ```json
|
|
452
|
+
* {
|
|
453
|
+
* "de": "Hundefutter",
|
|
454
|
+
* "en": "dog food"
|
|
455
|
+
* }
|
|
456
|
+
* ```
|
|
457
|
+
*
|
|
458
|
+
*
|
|
459
|
+
*/
|
|
460
|
+
readonly name: LocalizedString;
|
|
461
|
+
/**
|
|
462
|
+
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
463
|
+
*
|
|
464
|
+
*
|
|
465
|
+
*/
|
|
466
|
+
readonly money: TypedMoney;
|
|
467
|
+
/**
|
|
468
|
+
*
|
|
469
|
+
*/
|
|
470
|
+
readonly taxedPrice?: CustomLineItemTaxedPrice;
|
|
471
|
+
/**
|
|
472
|
+
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
473
|
+
*
|
|
474
|
+
*
|
|
475
|
+
*/
|
|
476
|
+
readonly totalPrice: TypedMoney;
|
|
477
|
+
/**
|
|
478
|
+
*
|
|
479
|
+
*/
|
|
480
|
+
readonly slug: string;
|
|
481
|
+
/**
|
|
482
|
+
*
|
|
483
|
+
*/
|
|
484
|
+
readonly quantity: number;
|
|
485
|
+
/**
|
|
486
|
+
*
|
|
487
|
+
*/
|
|
488
|
+
readonly state?: ItemState[];
|
|
489
|
+
/**
|
|
490
|
+
* References a tax category by key.
|
|
491
|
+
*
|
|
492
|
+
*/
|
|
493
|
+
readonly taxCategory?: TaxCategoryKeyReference;
|
|
494
|
+
/**
|
|
495
|
+
*
|
|
496
|
+
*/
|
|
497
|
+
readonly taxRate?: TaxRate;
|
|
498
|
+
/**
|
|
499
|
+
*
|
|
500
|
+
*/
|
|
501
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
502
|
+
/**
|
|
503
|
+
*
|
|
504
|
+
*/
|
|
505
|
+
readonly discountedPricePerQuantity?: DiscountedLineItemPriceDraft[];
|
|
506
|
+
/**
|
|
507
|
+
*
|
|
508
|
+
*/
|
|
509
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
510
|
+
}
|
|
511
|
+
export interface TaxPortion {
|
|
512
|
+
/**
|
|
513
|
+
*
|
|
514
|
+
*/
|
|
515
|
+
readonly name?: string;
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
*/
|
|
519
|
+
readonly rate: number;
|
|
520
|
+
/**
|
|
521
|
+
* TypedMoney is what is called BaseMoney in the HTTP API.
|
|
522
|
+
*
|
|
523
|
+
*
|
|
524
|
+
*/
|
|
525
|
+
readonly amount: TypedMoney;
|
|
526
|
+
}
|
|
527
|
+
export interface TaxedPrice {
|
|
528
|
+
/**
|
|
529
|
+
* Maps to `TaxedPrice.totalNet`.
|
|
530
|
+
*
|
|
531
|
+
*/
|
|
532
|
+
readonly totalNet: Money;
|
|
533
|
+
/**
|
|
534
|
+
* Maps to `TaxedPrice.totalGross`.
|
|
535
|
+
*
|
|
536
|
+
*/
|
|
537
|
+
readonly totalGross: Money;
|
|
538
|
+
/**
|
|
539
|
+
* Maps to `TaxedPrice.taxPortions`.
|
|
540
|
+
*
|
|
541
|
+
*/
|
|
542
|
+
readonly taxPortions: TaxPortion[];
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Maps to `Order.taxMode`
|
|
546
|
+
*/
|
|
547
|
+
export declare type TaxMode = 'Disabled' | 'External' | 'ExternalAmount' | 'Platform';
|
|
548
|
+
/**
|
|
549
|
+
* Maps to `Order.orderState`.
|
|
550
|
+
*/
|
|
551
|
+
export declare type OrderState = 'Cancelled' | 'Complete' | 'Confirmed' | 'Open';
|
|
552
|
+
/**
|
|
553
|
+
* Maps to `Order.shipmentState`.
|
|
554
|
+
*/
|
|
555
|
+
export declare type ShipmentState = 'Backorder' | 'Delayed' | 'Partial' | 'Pending' | 'Ready' | 'Shipped';
|
|
556
|
+
/**
|
|
557
|
+
* Maps to `Order.paymentState`.
|
|
558
|
+
*/
|
|
559
|
+
export declare type PaymentState = 'BalanceDue' | 'CreditOwed' | 'Failed' | 'Paid' | 'Pending';
|
|
560
|
+
/**
|
|
561
|
+
* Maps to `Order.inventoryMode`.
|
|
562
|
+
*/
|
|
563
|
+
export declare type InventoryMode = 'ReserveOnOrder' | 'TrackOnly';
|
|
564
|
+
/**
|
|
565
|
+
* Maps to `Order.taxRoundingMode`.
|
|
566
|
+
*/
|
|
567
|
+
export declare type RoundingMode = 'HalfDown' | 'HalfEven' | 'HalfUp';
|
|
568
|
+
/**
|
|
569
|
+
* Maps to `Order.taxCalculationMode`.
|
|
570
|
+
*/
|
|
571
|
+
export declare type TaxCalculationMode = 'LineItemLevel' | 'UnitPriceLevel';
|
|
572
|
+
/**
|
|
573
|
+
* Maps to `Order.origin`.
|
|
574
|
+
*/
|
|
575
|
+
export declare type CartOrigin = 'Customer' | 'Merchant';
|
|
576
|
+
export interface SyncInfo {
|
|
577
|
+
/**
|
|
578
|
+
* Maps to `SyncInfo.channel`
|
|
579
|
+
*
|
|
580
|
+
*/
|
|
581
|
+
readonly channel: ChannelKeyReference;
|
|
582
|
+
/**
|
|
583
|
+
* Maps to `SyncInfo.externalId`
|
|
584
|
+
*
|
|
585
|
+
*/
|
|
586
|
+
readonly externalId?: string;
|
|
587
|
+
/**
|
|
588
|
+
* Maps to `SyncInfo.syncedAt`
|
|
589
|
+
*
|
|
590
|
+
*/
|
|
591
|
+
readonly syncedAt: string;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Maps to `DiscountCodeInfo.state`
|
|
595
|
+
*/
|
|
596
|
+
export declare type DiscountCodeState = 'ApplicationStoppedByPreviousDiscount' | 'DoesNotMatchCart' | 'MatchesCart' | 'MaxApplicationReached' | 'NotActive' | 'NotValid';
|
|
597
|
+
export interface DiscountCodeInfo {
|
|
598
|
+
/**
|
|
599
|
+
* References a discount code by key.
|
|
600
|
+
*
|
|
601
|
+
*/
|
|
602
|
+
readonly discountCode: DiscountCodeKeyReference;
|
|
603
|
+
/**
|
|
604
|
+
* Maps to `DiscountCodeInfo.state`
|
|
605
|
+
*
|
|
606
|
+
*/
|
|
607
|
+
readonly state?: DiscountCodeState;
|
|
608
|
+
}
|
|
609
|
+
export declare type ShippingRateInputType = 'Classification' | 'Score';
|
|
610
|
+
export declare type ShippingRateInput = ClassificationShippingRateInput | ScoreShippingRateInput;
|
|
611
|
+
export interface ClassificationShippingRateInput {
|
|
612
|
+
readonly type: 'Classification';
|
|
613
|
+
/**
|
|
614
|
+
*
|
|
615
|
+
*/
|
|
616
|
+
readonly key: string;
|
|
617
|
+
/**
|
|
618
|
+
* 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.
|
|
619
|
+
* ```json
|
|
620
|
+
* {
|
|
621
|
+
* "de": "Hundefutter",
|
|
622
|
+
* "en": "dog food"
|
|
623
|
+
* }
|
|
624
|
+
* ```
|
|
625
|
+
*
|
|
626
|
+
*
|
|
627
|
+
*/
|
|
628
|
+
readonly label: LocalizedString;
|
|
629
|
+
}
|
|
630
|
+
export interface ScoreShippingRateInput {
|
|
631
|
+
readonly type: 'Score';
|
|
632
|
+
/**
|
|
633
|
+
*
|
|
634
|
+
*/
|
|
635
|
+
readonly score: number;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* The data representation for an Order to be imported that is persisted as an [Order](/../api/projects/orders#top) in the Project.
|
|
639
|
+
*
|
|
640
|
+
* In commercetools, you can import an Order using the
|
|
641
|
+
* [Create Order by Import](https://docs.commercetools.com/http-api-projects-orders-import.html#create-an-order-by-import)
|
|
642
|
+
* endpoint method instead of creating it from a Cart.
|
|
643
|
+
*
|
|
644
|
+
* An OrderImport is a snapshot of an order at the time it was imported.
|
|
645
|
+
*
|
|
646
|
+
*/
|
|
647
|
+
export interface OrderImport {
|
|
648
|
+
/**
|
|
649
|
+
* Maps to `Order.orderNumber`, String that uniquely identifies an order. It should be unique across a project. Once it's set it cannot be changed.
|
|
650
|
+
*
|
|
651
|
+
*
|
|
652
|
+
*/
|
|
653
|
+
readonly orderNumber: string;
|
|
654
|
+
/**
|
|
655
|
+
*
|
|
656
|
+
*/
|
|
657
|
+
readonly customer?: CustomerKeyReference;
|
|
658
|
+
/**
|
|
659
|
+
* Maps to `Order.customerEmail`.
|
|
660
|
+
*
|
|
661
|
+
*
|
|
662
|
+
*/
|
|
663
|
+
readonly customerEmail?: string;
|
|
664
|
+
/**
|
|
665
|
+
* Maps to `Order.lineItems`.
|
|
666
|
+
*
|
|
667
|
+
*
|
|
668
|
+
*/
|
|
669
|
+
readonly lineItems?: LineItemImportDraft[];
|
|
670
|
+
/**
|
|
671
|
+
* Maps to `Order.customLineItems`
|
|
672
|
+
*
|
|
673
|
+
*
|
|
674
|
+
*/
|
|
675
|
+
readonly customLineItems?: CustomLineItemDraft[];
|
|
676
|
+
/**
|
|
677
|
+
* Maps to `Order.totalPrice`. TypedMoney is what is called BaseMoney in the HTTP API.
|
|
678
|
+
*
|
|
679
|
+
*
|
|
680
|
+
*/
|
|
681
|
+
readonly totalPrice: TypedMoney;
|
|
682
|
+
/**
|
|
683
|
+
* Maps to `Order.taxedPrice`.
|
|
684
|
+
*
|
|
685
|
+
*
|
|
686
|
+
*/
|
|
687
|
+
readonly taxedPrice?: TaxedPrice;
|
|
688
|
+
/**
|
|
689
|
+
* Maps to `Order.shippingAddress`.
|
|
690
|
+
*
|
|
691
|
+
*
|
|
692
|
+
*/
|
|
693
|
+
readonly shippingAddress?: Address;
|
|
694
|
+
/**
|
|
695
|
+
* Maps to `Order.billingAddress`.
|
|
696
|
+
*
|
|
697
|
+
*
|
|
698
|
+
*/
|
|
699
|
+
readonly billingAddress?: Address;
|
|
700
|
+
/**
|
|
701
|
+
* Maps to `Order.customerGroup`.
|
|
702
|
+
*
|
|
703
|
+
*
|
|
704
|
+
*/
|
|
705
|
+
readonly customerGroup?: CustomerGroupKeyReference;
|
|
706
|
+
/**
|
|
707
|
+
* Maps to `Order.country`.
|
|
708
|
+
*
|
|
709
|
+
*
|
|
710
|
+
*/
|
|
711
|
+
readonly country?: string;
|
|
712
|
+
/**
|
|
713
|
+
* Maps to `Order.orderState`.
|
|
714
|
+
*
|
|
715
|
+
*
|
|
716
|
+
*/
|
|
717
|
+
readonly orderState?: OrderState;
|
|
718
|
+
/**
|
|
719
|
+
* Maps to `Order.shipmentState`.
|
|
720
|
+
*
|
|
721
|
+
*
|
|
722
|
+
*/
|
|
723
|
+
readonly shipmentState?: ShipmentState;
|
|
724
|
+
/**
|
|
725
|
+
* Maps to `Order.paymentState`.
|
|
726
|
+
*
|
|
727
|
+
*
|
|
728
|
+
*/
|
|
729
|
+
readonly paymentState?: PaymentState;
|
|
730
|
+
/**
|
|
731
|
+
* Maps to `Order.shippingInfo`.
|
|
732
|
+
*
|
|
733
|
+
*
|
|
734
|
+
*/
|
|
735
|
+
readonly shippingInfo?: ShippingInfoImportDraft;
|
|
736
|
+
/**
|
|
737
|
+
* Maps to `Order.completedAt`.
|
|
738
|
+
*
|
|
739
|
+
*
|
|
740
|
+
*/
|
|
741
|
+
readonly completedAt?: string;
|
|
742
|
+
/**
|
|
743
|
+
* Maps to `Order.custom`.
|
|
744
|
+
*
|
|
745
|
+
*
|
|
746
|
+
*/
|
|
747
|
+
readonly custom?: Custom;
|
|
748
|
+
/**
|
|
749
|
+
* Maps to `Order.inventoryMode`.
|
|
750
|
+
*
|
|
751
|
+
*
|
|
752
|
+
*/
|
|
753
|
+
readonly inventoryMode?: InventoryMode;
|
|
754
|
+
/**
|
|
755
|
+
* Maps to `Order.taxRoundingMode`.
|
|
756
|
+
*
|
|
757
|
+
*
|
|
758
|
+
*/
|
|
759
|
+
readonly taxRoundingMode?: RoundingMode;
|
|
760
|
+
/**
|
|
761
|
+
* Maps to `Order.taxCalculationMode`.
|
|
762
|
+
*
|
|
763
|
+
*
|
|
764
|
+
*/
|
|
765
|
+
readonly taxCalculationMode?: TaxCalculationMode;
|
|
766
|
+
/**
|
|
767
|
+
* Maps to `Order.origin`.
|
|
768
|
+
*
|
|
769
|
+
*
|
|
770
|
+
*/
|
|
771
|
+
readonly origin?: CartOrigin;
|
|
772
|
+
/**
|
|
773
|
+
* Maps to `Order.itemShippingAddresses`.
|
|
774
|
+
*
|
|
775
|
+
*
|
|
776
|
+
*/
|
|
777
|
+
readonly itemShippingAddresses?: Address[];
|
|
778
|
+
}
|