@commercetools/importapi-sdk 2.4.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +1 -1
  3. package/dist/commercetools-importapi-sdk.browser.cjs.js +247 -1383
  4. package/dist/commercetools-importapi-sdk.browser.esm.js +247 -1383
  5. package/dist/commercetools-importapi-sdk.cjs.dev.js +247 -1383
  6. package/dist/commercetools-importapi-sdk.cjs.prod.js +247 -1383
  7. package/dist/commercetools-importapi-sdk.esm.js +247 -1383
  8. package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +4 -4
  9. package/dist/declarations/src/generated/client/categories/by-project-key-categories-request-builder.d.ts +2 -4
  10. package/dist/declarations/src/generated/client/customers/by-project-key-customers-request-builder.d.ts +2 -4
  11. package/dist/declarations/src/generated/client/import-containers/by-project-key-categories-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  12. package/dist/declarations/src/generated/client/import-containers/by-project-key-categories-import-containers-request-builder.d.ts +2 -0
  13. package/dist/declarations/src/generated/client/import-containers/by-project-key-customers-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  14. package/dist/declarations/src/generated/client/import-containers/by-project-key-customers-import-containers-request-builder.d.ts +2 -0
  15. package/dist/declarations/src/generated/client/import-containers/by-project-key-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  16. package/dist/declarations/src/generated/client/import-containers/by-project-key-import-containers-request-builder.d.ts +2 -0
  17. 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 → import-containers/by-project-key-inventories-import-containers-by-import-container-key-request-builder.d.ts} +10 -10
  18. 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 → import-containers/by-project-key-inventories-import-containers-request-builder.d.ts} +7 -16
  19. package/dist/declarations/src/generated/client/import-containers/by-project-key-order-patches-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  20. package/dist/declarations/src/generated/client/import-containers/by-project-key-order-patches-import-containers-request-builder.d.ts +2 -0
  21. package/dist/declarations/src/generated/client/import-containers/by-project-key-orders-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  22. package/dist/declarations/src/generated/client/import-containers/by-project-key-orders-import-containers-request-builder.d.ts +2 -0
  23. package/dist/declarations/src/generated/client/import-containers/by-project-key-prices-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  24. package/dist/declarations/src/generated/client/import-containers/by-project-key-prices-import-containers-request-builder.d.ts +2 -0
  25. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-drafts-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  26. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-drafts-import-containers-request-builder.d.ts +2 -0
  27. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-types-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  28. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-types-import-containers-request-builder.d.ts +2 -0
  29. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variant-patches-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  30. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variant-patches-import-containers-request-builder.d.ts +2 -0
  31. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variants-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  32. package/dist/declarations/src/generated/client/import-containers/by-project-key-product-variants-import-containers-request-builder.d.ts +2 -0
  33. package/dist/declarations/src/generated/client/import-containers/by-project-key-products-import-containers-by-import-container-key-request-builder.d.ts +2 -0
  34. package/dist/declarations/src/generated/client/import-containers/by-project-key-products-import-containers-request-builder.d.ts +2 -0
  35. package/dist/declarations/src/generated/client/import-operations/by-project-key-import-containers-by-import-container-key-import-operations-request-builder.d.ts +2 -0
  36. package/dist/declarations/src/generated/client/import-operations/by-project-key-import-operations-by-id-request-builder.d.ts +2 -0
  37. package/dist/declarations/src/generated/client/import-operations/by-project-key-import-operations-request-builder.d.ts +2 -0
  38. package/dist/declarations/src/generated/client/import-summaries/by-project-key-import-containers-by-import-container-key-import-summaries-request-builder.d.ts +2 -0
  39. package/dist/declarations/src/generated/client/{import-summaries/by-project-key-import-summaries-request-builder.d.ts → inventories/by-project-key-inventories-request-builder.d.ts} +5 -5
  40. package/dist/declarations/src/generated/client/order-patches/by-project-key-order-patches-request-builder.d.ts +2 -4
  41. package/dist/declarations/src/generated/client/orders/by-project-key-orders-request-builder.d.ts +2 -4
  42. package/dist/declarations/src/generated/client/prices/by-project-key-prices-request-builder.d.ts +2 -4
  43. package/dist/declarations/src/generated/client/product-drafts/by-project-key-product-drafts-request-builder.d.ts +2 -4
  44. package/dist/declarations/src/generated/client/product-types/by-project-key-product-types-request-builder.d.ts +2 -4
  45. package/dist/declarations/src/generated/client/product-variant-patches/by-project-key-product-variant-patches-request-builder.d.ts +2 -4
  46. package/dist/declarations/src/generated/client/product-variants/by-project-key-product-variants-request-builder.d.ts +2 -4
  47. package/dist/declarations/src/generated/client/products/by-project-key-products-request-builder.d.ts +2 -4
  48. package/dist/declarations/src/generated/index.d.ts +1 -1
  49. package/dist/declarations/src/generated/models/common.d.ts +5 -4
  50. package/dist/declarations/src/generated/models/customfields.d.ts +2 -2
  51. package/dist/declarations/src/generated/models/errors.d.ts +2 -2
  52. package/dist/declarations/src/generated/models/importcontainers.d.ts +2 -3
  53. package/dist/declarations/src/generated/models/importoperations.d.ts +2 -3
  54. package/dist/declarations/src/generated/models/importrequests.d.ts +23 -9
  55. package/dist/declarations/src/generated/models/inventories.d.ts +49 -0
  56. package/dist/declarations/src/generated/models/order-patches.d.ts +2 -2
  57. package/dist/declarations/src/generated/models/orders.d.ts +6 -1
  58. package/dist/declarations/src/generated/models/prices.d.ts +8 -8
  59. package/dist/declarations/src/generated/models/productdrafts.d.ts +8 -2
  60. package/dist/declarations/src/generated/models/products.d.ts +8 -2
  61. package/dist/declarations/src/generated/models/productvariants.d.ts +4 -4
  62. package/package.json +11 -5
  63. package/dist/declarations/src/generated/client/categories/by-project-key-categories-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  64. package/dist/declarations/src/generated/client/customers/by-project-key-customers-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  65. 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 +0 -49
  66. 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 +0 -37
  67. 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 +0 -48
  68. 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 +0 -48
  69. 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 +0 -37
  70. 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 +0 -48
  71. 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 +0 -37
  72. 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 +0 -48
  73. 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 +0 -37
  74. 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 +0 -48
  75. 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 +0 -37
  76. 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 +0 -48
  77. 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 +0 -37
  78. 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 +0 -48
  79. 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 +0 -37
  80. 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 +0 -48
  81. 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 +0 -37
  82. 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 +0 -48
  83. package/dist/declarations/src/generated/client/import-sinks/by-project-key-import-sinks-by-import-sink-key-request-builder.d.ts +0 -51
  84. package/dist/declarations/src/generated/client/import-sinks/by-project-key-import-sinks-request-builder.d.ts +0 -51
  85. package/dist/declarations/src/generated/client/import-summaries/by-project-key-import-summaries-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  86. package/dist/declarations/src/generated/client/order-patches/by-project-key-order-patches-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  87. package/dist/declarations/src/generated/client/orders/by-project-key-orders-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  88. package/dist/declarations/src/generated/client/prices/by-project-key-prices-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  89. package/dist/declarations/src/generated/client/product-drafts/by-project-key-product-drafts-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -38
  90. package/dist/declarations/src/generated/client/product-types/by-project-key-product-types-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  91. 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 +0 -37
  92. package/dist/declarations/src/generated/client/product-variants/by-project-key-product-variants-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  93. package/dist/declarations/src/generated/client/products/by-project-key-products-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
  94. package/dist/declarations/src/generated/models/importsinks.d.ts +0 -113
