@commercetools/importapi-sdk 2.3.0 → 2.5.1

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 CHANGED
@@ -1,5 +1,42 @@
1
1
  # @commercetools/importapi-sdk
2
2
 
3
+ ## 2.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#258](https://github.com/commercetools/commercetools-sdk-typescript/pull/258) [`ba52d38`](https://github.com/commercetools/commercetools-sdk-typescript/commit/ba52d38a0a00299de61f554ae753cfb984401d79) Thanks [@github-actions](https://github.com/apps/github-actions)! - Update generated SDKs
8
+
9
+ - add support for Standalone Prices
10
+
11
+ * [#266](https://github.com/commercetools/commercetools-sdk-typescript/pull/266) [`fd29fa7`](https://github.com/commercetools/commercetools-sdk-typescript/commit/fd29fa759f906040d76a889c2d3fbfbdf2ac6617) Thanks [@github-actions](https://github.com/apps/github-actions)! - Platform SDK updates:
12
+
13
+ - Fix /me/email/confirm arguments and return type (https://github.com/commercetools/commercetools-sdk-typescript/issues/274)
14
+
15
+ ## 2.5.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#257](https://github.com/commercetools/commercetools-sdk-typescript/pull/257) [`facc47b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/facc47ba50b00056adc232d7c75a2849cdcc6689) Thanks [@ajimae](https://github.com/ajimae)! - release latest sdk
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [[`facc47b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/facc47ba50b00056adc232d7c75a2849cdcc6689), [`7512c3f`](https://github.com/commercetools/commercetools-sdk-typescript/commit/7512c3f1f488645da3952f296d4f4fe3149b7fba)]:
24
+ - @commercetools/sdk-client-v2@1.4.0
25
+
26
+ ## 2.4.0
27
+
28
+ ### Minor Changes
29
+
30
+ - [#241](https://github.com/commercetools/commercetools-sdk-typescript/pull/241) [`85f5be3`](https://github.com/commercetools/commercetools-sdk-typescript/commit/85f5be349a9b0fa46539259981bfd8d5fc2ffdc6) Thanks [@ajimae](https://github.com/ajimae)! - Releasing the TS SDK with the following changelogs
31
+
32
+ - added functionalities to extend client user agent
33
+ - custom field added to OrderFromCardDraft
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [[`85f5be3`](https://github.com/commercetools/commercetools-sdk-typescript/commit/85f5be349a9b0fa46539259981bfd8d5fc2ffdc6)]:
38
+ - @commercetools/sdk-client-v2@1.3.0
39
+
3
40
  ## 2.3.0
4
41
 
5
42
  ### Minor Changes
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Typescript SDK for commercetools import API
1
+ # TypeScript SDK for commercetools Composable Commerce Import API
2
2
 
3
3
  ## Usage examples
4
4
 
@@ -54,7 +54,7 @@ const authMiddlewareOptions = {
54
54
  }
55
55
 
56
56
  const httpMiddlewareOptions = {
57
- host: 'https://api.europe-west1.gcp.commercetools.com',
57
+ host: 'https://import.europe-west1.gcp.commercetools.com',
58
58
  fetch,
59
59
  }
60
60
 
@@ -79,9 +79,10 @@ const apiRoot = createApiBuilderFromCtpClient(client)
79
79
  // calling the importapi functions
80
80
  // get project details
81
81
  apiRoot
82
- .withProjectKey({
82
+ .withProjectKeyValue({
83
83
  projectKey,
84
84
  })
85
+ .importContainers()
85
86
  .get()
86
87
  .execute()
87
88
  .then((x) => {
@@ -88,7 +88,7 @@ export interface AssetSource {
88
88
  readonly contentType?: string;
89
89
  }
90
90
  /**
91
- * An Image uploaded to the commercetools platform is stored in a Content Delivery Network and it's available in several pre-defined sizes. If you already have an image stored on an external service, you can save the URL when creating a new product or adding a variant, or you can add it later.
91
+ * An Image uploaded to commercetools Composable Commerce is stored in a Content Delivery Network and it's available in several pre-defined sizes. If you already have an image stored on an external service, you can save the URL when creating a new product or adding a variant, or you can add it later.
92
92
  */
93
93
  export interface Image {
94
94
  /**
@@ -150,8 +150,8 @@ export interface LocalizedString {
150
150
  }
151
151
  /**
152
152
  * A representation of the resource to import.
153
- * Import resources are similar to commercetools draft types, but they only support key references.
154
- * In general, import resources are more granular then the normal commercetools resource.
153
+ * Import resources are similar to draft types, but they only support key references.
154
+ * In general, import resources are more granular then regular resources.
155
155
  * They are optimized for incremental updates and therefore have a slightly different structure.
156
156
  *
157
157
  */
@@ -68,7 +68,7 @@ export interface LocalizedStringField {
68
68
  readonly value: LocalizedString;
69
69
  }
70
70
  /**
71
- * A field with a enum value.
71
+ * A field with an enum value.
72
72
  */
73
73
  export interface EnumField {
74
74
  readonly type: 'Enum';
@@ -179,7 +179,7 @@ export interface LocalizedStringSetField {
179
179
  readonly value: LocalizedString[];
180
180
  }
181
181
  /**
182
- * A field with a enum set value.
182
+ * A field with an enum set value.
183
183
  */
184
184
  export interface EnumSetField {
185
185
  readonly type: 'EnumSet';
@@ -85,13 +85,12 @@ export interface ImportContainerUpdateDraft {
85
85
  */
86
86
  export interface ImportContainerPagedResponse {
87
87
  /**
88
- * The number of results requested in the query request.
88
+ * Number of [results requested](/../api/general-concepts#limit).
89
89
  *
90
90
  */
91
91
  readonly limit: number;
92
92
  /**
93
- * The number of elements skipped, not a page number.
94
- * Supplied by the client or the server default.
93
+ * Number of [elements skipped](/../api/general-concepts#offset).
95
94
  *
96
95
  *
97
96
  */
@@ -75,13 +75,12 @@ export interface ImportOperation {
75
75
  */
76
76
  export interface ImportOperationPagedResponse {
77
77
  /**
78
- * The number of results requested in the query request.
78
+ * Number of [results requested](/../api/general-concepts#limit).
79
79
  *
80
80
  */
81
81
  readonly limit: number;
82
82
  /**
83
- * The number of elements skipped, not a page number.
84
- * Supplied by the client or the server default.
83
+ * Number of [elements skipped](/../api/general-concepts#offset).
85
84
  *
86
85
  *
87
86
  */
@@ -30,7 +30,7 @@ export interface ImportResponse {
30
30
  readonly operationStatus: ImportOperationStatus[];
31
31
  }
32
32
  /**
33
- * The request body to [import Categories](#import-categories). Contains data for [Categories](/../api/projects/categories#category) to be created or updated in a commercetools Project.
33
+ * The request body to [import Categories](#import-categories). Contains data for [Categories](/../api/projects/categories#category) to be created or updated in a Project.
34
34
  *
35
35
  */
36
36
  export interface CategoryImportRequest {
@@ -43,7 +43,7 @@ export interface CategoryImportRequest {
43
43
  readonly resources: CategoryImport[];
44
44
  }
45
45
  /**
46
- * The request body to [import Products](#import-products). Contains data for [Products](/../api/projects/products#product) to be created or updated in a commercetools Project.
46
+ * The request body to [import Products](#import-products). Contains data for [Products](/../api/projects/products#product) to be created or updated in a Project.
47
47
  *
48
48
  */
49
49
  export interface ProductImportRequest {
@@ -56,7 +56,7 @@ export interface ProductImportRequest {
56
56
  readonly resources: ProductImport[];
57
57
  }
58
58
  /**
59
- * The request body to [import ProductDrafts](#import-productdrafts). Contains data for [Products](/../api/projects/products#productdraft) to be created or updated in a commercetools Project.
59
+ * The request body to [import ProductDrafts](#import-productdrafts). Contains data for [Products](/../api/projects/products#productdraft) to be created or updated in a Project.
60
60
  *
61
61
  */
62
62
  export interface ProductDraftImportRequest {
@@ -69,7 +69,7 @@ export interface ProductDraftImportRequest {
69
69
  readonly resources: ProductDraftImport[];
70
70
  }
71
71
  /**
72
- * The request body to [import ProductTypes](#import-producttypes). Contains data for [ProductTypes](/../api/projects/productTypes#producttype) to be created or updated in a commercetools Project.
72
+ * The request body to [import ProductTypes](#import-producttypes). Contains data for [ProductTypes](/../api/projects/productTypes#producttype) to be created or updated in a Project.
73
73
  *
74
74
  */
75
75
  export interface ProductTypeImportRequest {
@@ -82,7 +82,7 @@ export interface ProductTypeImportRequest {
82
82
  readonly resources: ProductTypeImport[];
83
83
  }
84
84
  /**
85
- * The request body to [import ProductVariants](#import-productvariants). Contains data for [ProductVariants](/../api/projects/products#productvariant) to be created or updated in a commercetools Project.
85
+ * The request body to [import ProductVariants](#import-productvariants). Contains data for [ProductVariants](/../api/projects/products#productvariant) to be created or updated in a Project.
86
86
  *
87
87
  */
88
88
  export interface ProductVariantImportRequest {
@@ -95,7 +95,7 @@ export interface ProductVariantImportRequest {
95
95
  readonly resources: ProductVariantImport[];
96
96
  }
97
97
  /**
98
- * The request body to [import Prices](#import-prices). Contains data for [Prices](/../api/projects/products#price) to be created or updated in a commercetools Project.
98
+ * The request body to [import Prices](#import-prices). Contains data for [EmbeddedPrices](/../api/projects/products#embeddedprice) to be created or updated in a Project.
99
99
  *
100
100
  */
101
101
  export interface PriceImportRequest {
@@ -108,7 +108,7 @@ export interface PriceImportRequest {
108
108
  readonly resources: PriceImport[];
109
109
  }
110
110
  /**
111
- * The request body to [import Orders](#import-orders). Contains data for [Orders](/../api/projects/orders#order) to be created or updated in a commercetools Project.
111
+ * The request body to [import Orders](#import-orders). Contains data for [Orders](/../api/projects/orders#order) to be created or updated in a Project.
112
112
  *
113
113
  */
114
114
  export interface OrderImportRequest {
@@ -147,7 +147,7 @@ export interface ProductVariantPatchRequest {
147
147
  readonly patches: ProductVariantPatch[];
148
148
  }
149
149
  /**
150
- * The request body to [import Customers](#import-customers). Contains data for [Customers](/../api/projects/customers#customer) to be created or updated in a commercetools Project.
150
+ * The request body to [import Customers](#import-customers). Contains data for [Customers](/../api/projects/customers#customer) to be created or updated in a Project.
151
151
  *
152
152
  */
153
153
  export interface CustomerImportRequest {
@@ -84,13 +84,12 @@ export interface ImportSinkUpdateDraft {
84
84
  */
85
85
  export interface ImportSinkPagedResponse {
86
86
  /**
87
- * The number of results requested in the query request.
87
+ * Number of [results requested](/../api/general-concepts#limit).
88
88
  *
89
89
  */
90
90
  readonly limit: number;
91
91
  /**
92
- * The number of elements skipped, not a page number.
93
- * Supplied by the client or the server default.
92
+ * Number of [elements skipped](/../api/general-concepts#offset).
94
93
  *
95
94
  *
96
95
  */
@@ -208,7 +208,7 @@ export interface OrderField {
208
208
  }
209
209
  /**
210
210
  * Representation for an update of an [Order](/../api/projects/orders#order). Use this type to import updates for existing
211
- * [Orders](/../api/projects/orders#order) in a commercetools Project.
211
+ * [Orders](/../api/projects/orders#order) in a Project.
212
212
  *
213
213
  */
214
214
  export interface OrderPatchImport {
@@ -219,7 +219,7 @@ export interface OrderPatchImport {
219
219
  */
220
220
  readonly orderNumber: string;
221
221
  /**
222
- * Each field referenced must be defined in an already existing order in the commercetools project or the import operation state is set to `validationFailed`.
222
+ * Each field referenced must be defined in an already existing order in the project or the import operation state is set to `validationFailed`.
223
223
  *
224
224
  *
225
225
  */
@@ -139,7 +139,7 @@ export interface LineItemProductVariantImportDraft {
139
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
140
  *
141
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.
142
+ * Products and Product Variants referenced by a line item must already exist in the Project.
143
143
  *
144
144
  */
145
145
  export interface LineItemImportDraft {
@@ -528,6 +528,11 @@ export interface TaxedPrice {
528
528
  *
529
529
  */
530
530
  readonly taxPortions: TaxPortion[];
531
+ /**
532
+ * Maps to `TaxedPrice.totalTax`.
533
+ *
534
+ */
535
+ readonly totalTax?: Money;
531
536
  }
532
537
  /**
533
538
  * Maps to `Order.taxMode`
@@ -48,7 +48,7 @@ export interface TaxRate {
48
48
  readonly subRates?: SubRate[];
49
49
  }
50
50
  /**
51
- * The data representation for a Price to be imported that is persisted as a [Price](/../api/projects/products#price) in the Project.
51
+ * The data representation for a price to be imported that is persisted as an [EmbeddedPrice](/../api/projects/products#embeddedprice) in the Project.
52
52
  *
53
53
  */
54
54
  export interface PriceImport extends ImportResource {
@@ -77,14 +77,14 @@ export interface PriceImport extends ImportResource {
77
77
  */
78
78
  readonly validUntil?: string;
79
79
  /**
80
- * The Reference to the [CustomerGroup](/../api/projects/customerGroups#customergroup) with which the Price is associated.
80
+ * The Reference to the [CustomerGroup](/../api/projects/customerGroups#customergroup) with which the [EmbeddedPrice](/../api/projects/products#embeddedprice) is associated.
81
81
  * If referenced CustomerGroup does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary CustomerGroup is created.
82
82
  *
83
83
  *
84
84
  */
85
85
  readonly customerGroup?: CustomerGroupKeyReference;
86
86
  /**
87
- * The Reference to the [Channel](/../api/projects/channels#channel) with which the Price is associated.
87
+ * The Reference to the [Channel](/../api/projects/channels#channel) with which the [EmbeddedPrice](/../api/projects/products#embeddedprice) is associated.
88
88
  * If referenced Channel does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Channel is created.
89
89
  *
90
90
  *
@@ -96,7 +96,7 @@ export interface PriceImport extends ImportResource {
96
96
  */
97
97
  readonly discounted?: DiscountedPrice;
98
98
  /**
99
- * Only the Price updates will be published to `staged` and `current` projection.
99
+ * Only the [EmbeddedPrice](/../api/projects/products#embeddedprice) updates will be published to `staged` and `current` projection.
100
100
  *
101
101
  *
102
102
  */
@@ -112,16 +112,16 @@ export interface PriceImport extends ImportResource {
112
112
  */
113
113
  readonly custom?: Custom;
114
114
  /**
115
- * The ProductVariant in which this Price is contained.
116
- * The Reference to the [ProductVariant](/../api/projects/products#productvariant) with which the Price is associated.
115
+ * The ProductVariant in which this [EmbeddedPrice](/../api/projects/products#embeddedprice) is contained.
116
+ * The Reference to the [ProductVariant](/../api/projects/products#productvariant) with which the [EmbeddedPrice](/../api/projects/products#embeddedprice) is associated.
117
117
  * 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.
118
118
  *
119
119
  *
120
120
  */
121
121
  readonly productVariant: ProductVariantKeyReference;
122
122
  /**
123
- * The Product in which the Product Variant containing this Price is contained. Maps to `ProductVariant.product`.
124
- * The Reference to the [Product](/../api/projects/products#product) with which the Price is associated.
123
+ * The Product in which the Product Variant containing this [EmbeddedPrice](/../api/projects/products#embeddedprice) is contained. Maps to `ProductVariant.product`.
124
+ * The Reference to the [Product](/../api/projects/products#product) with which the [EmbeddedPrice](/../api/projects/products#embeddedprice) is associated.
125
125
  * If referenced Product does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Product is created.
126
126
  *
127
127
  *
@@ -133,7 +133,7 @@ export interface ProductDraftImport extends ImportResource {
133
133
  /**
134
134
  * If `publish` is set to either `true` or `false`, both staged and current projections are set to the same value provided by the import data.
135
135
  * If `publish` is not set, the staged projection is set to the provided import data, but the current projection stays unchanged.
136
- * However, if the import data contains no update, that is, if it matches the staged projection of the existing Product in the platform, the import induces no change in the existing Product whether `publish` is set or not.
136
+ * However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whether `publish` is set or not.
137
137
  *
138
138
  *
139
139
  */
@@ -173,7 +173,7 @@ export interface ProductImport extends ImportResource {
173
173
  /**
174
174
  * If `publish` is set to either `true` or `false`, both staged and current projections are set to the same value provided by the import data.
175
175
  * If `publish` is not set, the staged projection is set to the provided import data, but the current projection stays unchanged.
176
- * However, if the import data contains no update, that is, if it matches the staged projection of the existing Product in the platform, the import induces no change in the existing Product whether `publish` is set or not.
176
+ * However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whether `publish` is set or not.
177
177
  *
178
178
  *
179
179
  */
@@ -460,7 +460,7 @@ export interface ProductVariantImport extends ImportResource {
460
460
  readonly isMasterVariant: boolean;
461
461
  /**
462
462
  * Maps to `ProductVariant.attributes`.
463
- * The referenced attribute must be defined in an already existing ProductType in the commercetools project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `unresolved`.
463
+ * The referenced attribute must be defined in an already existing ProductType in the project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `unresolved`.
464
464
  *
465
465
  *
466
466
  */
@@ -480,7 +480,7 @@ export interface ProductVariantImport extends ImportResource {
480
480
  /**
481
481
  * If `publish` is set to either `true` or `false`, both staged and current projections are set to the same value provided by the import data.
482
482
  * If `publish` is not set, the staged projection is set to the provided import data, but the current projection stays unchanged.
483
- * However, if the import data contains no update, that is, if it matches the staged projection of the existing Product in the platform, the import induces no change in the existing Product whether `publish` is set or not.
483
+ * However, if the import data contains no update, that is, if it matches the staged projection of the existing Product, the import induces no change in the existing Product whether `publish` is set or not.
484
484
  *
485
485
  *
486
486
  */
@@ -496,7 +496,7 @@ export interface ProductVariantImport extends ImportResource {
496
496
  }
497
497
  /**
498
498
  * Representation for an update of a [ProductVariant](/../api/projects/products#productvariant). Use this type to import updates for existing
499
- * [ProductVariants](/../api/projects/products#productvariant) in a commercetools Project.
499
+ * [ProductVariants](/../api/projects/products#productvariant) in a Project.
500
500
  *
501
501
  */
502
502
  export interface ProductVariantPatch {
@@ -510,7 +510,7 @@ export interface ProductVariantPatch {
510
510
  readonly productVariant: ProductVariantKeyReference;
511
511
  /**
512
512
  * Maps to `ProductVariant.attributes`.
513
- * The referenced attribute must be defined in an already existing [ProductType](/../api/projects/productTypes#producttype) in the commercetools Project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `unresolved`.
513
+ * The referenced attribute must be defined in an already existing [ProductType](/../api/projects/productTypes#producttype) in the Project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `unresolved`.
514
514
  *
515
515
  *
516
516
  */
package/package.json CHANGED
@@ -4,9 +4,15 @@
4
4
  "access": "public"
5
5
  },
6
6
  "name": "@commercetools/importapi-sdk",
7
- "version": "2.3.0",
8
- "description": "Type script sdk for commercetools import features",
9
- "keywords": ["commercetools", "typescript", "sdk", "import"],
7
+ "version": "2.5.1",
8
+ "description": "TypeScript SDK for Composable Commerce Import API features",
9
+ "keywords": [
10
+ "commercetools",
11
+ "composable commerce",
12
+ "typescript",
13
+ "sdk",
14
+ "import"
15
+ ],
10
16
  "homepage": "https://github.com/commercetools/commercetools-sdk-typescript/packages/importapi-sdk",
11
17
  "bugs": "https://github.com/commercetools/commercetools-sdk-typescript/issues",
12
18
  "repository": {
@@ -23,7 +29,7 @@
23
29
  "./dist/commercetools-importapi-sdk.esm.js": "./dist/commercetools-importapi-sdk.browser.esm.js"
24
30
  },
25
31
  "dependencies": {
26
- "@commercetools/sdk-client-v2": "^1.2.0",
32
+ "@commercetools/sdk-client-v2": "^1.4.0",
27
33
  "@commercetools/sdk-middleware-auth": "^6.0.4",
28
34
  "@commercetools/sdk-middleware-http": "^6.0.4",
29
35
  "@commercetools/sdk-middleware-logger": "^2.1.1",