@commercetools/importapi-sdk 4.0.0 → 4.2.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 (27) hide show
  1. package/CHANGELOG.md +225 -0
  2. package/dist/commercetools-importapi-sdk.browser.cjs.js +199 -230
  3. package/dist/commercetools-importapi-sdk.browser.esm.js +199 -230
  4. package/dist/commercetools-importapi-sdk.cjs.dev.js +199 -230
  5. package/dist/commercetools-importapi-sdk.cjs.prod.js +199 -230
  6. package/dist/commercetools-importapi-sdk.esm.js +199 -230
  7. package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +2 -0
  8. package/dist/declarations/src/generated/client/import-containers/by-project-key-standalone-prices-import-containers-by-import-container-key-request-builder.d.ts +37 -0
  9. package/dist/declarations/src/generated/client/import-containers/by-project-key-standalone-prices-import-containers-request-builder.d.ts +28 -0
  10. package/dist/declarations/src/generated/client/standalone-prices/by-project-key-standalone-prices-request-builder.d.ts +26 -0
  11. package/dist/declarations/src/generated/index.d.ts +1 -0
  12. package/dist/declarations/src/generated/models/common.d.ts +19 -7
  13. package/dist/declarations/src/generated/models/customfields.d.ts +1 -1
  14. package/dist/declarations/src/generated/models/errors.d.ts +1 -1
  15. package/dist/declarations/src/generated/models/importoperations.d.ts +1 -1
  16. package/dist/declarations/src/generated/models/importrequests.d.ts +16 -2
  17. package/dist/declarations/src/generated/models/order-patches.d.ts +1 -1
  18. package/dist/declarations/src/generated/models/orders.d.ts +21 -20
  19. package/dist/declarations/src/generated/models/prices.d.ts +14 -8
  20. package/dist/declarations/src/generated/models/productdrafts.d.ts +2 -0
  21. package/dist/declarations/src/generated/models/products.d.ts +1 -1
  22. package/dist/declarations/src/generated/models/producttypes.d.ts +3 -3
  23. package/dist/declarations/src/generated/models/productvariants.d.ts +5 -2
  24. package/dist/declarations/src/generated/models/standalone-prices.d.ts +76 -0
  25. package/dist/declarations/src/generated/shared/utils/common-types.d.ts +5 -5
  26. package/dist/declarations/src/generated/shared/utils/middleware.d.ts +1 -1
  27. package/package.json +6 -6
@@ -17,6 +17,7 @@ import { ByProjectKeyProductTypesRequestBuilder } from './product-types/by-proje
17
17
  import { ByProjectKeyProductVariantPatchesRequestBuilder } from './product-variant-patches/by-project-key-product-variant-patches-request-builder';
18
18
  import { ByProjectKeyProductVariantsRequestBuilder } from './product-variants/by-project-key-product-variants-request-builder';
19
19
  import { ByProjectKeyProductsRequestBuilder } from './products/by-project-key-products-request-builder';
20
+ import { ByProjectKeyStandalonePricesRequestBuilder } from './standalone-prices/by-project-key-standalone-prices-request-builder';
20
21
  /**
21
22
  **/
