New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@commercetools/platform-sdk

Package Overview
Dependencies
Maintainers
12
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools/platform-sdk - npm Package Compare versions

Comparing version 4.6.0-alpha-associate-roles to 4.6.0

dist/declarations/src/generated/client/quotes/by-project-key-me-orders-quotes-request-builder.d.ts

120

CHANGELOG.md
# @commercetools/platform-sdk
## 4.6.0
### Minor Changes
- [#432](https://github.com/commercetools/commercetools-sdk-typescript/pull/432) [`d06e0c5`](https://github.com/commercetools/commercetools-sdk-typescript/commit/d06e0c58f4b9a8f69bbde63f906cc905c878aa2d) Thanks [@ajimae](https://github.com/ajimae)! - ### Removed Properties
- :warning: removed property `externalTaxRate` from type `MyCartAddLineItemAction`
- :warning: removed property `externalPrice` from type `MyCartAddLineItemAction`
- :warning: removed property `externalTotalPrice` from type `MyCartAddLineItemAction`
### Changed Properties
- :warning: changed property `stores` of type `BusinessUnitDraft` from type `StoreKeyReference[]` to `StoreResourceIdentifier[]`
- :warning: changed property `stores` of type `CompanyDraft` from type `StoreKeyReference[]` to `StoreResourceIdentifier[]`
- :warning: changed property `stores` of type `DivisionDraft` from type `StoreKeyReference[]` to `StoreResourceIdentifier[]`
- :warning: changed property `totalPrice` of type `Cart` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `locale` of type `Cart` from type `string` to `Locale`
- :warning: changed property `country` of type `CartDraft` from type `string` to `CountryCode`
- :warning: changed property `locale` of type `CartDraft` from type `string` to `Locale`
- :warning: changed property `totalPrice` of type `CustomLineItem` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `externalTaxRate` of type `CustomShippingDraft` from type `string` to `ExternalTaxRateDraft`
- :warning: changed property `deliveries` of type `CustomShippingDraft` from type `Delivery[]` to `DeliveryDraft[]`
- :warning: changed property `custom` of type `CustomShippingDraft` from type `string` to `CustomFieldsDraft`
- :warning: changed property `country` of type `ExternalTaxRateDraft` from type `string` to `CountryCode`
- :warning: changed property `totalPrice` of type `LineItem` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `externalTaxRate` of type `ShippingDraft` from type `string` to `ExternalTaxRateDraft`
- :warning: changed property `deliveries` of type `ShippingDraft` from type `Delivery[]` to `DeliveryDraft[]`
- :warning: changed property `custom` of type `ShippingDraft` from type `string` to `CustomFieldsDraft`
- :warning: changed property `price` of type `ShippingInfo` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `amount` of type `TaxPortion` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `totalNet` of type `TaxedItemPrice` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `totalGross` of type `TaxedItemPrice` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `totalTax` of type `TaxedItemPrice` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `totalNet` of type `TaxedPrice` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `totalGross` of type `TaxedPrice` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `totalTax` of type `TaxedPrice` from type `TypedMoney` to `CentPrecisionMoney`
- :warning: changed property `externalTaxRate` of type `CartAddCustomShippingMethodAction` from type `string` to `ExternalTaxRateDraft`
- :warning: changed property `deliveries` of type `CartAddCustomShippingMethodAction` from type `Delivery[]` to `DeliveryDraft[]`
- :warning: changed property `custom` of type `CartAddCustomShippingMethodAction` from type `string` to `CustomFieldsDraft`
- :warning: changed property `shippingMethod` of type `CartAddShippingMethodAction` from type `ShippingMethodReference` to `ShippingMethodResourceIdentifier`
- :warning: changed property `externalTaxRate` of type `CartAddShippingMethodAction` from type `string` to `ExternalTaxRateDraft`
- :warning: changed property `deliveries` of type `CartAddShippingMethodAction` from type `Delivery[]` to `DeliveryDraft[]`
- :warning: changed property `custom` of type `CartAddShippingMethodAction` from type `string` to `CustomFieldsDraft`
- :warning: changed property `locale` of type `CartSetLocaleAction` from type `string` to `Locale`
- :warning: changed property `businessUnit` of type `MyCartDraft` from type `BusinessUnitKeyReference` to `BusinessUnitResourceIdentifier`
- :warning: changed property `store` of type `MyCartDraft` from type `StoreKeyReference` to `StoreResourceIdentifier`
- :warning: changed property `country` of type `MyCartDraft` from type `string` to `CountryCode`
- :warning: changed property `locale` of type `MyCartDraft` from type `string` to `Locale`
- :warning: changed property `locale` of type `MyCartSetLocaleAction` from type `string` to `Locale`
### Required Properties
- :warning: changed property `inventoryMode` of type `Cart` to be required
- :warning: changed property `itemShippingAddresses` of type `Cart` to be required
- :warning: changed property `discountCodes` of type `Cart` to be required
- :warning: changed property `directDiscounts` of type `Cart` to be required
- :warning: changed property `shippingAddress` of type `ShippingDraft` to be required
- changed property `quantity` of type `CustomLineItemDraft` to be optional
- changed property `deliveries` of type `CustomShippingDraft` to be optional
- changed property `deliveries` of type `ShippingDraft` to be optional
- changed property `quantity` of type `CartAddCustomLineItemAction` to be optional
- changed property `deliveries` of type `CartAddCustomShippingMethodAction` to be optional
- changed property `deliveries` of type `CartAddShippingMethodAction` to be optional
- changed property `email` of type `CartSetCustomerEmailAction` to be optional
- changed property `quantity` of type `MyLineItemDraft` to be optional
### Added Properties
- added property `shippingDetails` to type `CartAddCustomLineItemAction`
- added property `addedAt` to type `CartAddLineItemAction`
- added property `inventoryMode` to type `CartAddLineItemAction`
- added property `oldValue` to type `StandalonePriceValueChangedMessage`
- added property `oldValue` to type `StandalonePriceValueChangedMessagePayload`
- added property `purchaseOrderNumber` to type `StagedOrder`
- added property `purchaseOrderNumber` to type `Order`
- added property `purchaseOrderNumber` to type `OrderFromCartDraft`
- added property `purchaseOrderNumber` to type `QuoteRequest`
- added property `purchaseOrderNumber` to type `QuoteRequestDraft`
- added property `purchaseOrderNumber` to type `Quote`
- added property `purchaseOrderNumber` to type `StagedQuote`
### Added Resources
- added resource `/{projectKey}/me/orders/quotes`
### Added Method
- added method `apiRoot.withProjectKey().me().orders().quotes().post()`
### Removed Type
- :warning: removed type `CountryNotConfiguredInStore`
### Added Types
- added type `CartSetBusinessUnitAction`
- added type `CountryNotConfiguredInStoreError`
- added type `GoogleCloudFunctionDestination`
- added type `MyOrderFromQuoteDraft`
- added type `MyCartSetBusinessUnitAction`
- added type `OrderPurchaseOrderNumberSetMessage`
- added type `OrderPurchaseOrderNumberSetMessagePayload`
- added type `StagedOrderSetPurchaseOrderNumberAction`
- added type `OrderSetPurchaseOrderNumberAction`
### Added QueryParameters
- added query parameter `sort` to method `get /{projectKey}/product-selections/key={key}/products`
- added query parameter `sort` to method `get /{projectKey}/product-selections/{ID}/products`
- added query parameter `expand` to method `get /{projectKey}/in-store/key={storeKey}/me/active-cart`
### Added Enum(s)
- added enum `shipping` to type `ResourceTypeId`
### Patch Changes
- Updated dependencies [[`8b4ad04`](https://github.com/commercetools/commercetools-sdk-typescript/commit/8b4ad04e9a43a8b399fa946ab6693500a4af3fb5)]:
- @commercetools/sdk-client-v2@2.1.4
## 4.5.0

@@ -4,0 +124,0 @@

14

dist/declarations/src/generated/client/active-cart/by-project-key-in-store-key-by-store-key-me-active-cart-request-builder.d.ts

@@ -7,3 +7,3 @@ /**

import { Cart } from '../../models/cart';
import { executeRequest } from '../../shared/utils/common-types';
import { executeRequest, QueryParam } from '../../shared/utils/common-types';
import { ApiRequest } from '../../shared/utils/requests-utils';

@@ -29,3 +29,15 @@ /**

});
/**
* Retrieves the Customer's most recently modified active Cart in the Store specified by the `storeKey` path parameter.
*
* Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored.
*
* If no active Cart exists, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
*
*/
get(methodArgs?: {
queryArgs?: {
expand?: string | string[];
[key: string]: QueryParam;
};
headers?: {

@@ -32,0 +44,0 @@ [key: string]: string | string[];

@@ -26,2 +26,9 @@ /**

});
/**
* Retrieves the Customer's most recently modified active Cart.
* Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored.
*
* If no active Cart exists, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
*
*/
get(methodArgs?: {

@@ -28,0 +35,0 @@ queryArgs?: {

@@ -49,2 +49,6 @@ /**

}): ApiRequest<BusinessUnitPagedQueryResponse>;
/**
* Automatically assigns the authenticated user to the Business Unit in the [Associate Roles](ctp:api:type:AssociateRole) of `Admin` as well as `Buyer`.
*
*/
post(methodArgs: {

@@ -51,0 +55,0 @@ queryArgs?: {

7

dist/declarations/src/generated/client/by-project-key-request-builder.d.ts

@@ -10,4 +10,2 @@ /**

import { ByProjectKeyApiClientsRequestBuilder } from './api-clients/by-project-key-api-clients-request-builder';
import { ByProjectKeyAsAssociateRequestBuilder } from './as-associate/by-project-key-as-associate-request-builder';
import { ByProjectKeyAssociateRolesRequestBuilder } from './associate-roles/by-project-key-associate-roles-request-builder';
import { ByProjectKeyAttributeGroupsRequestBuilder } from './attribute-groups/by-project-key-attribute-groups-request-builder';

@@ -68,8 +66,3 @@ import { ByProjectKeyBusinessUnitsRequestBuilder } from './business-units/by-project-key-business-units-request-builder';

});
asAssociate(): ByProjectKeyAsAssociateRequestBuilder;
/**
* An Assocaite Role enables permissions over a Business Unit to an Associate.
*/
associateRoles(): ByProjectKeyAssociateRolesRequestBuilder;
/**
* A Business Unit can represent a Company or a Division.

@@ -76,0 +69,0 @@ */

@@ -29,4 +29,3 @@ /**

/**
* The cart may not contain up-to-date prices, discounts etc.
* If you want to ensure they're up-to-date, send an Update request with the Recalculate update action instead.
* To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
*

@@ -33,0 +32,0 @@ */

@@ -29,7 +29,5 @@ /**

/**
* Retrieves the active cart of the customer that has been modified most recently.
* It does not consider carts with CartOrigin Merchant. If no active cart exists, a 404 Not Found error is returned.
* Retrieves the recently modified active Cart of a Customer with [CartOrigin](ctp:api:type:CartOrigin) `Customer`. If no active Cart exists, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
*
* The cart may not contain up-to-date prices, discounts etc. If you want to ensure they're up-to-date,
* send an Update request with the Recalculate update action instead.
* To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
*

@@ -36,0 +34,0 @@ */

@@ -29,4 +29,3 @@ /**

/**
* The cart may not contain up-to-date prices, discounts etc.
* If you want to ensure they're up-to-date, send an Update request with the Recalculate update action instead.
* To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
*

@@ -33,0 +32,0 @@ */

@@ -55,4 +55,5 @@ /**

/**
* Creating a cart can fail with an InvalidOperation if the referenced shipping method in the
* CartDraft has a predicate which does not match the cart.
* Creating a Cart fails with an [InvalidOperation](ctp:api:type:InvalidOperationError) error if the
* [ShippingMethod](ctp:api:type:ShippingMethod) referenced in the CartDraft
* has a `predicate` that does not match the Cart.
*

@@ -59,0 +60,0 @@ */

@@ -31,8 +31,6 @@ /**

/**
* Returns a cart by its ID from a specific Store.
* If the cart exists in the project but does not have the store field,
* or the store field references a different store, this method returns a ResourceNotFound error.
* The cart may not contain up-to-date prices, discounts etc.
* If you want to ensure they're up-to-date, send an Update request with the Recalculate update action instead.
* If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
*
* To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
*
*/

@@ -63,2 +61,6 @@ get(methodArgs?: {

}): ApiRequest<Cart>;
/**
* If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
delete(methodArgs: {

@@ -65,0 +67,0 @@ queryArgs: {

@@ -31,9 +31,7 @@ /**

/**
* Retrieves the active cart of the customer that has been modified most recently in a specific Store.
* Retrieves the recently modified active Cart of a Customer with [CartOrigin](ctp:api:type:CartOrigin) `Customer`. If no active Cart exists, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
*
* If the cart exists in the project but does not have the store field, or the store field
* references a different store, this method returns a ResourceNotFound error.
* If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
*
* The cart may not contain up-to-date prices, discounts etc. If you want to ensure they're up-to-date,
* send an Update request with the Recalculate update action instead.
* To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
*

@@ -40,0 +38,0 @@ */

@@ -31,8 +31,6 @@ /**

/**
* Returns a cart by its key from a specific Store.
* If the cart exists in the project but does not have the store field,
* or the store field references a different store, this method returns a ResourceNotFound error.
* The cart may not contain up-to-date prices, discounts etc.
* If you want to ensure they're up-to-date, send an Update request with the Recalculate update action instead.
* If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned.
*
* To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
*
*/

@@ -49,5 +47,3 @@ get(methodArgs?: {

/**
* Updates a [Cart](ctp:api:type:Cart) in the Store specified by `storeKey`.
* If the Cart exists in the Project but does not have the store field,
* or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFound) error.
* If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*

@@ -65,2 +61,6 @@ */

}): ApiRequest<Cart>;
/**
* If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
delete(methodArgs: {

@@ -67,0 +67,0 @@ queryArgs: {

@@ -42,5 +42,2 @@ /**

}): ByProjectKeyInStoreKeyByStoreKeyCartsByIDRequestBuilder;
/**
* Queries carts in a specific Store.
*/
get(methodArgs?: {

@@ -61,6 +58,6 @@ queryArgs?: {

/**
* Creates a [Cart](ctp:api:type:Cart) in the Store specified by `storeKey`.
* When using this endpoint the Cart's `store` field is always set to the store specified in the path parameter.
* If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) in the [CartDraft](ctp:api:type:CartDraft) has a predicate that does not match, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
* The `store` field in the created [Cart](ctp:api:type:Cart) is set to the Store specified by the `storeKey` path parameter.
*
* Specific Error Codes: [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
*
*/

@@ -67,0 +64,0 @@ post(methodArgs: {

@@ -40,2 +40,6 @@ /**

}): ApiRequest<Cart>;
/**
* If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*
*/
post(methodArgs: {

@@ -42,0 +46,0 @@ queryArgs?: {

@@ -47,2 +47,8 @@ /**

}): ApiRequest<CartPagedQueryResponse>;
/**
* The `store` field in the created [Cart](ctp:api:type:Cart) is set to the Store specified by the `storeKey` path parameter.
*
* Specific Error Codes: [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
*
*/
post(methodArgs: {

@@ -49,0 +55,0 @@ queryArgs?: {

@@ -34,3 +34,3 @@ /**

*
* If a Cart is returned as part of [CustomerSignInResult](ctp:api:type:CustomerSignInResult), it has been [recalculated](/../api/projects/carts#recalculate) with up-to-date prices, taxes, discounts, and invalid line items removed.
* If a Cart is returned as part of [CustomerSignInResult](ctp:api:type:CustomerSignInResult), it has been [recalculated](ctp:api:type:MyCartRecalculateAction) with up-to-date prices, taxes, discounts, and invalid line items removed.
*

@@ -37,0 +37,0 @@ * If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.

@@ -29,3 +29,3 @@ /**

*
* If used with [an access token for an anonymous session](/../api/authorization#tokens-for-anonymous-sessions), all Orders and Carts that belong to the `anonymousId` are assigned to the newly logged-in Customer.
* If used with [an access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly logged-in Customer.
*

@@ -35,3 +35,3 @@ * - If the Customer does not have a Cart yet, the most recently modified anonymous cart becomes the Customer's Cart.

*
* A Cart returned as part of the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) is [recalculated](ctp:api:type:Recalculate) with up-to-date prices, taxes, discounts, and invalid line items removed.
* A Cart returned as part of the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) is [recalculated](ctp:api:type:MyCartRecalculateAction) with up-to-date prices, taxes, discounts, and invalid line items removed.
*

@@ -38,0 +38,0 @@ * If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.

@@ -33,3 +33,3 @@ /**

* If the order exists in the project but does not have the store field,
* or the store field references a different store, this method returns a ResourceNotFound error.
* or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*

@@ -49,3 +49,3 @@ */

* If the order exists in the project but does not have the store field,
* or the store field references a different store, this method returns a ResourceNotFound error.
* or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
*

@@ -52,0 +52,0 @@ */

@@ -34,3 +34,3 @@ /**

* If the order exists in the project but does not have the store field,
* or the store field references a different store, this method returns a ResourceNotFound error.
* or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* In case the orderNumber does not match the regular expression [a-zA-Z0-9_\-]+,

@@ -52,3 +52,3 @@ * it should be provided in URL-encoded format.

* If the order exists in the project but does not have the store field,
* or the store field references a different store, this method returns a ResourceNotFound error.
* or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* In case the orderNumber does not match the regular expression [a-zA-Z0-9_\-]+,

@@ -55,0 +55,0 @@ * it should be provided in URL-encoded format.

@@ -10,2 +10,3 @@ /**

import { ApiRequest } from '../../shared/utils/requests-utils';
import { ByProjectKeyMeOrdersQuotesRequestBuilder } from '../quotes/by-project-key-me-orders-quotes-request-builder';
import { ByProjectKeyMeOrdersByIDRequestBuilder } from './by-project-key-me-orders-by-id-request-builder';

@@ -32,2 +33,3 @@ /**

}): ByProjectKeyMeOrdersByIDRequestBuilder;
quotes(): ByProjectKeyMeOrdersQuotesRequestBuilder;
get(methodArgs?: {

@@ -34,0 +36,0 @@ queryArgs?: {

@@ -34,2 +34,3 @@ /**

withTotal?: boolean;
sort?: string | string[];
[key: string]: QueryParam;

@@ -36,0 +37,0 @@ };

@@ -34,2 +34,3 @@ /**

withTotal?: boolean;
sort?: string | string[];
[key: string]: QueryParam;

@@ -36,0 +37,0 @@ };

@@ -26,2 +26,10 @@ /**

});
/**
* Creates a new Cart by replicating an existing Cart or Order. Can be useful in cases where a customer wants to cancel a recent order to make some changes or reorder a previous order.
*
* The replicated Cart preserves Customer information, Line Items and Custom Line Items, Custom Fields, Discount Codes, and other settings of the Cart or Order. If the Line Items become invalid, for example, due to removed Products or Prices, they are removed from the new Cart. If the Customer switches to another Customer Group, the new Cart is updated with the new value. It has up-to-date Tax Rates, Prices, and Line Item product data and is in `Active` [CartState](ctp:api:type:CartState).
*
* The new Cart does not contain Payments or Deliveries. The [State](ctp:api:type:ItemState) of Line Items and Custom Line Items is reset to `initial`.
*
*/
post(methodArgs: {

@@ -28,0 +36,0 @@ body: ReplicaCartDraft;

@@ -28,2 +28,10 @@ /**

});
/**
* Creates a new Cart by replicating an existing Cart or Order. Can be useful in cases where a customer wants to cancel a recent order to make some changes or reorder a previous order.
*
* The replicated Cart preserves Customer information, Line Items and Custom Line Items, Custom Fields, Discount Codes, and other settings of the Cart or Order. If the Line Items become invalid, for example, due to removed Products or Prices, they are removed from the new Cart. If the Customer switches to another Customer Group, the new Cart is updated with the new value. It has up-to-date Tax Rates, Prices, and Line Item product data and is in `Active` [CartState](ctp:api:type:CartState).
*
* The new Cart does not contain payments or deliveries. The [State](ctp:api:type:ItemState) of Line Items and Custom Line Items is reset to `initial`.
*
*/
post(methodArgs: {

@@ -30,0 +38,0 @@ body: ReplicaCartDraft;

@@ -27,2 +27,16 @@ /**

});
/**
* Creates a new Cart by replicating an existing Cart or Order of the authenticated Customer.
* This can be useful in cases where a customer wants to cancel a recent order to make some changes or reorder a previous order.
*
* The replicated Cart preserves Customer information, Line Items and Custom Line Items, Custom Fields, Discount Codes, and other settings of the Cart or Order.
* If the Line Items become invalid, for example, due to removed Products or Prices, they are removed from the new Cart.
* If the Customer switches to another Customer Group, the new Cart is updated with the new value.
* It has up-to-date Tax Rates, Prices, and Line Item product data and is in `Active` [CartState](ctp:api:type:CartState).
*
* The new Cart does not contain Payments or Deliveries. The [State](ctp:api:type:ItemState) of Line Items and Custom Line Items is reset to `initial`.
*
* In case the Cart or Order to be replicated does not belong to the authenticaed Customer, the API returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error
*
*/
post(methodArgs: {

@@ -29,0 +43,0 @@ body: ReplicaMyCartDraft;

@@ -28,3 +28,3 @@ /**

/**
* If used with an [access token for an anonymous session](/../api/authorization#tokens-for-anonymous-sessions), all Orders and Carts that belong to the `anonymousId` are assigned to the newly created Customer.
* If used with an [access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly created Customer.
*

@@ -31,0 +31,0 @@ * Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message.

@@ -8,3 +8,2 @@ /**

export * from './models/api-client';
export * from './models/associate-role';
export * from './models/attribute-group';

@@ -11,0 +10,0 @@ export * from './models/business-unit';

@@ -6,3 +6,2 @@ /**

*/
import { AssociateRoleResourceIdentifier } from './associate-role';
import { Address, BaseAddress, CreatedBy, LastModifiedBy, _BaseAddress } from './common';

@@ -14,14 +13,8 @@ import { CustomerReference, CustomerResourceIdentifier } from './customer';

/**
* Roles assignment to the Associate within the Business Unit.
* Roles the Associate holds within the Business Unit.
*
*
*/
readonly associateRoleAssignments: AssociateRoleAssignment[];
readonly roles: AssociateRole[];
/**
* Deprecated type. Use `associateRoleAssignment` instead.
*
*
*/
readonly roles: AssociateRoleDeprecated[];
/**
* The [Customer](ctp:api:type:Customer) that is part of the Business Unit.

@@ -35,14 +28,8 @@ *

/**
* Roles assignment to the Associate within the Business Unit.
* Roles the Associate should hold within the Business Unit.
*
*
*/
readonly associateRoleAssignments?: AssociateRoleAssignment[];
readonly roles: AssociateRole[];
/**
* Deprecated type. Use `associateRoleAssignment` instead.
*
*
*/
readonly roles?: AssociateRoleDeprecated[];
/**
* The [Customer](ctp:api:type:Customer) to be part of the Business Unit.

@@ -54,18 +41,2 @@ *

}
export interface AssociateRoleAssignment {
/**
* Role the Associate holds within the Business Unit.
*
*
*/
readonly associateRole: AssociateRoleResourceIdentifier;
}
export interface AssociateRoleAssignmentDraft {
/**
* Role the Associate holds within the Business Unit.
*
*
*/
readonly associateRole?: AssociateRoleResourceIdentifier;
}
/**

@@ -75,5 +46,5 @@ * Roles defining how an [Associate](ctp:api:type:Associate) can interact with a Business Unit.

*/
export type AssociateRoleDeprecated = 'Admin' | 'Buyer' | string;
export type AssociateRole = 'Admin' | 'Buyer' | string;
/**
* Generic type to model the fields that all types of Business Units have in common.
* Generic type to model those fields all Business Units have in common.
*

@@ -80,0 +51,0 @@ */

@@ -6,3 +6,2 @@ /**

*/
import { AssociateRole, AssociateRoleKeyReference, AssociateRoleReference, AssociateRoleResourceIdentifier } from './associate-role';
import { AttributeGroup, AttributeGroupReference, AttributeGroupResourceIdentifier } from './attribute-group';

@@ -381,3 +380,3 @@ import { BusinessUnit, BusinessUnitKeyReference, BusinessUnitReference, BusinessUnitResourceIdentifier } from './business-unit';

}
export type _BaseAddress = BaseAddress | Address | AddressDraft;
export type _BaseAddress = BaseAddress | AddressDraft | Address;
/**

@@ -425,3 +424,3 @@ * Address type returned by read methods.

}
export type _BaseResource = BaseResource | CustomObject | CustomerGroup | Customer | DiscountCode | Extension | InventoryEntry | Message | OrderEdit | Order | Payment | ProductDiscount | ProductSelection | ProductType | Product | ProductProjection | QuoteRequest | Quote | Review | ShippingMethod | ShoppingList | StagedQuote | StandalonePrice | State | Store | Subscription | TaxCategory | Type | Zone | AssociateRole | Cart | Channel | Category | BusinessUnit | AttributeGroup | CartDiscount;
export type _BaseResource = BaseResource | CustomObject | CustomerGroup | Customer | DiscountCode | Extension | InventoryEntry | Message | OrderEdit | Order | Payment | ProductDiscount | ProductSelection | ProductType | Product | ProductProjection | QuoteRequest | Quote | Review | ShippingMethod | ShoppingList | StagedQuote | StandalonePrice | State | Store | Subscription | TaxCategory | Type | Zone | Cart | AttributeGroup | Channel | Category | BusinessUnit | CartDiscount;
/**

@@ -451,3 +450,3 @@ * These objects represent information about which [API Client](/../api/projects/api-clients) created or modified a resource. For more information, see [Client Logging](/client-logging).

/**
* Indicates that the resource was modified during an [anonymous session](/../api/authorization#tokens-for-anonymous-sessions) with the logged ID.
* Indicates that the resource was modified during an [anonymous session](ctp:api:type:AnonymousSession) with the logged ID.
*

@@ -482,3 +481,3 @@ *

/**
* Indicates the [anonymous session](/../api/authorization#tokens-for-anonymous-sessions) during which the resource was created.
* Indicates the [anonymous session](ctp:api:type:AnonymousSession) during which the resource was created.
*

@@ -567,3 +566,3 @@ *

*/
export type KeyReference = AssociateRoleKeyReference | BusinessUnitKeyReference | StoreKeyReference;
export type KeyReference = BusinessUnitKeyReference | StoreKeyReference;
/**

@@ -592,3 +591,3 @@ * Present on resources modified after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked).

/**
* Indicates the [anonymous session](/../api/authorization#tokens-for-anonymous-sessions) during which the resource was modified.
* Indicates the [anonymous session](ctp:api:type:AnonymousSession) during which the resource was modified.
*

@@ -689,4 +688,4 @@ *

* Is set if a [ProductDiscount](ctp:api:type:ProductDiscount) has been applied.
* If set, the API uses the DiscountedPrice value for the [LineItem Price selection](/projects/carts#lineitem-price-selection).
* When a [relative discount](/../api/projects/productDiscounts#productdiscountvaluerelative) has been applied and the fraction part of the DiscountedPrice `value` is 0.5, the `value` is rounded in favor of the customer with [half down rounding](https://en.wikipedia.org/wiki/Rounding#Round_half_down).
* If set, the API uses the DiscountedPrice value for the [Line Item Price selection](ctp:api:type:LineItemPriceSelection).
* When a [relative discount](ctp:api:type:ProductDiscountValueRelative) has been applied and the fraction part of the DiscountedPrice `value` is 0.5, the `value` is rounded in favor of the customer with [half-down rounding](https://en.wikipedia.org/wiki/Rounding#Round_half_down).
*

@@ -895,3 +894,3 @@ *

*/
export type Reference = AssociateRoleReference | AttributeGroupReference | BusinessUnitReference | CartDiscountReference | CartReference | CategoryReference | ChannelReference | CustomObjectReference | CustomerGroupReference | CustomerReference | DiscountCodeReference | InventoryEntryReference | OrderEditReference | OrderReference | PaymentReference | ProductDiscountReference | ProductReference | ProductSelectionReference | ProductTypeReference | QuoteReference | QuoteRequestReference | ReviewReference | ShippingMethodReference | ShoppingListReference | StagedQuoteReference | StandalonePriceReference | StateReference | StoreReference | TaxCategoryReference | TypeReference | ZoneReference;
export type Reference = AttributeGroupReference | BusinessUnitReference | CartDiscountReference | CartReference | CategoryReference | ChannelReference | CustomObjectReference | CustomerGroupReference | CustomerReference | DiscountCodeReference | InventoryEntryReference | OrderEditReference | OrderReference | PaymentReference | ProductDiscountReference | ProductReference | ProductSelectionReference | ProductTypeReference | QuoteReference | QuoteRequestReference | ReviewReference | ShippingMethodReference | ShoppingListReference | StagedQuoteReference | StandalonePriceReference | StateReference | StoreReference | TaxCategoryReference | TypeReference | ZoneReference;
/**

@@ -901,3 +900,3 @@ * Type of resource the value should reference. Supported resource type identifiers are:

*/
export type ReferenceTypeId = 'associate-role' | 'attribute-group' | 'business-unit' | 'cart' | 'cart-discount' | 'category' | 'channel' | 'customer' | 'customer-group' | 'discount-code' | 'extension' | 'inventory-entry' | 'key-value-document' | 'order' | 'order-edit' | 'payment' | 'product' | 'product-discount' | 'product-price' | 'product-selection' | 'product-type' | 'quote' | 'quote-request' | 'review' | 'shipping-method' | 'shopping-list' | 'staged-quote' | 'standalone-price' | 'state' | 'store' | 'subscription' | 'tax-category' | 'type' | 'zone' | string;
export type ReferenceTypeId = 'attribute-group' | 'business-unit' | 'cart' | 'cart-discount' | 'category' | 'channel' | 'customer' | 'customer-group' | 'discount-code' | 'extension' | 'inventory-entry' | 'key-value-document' | 'order' | 'order-edit' | 'payment' | 'product' | 'product-discount' | 'product-price' | 'product-selection' | 'product-type' | 'quote' | 'quote-request' | 'review' | 'shipping-method' | 'shopping-list' | 'staged-quote' | 'standalone-price' | 'state' | 'store' | 'subscription' | 'tax-category' | 'type' | 'zone' | string;
/**

@@ -909,3 +908,3 @@ * Draft type to create a [Reference](ctp:api:type:Reference) or a [KeyReference](ctp:api:type:KeyReference) to a resource. Provide either the `id` or (wherever supported) the `key` of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the field `parent` of a [CategoryDraft](ctp:api:type:CategoryDraft) takes a ResourceIdentifier for its value while the value of the corresponding field of a [Category](ctp:api:type:Category) is a Reference.

*/
export type ResourceIdentifier = AssociateRoleResourceIdentifier | AttributeGroupResourceIdentifier | BusinessUnitResourceIdentifier | CartDiscountResourceIdentifier | CartResourceIdentifier | CategoryResourceIdentifier | ChannelResourceIdentifier | CustomerGroupResourceIdentifier | CustomerResourceIdentifier | DiscountCodeResourceIdentifier | InventoryEntryResourceIdentifier | OrderEditResourceIdentifier | OrderResourceIdentifier | PaymentResourceIdentifier | ProductDiscountResourceIdentifier | ProductResourceIdentifier | ProductSelectionResourceIdentifier | ProductTypeResourceIdentifier | QuoteRequestResourceIdentifier | QuoteResourceIdentifier | ReviewResourceIdentifier | ShippingMethodResourceIdentifier | ShoppingListResourceIdentifier | StagedQuoteResourceIdentifier | StandalonePriceResourceIdentifier | StateResourceIdentifier | StoreResourceIdentifier | TaxCategoryResourceIdentifier | TypeResourceIdentifier | ZoneResourceIdentifier;
export type ResourceIdentifier = AttributeGroupResourceIdentifier | BusinessUnitResourceIdentifier | CartDiscountResourceIdentifier | CartResourceIdentifier | CategoryResourceIdentifier | ChannelResourceIdentifier | CustomerGroupResourceIdentifier | CustomerResourceIdentifier | DiscountCodeResourceIdentifier | InventoryEntryResourceIdentifier | OrderEditResourceIdentifier | OrderResourceIdentifier | PaymentResourceIdentifier | ProductDiscountResourceIdentifier | ProductResourceIdentifier | ProductSelectionResourceIdentifier | ProductTypeResourceIdentifier | QuoteRequestResourceIdentifier | QuoteResourceIdentifier | ReviewResourceIdentifier | ShippingMethodResourceIdentifier | ShoppingListResourceIdentifier | StagedQuoteResourceIdentifier | StandalonePriceResourceIdentifier | StateResourceIdentifier | StoreResourceIdentifier | TaxCategoryResourceIdentifier | TypeResourceIdentifier | ZoneResourceIdentifier;
/**

@@ -966,3 +965,3 @@ * Scoped Price is contained in a [ProductVariant](ctp:api:type:ProductVariant) which is returned in response to a

/**
* Is set if a matching [ProductDiscount](ctp:api:type:ProductDiscount) exists. If set, the [Cart](ctp:api:type:Cart) uses the discounted value for the [Cart Price calculation](ctp:api:type:CartAddLineItemAction).
* Is set when a matching [ProductDiscount](ctp:api:type:ProductDiscount) exists. If set, the [Cart](ctp:api:type:Cart) uses the discounted value for the [Cart Price calculation](ctp:api:type:CartAddLineItemAction).
*

@@ -969,0 +968,0 @@ * When a [relative Product Discount](ctp:api:type:ProductDiscountValueRelative) is applied and the fractional part of the discounted Price is 0.5, the discounted Price is [rounded half down](https://en.wikipedia.org/wiki/Rounding#Round_half_down) in favor of the Customer.

@@ -28,3 +28,3 @@ /**

*/
export type ErrorObject = AnonymousIdAlreadyInUseError | AttributeDefinitionAlreadyExistsError | AttributeDefinitionTypeConflictError | AttributeNameDoesNotExistError | BadGatewayError | ConcurrentModificationError | CountryNotConfiguredInStore | DiscountCodeNonApplicableError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateEnumValuesError | DuplicateFieldError | DuplicateFieldWithConflictingResourceError | DuplicatePriceKeyError | DuplicatePriceScopeError | DuplicateStandalonePriceScopeError | DuplicateVariantValuesError | EditPreviewFailedError | EnumKeyAlreadyExistsError | EnumKeyDoesNotExistError | EnumValueIsUsedError | EnumValuesMustMatchError | ExtensionBadResponseError | ExtensionNoResponseError | ExtensionPredicateEvaluationFailedError | ExtensionUpdateActionsFailedError | ExternalOAuthFailedError | FeatureRemovedError | GeneralError | InsufficientScopeError | InternalConstraintViolatedError | InvalidCredentialsError | InvalidCurrentPasswordError | InvalidFieldError | InvalidInputError | InvalidItemShippingDetailsError | InvalidJsonInputError | InvalidOperationError | InvalidSubjectError | InvalidTokenError | LanguageUsedInStoresError | MatchingPriceNotFoundError | MaxResourceLimitExceededError | MissingRoleOnChannelError | MissingTaxRateForCountryError | NoMatchingProductDiscountFoundError | NotEnabledError | ObjectNotFoundError | OutOfStockError | OverCapacityError | OverlappingStandalonePriceValidityError | PendingOperationError | PriceChangedError | ProductAssignmentMissingError | ProductPresentWithDifferentVariantSelectionError | ProjectNotConfiguredForLanguagesError | QueryComplexityLimitExceededError | QueryTimedOutError | ReferenceExistsError | ReferencedResourceNotFoundError | RequiredFieldError | ResourceNotFoundError | ResourceSizeLimitExceededError | SearchDeactivatedError | SearchExecutionFailureError | SearchFacetPathNotFoundError | SearchIndexingInProgressError | SemanticErrorError | ShippingMethodDoesNotMatchCartError | SyntaxErrorError;
export type ErrorObject = AnonymousIdAlreadyInUseError | AttributeDefinitionAlreadyExistsError | AttributeDefinitionTypeConflictError | AttributeNameDoesNotExistError | BadGatewayError | ConcurrentModificationError | CountryNotConfiguredInStoreError | DiscountCodeNonApplicableError | DuplicateAttributeValueError | DuplicateAttributeValuesError | DuplicateEnumValuesError | DuplicateFieldError | DuplicateFieldWithConflictingResourceError | DuplicatePriceKeyError | DuplicatePriceScopeError | DuplicateStandalonePriceScopeError | DuplicateVariantValuesError | EditPreviewFailedError | EnumKeyAlreadyExistsError | EnumKeyDoesNotExistError | EnumValueIsUsedError | EnumValuesMustMatchError | ExtensionBadResponseError | ExtensionNoResponseError | ExtensionPredicateEvaluationFailedError | ExtensionUpdateActionsFailedError | ExternalOAuthFailedError | FeatureRemovedError | GeneralError | InsufficientScopeError | InternalConstraintViolatedError | InvalidCredentialsError | InvalidCurrentPasswordError | InvalidFieldError | InvalidInputError | InvalidItemShippingDetailsError | InvalidJsonInputError | InvalidOperationError | InvalidSubjectError | InvalidTokenError | LanguageUsedInStoresError | MatchingPriceNotFoundError | MaxResourceLimitExceededError | MissingRoleOnChannelError | MissingTaxRateForCountryError | NoMatchingProductDiscountFoundError | NotEnabledError | ObjectNotFoundError | OutOfStockError | OverCapacityError | OverlappingStandalonePriceValidityError | PendingOperationError | PriceChangedError | ProductAssignmentMissingError | ProductPresentWithDifferentVariantSelectionError | ProjectNotConfiguredForLanguagesError | QueryComplexityLimitExceededError | QueryTimedOutError | ReferenceExistsError | ReferencedResourceNotFoundError | RequiredFieldError | ResourceNotFoundError | ResourceSizeLimitExceededError | SearchDeactivatedError | SearchExecutionFailureError | SearchFacetPathNotFoundError | SearchIndexingInProgressError | SemanticErrorError | ShippingMethodDoesNotMatchCartError | SyntaxErrorError;
/**

@@ -177,8 +177,13 @@ * Returned when the anonymous ID is being used by another resource.

*
* - [Create Cart in Store](/../api/projects/carts#create-a-cart-in-a-store) request and [Set Country](/../api/projects/carts#set-country) update action on Carts.
* - [Create Order in a Store from a Cart](/../api/projects/me-orders#create-order-in-a-store-from-a-cart) requests and [Set Country](/../api/projects/me-carts#set-country) on My Orders.
* - [Create Order by Import](/../api/projects/orders#create-order-by-import) request.
* - [Create Cart in Store](ctp:api:endpoint:/{projectKey}/in-store/carts:POST) request and [Set Country](ctp:api:type:CartSetCountryAction) update action on Carts.
* - [Create Cart in Store](ctp:api:endpoint:/{projectKey}/in-store/me/carts:POST) request and [Set Country](ctp:api:type:MyCartSetCountryAction) update action on My Carts.
* - [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests on Orders.
* - [Create Order from Cart in a Store](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST) requests on My Orders.
* - [Create Order from Quote](ctp:api:endpoint:/{projectKey}/orders/quotes:POST) requests on Orders.
* - [Create Order from Quote](ctp:api:endpoint:/{projectKey}/me/orders/quotes:POST) requests on My Orders.
* - [Create Order by Import](ctp:api:endpoint:/{projectKey}/orders/import:POST) request on Order Import.
* - [Set Country](ctp:api:type:StagedOrderSetCountryAction) on Order Edits.
*
*/
export interface CountryNotConfiguredInStore {
export interface CountryNotConfiguredInStoreError {
readonly code: 'CountryNotConfiguredInStore';

@@ -210,4 +215,4 @@ [key: string]: any;

*
* - [Create Order from Cart](/../api/projects/orders#create-order-from-cart) and [Create Order from Cart in a Store](/../api/projects/orders#create-order-from-cart-in-a-store) requests on Orders.
* - [Create Order from Cart](/../api/projects/me-orders#create-order-from-a-cart) and [Create Order in a Store from a Cart](/../api/projects/me-orders#create-order-in-a-store-from-a-cart) requests on My Orders.
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests on Orders.
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/me/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST) requests on My Orders.
*

@@ -976,3 +981,3 @@ */

*
* The error is returned as a failed response to the [Create Order from Cart](/../api/projects/orders#create-order-from-cart) and [Create Order from Cart in a Store](/../api/projects/orders#create-order-from-cart-in-a-store) requests.
* The error is returned as a failed response to the [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests.
*

@@ -1083,4 +1088,4 @@ */

* - [Add LineItem](ctp:api:type:StagedOrderAddLineItemAction), [Add CustomLineItem](ctp:api:type:StagedOrderAddCustomLineItemAction), and [Add DiscountCode](ctp:api:type:StagedOrderAddDiscountCodeAction) update actions on Order Edits.
* - [Create Order from Cart](/../api/projects/orders#create-order-from-cart) and [Create Order from Cart in a Store](/../api/projects/orders#create-order-from-cart-in-a-store) requests on Orders.
* - [Create Order from a Cart](/../api/projects/me-orders#create-order-from-a-cart) and [Create Order in a Store from a Cart](/../api/projects/me-orders#create-order-in-a-store-from-a-cart) requests on My Orders.
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests on Orders.
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/me/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST) requests on My Orders.
*

@@ -1159,3 +1164,3 @@ */

*
* - [Channel](ctp:api:Channel) is added or set on a [Store](ctp:api:Store) with missing Channel `roles`.
* - [Channel](ctp:api:type:Channel) is added or set on a [Store](ctp:api:type:Store) with missing Channel `roles`.
* - [Standalone Price](/../api/projects/standalone-prices#create-standaloneprice) references a Channel that does not contain the `ProductDistribution` role.

@@ -1197,4 +1202,4 @@ *

*
* - [Set Default Shipping Address](ctp:api:type:CustomerSetDefaultShippingAddressAction), [Add LineItem](ctp:api:type:CartAddLineItemAction), [Add CustomLineItem](ctp:api:type:CartAddCustomLineItemAction), [Set Shipping Address](ctp:api:type:CartSetShippingAddressAction), [Set Customer ID](ctp:api:type:CartSetCustomerIdAction), [Add LineItem](ctp:api:type:StagedOrderAddLineItemAction), and [Add CustomLineItem](ctp:api:type:StagedOrderAddCustomLineItemAction) update actions
* - [Create Order from Cart](/../api/projects/orders#create-order-from-cart) and [Create Order from Cart in a Store](/../api/projects/orders#create-order-from-cart-in-a-store) requests.
* - [Set Default Shipping Address](ctp:api:type:CustomerSetDefaultShippingAddressAction), [Add LineItem](ctp:api:type:CartAddLineItemAction), [Add CustomLineItem](ctp:api:type:CartAddCustomLineItemAction), [Set Shipping Address](ctp:api:type:CartSetShippingAddressAction), [Set Customer ID](ctp:api:type:CartSetCustomerIdAction), [Add LineItem](ctp:api:type:MyCartAddLineItemAction), [Add LineItem](ctp:api:type:StagedOrderAddLineItemAction), and [Add CustomLineItem](ctp:api:type:StagedOrderAddCustomLineItemAction) update actions
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests.
*

@@ -1279,4 +1284,4 @@ */

*
* - [Create Order from Cart](/../api/projects/orders#create-order-from-cart), [Create Order from Cart in a Store](/../api/projects/orders#create-order-from-cart-in-a-store), and [Create Order by Import](/../api/projects/me-orders) requests on Orders.
* - [Create Order from a Cart](/../api/projects/me-orders#create-order-from-a-cart) and [Create Order in a Store from Cart](/../api/projects/me-orders#create-order-in-a-store-from-a-cart) requests on My Orders.
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST), [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST), and [Create Order by Import](/../api/projects/me-orders) requests on Orders.
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/me/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST) requests on My Orders.
*

@@ -1419,4 +1424,4 @@ */

*
* - [Create Order from Cart](/../api/projects/orders#create-order-from-cart) and [Create Order from Cart in a Store](/../api/projects/orders#create-order-from-cart-in-a-store) requests on Orders.
* - [Create Order from a Cart](/../api/projects/me-orders#create-order-from-a-cart) and [Create Order in a Store from a Cart](/../api/projects/me-orders#create-order-in-a-store-from-a-cart) requests on My Orders.
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests on Orders.
* - [Create Order from Cart](ctp:api:endpoint:/{projectKey}/me/orders:POST) and [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/me/orders:POST) requests on My Orders.
*

@@ -1717,3 +1722,3 @@ */

*
* The error is returned as a failed response to the [Create Order from Cart](/../api/projects/orders#create-order-from-cart) or [Create Order from Cart in a Store](/../api/projects/orders#create-order-from-cart-in-a-store) requests.
* The error is returned as a failed response to the [Create Order from Cart](ctp:api:endpoint:/{projectKey}/orders:POST) or [Create Order in Store from Cart](ctp:api:endpoint:/{projectKey}/in-store/orders:POST) requests.
*

@@ -1720,0 +1725,0 @@ */

@@ -79,3 +79,3 @@ /**

*/
export type ExtensionDestination = AWSLambdaDestination | HttpDestination;
export type ExtensionDestination = AWSLambdaDestination | GoogleCloudFunctionDestination | HttpDestination;
/**

@@ -232,2 +232,15 @@ * We recommend creating an Identify and Access Management (IAM) user with an `accessKey` and `accessSecret` pair, specifically for each Extension that only has the `lambda:InvokeFunction` permission on this function.

/**
* For GoogleCloudFunction destinations, you need to grant permissions to the `extensions@commercetools-platform.iam.gserviceaccount.com` service account to invoke your function. If your function's version is 1st gen, grant the service account the IAM role `Cloud Functions Invoker`. For version 2nd gen, assign the IAM role `Cloud Run Invoker` using the Cloud Run console.
*
*/
export interface GoogleCloudFunctionDestination {
readonly type: 'GoogleCloudFunction';
/**
* URL to the target function.
*
*
*/
readonly url: string;
}
/**
* We recommend an encrypted `HTTPS` connection for production setups. However, we also accept unencrypted `HTTP` connections for development purposes. HTTP redirects will not be followed and cache headers will be ignored.

@@ -234,0 +247,0 @@ *

@@ -357,3 +357,5 @@ /**

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -427,3 +429,5 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -470,3 +474,5 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* For order creation and updates, the sum of the `targets` must match the quantity of the Line Items or Custom Line Items.
*
*
*/

@@ -612,3 +618,5 @@ readonly shippingDetails?: ItemShippingDetailsDraft;

/**
* Determines in which [Tax calculation mode](/carts-orders-overview#tax-calculation-mode) taxed prices are calculated.
*
*
*/

@@ -620,3 +628,5 @@ readonly taxCalculationMode: TaxCalculationMode;

/**
* Indicates how taxes are set on the Cart.
*
*
*/

@@ -628,3 +638,5 @@ readonly taxMode: TaxMode;

/**
* Determines how monetary values are rounded.
*
*
*/

@@ -708,3 +720,5 @@ readonly taxRoundingMode: RoundingMode;

/**
* For order creation and updates, the sum of the `targets` must match the quantity of the Line Items or Custom Line Items.
*
*
*/

@@ -845,3 +859,5 @@ readonly shippingDetailsToRemove?: ItemShippingDetailsDraft;

/**
* For order creation and updates, the sum of the `targets` must match the quantity of the Line Items or Custom Line Items.
*
*
*/

@@ -857,3 +873,10 @@ readonly shippingDetails?: ItemShippingDetailsDraft;

/**
* Cannot be used in [LineItemDraft](ctp:api:type:LineItemDraft) or [CustomLineItemDraft](ctp:api:type:CustomLineItemDraft).
*
* Can only be set by these update actions:
*
* - [Set LineItem TaxAmount](ctp:api:type:CartSetLineItemTaxAmountAction), [Set CustomLineItem TaxAmount](ctp:api:type:CartSetCustomLineItemTaxAmountAction), or [Set ShippingMethod TaxAmount](ctp:api:type:CartSetShippingMethodTaxAmountAction) on Carts
* - [Set LineItem TaxAmount](ctp:api:type:OrderEditSetLineItemTaxAmountAction), [Set CustomLineItem TaxAmount](ctp:api:type:OrderEditSetCustomLineItemTaxAmountAction), or [Set ShippingMethod TaxAmount](ctp:api:type:OrderEditSetShippingMethodTaxAmountAction) on Order Edits
*
*
*/

@@ -869,3 +892,5 @@ readonly externalTaxAmount?: ExternalTaxAmountDraft;

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -891,3 +916,5 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -1160,3 +1187,5 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* For order creation and updates, the sum of the `targets` must match the quantity of the Line Items or Custom Line Items.
*
*
*/

@@ -1172,3 +1201,10 @@ readonly shippingDetails?: ItemShippingDetailsDraft;

/**
* Cannot be used in [LineItemDraft](ctp:api:type:LineItemDraft) or [CustomLineItemDraft](ctp:api:type:CustomLineItemDraft).
*
* Can only be set by these update actions:
*
* - [Set LineItem TaxAmount](ctp:api:type:CartSetLineItemTaxAmountAction), [Set CustomLineItem TaxAmount](ctp:api:type:CartSetCustomLineItemTaxAmountAction), or [Set ShippingMethod TaxAmount](ctp:api:type:CartSetShippingMethodTaxAmountAction) on Carts
* - [Set LineItem TaxAmount](ctp:api:type:OrderEditSetLineItemTaxAmountAction), [Set CustomLineItem TaxAmount](ctp:api:type:OrderEditSetCustomLineItemTaxAmountAction), or [Set ShippingMethod TaxAmount](ctp:api:type:OrderEditSetShippingMethodTaxAmountAction) on Order Edits
*
*
*/

@@ -1191,3 +1227,5 @@ readonly externalTaxAmount?: ExternalTaxAmountDraft;

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -1432,3 +1470,5 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -1454,3 +1494,5 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -1501,3 +1543,5 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -1509,3 +1553,10 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* Cannot be used in [LineItemDraft](ctp:api:type:LineItemDraft) or [CustomLineItemDraft](ctp:api:type:CustomLineItemDraft).
*
* Can only be set by these update actions:
*
* - [Set LineItem TaxAmount](ctp:api:type:CartSetLineItemTaxAmountAction), [Set CustomLineItem TaxAmount](ctp:api:type:CartSetCustomLineItemTaxAmountAction), or [Set ShippingMethod TaxAmount](ctp:api:type:CartSetShippingMethodTaxAmountAction) on Carts
* - [Set LineItem TaxAmount](ctp:api:type:OrderEditSetLineItemTaxAmountAction), [Set CustomLineItem TaxAmount](ctp:api:type:OrderEditSetCustomLineItemTaxAmountAction), or [Set ShippingMethod TaxAmount](ctp:api:type:OrderEditSetShippingMethodTaxAmountAction) on Order Edits
*
*
*/

@@ -1517,3 +1568,5 @@ readonly externalTaxAmount?: ExternalTaxAmountDraft;

/**
* Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
*
*
*/

@@ -1525,2 +1578,3 @@ readonly externalTaxRate?: ExternalTaxRateDraft;

/**
* Generic type holding specifc ShippingRateInputDraft types.
*

@@ -1527,0 +1581,0 @@ */

@@ -432,4 +432,10 @@ /**

/**
* The shippingRateInput is used as an input to select a ShippingRatePriceTier.
* Input used to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
* The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
*
* - If `CartClassification`, it is [ClassificationShippingRateInput](ctp:api:type:ClassificationShippingRateInput).
* - If `CartScore`, it is [ScoreShippingRateInput](ctp:api:type:ScoreShippingRateInput).
* - If `CartValue`, it cannot be used.
*
*
*/

@@ -456,3 +462,3 @@ readonly shippingRateInput?: ShippingRateInput;

/**
* ResourceIdentifier of the Cart from which the Order is created.
* ResourceIdentifier of the Cart from which this order is created.
*

@@ -462,6 +468,3 @@ */

/**
* Expected version of the Cart from which the Order is created.
* If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) error will be returned.
*
*
*/

@@ -485,11 +488,7 @@ readonly version: number;

/**
* Payment state for the Order.
*
*
*/
readonly paymentState?: PaymentState;
/**
* Shipment state for the Order.
*
*
*/

@@ -503,5 +502,3 @@ readonly shipmentState?: ShipmentState;

/**
* [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State) indicating the Order's state.
*
*
*/

@@ -525,3 +522,3 @@ readonly state?: StateResourceIdentifier;

/**
* `version` of the [Quote](ctp:api:type:Quote) from which an Order is created.
* `version` of the [Quote](ctp:api:type:quote) from which an Order is created.
*

@@ -532,3 +529,3 @@ *

/**
* If `true`, the `quoteState` of the referenced [Quote](ctp:api:type:Quote) will be set to `Accepted`.
* If `true`, the `quoteState` of the referenced [Quote](ctp:api:type:quote) will be set to `Accepted`.
*

@@ -548,9 +545,6 @@ *

/**
* Payment state of the Order.
*
*
*/
readonly paymentState?: PaymentState;
/**
* Shipment state of the Order.
*

@@ -565,5 +559,3 @@ */

/**
* [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State) indicating the Order's state.
*
*
*/

@@ -780,12 +772,7 @@ readonly state?: StateResourceIdentifier;

/**
* Expected version of the Order on which the changes should be applied.
* If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) error will be returned.
*
*
*/
readonly version: number;
/**
* Update actions to be performed on the Order.
*
*
*/

@@ -1412,3 +1399,5 @@ readonly actions: OrderUpdateAction[];

/**
* For order creation and updates, the sum of the `targets` must match the quantity of the Line Items or Custom Line Items.
*
*
*/

@@ -1644,3 +1633,5 @@ readonly shippingDetails?: ItemShippingDetailsDraft;

/**
* For order creation and updates, the sum of the `targets` must match the quantity of the Line Items or Custom Line Items.
*
*
*/

@@ -1647,0 +1638,0 @@ readonly shippingDetails?: ItemShippingDetailsDraft;

@@ -50,3 +50,3 @@ /**

/**
* [Anonymous session](/../api/authorization#tokens-for-anonymous-sessions) associated with the Payment.
* [Anonymous session](ctp:api:type:AnonymousSession) associated with the Payment.
*

@@ -139,3 +139,3 @@ *

/**
* [Anonymous session](/../api/authorization#tokens-for-anonymous-sessions) associated with the Payment.
* [Anonymous session](ctp:api:type:AnonymousSession) associated with the Payment.
*

@@ -142,0 +142,0 @@ *

@@ -519,3 +519,3 @@ /**

*
* If the AttributeDefinition name to be changed does not exist, an [AttributeNameDoesNotExist](ctp:api:type:AttributeNameDoesNotExistError) error is returned.
* If the AttributeDefinition name to be changed does not exist, a [AttributeNameDoesNotExist](ctp:api:type:AttributeNameDoesNotExistError) error is returned.
*

@@ -522,0 +522,0 @@ */

@@ -456,3 +456,3 @@ /**

/**
* This mode determines the type of Prices used for [Product Price Selection](ctp:api:type:ProductPriceSelection) as well as for [LineItem Price selection](ctp:api:type:CartLineItemPriceSelection).
* This mode determines the type of Prices used for [Product Price Selection](ctp:api:type:ProductPriceSelection) and for [LineItem Price selection](ctp:api:type:LineItemPriceSelection).
*

@@ -459,0 +459,0 @@ */

@@ -22,5 +22,8 @@ /**

/**
* Default value for the `deleteDaysAfterLastModification` parameter of the [CartDraft](ctp:api:type:CartDraft). This field may not be present on Projects created before January 2020.
* Default value for the `deleteDaysAfterLastModification` parameter of the [CartDraft](ctp:api:type:CartDraft) and [MyCartDraft](ctp:api:type:MyCartDraft).
* If a [ChangeSubscription](ctp:api:type:ChangeSubscription) for Carts exists, a [ResourceDeletedDeliveryPayload](ctp:api:type:ResourceDeletedDeliveryPayload) is sent upon deletion of a Cart.
*
* This field may not be present on Projects created before January 2020.
*
*
*/

@@ -27,0 +30,0 @@ readonly deleteDaysAfterLastModification?: number;

@@ -71,3 +71,3 @@ /**

/**
* Identifies ShoppingLists belonging to an [anonymous session](/../api/authorization#tokens-for-anonymous-sessions).
* Identifies ShoppingLists belonging to an [anonymous session](ctp:api:type:AnonymousSession).
*

@@ -146,3 +146,3 @@ */

/**
* Identifies ShoppingLists belonging to an [anonymous session](/../api/authorization#tokens-for-anonymous-sessions).
* Identifies ShoppingLists belonging to an [anonymous session](ctp:api:type:AnonymousSession).
*

@@ -247,5 +247,4 @@ */

* Data of the [ProductVariant](ctp:api:type:ProductVariant).
* Returned when expanded using `expand=lineItems[*].variant`.
*
* *Limitation: `expand=lineItems[0].variant` is not supported.*
* Returned when expanded using `expand=lineItems[*].variant`. You cannot expand only a single element of the array.
*

@@ -257,5 +256,4 @@ *

* Slug of the current [ProductData](ctp:api:type:ProductData).
* Only returned when expanded using `expand=lineItems[*].productSlug`.
*
* *Limitation: `expand=lineItems[0].productSlug` is not supported.*
* Returned when expanded using `expand=lineItems[*].productSlug`. You cannot expand only a single element of the array.
*

@@ -262,0 +260,0 @@ *

@@ -118,3 +118,3 @@ /**

/**
* Set if a matching [ProductDiscount](ctp:api:type:ProductDiscount) exists. If set, the API uses the `discounted` value for the [LineItem Price selection](/../api/projects/carts#lineitem-price-selection).
* Set if a matching [ProductDiscount](ctp:api:type:ProductDiscount) exists. If set, the API uses the `discounted` value for the [LineItem Price selection](ctp:api:type:LineItemPriceSelection).
* When a [relative discount](/../api/projects/productDiscounts#productdiscountvaluerelative) is applied and the fraction part of the `discounted` price is 0.5, the discounted price is rounded in favor of the customer with the [half down rounding](https://en.wikipedia.org/wiki/Rounding#Round_half_down).

@@ -121,0 +121,0 @@ *

@@ -288,3 +288,3 @@ /**

*/
export type MessageSubscriptionResourceTypeId = 'associate-role' | 'business-unit' | 'category' | 'customer' | 'inventory-entry' | 'order' | 'payment' | 'product' | 'product-selection' | 'quote' | 'quote-request' | 'review' | 'staged-quote' | 'standalone-price' | 'store' | string;
export type MessageSubscriptionResourceTypeId = 'business-unit' | 'category' | 'customer' | 'inventory-entry' | 'order' | 'payment' | 'product' | 'product-selection' | 'quote' | 'quote-request' | 'review' | 'staged-quote' | 'standalone-price' | 'store' | string;
export interface PayloadNotIncluded {

@@ -291,0 +291,0 @@ /**

@@ -235,3 +235,3 @@ /**

*/
export type ResourceTypeId = 'address' | 'asset' | 'associate-role' | 'business-unit' | 'cart-discount' | 'category' | 'channel' | 'custom-line-item' | 'customer' | 'customer-group' | 'discount-code' | 'inventory-entry' | 'line-item' | 'order' | 'order-delivery' | 'order-edit' | 'order-parcel' | 'order-return-item' | 'payment' | 'payment-interface-interaction' | 'product-price' | 'product-selection' | 'quote' | 'review' | 'shipping-method' | 'shopping-list' | 'shopping-list-text-line-item' | 'standalone-price' | 'store' | 'transaction' | string;
export type ResourceTypeId = 'address' | 'asset' | 'business-unit' | 'cart-discount' | 'category' | 'channel' | 'custom-line-item' | 'customer' | 'customer-group' | 'discount-code' | 'inventory-entry' | 'line-item' | 'order' | 'order-delivery' | 'order-edit' | 'order-parcel' | 'order-return-item' | 'payment' | 'payment-interface-interaction' | 'product-price' | 'product-selection' | 'quote' | 'review' | 'shipping' | 'shipping-method' | 'shopping-list' | 'shopping-list-text-line-item' | 'standalone-price' | 'store' | 'transaction' | string;
export interface Type extends BaseResource {

@@ -238,0 +238,0 @@ /**

@@ -7,3 +7,3 @@ {

"name": "@commercetools/platform-sdk",
"version": "4.6.0-alpha-associate-roles",
"version": "4.6.0",
"engines": {

@@ -30,3 +30,3 @@ "node": ">=14"

"dependencies": {
"@commercetools/sdk-client-v2": "^2.1.2",
"@commercetools/sdk-client-v2": "^2.1.4",
"@commercetools/sdk-middleware-auth": "^7.0.0",

@@ -33,0 +33,0 @@ "@commercetools/sdk-middleware-http": "^7.0.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc