diff --git a/.changeset/tame-toes-teach.md b/.changeset/tame-toes-teach.md new file mode 100644 index 000000000..f134ae4cf --- /dev/null +++ b/.changeset/tame-toes-teach.md @@ -0,0 +1,7 @@ +--- +"@commercetools/history-sdk": patch +"@commercetools/importapi-sdk": patch +"@commercetools/platform-sdk": patch +--- + +Update generated SDKs diff --git a/packages/history-sdk/src/generated/models/change-value.ts b/packages/history-sdk/src/generated/models/change-value.ts index 5deae47f3..f496f957a 100644 --- a/packages/history-sdk/src/generated/models/change-value.ts +++ b/packages/history-sdk/src/generated/models/change-value.ts @@ -151,7 +151,7 @@ export interface ChangeValueGiftLineItemChangeValue { /** * */ - readonly supplyChannel: Reference + readonly supplyChannel?: Reference /** * */ diff --git a/packages/importapi-sdk/src/generated/models/errors.ts b/packages/importapi-sdk/src/generated/models/errors.ts index 1dd094d89..e32b392ad 100644 --- a/packages/importapi-sdk/src/generated/models/errors.ts +++ b/packages/importapi-sdk/src/generated/models/errors.ts @@ -228,6 +228,10 @@ export interface InvalidFieldError { * */ readonly allowedValues?: any[] + /** + * + */ + readonly resourceIndex?: number } /** * An invalid JSON input has been sent to the service. diff --git a/packages/platform-sdk/src/generated/models/api-client.ts b/packages/platform-sdk/src/generated/models/api-client.ts index 0f61cbd10..693d363b2 100644 --- a/packages/platform-sdk/src/generated/models/api-client.ts +++ b/packages/platform-sdk/src/generated/models/api-client.ts @@ -86,10 +86,10 @@ export interface ApiClientPagedQueryResponse { readonly count: number /** * Total number of results matching the query. - * This number is an estimation that is not [strongly consistent](/general-concepts#strong-consistency). + * This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency). * This field is returned by default. * For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`. - * When the results are filtered with a [Query Predicate](/predicates/query), `total` is subject to a [limit](/contract#queries). + * When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries). * * */ diff --git a/packages/platform-sdk/src/generated/models/cart-discount.ts b/packages/platform-sdk/src/generated/models/cart-discount.ts index 242c123ba..8e6e055fa 100644 --- a/packages/platform-sdk/src/generated/models/cart-discount.ts +++ b/packages/platform-sdk/src/generated/models/cart-discount.ts @@ -65,7 +65,7 @@ export interface CartDiscount extends BaseResource { /** * */ - readonly value: CartDiscountValueDraft + readonly value: CartDiscountValue /** * A valid Cart predicate. * diff --git a/packages/platform-sdk/src/generated/models/cart.ts b/packages/platform-sdk/src/generated/models/cart.ts index 5968a82dc..123b3e86f 100644 --- a/packages/platform-sdk/src/generated/models/cart.ts +++ b/packages/platform-sdk/src/generated/models/cart.ts @@ -1098,6 +1098,8 @@ export interface CartAddCustomLineItemAction { */ readonly slug: string /** + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * * */ readonly taxCategory?: TaxCategoryResourceIdentifier @@ -1482,6 +1484,8 @@ export interface CartSetCustomShippingMethodAction { */ readonly shippingRate: ShippingRateDraft /** + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * * */ readonly taxCategory?: TaxCategoryResourceIdentifier @@ -1511,7 +1515,7 @@ export interface CartSetCustomerEmailAction { export interface CartSetCustomerGroupAction { readonly action: 'setCustomerGroup' /** - * [ResourceIdentifier](/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ diff --git a/packages/platform-sdk/src/generated/models/common.ts b/packages/platform-sdk/src/generated/models/common.ts index facffd048..d4849a094 100644 --- a/packages/platform-sdk/src/generated/models/common.ts +++ b/packages/platform-sdk/src/generated/models/common.ts @@ -471,7 +471,7 @@ export interface PriceDraft { */ readonly country?: string /** - * [ResourceIdentifier](/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ diff --git a/packages/platform-sdk/src/generated/models/customer-group.ts b/packages/platform-sdk/src/generated/models/customer-group.ts index 29c9680e7..dd0f25925 100644 --- a/packages/platform-sdk/src/generated/models/customer-group.ts +++ b/packages/platform-sdk/src/generated/models/customer-group.ts @@ -38,13 +38,13 @@ export interface CustomerGroup extends BaseResource { */ readonly lastModifiedAt: string /** - * Present on resources updated after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * Present on resources updated after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked). * * */ readonly lastModifiedBy?: LastModifiedBy /** - * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked). * * */ @@ -116,10 +116,10 @@ export interface CustomerGroupPagedQueryResponse { readonly count: number /** * Total number of results matching the query. - * This number is an estimation that is not [strongly consistent](/general-concepts#strong-consistency). + * This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency). * This field is returned by default. * For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`. - * When the results are filtered with a [Query Predicate](/predicates/query), `total` is subject to a [limit](/contract#queries). + * When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries). * * */ @@ -144,14 +144,14 @@ export interface CustomerGroupReference { */ readonly id: string /** - * Contains the representation of the expanded Customer Group. Only present in responses to requests with [Reference Expansion](/general-concepts#reference-expansion) for Customer Groups. + * Contains the representation of the expanded Customer Group. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for Customer Groups. * * */ readonly obj?: CustomerGroup } /** - * [ResourceIdentifier](/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). * */ export interface CustomerGroupResourceIdentifier { diff --git a/packages/platform-sdk/src/generated/models/inventory.ts b/packages/platform-sdk/src/generated/models/inventory.ts index 370b36d2f..cfcdcf37b 100644 --- a/packages/platform-sdk/src/generated/models/inventory.ts +++ b/packages/platform-sdk/src/generated/models/inventory.ts @@ -48,7 +48,7 @@ export interface InventoryEntry extends BaseResource { */ readonly sku: string /** - * Optional connection to a particular supplier. + * Connection to a particular supplier. * */ readonly supplyChannel?: ChannelReference diff --git a/packages/platform-sdk/src/generated/models/message.ts b/packages/platform-sdk/src/generated/models/message.ts index f68eee6a6..c06b85b5b 100644 --- a/packages/platform-sdk/src/generated/models/message.ts +++ b/packages/platform-sdk/src/generated/models/message.ts @@ -7,6 +7,7 @@ import { DiscountCodeState, DiscountedLineItemPriceForQuantity, + ItemShippingDetails, LineItem, ProductPublishScope, ShippingInfo, @@ -23,7 +24,9 @@ import { LastModifiedBy, LocalizedString, Money, + Price, Reference, + TypedMoney, } from './common' import { Customer, CustomerReference } from './customer' import { CustomerGroupReference } from './customer-group' @@ -32,6 +35,7 @@ import { InventoryEntry } from './inventory' import { Delivery, DeliveryItem, + ItemState, Order, OrderState, Parcel, @@ -63,8 +67,11 @@ export type Message = | CustomerDeletedMessage | CustomerEmailChangedMessage | CustomerEmailVerifiedMessage + | CustomerFirstNameSetMessage | CustomerGroupSetMessage + | CustomerLastNameSetMessage | CustomerPasswordUpdatedMessage + | CustomerTitleSetMessage | DeliveryAddedMessage | DeliveryAddressSetMessage | DeliveryItemsUpdatedMessage @@ -87,8 +94,10 @@ export type Message = | OrderImportedMessage | OrderLineItemAddedMessage | OrderLineItemDiscountSetMessage + | OrderLineItemRemovedMessage | OrderPaymentStateChangedMessage | OrderReturnInfoAddedMessage + | OrderReturnInfoSetMessage | OrderReturnShipmentStateChangedMessage | OrderShipmentStateChangedMessage | OrderShippingAddressSetMessage @@ -502,7 +511,7 @@ export interface CustomerCompanyNameSetMessage { /** * */ - readonly companyName: string + readonly companyName?: string } export interface CustomerCreatedMessage { readonly type: 'CustomerCreated' @@ -604,7 +613,7 @@ export interface CustomerDateOfBirthSetMessage { /** * */ - readonly dateOfBirth: string + readonly dateOfBirth?: string } export interface CustomerDeletedMessage { readonly type: 'CustomerDeleted' @@ -751,6 +760,57 @@ export interface CustomerEmailVerifiedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers } +export interface CustomerFirstNameSetMessage { + readonly type: 'CustomerFirstNameSet' + /** + * + */ + readonly id: string + /** + * + */ + readonly version: number + /** + * + */ + readonly createdAt: string + /** + * + */ + readonly lastModifiedAt: string + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly lastModifiedBy?: LastModifiedBy + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly createdBy?: CreatedBy + /** + * + */ + readonly sequenceNumber: number + /** + * + */ + readonly resource: Reference + /** + * + */ + readonly resourceVersion: number + /** + * + */ + readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers + /** + * + */ + readonly firstName?: string +} export interface CustomerGroupSetMessage { readonly type: 'CustomerGroupSet' /** @@ -802,7 +862,58 @@ export interface CustomerGroupSetMessage { * * */ - readonly customerGroup: CustomerGroupReference + readonly customerGroup?: CustomerGroupReference +} +export interface CustomerLastNameSetMessage { + readonly type: 'CustomerLastNameSet' + /** + * + */ + readonly id: string + /** + * + */ + readonly version: number + /** + * + */ + readonly createdAt: string + /** + * + */ + readonly lastModifiedAt: string + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly lastModifiedBy?: LastModifiedBy + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly createdBy?: CreatedBy + /** + * + */ + readonly sequenceNumber: number + /** + * + */ + readonly resource: Reference + /** + * + */ + readonly resourceVersion: number + /** + * + */ + readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers + /** + * + */ + readonly lastName?: string } export interface CustomerPasswordUpdatedMessage { readonly type: 'CustomerPasswordUpdated' @@ -856,6 +967,57 @@ export interface CustomerPasswordUpdatedMessage { */ readonly reset: boolean } +export interface CustomerTitleSetMessage { + readonly type: 'CustomerTitleSet' + /** + * + */ + readonly id: string + /** + * + */ + readonly version: number + /** + * + */ + readonly createdAt: string + /** + * + */ + readonly lastModifiedAt: string + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly lastModifiedBy?: LastModifiedBy + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly createdBy?: CreatedBy + /** + * + */ + readonly sequenceNumber: number + /** + * + */ + readonly resource: Reference + /** + * + */ + readonly resourceVersion: number + /** + * + */ + readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers + /** + * + */ + readonly title?: string +} export interface DeliveryAddedMessage { readonly type: 'DeliveryAdded' /** @@ -1180,7 +1342,7 @@ export interface InventoryEntryDeletedMessage { /** * */ - readonly supplyChannel: ChannelReference + readonly supplyChannel?: ChannelReference } export interface InventoryEntryQuantitySetMessage { readonly type: 'InventoryEntryQuantitySet' @@ -1244,6 +1406,10 @@ export interface InventoryEntryQuantitySetMessage { * */ readonly newAvailableQuantity: number + /** + * + */ + readonly supplyChannel?: ChannelReference } export interface LineItemStateTransitionMessage { readonly type: 'LineItemStateTransition' @@ -2136,6 +2302,85 @@ export interface OrderLineItemDiscountSetMessage { */ readonly taxedPrice?: TaxedItemPrice } +export interface OrderLineItemRemovedMessage { + readonly type: 'OrderLineItemRemoved' + /** + * + */ + readonly id: string + /** + * + */ + readonly version: number + /** + * + */ + readonly createdAt: string + /** + * + */ + readonly lastModifiedAt: string + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly lastModifiedBy?: LastModifiedBy + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly createdBy?: CreatedBy + /** + * + */ + readonly sequenceNumber: number + /** + * + */ + readonly resource: Reference + /** + * + */ + readonly resourceVersion: number + /** + * + */ + readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers + /** + * + */ + readonly lineItemId: string + /** + * + */ + readonly removedQuantity: number + /** + * + */ + readonly newQuantity: number + /** + * + */ + readonly newState: ItemState[] + /** + * + */ + readonly newTotalPrice: TypedMoney + /** + * + */ + readonly newTaxedPrice?: TaxedItemPrice + /** + * + */ + readonly newPrice?: Price + /** + * + */ + readonly newShippingDetail?: ItemShippingDetails +} export interface OrderPaymentStateChangedMessage { readonly type: 'OrderPaymentStateChanged' /** @@ -2242,6 +2487,57 @@ export interface OrderReturnInfoAddedMessage { */ readonly returnInfo: ReturnInfo } +export interface OrderReturnInfoSetMessage { + readonly type: 'ReturnInfoSet' + /** + * + */ + readonly id: string + /** + * + */ + readonly version: number + /** + * + */ + readonly createdAt: string + /** + * + */ + readonly lastModifiedAt: string + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly lastModifiedBy?: LastModifiedBy + /** + * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * + * + */ + readonly createdBy?: CreatedBy + /** + * + */ + readonly sequenceNumber: number + /** + * + */ + readonly resource: Reference + /** + * + */ + readonly resourceVersion: number + /** + * + */ + readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers + /** + * + */ + readonly returnInfo?: ReturnInfo[] +} export interface OrderReturnShipmentStateChangedMessage { readonly type: 'OrderReturnShipmentStateChanged' /** @@ -4429,8 +4725,11 @@ export type MessagePayload = | CustomerDeletedMessagePayload | CustomerEmailChangedMessagePayload | CustomerEmailVerifiedMessagePayload + | CustomerFirstNameSetMessagePayload | CustomerGroupSetMessagePayload + | CustomerLastNameSetMessagePayload | CustomerPasswordUpdatedMessagePayload + | CustomerTitleSetMessagePayload | DeliveryAddedMessagePayload | DeliveryAddressSetMessagePayload | DeliveryItemsUpdatedMessagePayload @@ -4453,8 +4752,10 @@ export type MessagePayload = | OrderImportedMessagePayload | OrderLineItemAddedMessagePayload | OrderLineItemDiscountSetMessagePayload + | OrderLineItemRemovedMessagePayload | OrderPaymentStateChangedMessagePayload | OrderReturnInfoAddedMessagePayload + | OrderReturnInfoSetMessagePayload | OrderReturnShipmentStateChangedMessagePayload | OrderShipmentStateChangedMessagePayload | OrderShippingAddressSetMessagePayload @@ -4561,7 +4862,7 @@ export interface CustomerCompanyNameSetMessagePayload { /** * */ - readonly companyName: string + readonly companyName?: string } export interface CustomerCreatedMessagePayload { readonly type: 'CustomerCreated' @@ -4575,7 +4876,7 @@ export interface CustomerDateOfBirthSetMessagePayload { /** * */ - readonly dateOfBirth: string + readonly dateOfBirth?: string } export interface CustomerDeletedMessagePayload { readonly type: 'CustomerDeleted' @@ -4590,6 +4891,13 @@ export interface CustomerEmailChangedMessagePayload { export interface CustomerEmailVerifiedMessagePayload { readonly type: 'CustomerEmailVerified' } +export interface CustomerFirstNameSetMessagePayload { + readonly type: 'CustomerFirstNameSet' + /** + * + */ + readonly firstName?: string +} export interface CustomerGroupSetMessagePayload { readonly type: 'CustomerGroupSet' /** @@ -4597,7 +4905,14 @@ export interface CustomerGroupSetMessagePayload { * * */ - readonly customerGroup: CustomerGroupReference + readonly customerGroup?: CustomerGroupReference +} +export interface CustomerLastNameSetMessagePayload { + readonly type: 'CustomerLastNameSet' + /** + * + */ + readonly lastName?: string } export interface CustomerPasswordUpdatedMessagePayload { readonly type: 'CustomerPasswordUpdated' @@ -4607,6 +4922,13 @@ export interface CustomerPasswordUpdatedMessagePayload { */ readonly reset: boolean } +export interface CustomerTitleSetMessagePayload { + readonly type: 'CustomerTitleSet' + /** + * + */ + readonly title?: string +} export interface DeliveryAddedMessagePayload { readonly type: 'DeliveryAdded' /** @@ -4667,7 +4989,7 @@ export interface InventoryEntryDeletedMessagePayload { /** * */ - readonly supplyChannel: ChannelReference + readonly supplyChannel?: ChannelReference } export interface InventoryEntryQuantitySetMessagePayload { readonly type: 'InventoryEntryQuantitySet' @@ -4687,6 +5009,10 @@ export interface InventoryEntryQuantitySetMessagePayload { * */ readonly newAvailableQuantity: number + /** + * + */ + readonly supplyChannel?: ChannelReference } export interface LineItemStateTransitionMessagePayload { readonly type: 'LineItemStateTransition' @@ -4877,6 +5203,41 @@ export interface OrderLineItemDiscountSetMessagePayload { */ readonly taxedPrice?: TaxedItemPrice } +export interface OrderLineItemRemovedMessagePayload { + readonly type: 'OrderLineItemRemoved' + /** + * + */ + readonly lineItemId: string + /** + * + */ + readonly removedQuantity: number + /** + * + */ + readonly newQuantity: number + /** + * + */ + readonly newState: ItemState[] + /** + * + */ + readonly newTotalPrice: TypedMoney + /** + * + */ + readonly newTaxedPrice?: TaxedItemPrice + /** + * + */ + readonly newPrice?: Price + /** + * + */ + readonly newShippingDetail?: ItemShippingDetails +} export interface OrderPaymentStateChangedMessagePayload { readonly type: 'OrderPaymentStateChanged' /** @@ -4895,6 +5256,13 @@ export interface OrderReturnInfoAddedMessagePayload { */ readonly returnInfo: ReturnInfo } +export interface OrderReturnInfoSetMessagePayload { + readonly type: 'ReturnInfoSet' + /** + * + */ + readonly returnInfo?: ReturnInfo[] +} export interface OrderReturnShipmentStateChangedMessagePayload { readonly type: 'OrderReturnShipmentStateChanged' /** @@ -4967,6 +5335,10 @@ export interface OrderStateTransitionMessagePayload { * */ readonly state: StateReference + /** + * + */ + readonly oldState?: StateReference /** * */ diff --git a/packages/platform-sdk/src/generated/models/order-edit.ts b/packages/platform-sdk/src/generated/models/order-edit.ts index 4cc70c175..188134f6f 100644 --- a/packages/platform-sdk/src/generated/models/order-edit.ts +++ b/packages/platform-sdk/src/generated/models/order-edit.ts @@ -39,6 +39,7 @@ import { ParcelDraft, ParcelMeasurements, PaymentState, + ReturnInfoDraft, ReturnItemDraft, ReturnPaymentState, ReturnShipmentState, @@ -364,6 +365,8 @@ export interface StagedOrderAddCustomLineItemAction { */ readonly slug: string /** + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * * */ readonly taxCategory?: TaxCategoryResourceIdentifier @@ -803,6 +806,8 @@ export interface StagedOrderSetCustomShippingMethodAction { */ readonly shippingRate: ShippingRateDraft /** + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * * */ readonly taxCategory?: TaxCategoryResourceIdentifier @@ -832,7 +837,7 @@ export interface StagedOrderSetCustomerEmailAction { export interface StagedOrderSetCustomerGroupAction { readonly action: 'setCustomerGroup' /** - * [ResourceIdentifier](/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -1081,6 +1086,13 @@ export interface StagedOrderSetParcelTrackingDataAction { */ readonly trackingData?: TrackingData } +export interface StagedOrderSetReturnInfoAction { + readonly action: 'setReturnInfo' + /** + * + */ + readonly items?: ReturnInfoDraft[] +} export interface StagedOrderSetReturnPaymentStateAction { readonly action: 'setReturnPaymentState' /** @@ -1125,6 +1137,8 @@ export interface StagedOrderSetShippingAddressAndCustomShippingMethodAction { */ readonly shippingRate: ShippingRateDraft /** + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * * */ readonly taxCategory?: TaxCategoryResourceIdentifier diff --git a/packages/platform-sdk/src/generated/models/order.ts b/packages/platform-sdk/src/generated/models/order.ts index f8bfdfc3b..ec3df9afc 100644 --- a/packages/platform-sdk/src/generated/models/order.ts +++ b/packages/platform-sdk/src/generated/models/order.ts @@ -105,6 +105,7 @@ import { StagedOrderSetParcelItemsAction, StagedOrderSetParcelMeasurementsAction, StagedOrderSetParcelTrackingDataAction, + StagedOrderSetReturnInfoAction, StagedOrderSetReturnPaymentStateAction, StagedOrderSetReturnShipmentStateAction, StagedOrderSetShippingAddressAction, @@ -201,6 +202,7 @@ export type StagedOrderUpdateAction = | StagedOrderSetParcelItemsAction | StagedOrderSetParcelMeasurementsAction | StagedOrderSetParcelTrackingDataAction + | StagedOrderSetReturnInfoAction | StagedOrderSetReturnPaymentStateAction | StagedOrderSetReturnShipmentStateAction | StagedOrderSetShippingAddressAction @@ -300,7 +302,7 @@ export interface LineItemImportDraft { */ readonly state?: ItemState[] /** - * Optional connection to a particular supplier. + * Connection to a particular supplier. * By providing supply channel information, you can uniquely identify * inventory entries that should be reserved. * The provided channel should have the @@ -772,6 +774,7 @@ export type OrderUpdateAction = | OrderSetParcelItemsAction | OrderSetParcelMeasurementsAction | OrderSetParcelTrackingDataAction + | OrderSetReturnInfoAction | OrderSetReturnPaymentStateAction | OrderSetReturnShipmentStateAction | OrderSetShippingAddressAction @@ -899,6 +902,21 @@ export interface ReturnInfo { */ readonly returnDate?: string } +export interface ReturnInfoDraft { + /** + * + */ + readonly items: ReturnItemDraft[] + /** + * Identifies, which return tracking ID is connected to this particular return. + * + */ + readonly returnTrackingId?: string + /** + * + */ + readonly returnDate?: string +} export type ReturnItem = CustomLineItemReturnItem | LineItemReturnItem export interface CustomLineItemReturnItem { readonly type: 'CustomLineItemReturnItem' @@ -1512,6 +1530,13 @@ export interface OrderSetParcelTrackingDataAction { */ readonly trackingData?: TrackingData } +export interface OrderSetReturnInfoAction { + readonly action: 'setReturnInfo' + /** + * + */ + readonly items?: ReturnInfoDraft[] +} export interface OrderSetReturnPaymentStateAction { readonly action: 'setReturnPaymentState' /** diff --git a/packages/platform-sdk/src/generated/models/store.ts b/packages/platform-sdk/src/generated/models/store.ts index 537b93b5c..8700de49d 100644 --- a/packages/platform-sdk/src/generated/models/store.ts +++ b/packages/platform-sdk/src/generated/models/store.ts @@ -192,7 +192,7 @@ export interface StoreAddSupplyChannelAction { /** * */ - readonly supplyChannel: ChannelResourceIdentifier + readonly supplyChannel?: ChannelResourceIdentifier } export interface StoreRemoveDistributionChannelAction { readonly action: 'removeDistributionChannel' @@ -206,7 +206,7 @@ export interface StoreRemoveSupplyChannelAction { /** * */ - readonly supplyChannel: ChannelResourceIdentifier + readonly supplyChannel?: ChannelResourceIdentifier } export interface StoreSetCustomFieldAction { readonly action: 'setCustomField' diff --git a/packages/platform-sdk/src/generated/models/tax-category.ts b/packages/platform-sdk/src/generated/models/tax-category.ts index ee80aa65a..b7646316f 100644 --- a/packages/platform-sdk/src/generated/models/tax-category.ts +++ b/packages/platform-sdk/src/generated/models/tax-category.ts @@ -6,8 +6,13 @@ import { BaseResource, CreatedBy, LastModifiedBy } from './common' +/** + * It is used to calculate the [taxPortions](/../api/projects/carts#taxedprice) field in a Cart or Order. + */ export interface SubRate { /** + * Name of the SubRate. + * * */ readonly name: string @@ -18,125 +23,181 @@ export interface SubRate { } export interface TaxCategory extends BaseResource { /** - * The unique ID of the category. + * Unique ID of the TaxCategory. + * * */ readonly id: string /** - * The current version of the category. + * Current version of the TaxCategory. + * * */ readonly version: number /** + * Date and time (UTC) the TaxCategory was initially created. + * * */ readonly createdAt: string /** + * Date and time (UTC) the TaxCategory was last updated. + * * */ readonly lastModifiedAt: string /** - * Present on resources created after 2019-02-01 except for [events not tracked](/client-logging#events-tracked). + * Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked). * * */ readonly lastModifiedBy?: LastModifiedBy /** - * Present on resources created after 2019-02-01 except for [events not tracked](/client-logging#events-tracked). + * Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked). * * */ readonly createdBy?: CreatedBy /** + * Name of the TaxCategory. + * * */ readonly name: string /** + * Description of the TaxCategory. + * * */ readonly description?: string /** - * The tax rates have unique IDs in the rates list + * Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID assigned by the platform. + * * */ readonly rates: TaxRate[] /** - * User-specific unique identifier for the category. + * User-defined unique identifier for the TaxCategory. + * * */ readonly key?: string } export interface TaxCategoryDraft { /** + * Name of the TaxCategory. + * * */ readonly name: string /** + * Description of the TaxCategory. + * * */ readonly description?: string /** + * Tax rates and subrates of states and countries. + * * */ readonly rates?: TaxRateDraft[] /** + * User-defined unique identifier for the TaxCategory. + * * */ readonly key?: string } +/** + * [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [TaxCategory](ctp:api:type:TaxCategory). + * + */ export interface TaxCategoryPagedQueryResponse { /** + * Number of results requested in the query request. + * * */ readonly limit: number /** + * Offset supplied by the client or the server default. + * It is the number of elements skipped, not a page number. + * * */ - readonly count: number + readonly offset: number /** + * Actual number of results returned. + * * */ - readonly total?: number + readonly count: number /** + * Total number of results matching the query. + * This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency). + * This field is returned by default. + * For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`. + * When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/contract#queries). + * * */ - readonly offset: number + readonly total?: number /** + * [TaxCategories](ctp:api:type:TaxCategory) matching the query. + * * */ readonly results: TaxCategory[] } +/** + * [Reference](/../api/types#reference) to a [TaxCategory](ctp:api:type:TaxCategory). + * + */ export interface TaxCategoryReference { readonly typeId: 'tax-category' /** - * Unique ID of the referenced resource. + * Unique ID of the referenced [TaxCategory](ctp:api:type:TaxCategory). + * * */ readonly id: string /** + * Contains the representation of the expanded TaxCategory. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for TaxCategory. + * * */ readonly obj?: TaxCategory } +/** + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * + */ export interface TaxCategoryResourceIdentifier { readonly typeId: 'tax-category' /** - * Unique ID of the referenced resource. Either `id` or `key` is required. + * Unique ID of the referenced [TaxCategory](ctp:api:type:TaxCategory). Either `id` or `key` is required. + * * */ readonly id?: string /** - * Unique key of the referenced resource. Either `id` or `key` is required. + * Unique key of the referenced [TaxCategory](ctp:api:type:TaxCategory). Either `id` or `key` is required. + * * */ readonly key?: string } export interface TaxCategoryUpdate { /** + * Expected version of the TaxCategory on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned. + * * */ readonly version: number /** + * Update actions to be performed on the TaxCategory. + * * */ readonly actions: TaxCategoryUpdateAction[] @@ -150,75 +211,84 @@ export type TaxCategoryUpdateAction = | TaxCategorySetKeyAction export interface TaxRate { /** - * The ID is always set if the tax rate is part of a TaxCategory. - * The external tax rates in a - * Cart do not contain an `id`. + * Present if the TaxRate is part of a [TaxCategory](ctp:api:type:TaxCategory). + * Absent for external TaxRates in [LineItem](ctp:api:type:LineItem), [CustomLineItem](ctp:api:type:CustomLineItem), and [ShippingInfo](ctp:api:type:ShippingInfo). + * * */ readonly id?: string /** + * Name of the TaxRate. + * * */ readonly name: string /** - * Percentage in the range of [0..1]. - * The sum of the amounts of all `subRates`, if there are any. + * Tax rate. If subrates are used, the amount must be the sum of all subrates. + * * */ readonly amount: number /** + * If `true`, tax is included in [Prices](ctp:api:type:Price) and the `taxedPrice` is present on [LineItems](ctp:api:type:LineItem). In this case, the platform calculates the `totalNet` price based on the TaxRate. + * * */ readonly includedInPrice: boolean /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Country in which the tax rate is applied in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + * * */ readonly country: string /** - * The state in the country + * State within the country, such as Texas in the United States. + * * */ readonly state?: string /** - * For countries (e.g. - * the US) where the total tax is a combination of multiple taxes (e.g. - * state and local taxes). + * Used to calculate the [taxPortions](/../api/projects/carts#taxedprice) field in a Cart or Order. It is useful if the total tax of a country (such as the US) is a combination of multiple taxes (such as state and local taxes). + * * */ readonly subRates?: SubRate[] } export interface TaxRateDraft { /** + * Name of the TaxRate. * */ readonly name: string /** - * Percentage in the range of [0..1]. + * Tax rate. * Must be supplied if no `subRates` are specified. - * If `subRates` are specified - * then the `amount` can be omitted or it must be the sum of the amounts of all `subRates`. + * If `subRates` are specified, this field can be omitted or it must be the sum of amounts of all `subRates`. + * * */ readonly amount?: number /** + * Set to `true`, if tax should be included in [Prices](ctp:api:type:Price) and the `taxedPrice` should be present on [Line Items](ctp:api:type:LineItem). In this case, the platform calculates the `totalNet` price based on the TaxRate. + * * */ readonly includedInPrice: boolean /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Country in which the tax rate is applied in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + * * */ readonly country: string /** - * The state in the country + * State within the country, such as Texas in the United States. + * * */ readonly state?: string /** - * For countries (e.g. - * the US) where the total tax is a combination of multiple taxes (e.g. - * state and local taxes). + * Used to calculate the [taxPortions](/../api/projects/carts#taxedprice) field in a Cart or Order. It is useful if the total tax of a country (such as the US) is a combination of multiple taxes (such as state and local taxes). + * * */ readonly subRates?: SubRate[] @@ -226,6 +296,8 @@ export interface TaxRateDraft { export interface TaxCategoryAddTaxRateAction { readonly action: 'addTaxRate' /** + * Value to append to the `rates` array. + * * */ readonly taxRate: TaxRateDraft @@ -233,6 +305,8 @@ export interface TaxCategoryAddTaxRateAction { export interface TaxCategoryChangeNameAction { readonly action: 'changeName' /** + * New value to set. Must not be empty. + * * */ readonly name: string @@ -240,6 +314,8 @@ export interface TaxCategoryChangeNameAction { export interface TaxCategoryRemoveTaxRateAction { readonly action: 'removeTaxRate' /** + * ID of the TaxRate to remove. + * * */ readonly taxRateId: string @@ -247,10 +323,14 @@ export interface TaxCategoryRemoveTaxRateAction { export interface TaxCategoryReplaceTaxRateAction { readonly action: 'replaceTaxRate' /** + * ID of the TaxRate to replace. + * * */ readonly taxRateId: string /** + * New TaxRate to replace with. + * * */ readonly taxRate: TaxRateDraft @@ -258,6 +338,8 @@ export interface TaxCategoryReplaceTaxRateAction { export interface TaxCategorySetDescriptionAction { readonly action: 'setDescription' /** + * Value to set. If empty, any existing value will be removed. + * * */ readonly description?: string @@ -265,7 +347,8 @@ export interface TaxCategorySetDescriptionAction { export interface TaxCategorySetKeyAction { readonly action: 'setKey' /** - * If `key` is absent or `null`, it is removed if it exists. + * Value to set. If empty, any existing value will be removed. + * * */ readonly key?: string diff --git a/packages/platform-sdk/src/generated/models/type.ts b/packages/platform-sdk/src/generated/models/type.ts index f77f7273c..8ba91f900 100644 --- a/packages/platform-sdk/src/generated/models/type.ts +++ b/packages/platform-sdk/src/generated/models/type.ts @@ -318,7 +318,6 @@ export type TypeUpdateAction = | TypeAddLocalizedEnumValueAction | TypeChangeEnumValueLabelAction | TypeChangeEnumValueOrderAction - | TypeChangeFieldDefinitionLabelAction | TypeChangeFieldDefinitionOrderAction | TypeChangeInputHintAction | TypeChangeKeyAction @@ -379,17 +378,6 @@ export interface TypeChangeEnumValueOrderAction { */ readonly keys: string[] } -export interface TypeChangeFieldDefinitionLabelAction { - readonly action: 'changeFieldDefinitionLabel' - /** - * - */ - readonly fieldName: string - /** - * - */ - readonly label: LocalizedString -} export interface TypeChangeFieldDefinitionOrderAction { readonly action: 'changeFieldDefinitionOrder' /** diff --git a/packages/platform-sdk/src/generated/models/zone.ts b/packages/platform-sdk/src/generated/models/zone.ts index 0581ca794..e0d5182bb 100644 --- a/packages/platform-sdk/src/generated/models/zone.ts +++ b/packages/platform-sdk/src/generated/models/zone.ts @@ -45,13 +45,13 @@ export interface Zone extends BaseResource { */ readonly lastModifiedAt: string /** - * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked). * * */ readonly lastModifiedBy?: LastModifiedBy /** - * Present on resources created after 1 February 2019 except for [events not tracked](/client-logging#events-tracked). + * Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked). * * */ @@ -126,10 +126,10 @@ export interface ZonePagedQueryResponse { readonly count: number /** * Total number of results matching the query. - * This number is an estimation that is not [strongly consistent](/general-concepts#strong-consistency). + * This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency). * This field is returned by default. * For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`. - * When the results are filtered with a [Query Predicate](/predicates/query), `total` is subject to a [limit](/contract#queries). + * When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries). * * */ @@ -154,14 +154,14 @@ export interface ZoneReference { */ readonly id: string /** - * Contains the representation of the expanded Zone. Only present in responses to requests with [Reference Expansion](/general-concepts#reference-expansion) for Zones. + * Contains the representation of the expanded Zone. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for Zones. * * */ readonly obj?: Zone } /** - * [ResourceIdentifier](/types#resourceidentifier) to a [Zone](ctp:api:type:Zone). + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Zone](ctp:api:type:Zone). * */ export interface ZoneResourceIdentifier {