22
23
  export declare class ByProjectKeyRequestBuilder {
@@ -38,6 +39,7 @@ export declare class ByProjectKeyRequestBuilder {
38
39
  importOperations(): ByProjectKeyImportOperationsRequestBuilder;
39
40
  categories(): ByProjectKeyCategoriesRequestBuilder;
40
41
  prices(): ByProjectKeyPricesRequestBuilder;
42
+ standalonePrices(): ByProjectKeyStandalonePricesRequestBuilder;
41
43
  products(): ByProjectKeyProductsRequestBuilder;
42
44
  productDrafts(): ByProjectKeyProductDraftsRequestBuilder;
43
45
  productTypes(): ByProjectKeyProductTypesRequestBuilder;
@@ -0,0 +1,37 @@
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 { ImportResponse, StandalonePriceImportRequest } from '../../models/importrequests';
7
+ import { executeRequest } from '../../shared/utils/common-types';
8
+ import { ApiRequest } from '../../shared/utils/requests-utils';
9
+ /**
10
+ **/
11
+ export declare class ByProjectKeyStandalonePricesImportContainersByImportContainerKeyRequestBuilder {
12
+ protected readonly args: {
13
+ pathArgs: {
14
+ projectKey: string;
15
+ importContainerKey: string;
16
+ };
17
+ executeRequest: executeRequest;
18
+ baseUri?: string;
19
+ };
20
+ constructor(args: {
21
+ pathArgs: {
22
+ projectKey: string;
23
+ importContainerKey: string;
24
+ };
25
+ executeRequest: executeRequest;
26
+ baseUri?: string;
27
+ });
28
+ /**
29
+ * Creates a request for creating new Standalone Prices or updating existing ones.
30
+ */
31
+ post(methodArgs: {
32
+ body: StandalonePriceImportRequest;
33
+ headers?: {
34
+ [key: string]: string | string[];
35
+ };
36
+ }): ApiRequest<ImportResponse>;
37
+ }
@@ -0,0 +1,28 @@
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 { executeRequest } from '../../shared/utils/common-types';
7
+ import { ByProjectKeyStandalonePricesImportContainersByImportContainerKeyRequestBuilder } from './by-project-key-standalone-prices-import-containers-by-import-container-key-request-builder';
8
+ /**
9
+ **/
10
+ export declare class ByProjectKeyStandalonePricesImportContainersRequestBuilder {
11
+ protected readonly args: {
12
+ pathArgs: {
13
+ projectKey: string;
14
+ };
15
+ executeRequest: executeRequest;
16
+ baseUri?: string;
17
+ };
18
+ constructor(args: {
19
+ pathArgs: {
20
+ projectKey: string;
21
+ };
22
+ executeRequest: executeRequest;
23
+ baseUri?: string;
24
+ });
25
+ withImportContainerKeyValue(childPathArgs: {
26
+ importContainerKey: string;
27
+ }): ByProjectKeyStandalonePricesImportContainersByImportContainerKeyRequestBuilder;
28
+ }
@@ -0,0 +1,26 @@
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 { executeRequest } from '../../shared/utils/common-types';
7
+ import { ByProjectKeyStandalonePricesImportContainersRequestBuilder } from '../import-containers/by-project-key-standalone-prices-import-containers-request-builder';
8
+ /**
9
+ **/
10
+ export declare class ByProjectKeyStandalonePricesRequestBuilder {
11
+ protected readonly args: {
12
+ pathArgs: {
13
+ projectKey: string;
14
+ };
15
+ executeRequest: executeRequest;
16
+ baseUri?: string;
17
+ };
18
+ constructor(args: {
19
+ pathArgs: {
20
+ projectKey: string;
21
+ };
22
+ executeRequest: executeRequest;
23
+ baseUri?: string;
24
+ });
25
+ importContainers(): ByProjectKeyStandalonePricesImportContainersRequestBuilder;
26
+ }
@@ -21,5 +21,6 @@ export * from './models/productdrafts';
21
21
  export * from './models/products';
22
22
  export * from './models/producttypes';
23
23
  export * from './models/productvariants';
24
+ export * from './models/standalone-prices';
24
25
  export * from './shared/utils/common-types';
25
26
  export * from './shared/utils/middleware';
@@ -3,7 +3,16 @@
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 { CategoryImport } from './categories';
7
+ import { CustomerImport } from './customers';
6
8
  import { Custom } from './customfields';
9
+ import { InventoryImport } from './inventories';
10
+ import { PriceImport } from './prices';
11
+ import { ProductDraftImport } from './productdrafts';
12
+ import { ProductImport } from './products';
13
+ import { ProductTypeImport } from './producttypes';
14
+ import { ProductVariantImport } from './productvariants';
15
+ import { StandalonePriceImport } from './standalone-prices';
7
16
  export interface Asset {
8
17
  /**
9
18
  * User-defined identifier for the asset.
@@ -157,14 +166,17 @@ export interface LocalizedString {
157
166
  */
158
167
  export interface ImportResource {
159
168
  /**
169
+ * User-defined unique identifier.
170
+ *
160
171
  *
161
172
  */
162
173
  readonly key: string;
163
174
  }
175
+ export type _ImportResource = ImportResource | ProductVariantImport | PriceImport | CategoryImport | StandalonePriceImport | ProductImport | ProductDraftImport | ProductTypeImport | CustomerImport | InventoryImport;
164
176
  /**
165
177
  * References a resource by key.
166
178
  */
167
- export declare type KeyReference = CartDiscountKeyReference | CartKeyReference | CategoryKeyReference | ChannelKeyReference | CustomObjectKeyReference | CustomerGroupKeyReference | CustomerKeyReference | DiscountCodeKeyReference | OrderKeyReference | PaymentKeyReference | PriceKeyReference | ProductDiscountKeyReference | ProductKeyReference | ProductTypeKeyReference | ProductVariantKeyReference | ShippingMethodKeyReference | StateKeyReference | StoreKeyReference | TaxCategoryKeyReference | TypeKeyReference;
179
+ export type KeyReference = CartDiscountKeyReference | CartKeyReference | CategoryKeyReference | ChannelKeyReference | CustomObjectKeyReference | CustomerGroupKeyReference | CustomerKeyReference | DiscountCodeKeyReference | OrderKeyReference | PaymentKeyReference | PriceKeyReference | ProductDiscountKeyReference | ProductKeyReference | ProductTypeKeyReference | ProductVariantKeyReference | ShippingMethodKeyReference | StateKeyReference | StoreKeyReference | TaxCategoryKeyReference | TypeKeyReference;
168
180
  /**
169
181
  * References a cart by key.
170
182
  */
@@ -381,8 +393,8 @@ export interface UnresolvedReferences {
381
393
  */
382
394
  readonly typeId: ReferenceType;
383
395
  }
384
- export declare type MoneyType = 'centPrecision' | 'highPrecision';
385
- export declare type TypedMoney = HighPrecisionMoney | Money;
396
+ export type MoneyType = 'centPrecision' | 'highPrecision' | string;
397
+ export type TypedMoney = HighPrecisionMoney | Money;
386
398
  export interface HighPrecisionMoney {
387
399
  readonly type: 'highPrecision';
388
400
  /**
@@ -453,17 +465,17 @@ export interface PriceTier {
453
465
  * The type of the import resource.
454
466
  *
455
467
  */
456
- export declare type ImportResourceType = 'category' | 'customer' | 'inventory' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch';
468
+ export type ImportResourceType = 'category' | 'customer' | 'inventory' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch' | 'standalone-price' | string;
457
469
  /**
458
470
  * The type of the referenced resource.
459
471
  *
460
472
  */
461
- export declare type ReferenceType = 'cart' | 'cart-discount' | 'category' | 'channel' | 'customer' | 'customer-group' | 'discount-code' | 'key-value-document' | 'order' | 'payment' | 'price' | 'product' | 'product-discount' | 'product-type' | 'product-variant' | 'shipping-method' | 'state' | 'store' | 'tax-category' | 'type';
473
+ export type ReferenceType = 'cart' | 'cart-discount' | 'category' | 'channel' | 'customer' | 'customer-group' | 'discount-code' | 'key-value-document' | 'order' | 'payment' | 'price' | 'product' | 'product-discount' | 'product-type' | 'product-variant' | 'shipping-method' | 'state' | 'store' | 'tax-category' | 'type' | string;
462
474
  /**
463
475
  * Every [Import Operation](/import-operation) is assigned with one of the following states.
464
476
  *
465
477
  */
466
- export declare type ProcessingState = 'imported' | 'processing' | 'rejected' | 'unresolved' | 'validationFailed' | 'waitForMasterVariant';
478
+ export type ProcessingState = 'imported' | 'processing' | 'rejected' | 'unresolved' | 'validationFailed' | 'waitForMasterVariant' | string;
467
479
  export interface Address {
468
480
  /**
469
481
  *
@@ -568,4 +580,4 @@ export interface Address {
568
580
  */
569
581
  readonly externalId?: string;
570
582
  }
571
- export declare type ProductPriceModeEnum = 'Embedded' | 'Standalone';
583
+ export type ProductPriceModeEnum = 'Embedded' | 'Standalone' | string;
@@ -28,7 +28,7 @@ export interface FieldContainer {
28
28
  /**
29
29
  * Provides the value for a custom field of a specific type.
30
30
  */
31
- export declare type CustomField = BooleanField | BooleanSetField | DateField | DateSetField | DateTimeField | DateTimeSetField | EnumField | EnumSetField | LocalizedEnumField | LocalizedEnumSetField | LocalizedStringField | LocalizedStringSetField | MoneyField | MoneySetField | NumberField | NumberSetField | ReferenceField | ReferenceSetField | StringField | StringSetField | TimeField | TimeSetField;
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
  /**
33
33
  * A field with a boolean value.
34
34
  */
@@ -43,7 +43,7 @@ export interface ErrorResponse {
43
43
  */
44
44
  readonly errors?: ErrorObject[];
45
45
  }
46
- export declare type ErrorObject = AccessDeniedError | ConcurrentModificationError | ContentionError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateFieldError | DuplicateVariantValuesError | GenericError | InsufficientScopeError | InvalidCredentialsError | InvalidFieldError | InvalidInput | InvalidJsonInput | InvalidOperation | InvalidScopeError | InvalidStateTransitionError | InvalidTokenError | RequiredFieldError | ResourceCreationError | ResourceDeletionError | ResourceNotFoundError | ResourceUpdateError;
46
+ export type ErrorObject = AccessDeniedError | ConcurrentModificationError | ContentionError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateFieldError | DuplicateVariantValuesError | GenericError | InsufficientScopeError | InvalidCredentialsError | InvalidFieldError | InvalidInput | InvalidJsonInput | InvalidOperation | InvalidScopeError | InvalidStateTransitionError | InvalidTokenError | RequiredFieldError | ResourceCreationError | ResourceDeletionError | ResourceNotFoundError | ResourceUpdateError;
47
47
  /**
48
48
  * This is the generic error code for access denied. In case of a wrong scope, an [InvalidScopeError](#invalidscopeerror) will be returned.
49
49
  */
@@ -105,7 +105,7 @@ export interface ImportOperationPagedResponse {
105
105
  * Describes the validation state of a newly created [ImportOperation](#importoperation).
106
106
  *
107
107
  */
108
- export declare type ImportOperationState = 'processing' | 'validationFailed';
108
+ export type ImportOperationState = 'processing' | 'validationFailed' | string;
109
109
  export interface ImportOperationStatus {
110
110
  /**
111
111
  * The ID of the [ImportOperation](#importoperation).
@@ -14,11 +14,12 @@ import { ProductDraftImport } from './productdrafts';
14
14
  import { ProductImport } from './products';
15
15
  import { ProductTypeImport } from './producttypes';
16
16
  import { ProductVariantImport, ProductVariantPatch } from './productvariants';
17
+ import { StandalonePriceImport } from './standalone-prices';
17
18
  /**
18
19
  * An import request batches multiple import resources of the same import resource type for processing by an import container.
19
20
  *
20
21
  */
21
- export declare type ImportRequest = CategoryImportRequest | CustomerImportRequest | InventoryImportRequest | OrderImportRequest | OrderPatchImportRequest | PriceImportRequest | ProductDraftImportRequest | ProductImportRequest | ProductTypeImportRequest | ProductVariantImportRequest | ProductVariantPatchRequest;
22
+ export type ImportRequest = CategoryImportRequest | CustomerImportRequest | InventoryImportRequest | OrderImportRequest | OrderPatchImportRequest | PriceImportRequest | ProductDraftImportRequest | ProductImportRequest | ProductTypeImportRequest | ProductVariantImportRequest | ProductVariantPatchRequest | StandalonePriceImportRequest;
22
23
  /**
23
24
  * A list of the ID's and validation statuses of newly created [ImportOperations](#importoperation).
24
25
  * 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).
@@ -96,7 +97,7 @@ export interface ProductVariantImportRequest {
96
97
  readonly resources: ProductVariantImport[];
97
98
  }
98
99
  /**
99
- * The request body to [import Prices](#import-prices). Contains data for [Embedded Prices](/../api/types#embedded-price) to be created or updated in a Project.
100
+ * The request body to [import Embedded Prices](#import-embedded-prices). Contains data for [Embedded Prices](/../api/projects/products#embedded-price) to be created or updated in a Project.
100
101
  *
101
102
  */
102
103
  export interface PriceImportRequest {
@@ -108,6 +109,19 @@ export interface PriceImportRequest {
108
109
  */
109
110
  readonly resources: PriceImport[];
110
111
  }
112
+ /**
113
+ * The request body to [import Standalone Prices](#import-standalone-prices). Contains data for [Standalone Prices](/../api/projects/standalone-prices#standaloneprice) to be created or updated in a Project.
114
+ *
115
+ */
116
+ export interface StandalonePriceImportRequest {
117
+ readonly type: 'standalone-price';
118
+ /**
119
+ * The Standalone Price import resources of this request.
120
+ *
121
+ *
122
+ */
123
+ readonly resources: StandalonePriceImport[];
124
+ }
111
125
  /**
112
126
  * The request body to [import Orders](#import-orders). Contains data for [Orders](/../api/projects/orders#order) to be created or updated in a Project.
113
127
  *
@@ -8,7 +8,7 @@ import { DeliveryItem, ParcelMeasurements, TrackingData } from './orders';
8
8
  /**
9
9
  * Maps to `ReturnItem.shipmentState`
10
10
  */
11
- export declare type ReturnShipmentState = 'Advised' | 'BackInStock' | 'Returned' | 'Unusable';
11
+ export type ReturnShipmentState = 'Advised' | 'BackInStock' | 'Returned' | 'Unusable' | string;
12
12
  export interface ReturnItemDraft {
13
13
  /**
14
14
  *
@@ -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 { Address, CartDiscountKeyReference, ChannelKeyReference, CustomerGroupKeyReference, CustomerKeyReference, DiscountCodeKeyReference, DiscountedPrice, Image, LocalizedString, Money, PriceTier, ProductKeyReference, ProductVariantKeyReference, ShippingMethodKeyReference, StateKeyReference, TaxCategoryKeyReference, TypedMoney } from './common';
6
+ import { Address, CartDiscountKeyReference, ChannelKeyReference, CustomerGroupKeyReference, CustomerKeyReference, DiscountCodeKeyReference, DiscountedPrice, Image, LocalizedString, Money, PriceTier, ProductKeyReference, ProductVariantKeyReference, ShippingMethodKeyReference, StateKeyReference, StoreKeyReference, TaxCategoryKeyReference, TypedMoney } from './common';
7
7
  import { Custom } from './customfields';
8
8
  import { SubRate, TaxRate } from './prices';
9
9
  import { Attribute } from './productvariants';
@@ -211,8 +211,8 @@ export interface LineItemImportDraft {
211
211
  */
212
212
  readonly custom?: Custom;
213
213
  }
214
- export declare type ShippingRateTierType = 'CartClassification' | 'CartScore' | 'CartValue';
215
- export declare type ShippingRatePriceTier = CartClassificationTier;
214
+ export type ShippingRateTierType = 'CartClassification' | 'CartScore' | 'CartValue' | string;
215
+ export type ShippingRatePriceTier = CartClassificationTier;
216
216
  export interface CartClassificationTier {
217
217
  readonly type: 'CartClassification';
218
218
  /**
@@ -361,7 +361,7 @@ export interface DiscountedLineItemPriceDraft {
361
361
  */
362
362
  readonly includedDiscounts: DiscountedLineItemPortion[];
363
363
  }
364
- export declare type ShippingMethodState = 'DoesNotMatchCart' | 'MatchesCart';
364
+ export type ShippingMethodState = 'DoesNotMatchCart' | 'MatchesCart' | string;
365
365
  /**
366
366
  * Maps to an order's `shippingInfo` property. This field is usually populated by the cart assosciated with
367
367
  * the order, but when importing orders you must provide a draft representation as a part of the OrderImport.
@@ -533,44 +533,39 @@ export interface TaxedPrice {
533
533
  *
534
534
  */
535
535
  readonly taxPortions: TaxPortion[];
536
- /**
537
- * Maps to `TaxedPrice.totalTax`.
538
- *
539
- */
540
- readonly totalTax?: Money;
541
536
  }
542
537
  /**
543
538
  * Maps to `Order.taxMode`
544
539
  */
545
- export declare type TaxMode = 'Disabled' | 'External' | 'ExternalAmount' | 'Platform';
540
+ export type TaxMode = 'Disabled' | 'External' | 'ExternalAmount' | 'Platform' | string;
546
541
  /**
547
542
  * Maps to `Order.orderState`.
548
543
  */
549
- export declare type OrderState = 'Cancelled' | 'Complete' | 'Confirmed' | 'Open';
544
+ export type OrderState = 'Cancelled' | 'Complete' | 'Confirmed' | 'Open' | string;
550
545
  /**
551
546
  * Maps to `Order.shipmentState`.
552
547
  */
553
- export declare type ShipmentState = 'Backorder' | 'Delayed' | 'Partial' | 'Pending' | 'Ready' | 'Shipped';
548
+ export type ShipmentState = 'Backorder' | 'Delayed' | 'Partial' | 'Pending' | 'Ready' | 'Shipped' | string;
554
549
  /**
555
550
  * Maps to `Order.paymentState`.
556
551
  */
557
- export declare type PaymentState = 'BalanceDue' | 'CreditOwed' | 'Failed' | 'Paid' | 'Pending';
552
+ export type PaymentState = 'BalanceDue' | 'CreditOwed' | 'Failed' | 'Paid' | 'Pending' | string;
558
553
  /**
559
554
  * Maps to `Order.inventoryMode`.
560
555
  */
561
- export declare type InventoryMode = 'ReserveOnOrder' | 'TrackOnly';
556
+ export type InventoryMode = 'ReserveOnOrder' | 'TrackOnly' | string;
562
557
  /**
563
558
  * Maps to `Order.taxRoundingMode`.
564
559
  */
565
- export declare type RoundingMode = 'HalfDown' | 'HalfEven' | 'HalfUp';
560
+ export type RoundingMode = 'HalfDown' | 'HalfEven' | 'HalfUp' | string;
566
561
  /**
567
562
  * Maps to `Order.taxCalculationMode`.
568
563
  */
569
- export declare type TaxCalculationMode = 'LineItemLevel' | 'UnitPriceLevel';
564
+ export type TaxCalculationMode = 'LineItemLevel' | 'UnitPriceLevel' | string;
570
565
  /**
571
566
  * Maps to `Order.origin`.
572
567
  */
573
- export declare type CartOrigin = 'Customer' | 'Merchant';
568
+ export type CartOrigin = 'Customer' | 'Merchant' | string;
574
569
  export interface SyncInfo {
575
570
  /**
576
571
  * Maps to `SyncInfo.channel`
@@ -591,7 +586,7 @@ export interface SyncInfo {
591
586
  /**
592
587
  * Maps to `DiscountCodeInfo.state`
593
588
  */
594
- export declare type DiscountCodeState = 'ApplicationStoppedByPreviousDiscount' | 'DoesNotMatchCart' | 'MatchesCart' | 'MaxApplicationReached' | 'NotActive' | 'NotValid';
589
+ export type DiscountCodeState = 'ApplicationStoppedByPreviousDiscount' | 'DoesNotMatchCart' | 'MatchesCart' | 'MaxApplicationReached' | 'NotActive' | 'NotValid' | string;
595
590
  export interface DiscountCodeInfo {
596
591
  /**
597
592
  * References a discount code by key.
@@ -604,8 +599,8 @@ export interface DiscountCodeInfo {
604
599
  */
605
600
  readonly state?: DiscountCodeState;
606
601
  }
607
- export declare type ShippingRateInputType = 'Classification' | 'Score';
608
- export declare type ShippingRateInput = ClassificationShippingRateInput | ScoreShippingRateInput;
602
+ export type ShippingRateInputType = 'Classification' | 'Score' | string;
603
+ export type ShippingRateInput = ClassificationShippingRateInput | ScoreShippingRateInput;
609
604
  export interface ClassificationShippingRateInput {
610
605
  readonly type: 'Classification';
611
606
  /**
@@ -773,4 +768,10 @@ export interface OrderImport {
773
768
  *
774
769
  */
775
770
  readonly itemShippingAddresses?: Address[];
771
+ /**
772
+ * Reference to the Store in which the Order is associated. If referenced Store does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Store exists.
773
+ *
774
+ *
775
+ */
776
+ readonly store?: StoreKeyReference;
776
777
  }
@@ -48,10 +48,16 @@ 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 an [Embedded Price](/../api/types#embedded-price) in the Project.
51
+ * The data representation for a price to be imported that is persisted as a [Price](/../api/types#price) in the Project.
52
52
  *
53
53
  */
54
54
  export interface PriceImport extends ImportResource {
55
+ /**
56
+ * User-defined unique identifier for the Embedded Price.
57
+ *
58
+ *
59
+ */
60
+ readonly key: string;
55
61
  /**
56
62
  * Maps to `Price.value`.
57
63
  *
@@ -77,14 +83,14 @@ export interface PriceImport extends ImportResource {
77
83
  */
78
84
  readonly validUntil?: string;
79
85
  /**
80
- * The Reference to the [CustomerGroup](/../api/projects/customerGroups#customergroup) with which the [Embedded Price](/../api/types#embedded-price) is associated.
86
+ * The Reference to the [CustomerGroup](/../api/projects/customerGroups#customergroup) with which the [Price](/../api/types#price) is associated.
81
87
  * 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
88
  *
83
89
  *
84
90
  */
85
91
  readonly customerGroup?: CustomerGroupKeyReference;
86
92
  /**
87
- * The Reference to the [Channel](/../api/projects/channels#channel) with which the [Embedded Price](/../api/types#embedded-price) is associated.
93
+ * The Reference to the [Channel](/../api/projects/channels#channel) with which the [Price](/../api/types#price) is associated.
88
94
  * 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
95
  *
90
96
  *
@@ -96,7 +102,7 @@ export interface PriceImport extends ImportResource {
96
102
  */
97
103
  readonly discounted?: DiscountedPrice;
98
104
  /**
99
- * Only the [Embedded Price](/../api/types#embedded-price) updates will be published to `staged` and `current` projection.
105
+ * Only the [Embedded Price](/../api/projects/products#embedded-price) updates will be published to `staged` and `current` projection.
100
106
  *
101
107
  *
102
108
  */
@@ -112,16 +118,16 @@ export interface PriceImport extends ImportResource {
112
118
  */
113
119
  readonly custom?: Custom;
114
120
  /**
115
- * The ProductVariant in which this [Embedded Price](/../api/types#embedded-price) is contained.
116
- * The Reference to the [ProductVariant](/../api/projects/products#productvariant) with which the [Embedded Price](/../api/types#embedded-price) is associated.
121
+ * The ProductVariant in which this [Embedded Price](/../api/projects/products#embedded-price) is contained.
122
+ * The Reference to the [ProductVariant](/../api/projects/products#productvariant) with which the [Price](/../api/types#price) is associated.
117
123
  * 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
124
  *
119
125
  *
120
126
  */
121
127
  readonly productVariant: ProductVariantKeyReference;
122
128
  /**
123
- * The Product in which the Product Variant containing this [Embedded Price](/../api/types#embedded-price) is contained. Maps to `ProductVariant.product`.
124
- * The Reference to the [Product](/../api/projects/products#product) with which the [Embedded Price](/../api/types#embedded-price) is associated.
129
+ * The Product in which the Product Variant containing this [Embedded Price](/../api/projects/products#embedded-price) is contained. Maps to `ProductVariant.product`.
130
+ * The Reference to the [Product](/../api/projects/products#product) with which the [Price](/../api/types#price) is associated.
125
131
  * 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
132
  *
127
133
  *
@@ -224,6 +224,8 @@ export interface PriceDraftImport {
224
224
  */
225
225
  readonly tiers?: PriceTier[];
226
226
  /**
227
+ * User-defined unique identifier for the Embedded Price.
228
+ *
227
229
  *
228
230
  */
229
231
  readonly key?: string;
@@ -43,7 +43,7 @@ export interface SearchKeyword {
43
43
  * The tokenizer defines the tokens that are used to match against the [Suggest Query](/../products-suggestions#suggest-query) input.
44
44
  *
45
45
  */
46
- export declare type SuggestTokenizer = CustomTokenizer | WhitespaceTokenizer;
46
+ export type SuggestTokenizer = CustomTokenizer | WhitespaceTokenizer;
47
47
  export interface CustomTokenizer {
48
48
  readonly type: 'custom';
49
49
  /**
@@ -54,7 +54,7 @@ export interface AttributeDefinition {
54
54
  */
55
55
  readonly isSearchable?: boolean;
56
56
  }
57
- export declare type AttributeType = AttributeBooleanType | AttributeDateTimeType | AttributeDateType | AttributeEnumType | AttributeLocalizableTextType | AttributeLocalizedEnumType | AttributeMoneyType | AttributeNestedType | AttributeNumberType | AttributeReferenceType | AttributeSetType | AttributeTextType | AttributeTimeType;
57
+ export type AttributeType = AttributeBooleanType | AttributeDateTimeType | AttributeDateType | AttributeEnumType | AttributeLocalizableTextType | AttributeLocalizedEnumType | AttributeMoneyType | AttributeNestedType | AttributeNumberType | AttributeReferenceType | AttributeSetType | AttributeTextType | AttributeTimeType;
58
58
  export interface AttributeBooleanType {
59
59
  readonly name: 'boolean';
60
60
  }
@@ -145,8 +145,8 @@ export interface AttributeTextType {
145
145
  export interface AttributeTimeType {
146
146
  readonly name: 'time';
147
147
  }
148
- export declare type AttributeConstraintEnum = 'CombinationUnique' | 'None' | 'SameForAll' | 'Unique';
149
- export declare type TextInputHint = 'MultiLine' | 'SingleLine';
148
+ export type AttributeConstraintEnum = 'CombinationUnique' | 'None' | 'SameForAll' | 'Unique' | string;
149
+ export type TextInputHint = 'MultiLine' | 'SingleLine' | string;
150
150
  /**
151
151
  * The data representation for a ProductType to be imported that is persisted as a [ProductType](/../api/projects/productTypes#producttype) in the Project.
152
152
  *
@@ -9,7 +9,7 @@ import { Asset, Image, ImportResource, KeyReference, LocalizedString, ProductKey
9
9
  * The name and type property must match the name and type property of an attribute definition of the product type.
10
10
  *
11
11
  */
12
- export declare type Attribute = BooleanAttribute | BooleanSetAttribute | DateAttribute | DateSetAttribute | DateTimeAttribute | DateTimeSetAttribute | EnumAttribute | EnumSetAttribute | LocalizableEnumAttribute | LocalizableEnumSetAttribute | LocalizableTextAttribute | LocalizableTextSetAttribute | MoneyAttribute | MoneySetAttribute | NumberAttribute | NumberSetAttribute | ReferenceAttribute | ReferenceSetAttribute | TextAttribute | TextSetAttribute | TimeAttribute | TimeSetAttribute;
12
+ export type Attribute = BooleanAttribute | BooleanSetAttribute | DateAttribute | DateSetAttribute | DateTimeAttribute | DateTimeSetAttribute | EnumAttribute | EnumSetAttribute | LocalizableEnumAttribute | LocalizableEnumSetAttribute | LocalizableTextAttribute | LocalizableTextSetAttribute | MoneyAttribute | MoneySetAttribute | NumberAttribute | NumberSetAttribute | ReferenceAttribute | ReferenceSetAttribute | TextAttribute | TextSetAttribute | TimeAttribute | TimeSetAttribute;
13
13
  /**
14
14
  * This type represents an attribute whose value is either "true" or "false".
15
15
  *
@@ -510,7 +510,10 @@ 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 Project, or the `state` of the [ImportOperation](/import-operation#importoperation) will be `unresolved`.
513
+ * - The referenced Attribute must be defined in an existing [ProductType](/../api/projects/productTypes#producttype), or the `state` of the [ImportOperation](/import-operation#importoperation) will be `validationFailed`.
514
+ * - Setting the value of a non-required Attribute to `null` will remove the Attribute.
515
+ * - Attempting to set a `null` value to a required Attribute will make the import operation fail with an [InvalidOperation](/error#invalidoperation) error.
516
+ * - Importing [LocalizableTextAttributes](/product-variant#localizabletextattribute) or [LocalizableTextSetAttributes](/product-variant#localizabletextsetattribute) follows an override pattern, meaning that omitted localized fields will be deleted, new fields will be created, and existing fields will be updated. You can also delete localized fields by setting their value to `null`.
514
517
  *
515
518
  *
516
519
  */
@@ -0,0 +1,76 @@
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, CustomerGroupKeyReference, DiscountedPrice, ImportResource, PriceTier, TypedMoney } from './common';
7
+ import { Custom } from './customfields';
8
+ /**
9
+ * The data representation for a Standalone Price to be imported that is persisted as a [Standalone Price](/../api/projects/standalone-prices#standaloneprice) in the Project.
10
+ *
11
+ */
12
+ export interface StandalonePriceImport extends ImportResource {
13
+ /**
14
+ * User-defined unique identifier for the Standalone Price.
15
+ *
16
+ *
17
+ */
18
+ readonly key: string;
19
+ /**
20
+ * Identifies the ProductVariant to which this Standalone Price is associated. This value is not validated to exist in Product Variants.
21
+ *
22
+ *
23
+ */
24
+ readonly sku: string;
25
+ /**
26
+ * Sets the money value of this Price.
27
+ *
28
+ *
29
+ */
30
+ readonly value: TypedMoney;
31
+ /**
32
+ * Sets the country for which this Price is valid.
33
+ *
34
+ *
35
+ */
36
+ readonly country?: string;
37
+ /**
38
+ * Sets the CustomerGroup for which this Price is valid.
39
+ *
40
+ *
41
+ */
42
+ readonly customerGroup?: CustomerGroupKeyReference;
43
+ /**
44
+ * Sets the product distribution Channel for which this Price is valid
45
+ *
46
+ *
47
+ */
48
+ readonly channel?: ChannelKeyReference;
49
+ /**
50
+ * Sets the date from which the Price is valid.
51
+ *
52
+ *
53
+ */
54
+ readonly validFrom?: string;
55
+ /**
56
+ * Sets the date until the Price is valid.
57
+ *
58
+ *
59
+ */
60
+ readonly validUntil?: string;
61
+ /**
62
+ * Sets price tiers.
63
+ *
64
+ */
65
+ readonly tiers?: PriceTier[];
66
+ /**
67
+ * Sets a discounted price for this Price that is different from the base price with value.
68
+ *
69
+ */
70
+ readonly discounted?: DiscountedPrice;
71
+ /**
72
+ * Custom Fields for the StandalonePrice.
73
+ *
74
+ */
75
+ readonly custom?: Custom;
76
+ }
@@ -3,9 +3,9 @@
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
- export declare type MethodType = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE';
7
- export declare type QueryParam = string | string[] | number | number[] | boolean | boolean[] | undefined;
8
- export declare type VariableMap = {
6
+ export type MethodType = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE';
7
+ export type QueryParam = string | string[] | number | number[] | boolean | boolean[] | undefined;
8
+ export type VariableMap = {
9
9
  [key: string]: QueryParam;
10
10
  };
11
11
  export interface ClientRequest {
@@ -18,9 +18,9 @@ export interface ClientRequest {
18
18
  queryParams?: VariableMap;
19
19
  body?: any;
20
20
  }
21
- export declare type ClientResponse<T = any> = {
21
+ export type ClientResponse<T = any> = {
22
22
  body: T;
23
23
  statusCode?: number;
24
24
  headers?: Object;
25
25
  };
26
- export declare type executeRequest = (request: ClientRequest) => Promise<ClientResponse>;
26
+ export type executeRequest = (request: ClientRequest) => Promise<ClientResponse>;
@@ -4,5 +4,5 @@
4
4
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
5
  */
6
6
  import { ClientRequest, ClientResponse, executeRequest } from './common-types';
7
- export declare type Middleware = (request: ClientRequest, executor: executeRequest) => Promise<ClientResponse>;
7
+ export type Middleware = (request: ClientRequest, executor: executeRequest) => Promise<ClientResponse>;
8
8
  export declare const createExecutorFromMiddlewares: (executor: executeRequest, midds?: Middleware[]) => executeRequest;