@commercetools/importapi-sdk 4.7.0 → 5.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 +48 -0
- package/dist/commercetools-importapi-sdk.browser.cjs.js +2 -1
- package/dist/commercetools-importapi-sdk.browser.esm.js +2 -1
- package/dist/commercetools-importapi-sdk.cjs.dev.js +2 -1
- package/dist/commercetools-importapi-sdk.cjs.prod.js +2 -1
- package/dist/commercetools-importapi-sdk.esm.js +2 -1
- package/dist/declarations/src/generated/models/categories.d.ts +5 -0
- package/dist/declarations/src/generated/models/customers.d.ts +5 -0
- package/dist/declarations/src/generated/models/customfields.d.ts +4 -4
- package/dist/declarations/src/generated/models/inventories.d.ts +5 -0
- package/dist/declarations/src/generated/models/orders.d.ts +1 -1
- package/dist/declarations/src/generated/models/prices.d.ts +1 -1
- package/dist/declarations/src/generated/models/productdrafts.d.ts +5 -0
- package/dist/declarations/src/generated/models/products.d.ts +5 -0
- package/dist/declarations/src/generated/models/producttypes.d.ts +5 -0
- package/dist/declarations/src/generated/models/productvariants.d.ts +13 -3
- package/dist/declarations/src/generated/models/standalone-prices.d.ts +1 -1
- package/dist/declarations/src/generated/models/types.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @commercetools/importapi-sdk
|
|
2
2
|
|
|
3
|
+
## 5.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#553](https://github.com/commercetools/commercetools-sdk-typescript/pull/553) [`8e0a312`](https://github.com/commercetools/commercetools-sdk-typescript/commit/8e0a312404020c2f14cb15786a262c78476b5152) Thanks [@github-actions](https://github.com/apps/github-actions)! - **Api changes**
|
|
8
|
+
|
|
9
|
+
<details>
|
|
10
|
+
<summary>Added QueryParameter(s)</summary>
|
|
11
|
+
|
|
12
|
+
- added query parameter `expand` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
|
|
13
|
+
- added query parameter `sort` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
|
|
14
|
+
- added query parameter `limit` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
|
|
15
|
+
- added query parameter `offset` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
|
|
16
|
+
- added query parameter `withTotal` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
|
|
17
|
+
- added query parameter `where` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
|
|
18
|
+
- added query parameter `/^var[.][a-zA-Z0-9]+$/` to method `get /{projectKey}/in-store/key={storeKey}/cart-discounts`
|
|
19
|
+
- added query parameter `expand` to method `post /{projectKey}/in-store/key={storeKey}/cart-discounts`
|
|
20
|
+
</details>
|
|
21
|
+
|
|
22
|
+
<details>
|
|
23
|
+
<summary>Changed MethodResponseBody(s)</summary>
|
|
24
|
+
|
|
25
|
+
- :warning: changed response body for `200: application/json` of method `get /{projectKey}/in-store/key={storeKey}/cart-discounts` from type `CartDiscount` to `CartDiscountPagedQueryResponse`
|
|
26
|
+
</details>
|
|
27
|
+
|
|
28
|
+
## 5.0.0
|
|
29
|
+
|
|
30
|
+
### Major Changes
|
|
31
|
+
|
|
32
|
+
- [#551](https://github.com/commercetools/commercetools-sdk-typescript/pull/551) [`9e7939a`](https://github.com/commercetools/commercetools-sdk-typescript/commit/9e7939a1df234fd1f4f77c60f4ff75b31d7fc3fd) Thanks [@github-actions](https://github.com/apps/github-actions)! - BREAKING CHANGE:
|
|
33
|
+
|
|
34
|
+
- fix URI parameters to be URI encoded
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- [#527](https://github.com/commercetools/commercetools-sdk-typescript/pull/527) [`00c6176`](https://github.com/commercetools/commercetools-sdk-typescript/commit/00c617692543f9a8d0ac64e81d583f89e002e81b) Thanks [@github-actions](https://github.com/apps/github-actions)! - **Import changes**
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary>Added Property(s)</summary>
|
|
42
|
+
|
|
43
|
+
- added property `product` to type `ProductVariantPatch`
|
|
44
|
+
</details>
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- Updated dependencies [[`a6d0df2`](https://github.com/commercetools/commercetools-sdk-typescript/commit/a6d0df2034b72504db2aa2d13a8d3726d97cc881)]:
|
|
49
|
+
- @commercetools/sdk-client-v2@2.2.2
|
|
50
|
+
|
|
3
51
|
## 4.7.0
|
|
4
52
|
|
|
5
53
|
### Minor Changes
|
|
@@ -86,7 +86,8 @@ function buildRelativeUri(commonRequest) {
|
|
|
86
86
|
const pathMap = commonRequest.pathVariables;
|
|
87
87
|
var uri = commonRequest.uriTemplate;
|
|
88
88
|
for (const param in pathMap) {
|
|
89
|
-
|
|
89
|
+
const value = encodeURIComponent(`${pathMap[param]}`);
|
|
90
|
+
uri = uri.replace(`{${param}}`, `${value}`);
|
|
90
91
|
}
|
|
91
92
|
const resQuery = formatQueryString(commonRequest.queryParams || {});
|
|
92
93
|
return `${uri}${resQuery}`;
|
|
@@ -82,7 +82,8 @@ function buildRelativeUri(commonRequest) {
|
|
|
82
82
|
const pathMap = commonRequest.pathVariables;
|
|
83
83
|
var uri = commonRequest.uriTemplate;
|
|
84
84
|
for (const param in pathMap) {
|
|
85
|
-
|
|
85
|
+
const value = encodeURIComponent(`${pathMap[param]}`);
|
|
86
|
+
uri = uri.replace(`{${param}}`, `${value}`);
|
|
86
87
|
}
|
|
87
88
|
const resQuery = formatQueryString(commonRequest.queryParams || {});
|
|
88
89
|
return `${uri}${resQuery}`;
|
|
@@ -86,7 +86,8 @@ function buildRelativeUri(commonRequest) {
|
|
|
86
86
|
const pathMap = commonRequest.pathVariables;
|
|
87
87
|
var uri = commonRequest.uriTemplate;
|
|
88
88
|
for (const param in pathMap) {
|
|
89
|
-
|
|
89
|
+
const value = encodeURIComponent(`${pathMap[param]}`);
|
|
90
|
+
uri = uri.replace(`{${param}}`, `${value}`);
|
|
90
91
|
}
|
|
91
92
|
const resQuery = formatQueryString(commonRequest.queryParams || {});
|
|
92
93
|
return `${uri}${resQuery}`;
|
|
@@ -86,7 +86,8 @@ function buildRelativeUri(commonRequest) {
|
|
|
86
86
|
const pathMap = commonRequest.pathVariables;
|
|
87
87
|
var uri = commonRequest.uriTemplate;
|
|
88
88
|
for (const param in pathMap) {
|
|
89
|
-
|
|
89
|
+
const value = encodeURIComponent(`${pathMap[param]}`);
|
|
90
|
+
uri = uri.replace(`{${param}}`, `${value}`);
|
|
90
91
|
}
|
|
91
92
|
const resQuery = formatQueryString(commonRequest.queryParams || {});
|
|
92
93
|
return `${uri}${resQuery}`;
|
|
@@ -82,7 +82,8 @@ function buildRelativeUri(commonRequest) {
|
|
|
82
82
|
const pathMap = commonRequest.pathVariables;
|
|
83
83
|
var uri = commonRequest.uriTemplate;
|
|
84
84
|
for (const param in pathMap) {
|
|
85
|
-
|
|
85
|
+
const value = encodeURIComponent(`${pathMap[param]}`);
|
|
86
|
+
uri = uri.replace(`{${param}}`, `${value}`);
|
|
86
87
|
}
|
|
87
88
|
const resQuery = formatQueryString(commonRequest.queryParams || {});
|
|
88
89
|
return `${uri}${resQuery}`;
|
|
@@ -10,6 +10,11 @@ import { Custom } from "./customfields.js";
|
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
export interface CategoryImport extends ImportResource {
|
|
13
|
+
/**
|
|
14
|
+
* User-defined unique identifier. If a [Category](/../api/projects/categories#category) with this `key` exists, it will be updated with the imported data.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
readonly key: string;
|
|
13
18
|
/**
|
|
14
19
|
* Maps to `Category.name`.
|
|
15
20
|
*
|
|
@@ -123,6 +123,11 @@ export interface CustomerAddress {
|
|
|
123
123
|
*
|
|
124
124
|
*/
|
|
125
125
|
export interface CustomerImport extends ImportResource {
|
|
126
|
+
/**
|
|
127
|
+
* User-defined unique identifier. If a [Customer](/../api/projects/customers#customer) with this `key` exists, it will be updated with the imported data.
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
readonly key: string;
|
|
126
131
|
/**
|
|
127
132
|
* Maps to `Customer.customerNumber`.
|
|
128
133
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { KeyReference, LocalizedString, Money, TypedMoney, TypeKeyReference } from "./common.js";
|
|
7
7
|
/**
|
|
8
|
-
* The representation to be sent to the server when creating a resource with
|
|
8
|
+
* The representation to be sent to the server when creating a resource with Custom Fields.
|
|
9
9
|
*/
|
|
10
10
|
export interface Custom {
|
|
11
11
|
/**
|
|
@@ -14,19 +14,19 @@ export interface Custom {
|
|
|
14
14
|
*/
|
|
15
15
|
readonly type: TypeKeyReference;
|
|
16
16
|
/**
|
|
17
|
-
* The
|
|
17
|
+
* The Custom Fields of this object.
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
readonly fields?: FieldContainer;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Maps the
|
|
23
|
+
* Maps the Custom Field names to actual values.
|
|
24
24
|
*/
|
|
25
25
|
export interface FieldContainer {
|
|
26
26
|
[key: string]: CustomField;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Provides the value for a
|
|
29
|
+
* Provides the value for a Custom Field of a specific type.
|
|
30
30
|
*/
|
|
31
31
|
export type CustomField = BooleanField | BooleanSetField | DateField | DateSetField | DateTimeField | DateTimeSetField | EnumField | EnumSetField | LocalizedEnumField | LocalizedEnumSetField | LocalizedStringField | LocalizedStringSetField | MoneyField | MoneySetField | NumberField | NumberSetField | ReferenceField | ReferenceSetField | StringField | StringSetField | TimeField | TimeSetField;
|
|
32
32
|
/**
|
|
@@ -10,6 +10,11 @@ import { Custom } from "./customfields.js";
|
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
export interface InventoryImport extends ImportResource {
|
|
13
|
+
/**
|
|
14
|
+
* User-defined unique identifier. If an [InventoryEntry](/../api/projects/inventory#inventoryentry) with this `key` exists, it will be updated with the imported data.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
readonly key: string;
|
|
13
18
|
/**
|
|
14
19
|
* Maps to `Inventory.sku`
|
|
15
20
|
*
|
|
@@ -318,7 +318,7 @@ export interface Parcel {
|
|
|
318
318
|
*/
|
|
319
319
|
readonly items?: DeliveryItem[];
|
|
320
320
|
/**
|
|
321
|
-
* The representation to be sent to the server when creating a resource with
|
|
321
|
+
* The representation to be sent to the server when creating a resource with Custom Fields.
|
|
322
322
|
*
|
|
323
323
|
*/
|
|
324
324
|
readonly custom?: Custom;
|
|
@@ -53,7 +53,7 @@ export interface TaxRate {
|
|
|
53
53
|
*/
|
|
54
54
|
export interface PriceImport extends ImportResource {
|
|
55
55
|
/**
|
|
56
|
-
* User-defined unique identifier for the Embedded Price.
|
|
56
|
+
* User-defined unique identifier for the Embedded Price. If a [Price](/../api/types#price) with this `key` exists on the specified `productVariant`, it will be updated with the imported data.
|
|
57
57
|
*
|
|
58
58
|
*
|
|
59
59
|
*/
|
|
@@ -12,6 +12,11 @@ import { Attribute } from "./productvariants.js";
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
export interface ProductDraftImport extends ImportResource {
|
|
15
|
+
/**
|
|
16
|
+
* User-defined unique identifier. If a [Product](/../api/projects/products#product) with this `key` exists, it will be updated with the imported data.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
readonly key: string;
|
|
15
20
|
/**
|
|
16
21
|
* The `productType` of a [Product](/../api/projects/products#product).
|
|
17
22
|
* Maps to `Product.productType`.
|
|
@@ -61,6 +61,11 @@ export interface WhitespaceTokenizer {
|
|
|
61
61
|
*
|
|
62
62
|
*/
|
|
63
63
|
export interface ProductImport extends ImportResource {
|
|
64
|
+
/**
|
|
65
|
+
* User-defined unique identifier. If a [Product](/../api/projects/products#product) with this `key` exists, it will be updated with the imported data.
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
readonly key: string;
|
|
64
69
|
/**
|
|
65
70
|
* Maps to `Product.name`.
|
|
66
71
|
*
|
|
@@ -152,6 +152,11 @@ export type TextInputHint = 'MultiLine' | 'SingleLine' | string;
|
|
|
152
152
|
*
|
|
153
153
|
*/
|
|
154
154
|
export interface ProductTypeImport extends ImportResource {
|
|
155
|
+
/**
|
|
156
|
+
* User-defined unique identifier. If a [ProductType](/../api/projects/productTypes#producttype) with this `key` exists, it will be updated with the imported data.
|
|
157
|
+
*
|
|
158
|
+
*/
|
|
159
|
+
readonly key: string;
|
|
155
160
|
/**
|
|
156
161
|
* Maps to `ProductType.name`.
|
|
157
162
|
*
|
|
@@ -446,6 +446,11 @@ export interface TimeSetAttribute {
|
|
|
446
446
|
*
|
|
447
447
|
*/
|
|
448
448
|
export interface ProductVariantImport extends ImportResource {
|
|
449
|
+
/**
|
|
450
|
+
* User-defined unique identifier. If a [ProductVariant](/../api/projects/products#productvariant) with this `key` exists on the specified `product`, it will be updated with the imported data.
|
|
451
|
+
*
|
|
452
|
+
*/
|
|
453
|
+
readonly key: string;
|
|
449
454
|
/**
|
|
450
455
|
* Maps to `ProductVariant.sku`.
|
|
451
456
|
*
|
|
@@ -501,9 +506,8 @@ export interface ProductVariantImport extends ImportResource {
|
|
|
501
506
|
*/
|
|
502
507
|
export interface ProductVariantPatch {
|
|
503
508
|
/**
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
* 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
|
+
* Reference to the [ProductVariant](/../api/projects/products#productvariant) to update.
|
|
510
|
+
* If the referenced ProductVariant does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary ProductVariant is created.
|
|
507
511
|
*
|
|
508
512
|
*
|
|
509
513
|
*/
|
|
@@ -524,6 +528,12 @@ export interface ProductVariantPatch {
|
|
|
524
528
|
*
|
|
525
529
|
*/
|
|
526
530
|
readonly staged?: boolean;
|
|
531
|
+
/**
|
|
532
|
+
* Reference to the [Product](/../api/projects/products#product) which contains the ProductVariant. Setting a value will batch process the import operations to minimize concurrency errors. If set, this field is required for every ProductVariantPatch in the [ProductVariantPatchRequest](ctp:import:type:ProductVariantPatchRequest).
|
|
533
|
+
*
|
|
534
|
+
*
|
|
535
|
+
*/
|
|
536
|
+
readonly product?: ProductKeyReference;
|
|
527
537
|
}
|
|
528
538
|
export interface Attributes {
|
|
529
539
|
[key: string]: Attribute | null;
|
|
@@ -11,7 +11,7 @@ import { Custom } from "./customfields.js";
|
|
|
11
11
|
*/
|
|
12
12
|
export interface StandalonePriceImport extends ImportResource {
|
|
13
13
|
/**
|
|
14
|
-
* User-defined unique identifier for the Standalone Price.
|
|
14
|
+
* User-defined unique identifier for the Standalone Price. If a [StandalonePrice](/../api/projects/standalone-prices#standaloneprice) with this `key` exists, it will be updated with the imported data.
|
|
15
15
|
*
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
@@ -180,7 +180,7 @@ export interface FieldDefinition {
|
|
|
180
180
|
*/
|
|
181
181
|
export interface TypeImport extends ImportResource {
|
|
182
182
|
/**
|
|
183
|
-
* User-defined unique identifier for the Type.
|
|
183
|
+
* User-defined unique identifier for the Type. If a [Type](/../api/projects/types#type) with this `key` exists, it will be updated with the imported data.
|
|
184
184
|
*
|
|
185
185
|
*
|
|
186
186
|
*/
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"name": "@commercetools/importapi-sdk",
|
|
7
|
-
"version": "
|
|
7
|
+
"version": "5.1.0",
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=14"
|
|
10
10
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"./dist/commercetools-importapi-sdk.esm.js": "./dist/commercetools-importapi-sdk.browser.esm.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@commercetools/sdk-client-v2": "^2.
|
|
35
|
+
"@commercetools/sdk-client-v2": "^2.2.2",
|
|
36
36
|
"@commercetools/sdk-middleware-auth": "^7.0.0",
|
|
37
37
|
"@commercetools/sdk-middleware-http": "^7.0.0",
|
|
38
38
|
"@commercetools/sdk-middleware-logger": "^3.0.0"
|