@@ -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
  */
@@ -453,7 +453,7 @@ export interface PriceTier {
453
453
  * The type of the import resource.
454
454
  *
455
455
  */
456
- export declare type ImportResourceType = 'category' | 'customer' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch';
456
+ export declare type ImportResourceType = 'category' | 'customer' | 'inventory' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch';
457
457
  /**
458
458
  * The type of the referenced resource.
459
459
  *
@@ -568,3 +568,4 @@ export interface Address {
568
568
  */
569
569
  readonly externalId?: string;
570
570
  }
571
+ export declare type ProductPriceModeEnum = 'Embedded' | 'Standalone';
@@ -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';
@@ -78,7 +78,7 @@ export interface InvalidOperation {
78
78
  readonly message: string;
79
79
  }
80
80
  /**
81
- * The `Unique` [Attribute Constraint](/../api/projects/productTypes#attributeconstraint-enum) was violated.
81
+ * The `Unique` [AttributeConstraintEnum](/../api/projects/productTypes#attributeconstraintenum) was violated.
82
82
  */
83
83
  export interface DuplicateAttributeValueError {
84
84
  readonly code: 'DuplicateAttributeValue';
@@ -93,7 +93,7 @@ export interface DuplicateAttributeValueError {
93
93
  readonly attribute: Attribute;
94
94
  }
95
95
  /**
96
- * The `CombinationUnique` [Attribute Constraint](/../api/projects/productTypes#attributeconstraint-enum) was violated.
96
+ * The `CombinationUnique` [AttributeConstraintEnum](/../api/projects/productTypes#attributeconstraintenum) was violated.
97
97
  */
98
98
  export interface DuplicateAttributeValuesError {
99
99
  readonly code: 'DuplicateAttributeValues';
@@ -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
  */
@@ -6,6 +6,7 @@
6
6
  import { CategoryImport } from './categories';
7
7
  import { CustomerImport } from './customers';
8
8
  import { ImportOperationStatus } from './importoperations';
9
+ import { InventoryImport } from './inventories';
9
10
  import { OrderPatchImport } from './order-patches';
10
11
  import { OrderImport } from './orders';
11
12
  import { PriceImport } from './prices';
@@ -17,7 +18,7 @@ import { ProductVariantImport, ProductVariantPatch } from './productvariants';
17
18
  * An import request batches multiple import resources of the same import resource type for processing by an import container.
18
19
  *
19
20
  */
20
- export declare type ImportRequest = CategoryImportRequest | CustomerImportRequest | OrderImportRequest | OrderPatchImportRequest | PriceImportRequest | ProductDraftImportRequest | ProductImportRequest | ProductTypeImportRequest | ProductVariantImportRequest | ProductVariantPatchRequest;
21
+ export declare type ImportRequest = CategoryImportRequest | CustomerImportRequest | InventoryImportRequest | OrderImportRequest | OrderPatchImportRequest | PriceImportRequest | ProductDraftImportRequest | ProductImportRequest | ProductTypeImportRequest | ProductVariantImportRequest | ProductVariantPatchRequest;
21
22
  /**
22
23
  * A list of the ID's and validation statuses of newly created [ImportOperations](#importoperation).
23
24
  * Used as a response at each resource-specific import endpoint, for example, at [Import Categories](/category#import-categories) and [Import ProductTypes](/product-type#import-producttypes).
@@ -30,7 +31,7 @@ export interface ImportResponse {
30
31
  readonly operationStatus: ImportOperationStatus[];
31
32
  }
32
33
  /**
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.
34
+ * 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
35
  *
35
36
  */
36
37
  export interface CategoryImportRequest {
@@ -43,7 +44,7 @@ export interface CategoryImportRequest {
43
44
  readonly resources: CategoryImport[];
44
45
  }
45
46
  /**
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.
47
+ * 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
48
  *
48
49
  */
49
50
  export interface ProductImportRequest {
@@ -56,7 +57,7 @@ export interface ProductImportRequest {
56
57
  readonly resources: ProductImport[];
57
58
  }
58
59
  /**
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.
60
+ * 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
61
  *
61
62
  */
62
63
  export interface ProductDraftImportRequest {
@@ -69,7 +70,7 @@ export interface ProductDraftImportRequest {
69
70
  readonly resources: ProductDraftImport[];
70
71
  }
71
72
  /**
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.
73
+ * 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
74
  *
74
75
  */
75
76
  export interface ProductTypeImportRequest {
@@ -82,7 +83,7 @@ export interface ProductTypeImportRequest {
82
83
  readonly resources: ProductTypeImport[];
83
84
  }
84
85
  /**
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.
86
+ * 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
87
  *
87
88
  */
88
89
  export interface ProductVariantImportRequest {
@@ -95,7 +96,7 @@ export interface ProductVariantImportRequest {
95
96
  readonly resources: ProductVariantImport[];
96
97
  }
97
98
  /**
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.
99
+ * 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
100
  *
100
101
  */
101
102
  export interface PriceImportRequest {
@@ -108,7 +109,7 @@ export interface PriceImportRequest {
108
109
  readonly resources: PriceImport[];
109
110
  }
110
111
  /**
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.
112
+ * 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
113
  *
113
114
  */
114
115
  export interface OrderImportRequest {
@@ -147,7 +148,7 @@ export interface ProductVariantPatchRequest {
147
148
  readonly patches: ProductVariantPatch[];
148
149
  }
149
150
  /**
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.
151
+ * 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
152
  *
152
153
  */
153
154
  export interface CustomerImportRequest {
@@ -159,3 +160,16 @@ export interface CustomerImportRequest {
159
160
  */
160
161
  readonly resources: CustomerImport[];
161
162
  }
163
+ /**
164
+ * The request body to [import Inventories](#import-inventory). Contains data for [InventoryEntries](/../api/projects/inventory#inventoryentry) to be created or updated in a commercetools Project.
165
+ *
166
+ */
167
+ export interface InventoryImportRequest {
168
+ readonly type: 'inventory';
169
+ /**
170
+ * The inventory import resources of this request.
171
+ *
172
+ *
173
+ */
174
+ readonly resources: InventoryImport[];
175
+ }
@@ -0,0 +1,49 @@
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 { ChannelKeyReference, ImportResource } from './common';
7
+ import { Custom } from './customfields';
8
+ /**
9
+ * The data representation for an Inventory to be imported that is persisted as a [Inventory](/../api/projects/inventory#top) in the Project.
10
+ *
11
+ */
12
+ export interface InventoryImport extends ImportResource {
13
+ /**
14
+ * Maps to `Inventory.sku`
15
+ *
16
+ *
17
+ */
18
+ readonly sku: string;
19
+ /**
20
+ * Maps to `Inventory.quantityOnStock`
21
+ *
22
+ *
23
+ */
24
+ readonly quantityOnStock: number;
25
+ /**
26
+ * Maps to `Inventory.restockableInDays`
27
+ *
28
+ *
29
+ */
30
+ readonly restockableInDays?: number;
31
+ /**
32
+ * Maps to `Inventory.expectedDelivery`
33
+ *
34
+ *
35
+ */
36
+ readonly expectedDelivery?: string;
37
+ /**
38
+ * Maps to `Inventory.supplyChannel`
39
+ *
40
+ *
41
+ */
42
+ readonly supplyChannel?: ChannelKeyReference;
43
+ /**
44
+ * Maps to `Inventory.custom`.
45
+ *
46
+ *
47
+ */
48
+ readonly custom?: Custom;
49
+ }
@@ -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
  *
@@ -3,7 +3,7 @@
3
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
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
- import { Asset, CategoryKeyReference, ChannelKeyReference, CustomerGroupKeyReference, DiscountedPrice, Image, ImportResource, LocalizedString, PriceTier, ProductTypeKeyReference, StateKeyReference, TaxCategoryKeyReference, TypedMoney } from './common';
6
+ import { Asset, CategoryKeyReference, ChannelKeyReference, CustomerGroupKeyReference, DiscountedPrice, Image, ImportResource, LocalizedString, PriceTier, ProductPriceModeEnum, ProductTypeKeyReference, StateKeyReference, TaxCategoryKeyReference, TypedMoney } from './common';
7
7
  import { Custom } from './customfields';
8
8
  import { SearchKeywords } from './products';
9
9
  import { Attribute } from './productvariants';
@@ -133,11 +133,17 @@ 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
  */
140
140
  readonly publish?: boolean;
141
+ /**
142
+ * Determines the type of Prices the API uses. See [ProductPriceMode](/../api/projects/products#productpricemode) for more details. If not provided, the existing `Product.priceMode` is not changed.
143
+ *
144
+ *
145
+ */
146
+ readonly priceMode?: ProductPriceModeEnum;
141
147
  }
142
148
  /**
143
149
  * The representation of a Product Variant Draft for the import purpose.
@@ -3,7 +3,7 @@
3
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
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
- import { CategoryKeyReference, ImportResource, LocalizedString, ProductTypeKeyReference, StateKeyReference, TaxCategoryKeyReference } from './common';
6
+ import { CategoryKeyReference, ImportResource, LocalizedString, ProductPriceModeEnum, ProductTypeKeyReference, StateKeyReference, TaxCategoryKeyReference } from './common';
7
7
  /**
8
8
  * Search keywords are primarily used by the suggester but are also considered for the full-text search. SearchKeywords is a JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). The value to a language tag key is an array of SearchKeyword for the specific language.
9
9
  * ```json
@@ -173,9 +173,15 @@ 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
  */
180
180
  readonly publish?: boolean;
181
+ /**
182
+ * Determines the type of Prices the API uses. See [ProductPriceMode](/../api/projects/products#productpricemode) for more details. If not provided, the existing `Product.priceMode` is not changed.
183
+ *
184
+ *
185
+ */
186
+ readonly priceMode?: ProductPriceModeEnum;
181
187
  }
@@ -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.4.0",
8
- "description": "Type script sdk for commercetools import features",
9
- "keywords": ["commercetools", "typescript", "sdk", "import"],
7
+ "version": "3.0.0",
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.3.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",
@@ -31,7 +37,7 @@
31
37
  },
32
38
  "devDependencies": {
33
39
  "@types/uuid": "8.3.4",
34
- "organize-imports-cli": "0.9.0",
40
+ "organize-imports-cli": "0.10.0",
35
41
  "tsconfig-replace-paths": "0.0.11",
36
42
  "uuid": "8.3.2"
37
43
  },
@@ -1,37 +0,0 @@
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 { CategoryImportRequest, ImportResponse } from '../../models/importrequests';
7
- import { executeRequest } from '../../shared/utils/common-types';
8
- import { ApiRequest } from '../../shared/utils/requests-utils';
9
- import { ByProjectKeyCategoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder } from '../import-operations/by-project-key-categories-import-sink-key-by-import-sink-key-import-operations-request-builder';
10
- export declare class ByProjectKeyCategoriesImportSinkKeyByImportSinkKeyRequestBuilder {
11
- protected readonly args: {
12
- pathArgs: {
13
- projectKey: string;
14
- importSinkKey: string;
15
- };
16
- executeRequest: executeRequest;
17
- baseUri?: string;
18
- };
19
- constructor(args: {
20
- pathArgs: {
21
- projectKey: string;
22
- importSinkKey: string;
23
- };
24
- executeRequest: executeRequest;
25
- baseUri?: string;
26
- });
27
- importOperations(): ByProjectKeyCategoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder;
28
- /**
29
- * Creates import request for creating new categories or updating existing ones.
30
- */
31
- post(methodArgs: {
32
- body: CategoryImportRequest;
33
- headers?: {
34
- [key: string]: string | string[];
35
- };
36
- }): ApiRequest<ImportResponse>;
37
- }
@@ -1,37 +0,0 @@
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 { CustomerImportRequest, ImportResponse } from '../../models/importrequests';
7
- import { executeRequest } from '../../shared/utils/common-types';
8
- import { ApiRequest } from '../../shared/utils/requests-utils';
9
- import { ByProjectKeyCustomersImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder } from '../import-operations/by-project-key-customers-import-sink-key-by-import-sink-key-import-operations-request-builder';
10
- export declare class ByProjectKeyCustomersImportSinkKeyByImportSinkKeyRequestBuilder {
11
- protected readonly args: {
12
- pathArgs: {
13
- projectKey: string;
14
- importSinkKey: string;
15
- };
16
- executeRequest: executeRequest;
17
- baseUri?: string;
18
- };
19
- constructor(args: {
20
- pathArgs: {
21
- projectKey: string;
22
- importSinkKey: string;
23
- };
24
- executeRequest: executeRequest;
25
- baseUri?: string;
26
- });
27
- importOperations(): ByProjectKeyCustomersImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder;
28
- /**
29
- * Creates import request for creating new customers or updating existing ones.
30
- */
31
- post(methodArgs: {
32
- body: CustomerImportRequest;
33
- headers?: {
34
- [key: string]: string | string[];
35
- };
36
- }): ApiRequest<ImportResponse>;
37
- }
@@ -1,49 +0,0 @@
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 { ProcessingState } from '../../models/common';
7
- import { ImportOperationPagedResponse } from '../../models/importoperations';
8
- import { executeRequest, QueryParam } from '../../shared/utils/common-types';
9
- import { ApiRequest } from '../../shared/utils/requests-utils';
10
- import { ByProjectKeyCategoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder } from './by-project-key-categories-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder';
11
- export declare class ByProjectKeyCategoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder {
12
- protected readonly args: {
13
- pathArgs: {
14
- projectKey: string;
15
- importSinkKey: string;
16
- };
17
- executeRequest: executeRequest;
18
- baseUri?: string;
19
- };
20
- constructor(args: {
21
- pathArgs: {
22
- projectKey: string;
23
- importSinkKey: string;
24
- };
25
- executeRequest: executeRequest;
26
- baseUri?: string;
27
- });
28
- withIdValue(childPathArgs: {
29
- id: string;
30
- }): ByProjectKeyCategoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder;
31
- /**
32
- * Retrieves all category import operations of an import sink key.
33
- *
34
- */
35
- get(methodArgs?: {
36
- queryArgs?: {
37
- limit?: number;
38
- offset?: number;
39
- sort?: string | string[];
40
- resourceKey?: string;
41
- state?: ProcessingState;
42
- debug?: boolean;
43
- [key: string]: QueryParam;
44
- };
45
- headers?: {
46
- [key: string]: string | string[];
47
- };
48
- }): ApiRequest<ImportOperationPagedResponse>;
49
- }
@@ -1,37 +0,0 @@
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 { ImportOperation } from '../../models/importoperations';
7
- import { executeRequest } from '../../shared/utils/common-types';
8
- import { ApiRequest } from '../../shared/utils/requests-utils';
9
- export declare class ByProjectKeyCustomersImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder {
10
- protected readonly args: {
11
- pathArgs: {
12
- projectKey: string;
13
- importSinkKey: string;
14
- id: string;
15
- };
16
- executeRequest: executeRequest;
17
- baseUri?: string;
18
- };
19
- constructor(args: {
20
- pathArgs: {
21
- projectKey: string;
22
- importSinkKey: string;
23
- id: string;
24
- };
25
- executeRequest: executeRequest;
26
- baseUri?: string;
27
- });
28
- /**
29
- * Retrieves the import operation with the given id.
30
- *
31
- */
32
- get(methodArgs?: {
33
- headers?: {
34
- [key: string]: string | string[];
35
- };
36
- }): ApiRequest<ImportOperation>;
37
- }