diff --git a/.changeset/calm-crabs-unite.md b/.changeset/calm-crabs-unite.md new file mode 100644 index 000000000..7a955e7fd --- /dev/null +++ b/.changeset/calm-crabs-unite.md @@ -0,0 +1,10 @@ +--- +'@commercetools/history-sdk': patch +'@commercetools/importapi-sdk': patch +'@commercetools/ml-sdk': patch +'@commercetools/platform-sdk': minor +--- + +Update generated SDKs + +- add support for Standalone Prices diff --git a/packages/history-sdk/src/generated/models/change-history.ts b/packages/history-sdk/src/generated/models/change-history.ts index 938f94a79..7daa634e1 100644 --- a/packages/history-sdk/src/generated/models/change-history.ts +++ b/packages/history-sdk/src/generated/models/change-history.ts @@ -101,7 +101,7 @@ export interface RecordPagedQueryResponse { */ readonly total: number /** - * The number of elements skipped, not a page number. Supplied by the client or the server default. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ diff --git a/packages/history-sdk/src/generated/models/change.ts b/packages/history-sdk/src/generated/models/change.ts index a7ef767ec..ede7afc4d 100644 --- a/packages/history-sdk/src/generated/models/change.ts +++ b/packages/history-sdk/src/generated/models/change.ts @@ -2639,12 +2639,14 @@ export interface SetCountryChange { */ readonly change: string /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * * */ readonly previousValue: string /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * * */ readonly nextValue: string diff --git a/packages/history-sdk/src/generated/models/common.ts b/packages/history-sdk/src/generated/models/common.ts index de521649c..f261bb0fd 100644 --- a/packages/history-sdk/src/generated/models/common.ts +++ b/packages/history-sdk/src/generated/models/common.ts @@ -9,6 +9,7 @@ export interface LocalizedString { } export interface Address { /** + * Unique ID of the Address. * */ readonly id: string @@ -61,7 +62,8 @@ export interface Address { */ readonly state: string /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * * */ readonly country: string @@ -494,7 +496,8 @@ export interface LineItem { */ export interface Location { /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * * */ readonly country: string @@ -505,7 +508,7 @@ export interface Location { } export interface Money { /** - * The currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * Currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * * */ @@ -879,7 +882,8 @@ export interface 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). + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * * */ readonly country: string diff --git a/packages/importapi-sdk/src/generated/models/importcontainers.ts b/packages/importapi-sdk/src/generated/models/importcontainers.ts index 0e75c3b5e..d6fd6a84d 100644 --- a/packages/importapi-sdk/src/generated/models/importcontainers.ts +++ b/packages/importapi-sdk/src/generated/models/importcontainers.ts @@ -92,8 +92,7 @@ export interface ImportContainerPagedResponse { */ readonly limit: number /** - * The number of elements skipped, not a page number. - * Supplied by the client or the server default. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ diff --git a/packages/importapi-sdk/src/generated/models/importoperations.ts b/packages/importapi-sdk/src/generated/models/importoperations.ts index 7768e0ef1..2384ec1b4 100644 --- a/packages/importapi-sdk/src/generated/models/importoperations.ts +++ b/packages/importapi-sdk/src/generated/models/importoperations.ts @@ -82,8 +82,7 @@ export interface ImportOperationPagedResponse { */ readonly limit: number /** - * The number of elements skipped, not a page number. - * Supplied by the client or the server default. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ diff --git a/packages/importapi-sdk/src/generated/models/importrequests.ts b/packages/importapi-sdk/src/generated/models/importrequests.ts index 42d072b4f..8c5524750 100644 --- a/packages/importapi-sdk/src/generated/models/importrequests.ts +++ b/packages/importapi-sdk/src/generated/models/importrequests.ts @@ -107,7 +107,7 @@ export interface ProductVariantImportRequest { readonly resources: ProductVariantImport[] } /** - * The request body to [import Prices](#import-prices). Contains data for [Prices](/../api/projects/products#price) to be created or updated in a commercetools Project. + * The request body to [import Prices](#import-prices). Contains data for [EmbeddedPrices](/../api/projects/products#embeddedprice) to be created or updated in a commercetools Project. * */ export interface PriceImportRequest { diff --git a/packages/importapi-sdk/src/generated/models/importsinks.ts b/packages/importapi-sdk/src/generated/models/importsinks.ts index b5105faab..c01301114 100644 --- a/packages/importapi-sdk/src/generated/models/importsinks.ts +++ b/packages/importapi-sdk/src/generated/models/importsinks.ts @@ -91,8 +91,7 @@ export interface ImportSinkPagedResponse { */ readonly limit: number /** - * The number of elements skipped, not a page number. - * Supplied by the client or the server default. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ diff --git a/packages/importapi-sdk/src/generated/models/prices.ts b/packages/importapi-sdk/src/generated/models/prices.ts index d358ef3e5..64beb0718 100644 --- a/packages/importapi-sdk/src/generated/models/prices.ts +++ b/packages/importapi-sdk/src/generated/models/prices.ts @@ -59,7 +59,7 @@ export interface TaxRate { readonly subRates?: SubRate[] } /** - * The data representation for a Price to be imported that is persisted as a [Price](/../api/projects/products#price) in the Project. + * The data representation for a price to be imported that is persisted as an [EmbeddedPrice](/../api/projects/products#embeddedprice) in the Project. * */ export interface PriceImport extends ImportResource { @@ -88,14 +88,14 @@ export interface PriceImport extends ImportResource { */ readonly validUntil?: string /** - * The Reference to the [CustomerGroup](/../api/projects/customerGroups#customergroup) with which the Price is associated. + * The Reference to the [CustomerGroup](/../api/projects/customerGroups#customergroup) with which the [EmbeddedPrice](/../api/projects/products#embeddedprice) is associated. * If referenced CustomerGroup does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary CustomerGroup is created. * * */ readonly customerGroup?: CustomerGroupKeyReference /** - * The Reference to the [Channel](/../api/projects/channels#channel) with which the Price is associated. + * The Reference to the [Channel](/../api/projects/channels#channel) with which the [EmbeddedPrice](/../api/projects/products#embeddedprice) is associated. * If referenced Channel does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Channel is created. * * @@ -107,7 +107,7 @@ export interface PriceImport extends ImportResource { */ readonly discounted?: DiscountedPrice /** - * Only the Price updates will be published to `staged` and `current` projection. + * Only the [EmbeddedPrice](/../api/projects/products#embeddedprice) updates will be published to `staged` and `current` projection. * * */ @@ -123,16 +123,16 @@ export interface PriceImport extends ImportResource { */ readonly custom?: Custom /** - * The ProductVariant in which this Price is contained. - * The Reference to the [ProductVariant](/../api/projects/products#productvariant) with which the Price is associated. + * The ProductVariant in which this [EmbeddedPrice](/../api/projects/products#embeddedprice) is contained. + * The Reference to the [ProductVariant](/../api/projects/products#productvariant) with which the [EmbeddedPrice](/../api/projects/products#embeddedprice) is associated. * If referenced ProductVariant does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary ProductVariant is created. * * */ readonly productVariant: ProductVariantKeyReference /** - * The Product in which the Product Variant containing this Price is contained. Maps to `ProductVariant.product`. - * The Reference to the [Product](/../api/projects/products#product) with which the Price is associated. + * The Product in which the Product Variant containing this [EmbeddedPrice](/../api/projects/products#embeddedprice) is contained. Maps to `ProductVariant.product`. + * The Reference to the [Product](/../api/projects/products#product) with which the [EmbeddedPrice](/../api/projects/products#embeddedprice) is associated. * If referenced Product does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Product is created. * * diff --git a/packages/ml-sdk/src/generated/models/category-recommendations.ts b/packages/ml-sdk/src/generated/models/category-recommendations.ts index 81e729595..ec3ee1b9b 100644 --- a/packages/ml-sdk/src/generated/models/category-recommendations.ts +++ b/packages/ml-sdk/src/generated/models/category-recommendations.ts @@ -50,6 +50,8 @@ export interface ProjectCategoryRecommendationPagedQueryResponse { */ readonly total: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number diff --git a/packages/ml-sdk/src/generated/models/general-category-recommendations.ts b/packages/ml-sdk/src/generated/models/general-category-recommendations.ts index 0feadd630..f18840f6c 100644 --- a/packages/ml-sdk/src/generated/models/general-category-recommendations.ts +++ b/packages/ml-sdk/src/generated/models/general-category-recommendations.ts @@ -26,6 +26,8 @@ export interface GeneralCategoryRecommendationPagedQueryResponse { */ readonly total: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number diff --git a/packages/ml-sdk/src/generated/models/image-search.ts b/packages/ml-sdk/src/generated/models/image-search.ts index 241f92579..6571ceff1 100644 --- a/packages/ml-sdk/src/generated/models/image-search.ts +++ b/packages/ml-sdk/src/generated/models/image-search.ts @@ -17,7 +17,7 @@ export interface ImageSearchResponse { */ readonly count: number /** - * The offset into the results matching the query. An offset of 0 is the default value indicating that no results should be skipped. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ diff --git a/packages/ml-sdk/src/generated/models/missing-data.ts b/packages/ml-sdk/src/generated/models/missing-data.ts index f3b68618f..5c89f0864 100644 --- a/packages/ml-sdk/src/generated/models/missing-data.ts +++ b/packages/ml-sdk/src/generated/models/missing-data.ts @@ -106,10 +106,14 @@ export interface MissingAttributesMeta { } export interface MissingAttributesSearchRequest { /** + * Number of [results requested](/../api/general-concepts#limit). + * * */ readonly limit?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset?: number @@ -182,6 +186,8 @@ export interface MissingAttributesPagedQueryResult { */ readonly total: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -282,10 +288,14 @@ export interface MissingImagesMeta { } export interface MissingImagesSearchRequest { /** + * Number of [results requested](/../api/general-concepts#limit). + * * */ readonly limit?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset?: number @@ -335,6 +345,8 @@ export interface MissingImagesPagedQueryResult { */ readonly total: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -424,10 +436,14 @@ export interface MissingPricesMeta { } export interface MissingPricesSearchRequest { /** + * Number of [results requested](/../api/general-concepts#limit). + * * */ readonly limit?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset?: number @@ -487,6 +503,8 @@ export interface MissingPricesPagedQueryResult { */ readonly total: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number diff --git a/packages/ml-sdk/src/generated/models/similar-products.ts b/packages/ml-sdk/src/generated/models/similar-products.ts index 083668f57..c2f81b8be 100644 --- a/packages/ml-sdk/src/generated/models/similar-products.ts +++ b/packages/ml-sdk/src/generated/models/similar-products.ts @@ -78,10 +78,14 @@ export interface SimilarityMeasures { } export interface SimilarProductSearchRequest { /** + * Number of [results requested](/../api/general-concepts#limit). + * * */ readonly limit?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset?: number @@ -188,6 +192,8 @@ export interface SimilarProductsPagedQueryResult { */ readonly total: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number diff --git a/packages/platform-sdk/src/generated/client/by-project-key-request-builder.ts b/packages/platform-sdk/src/generated/client/by-project-key-request-builder.ts index ddc41701e..ab004129c 100644 --- a/packages/platform-sdk/src/generated/client/by-project-key-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/by-project-key-request-builder.ts @@ -32,6 +32,7 @@ import { ByProjectKeyProductsRequestBuilder } from './products/by-project-key-pr import { ByProjectKeyReviewsRequestBuilder } from './reviews/by-project-key-reviews-request-builder' import { ByProjectKeyShippingMethodsRequestBuilder } from './shipping-methods/by-project-key-shipping-methods-request-builder' import { ByProjectKeyShoppingListsRequestBuilder } from './shopping-lists/by-project-key-shopping-lists-request-builder' +import { ByProjectKeyStandalonePricesRequestBuilder } from './standalone-prices/by-project-key-standalone-prices-request-builder' import { ByProjectKeyStatesRequestBuilder } from './states/by-project-key-states-request-builder' import { ByProjectKeyStoresRequestBuilder } from './stores/by-project-key-stores-request-builder' import { ByProjectKeySubscriptionsRequestBuilder } from './subscriptions/by-project-key-subscriptions-request-builder' @@ -136,7 +137,7 @@ export class ByProjectKeyRequestBuilder { }) } /** - * Discount codes can be added to a discount-code to enable certain discount-code discounts. + * Discount Codes can be added to a discount-code to enable certain discount-code discounts. */ public discountCodes(): ByProjectKeyDiscountCodesRequestBuilder { return new ByProjectKeyDiscountCodesRequestBuilder({ @@ -447,6 +448,18 @@ export class ByProjectKeyRequestBuilder { baseUri: this.args.baseUri, }) } + /** + * A standalone price assigns a price to a product variant for a given scope. The platform will use the standalone prices associated with a Product if its field [`priceMode`](/projects/products#pricemode) is set to `Standalone` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum). + */ + public standalonePrices(): ByProjectKeyStandalonePricesRequestBuilder { + return new ByProjectKeyStandalonePricesRequestBuilder({ + pathArgs: { + ...this.args.pathArgs, + }, + executeRequest: this.args.executeRequest, + baseUri: this.args.baseUri, + }) + } public get(methodArgs?: { headers?: { diff --git a/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-by-container-by-key-request-builder.ts b/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-by-container-by-key-request-builder.ts index 7934c4828..75a580d51 100644 --- a/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-by-container-by-key-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-by-container-by-key-request-builder.ts @@ -19,9 +19,6 @@ export class ByProjectKeyCustomObjectsByContainerByKeyRequestBuilder { baseUri?: string } ) {} - /** - * Get CustomObject by container and key - */ public get(methodArgs?: { queryArgs?: { expand?: string | string[] @@ -45,14 +42,11 @@ export class ByProjectKeyCustomObjectsByContainerByKeyRequestBuilder { this.args.executeRequest ) } - /** - * Delete CustomObject by container and key - */ public delete(methodArgs?: { queryArgs?: { version?: number - dataErasure?: boolean expand?: string | string[] + dataErasure?: boolean [key: string]: QueryParam } headers?: { diff --git a/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-by-container-request-builder.ts b/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-by-container-request-builder.ts index 8253c5d48..484b703e5 100644 --- a/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-by-container-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-by-container-request-builder.ts @@ -20,8 +20,12 @@ export class ByProjectKeyCustomObjectsByContainerRequestBuilder { ) {} public get(methodArgs?: { queryArgs?: { + sort?: string | string[] where?: string | string[] expand?: string | string[] + limit?: number + offset?: number + withTotal?: boolean [key: string]: QueryParam } headers?: { diff --git a/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-request-builder.ts b/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-request-builder.ts index 29f3b664b..ab5a7ba67 100644 --- a/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/custom-objects/by-project-key-custom-objects-request-builder.ts @@ -50,9 +50,7 @@ export class ByProjectKeyCustomObjectsRequestBuilder { } /** - * The query endpoint allows to retrieve custom objects in a specific container or all custom objects. - * For performance reasons, it is highly advisable to query only for custom objects in a container by using - * the container field in the where predicate. + * For performance reasons, it is highly advisable to query for Custom Objects in a container by using the `container` field in the `where` predicate. * */ public get(methodArgs?: { @@ -84,13 +82,10 @@ export class ByProjectKeyCustomObjectsRequestBuilder { ) } /** - * Creates a new custom object or updates an existing custom object. - * If an object with the given container/key exists, - * the object will be replaced with the new value and the version is incremented. - * If the request contains a version and an object with the given container/key exists then the version - * must match the version of the existing object. Concurrent updates for the same custom object still can result - * in a Conflict (409) even if the version is not provided. - * Fields with null values will not be saved. + * If an object with the given container/key exists, the object will be replaced with the new value and the version is incremented. + * If the request contains a version and an object with the given container/key, then the version must match the version of the existing object. Concurrent updates for the same Custom Object can result in a [409 Conflict](/../api/errors#409-conflict) even if the version is not provided. + * + * Fields with `null` values will **not be saved**. * */ public post(methodArgs: { diff --git a/packages/platform-sdk/src/generated/client/discount-codes/by-project-key-discount-codes-by-id-request-builder.ts b/packages/platform-sdk/src/generated/client/discount-codes/by-project-key-discount-codes-by-id-request-builder.ts index 0b5cdf031..9b14d0fc5 100644 --- a/packages/platform-sdk/src/generated/client/discount-codes/by-project-key-discount-codes-by-id-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/discount-codes/by-project-key-discount-codes-by-id-request-builder.ts @@ -18,6 +18,9 @@ export class ByProjectKeyDiscountCodesByIDRequestBuilder { baseUri?: string } ) {} + /** + * Deprecated scope: `view_orders:{projectKey}` + */ public get(methodArgs?: { queryArgs?: { expand?: string | string[] @@ -41,6 +44,9 @@ export class ByProjectKeyDiscountCodesByIDRequestBuilder { this.args.executeRequest ) } + /** + * Deprecated scope: `manage_orders:{projectKey}` + */ public post(methodArgs: { queryArgs?: { expand?: string | string[] @@ -67,6 +73,9 @@ export class ByProjectKeyDiscountCodesByIDRequestBuilder { this.args.executeRequest ) } + /** + * Deprecated scope: `manage_orders:{projectKey}` + */ public delete(methodArgs: { queryArgs: { dataErasure?: boolean diff --git a/packages/platform-sdk/src/generated/client/discount-codes/by-project-key-discount-codes-request-builder.ts b/packages/platform-sdk/src/generated/client/discount-codes/by-project-key-discount-codes-request-builder.ts index 95221d51e..eea8685e8 100644 --- a/packages/platform-sdk/src/generated/client/discount-codes/by-project-key-discount-codes-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/discount-codes/by-project-key-discount-codes-request-builder.ts @@ -35,6 +35,9 @@ export class ByProjectKeyDiscountCodesRequestBuilder { }) } + /** + * Deprecated scope: `view_orders:{projectKey}` + */ public get(methodArgs?: { queryArgs?: { expand?: string | string[] @@ -63,6 +66,9 @@ export class ByProjectKeyDiscountCodesRequestBuilder { this.args.executeRequest ) } + /** + * Deprecated scope: `manage_orders:{projectKey}` + */ public post(methodArgs: { queryArgs?: { expand?: string | string[] diff --git a/packages/platform-sdk/src/generated/client/login/by-project-key-in-store-key-by-store-key-me-login-request-builder.ts b/packages/platform-sdk/src/generated/client/login/by-project-key-in-store-key-by-store-key-me-login-request-builder.ts index de9db515b..cd3e5044c 100644 --- a/packages/platform-sdk/src/generated/client/login/by-project-key-in-store-key-by-store-key-me-login-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/login/by-project-key-in-store-key-by-store-key-me-login-request-builder.ts @@ -3,7 +3,7 @@ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. */ -import { CustomerSignin, CustomerSignInResult } from '../../models/customer' +import { CustomerSignInResult, MyCustomerSignin } from '../../models/customer' import { executeRequest } from '../../shared/utils/common-types' import { ApiRequest } from '../../shared/utils/requests-utils' @@ -19,7 +19,7 @@ export class ByProjectKeyInStoreKeyByStoreKeyMeLoginRequestBuilder { } ) {} public post(methodArgs: { - body: CustomerSignin + body: MyCustomerSignin headers?: { [key: string]: string | string[] } diff --git a/packages/platform-sdk/src/generated/client/login/by-project-key-me-login-request-builder.ts b/packages/platform-sdk/src/generated/client/login/by-project-key-me-login-request-builder.ts index 6d2e80766..9c4264f7b 100644 --- a/packages/platform-sdk/src/generated/client/login/by-project-key-me-login-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/login/by-project-key-me-login-request-builder.ts @@ -3,7 +3,7 @@ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. */ -import { CustomerSignin, CustomerSignInResult } from '../../models/customer' +import { CustomerSignInResult, MyCustomerSignin } from '../../models/customer' import { executeRequest } from '../../shared/utils/common-types' import { ApiRequest } from '../../shared/utils/requests-utils' @@ -18,7 +18,7 @@ export class ByProjectKeyMeLoginRequestBuilder { } ) {} public post(methodArgs: { - body: CustomerSignin + body: MyCustomerSignin headers?: { [key: string]: string | string[] } diff --git a/packages/platform-sdk/src/generated/client/matching/by-project-key-product-discounts-matching-request-builder.ts b/packages/platform-sdk/src/generated/client/matching/by-project-key-product-discounts-matching-request-builder.ts index e2774bf2b..8c248e3a7 100644 --- a/packages/platform-sdk/src/generated/client/matching/by-project-key-product-discounts-matching-request-builder.ts +++ b/packages/platform-sdk/src/generated/client/matching/by-project-key-product-discounts-matching-request-builder.ts @@ -20,6 +20,11 @@ export class ByProjectKeyProductDiscountsMatchingRequestBuilder { baseUri?: string } ) {} + /** + * This endpoint can be used to simulate which Product Discounts would be applied if a specified Product Variant had a specified Price. + * Given Product and Product Variant IDs and a Price, this endpoint will return the [ProductDiscount](ctp:api:type:ProductDiscount) that would have been applied to that Price. + * + */ public post(methodArgs: { body: ProductDiscountMatchQuery headers?: { diff --git a/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-by-id-request-builder.ts b/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-by-id-request-builder.ts new file mode 100644 index 000000000..fc0044524 --- /dev/null +++ b/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-by-id-request-builder.ts @@ -0,0 +1,97 @@ +/** + * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT. + * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. + * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. + */ +import { + StandalonePrice, + StandalonePriceUpdate, +} from '../../models/standalone-price' +import { executeRequest, QueryParam } from '../../shared/utils/common-types' +import { ApiRequest } from '../../shared/utils/requests-utils' + +export class ByProjectKeyStandalonePricesByIDRequestBuilder { + constructor( + protected readonly args: { + pathArgs: { + projectKey: string + ID: string + } + executeRequest: executeRequest + baseUri?: string + } + ) {} + public get(methodArgs?: { + queryArgs?: { + expand?: string | string[] + [key: string]: QueryParam + } + headers?: { + [key: string]: string | string[] + } + }): ApiRequest { + return new ApiRequest( + { + baseUri: this.args.baseUri, + method: 'GET', + uriTemplate: '/{projectKey}/standalone-prices/{ID}', + pathVariables: this.args.pathArgs, + headers: { + ...methodArgs?.headers, + }, + queryParams: methodArgs?.queryArgs, + }, + this.args.executeRequest + ) + } + public post(methodArgs: { + queryArgs?: { + expand?: string | string[] + [key: string]: QueryParam + } + body: StandalonePriceUpdate + headers?: { + [key: string]: string | string[] + } + }): ApiRequest { + return new ApiRequest( + { + baseUri: this.args.baseUri, + method: 'POST', + uriTemplate: '/{projectKey}/standalone-prices/{ID}', + pathVariables: this.args.pathArgs, + headers: { + 'Content-Type': 'application/json', + ...methodArgs?.headers, + }, + queryParams: methodArgs?.queryArgs, + body: methodArgs?.body, + }, + this.args.executeRequest + ) + } + public delete(methodArgs: { + queryArgs: { + version: number + expand?: string | string[] + [key: string]: QueryParam + } + headers?: { + [key: string]: string | string[] + } + }): ApiRequest { + return new ApiRequest( + { + baseUri: this.args.baseUri, + method: 'DELETE', + uriTemplate: '/{projectKey}/standalone-prices/{ID}', + pathVariables: this.args.pathArgs, + headers: { + ...methodArgs?.headers, + }, + queryParams: methodArgs?.queryArgs, + }, + this.args.executeRequest + ) + } +} diff --git a/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-key-by-key-request-builder.ts b/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-key-by-key-request-builder.ts new file mode 100644 index 000000000..9fd22621e --- /dev/null +++ b/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-key-by-key-request-builder.ts @@ -0,0 +1,97 @@ +/** + * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT. + * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. + * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. + */ +import { + StandalonePrice, + StandalonePriceUpdate, +} from '../../models/standalone-price' +import { executeRequest, QueryParam } from '../../shared/utils/common-types' +import { ApiRequest } from '../../shared/utils/requests-utils' + +export class ByProjectKeyStandalonePricesKeyByKeyRequestBuilder { + constructor( + protected readonly args: { + pathArgs: { + projectKey: string + key: string + } + executeRequest: executeRequest + baseUri?: string + } + ) {} + public get(methodArgs?: { + queryArgs?: { + expand?: string | string[] + [key: string]: QueryParam + } + headers?: { + [key: string]: string | string[] + } + }): ApiRequest { + return new ApiRequest( + { + baseUri: this.args.baseUri, + method: 'GET', + uriTemplate: '/{projectKey}/standalone-prices/key={key}', + pathVariables: this.args.pathArgs, + headers: { + ...methodArgs?.headers, + }, + queryParams: methodArgs?.queryArgs, + }, + this.args.executeRequest + ) + } + public post(methodArgs: { + queryArgs?: { + expand?: string | string[] + [key: string]: QueryParam + } + body: StandalonePriceUpdate + headers?: { + [key: string]: string | string[] + } + }): ApiRequest { + return new ApiRequest( + { + baseUri: this.args.baseUri, + method: 'POST', + uriTemplate: '/{projectKey}/standalone-prices/key={key}', + pathVariables: this.args.pathArgs, + headers: { + 'Content-Type': 'application/json', + ...methodArgs?.headers, + }, + queryParams: methodArgs?.queryArgs, + body: methodArgs?.body, + }, + this.args.executeRequest + ) + } + public delete(methodArgs: { + queryArgs: { + version: number + expand?: string | string[] + [key: string]: QueryParam + } + headers?: { + [key: string]: string | string[] + } + }): ApiRequest { + return new ApiRequest( + { + baseUri: this.args.baseUri, + method: 'DELETE', + uriTemplate: '/{projectKey}/standalone-prices/key={key}', + pathVariables: this.args.pathArgs, + headers: { + ...methodArgs?.headers, + }, + queryParams: methodArgs?.queryArgs, + }, + this.args.executeRequest + ) + } +} diff --git a/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-request-builder.ts b/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-request-builder.ts new file mode 100644 index 000000000..4a9c9e15e --- /dev/null +++ b/packages/platform-sdk/src/generated/client/standalone-prices/by-project-key-standalone-prices-request-builder.ts @@ -0,0 +1,105 @@ +/** + * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT. + * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. + * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. + */ +import { + StandalonePrice, + StandalonePriceDraft, + StandalonePricePagedQueryResponse, +} from '../../models/standalone-price' +import { executeRequest, QueryParam } from '../../shared/utils/common-types' +import { ApiRequest } from '../../shared/utils/requests-utils' +import { ByProjectKeyStandalonePricesByIDRequestBuilder } from './by-project-key-standalone-prices-by-id-request-builder' +import { ByProjectKeyStandalonePricesKeyByKeyRequestBuilder } from './by-project-key-standalone-prices-key-by-key-request-builder' + +export class ByProjectKeyStandalonePricesRequestBuilder { + constructor( + protected readonly args: { + pathArgs: { + projectKey: string + } + executeRequest: executeRequest + baseUri?: string + } + ) {} + public withKey(childPathArgs: { + key: string + }): ByProjectKeyStandalonePricesKeyByKeyRequestBuilder { + return new ByProjectKeyStandalonePricesKeyByKeyRequestBuilder({ + pathArgs: { + ...this.args.pathArgs, + ...childPathArgs, + }, + executeRequest: this.args.executeRequest, + baseUri: this.args.baseUri, + }) + } + public withId(childPathArgs: { + ID: string + }): ByProjectKeyStandalonePricesByIDRequestBuilder { + return new ByProjectKeyStandalonePricesByIDRequestBuilder({ + pathArgs: { + ...this.args.pathArgs, + ...childPathArgs, + }, + executeRequest: this.args.executeRequest, + baseUri: this.args.baseUri, + }) + } + + public get(methodArgs?: { + queryArgs?: { + expand?: string | string[] + sort?: string | string[] + limit?: number + offset?: number + withTotal?: boolean + where?: string | string[] + [key: string]: QueryParam + } + headers?: { + [key: string]: string | string[] + } + }): ApiRequest { + return new ApiRequest( + { + baseUri: this.args.baseUri, + method: 'GET', + uriTemplate: '/{projectKey}/standalone-prices', + pathVariables: this.args.pathArgs, + headers: { + ...methodArgs?.headers, + }, + queryParams: methodArgs?.queryArgs, + }, + this.args.executeRequest + ) + } + public post(methodArgs: { + queryArgs?: { + expand?: string | string[] + [key: string]: QueryParam + } + body: StandalonePriceDraft + headers?: { + [key: string]: string | string[] + } + }): ApiRequest { + return new ApiRequest( + { + baseUri: this.args.baseUri, + method: 'POST', + uriTemplate: '/{projectKey}/standalone-prices', + pathVariables: this.args.pathArgs, + headers: { + 'Content-Type': 'application/json', + ...methodArgs?.headers, + }, + queryParams: methodArgs?.queryArgs, + body: methodArgs?.body, + }, + this.args.executeRequest + ) + } +} diff --git a/packages/platform-sdk/src/generated/index.ts b/packages/platform-sdk/src/generated/index.ts index a60a2cc63..1bf0b749d 100644 --- a/packages/platform-sdk/src/generated/index.ts +++ b/packages/platform-sdk/src/generated/index.ts @@ -36,6 +36,7 @@ export * from './models/review' export * from './models/scalar-types' export * from './models/shipping-method' export * from './models/shopping-list' +export * from './models/standalone-price' export * from './models/state' export * from './models/store' export * from './models/subscription' diff --git a/packages/platform-sdk/src/generated/models/api-client.ts b/packages/platform-sdk/src/generated/models/api-client.ts index 175fda974..e59d32278 100644 --- a/packages/platform-sdk/src/generated/models/api-client.ts +++ b/packages/platform-sdk/src/generated/models/api-client.ts @@ -6,13 +6,13 @@ export interface ApiClient { /** - * Platform-generated unique identifier of the API Client. + * Platform-generated unique identifier of the APIClient. * This is the OAuth2 `client_id` that can be used to [obtain an access token](/../api/authorization#requesting-an-access-token-using-commercetools-oauth-20-server). * */ readonly id: string /** - * Name of the API Client. + * Name of the APIClient. * */ readonly name: string @@ -22,13 +22,13 @@ export interface ApiClient { */ readonly scope: string /** - * Only shown once in the response of creating the API Client. + * Only shown once in the response of creating the APIClient. * This is the OAuth2 `client_secret` that can be used to [obtain an access token](/../api/authorization#requesting-an-access-token-using-commercetools-oauth-20-server). * */ readonly secret?: string /** - * Date of the last day this API Client was used to [obtain an access token](/../api/authorization#requesting-an-access-token-using-commercetools-oauth-20-server). + * Date of the last day this APIClient was used to [obtain an access token](/../api/authorization#requesting-an-access-token-using-commercetools-oauth-20-server). * */ readonly lastUsedAt?: string @@ -38,18 +38,18 @@ export interface ApiClient { */ readonly deleteAt?: string /** - * Date and time (UTC) the API Client was initially created at. + * Date and time (UTC) the APIClient was initially created at. * */ readonly createdAt?: string /** - * Expiration time in seconds for each access token obtained by the API Client. Only present when set with the [APIClientDraft](ctp:api:type:ApiClientDraft). If not present the default value applies. + * Expiration time in seconds for each access token obtained by the APIClient. Only present when set with the [APIClientDraft](ctp:api:type:ApiClientDraft). If not present the default value applies. * * */ readonly accessTokenValiditySeconds?: number /** - * Inactivity expiration time in seconds for each refresh token obtained by the API Client. Only present when set with the [APIClientDraft](ctp:api:type:ApiClientDraft). If not present the default value applies. + * Inactivity expiration time in seconds for each refresh token obtained by the APIClient. Only present when set with the [APIClientDraft](ctp:api:type:ApiClientDraft). If not present the default value applies. * * */ @@ -57,7 +57,7 @@ export interface ApiClient { } export interface ApiClientDraft { /** - * Name of the API Client. + * Name of the APIClient. * */ readonly name: string @@ -72,13 +72,13 @@ export interface ApiClientDraft { */ readonly deleteDaysAfterCreation?: number /** - * Expiration time in seconds for each access token obtained by the API Client. If not set the default value applies. + * Expiration time in seconds for each access token obtained by the APIClient. If not set the default value applies. * * */ readonly accessTokenValiditySeconds?: number /** - * Inactivity expiration time in seconds for each refresh token obtained by the API Client. The expiration time for refresh tokens is restarted each time the token is used. If not set the default value applies. + * Inactivity expiration time in seconds for each refresh token obtained by the APIClient. The expiration time for refresh tokens is restarted each time the token is used. If not set the default value applies. * * */ @@ -96,8 +96,7 @@ export interface ApiClientPagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -119,7 +118,7 @@ export interface ApiClientPagedQueryResponse { */ readonly total?: number /** - * API Clients matching the query. + * APIClients matching the query. * */ readonly results: ApiClient[] diff --git a/packages/platform-sdk/src/generated/models/cart-discount.ts b/packages/platform-sdk/src/generated/models/cart-discount.ts index 902a3c1f1..f376cc014 100644 --- a/packages/platform-sdk/src/generated/models/cart-discount.ts +++ b/packages/platform-sdk/src/generated/models/cart-discount.ts @@ -205,6 +205,8 @@ export interface CartDiscountPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -214,7 +216,7 @@ export interface CartDiscountPagedQueryResponse { readonly results: CartDiscount[] } /** - * [Reference](/../api/types#reference) to a [CartDiscount](ctp:api:type:CartDiscount). + * [Reference](ctp:api:type:Reference) to a [CartDiscount](ctp:api:type:CartDiscount). * */ export interface CartDiscountReference { @@ -233,7 +235,7 @@ export interface CartDiscountReference { readonly obj?: CartDiscount } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CartDiscount](ctp:api:type:CartDiscount). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CartDiscount](ctp:api:type:CartDiscount). * */ export interface CartDiscountResourceIdentifier { @@ -341,7 +343,7 @@ export interface CartDiscountValueFixedDraft { export interface CartDiscountValueGiftLineItem { readonly type: 'giftLineItem' /** - * [Reference](/../api/types#reference) to a [Product](ctp:api:type:Product). + * [Reference](ctp:api:type:Reference) to a [Product](ctp:api:type:Product). * * */ @@ -364,7 +366,7 @@ export interface CartDiscountValueGiftLineItem { export interface CartDiscountValueGiftLineItemDraft { readonly type: 'giftLineItem' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Product](ctp:api:type:Product). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Product](ctp:api:type:Product). * * */ diff --git a/packages/platform-sdk/src/generated/models/cart.ts b/packages/platform-sdk/src/generated/models/cart.ts index da77f4a3e..0794e5be9 100644 --- a/packages/platform-sdk/src/generated/models/cart.ts +++ b/packages/platform-sdk/src/generated/models/cart.ts @@ -372,6 +372,8 @@ export interface CartPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -381,7 +383,7 @@ export interface CartPagedQueryResponse { readonly results: Cart[] } /** - * [Reference](/../api/types#reference) to a [Cart](ctp:api:type:Cart). + * [Reference](ctp:api:type:Reference) to a [Cart](ctp:api:type:Cart). * */ export interface CartReference { @@ -400,7 +402,7 @@ export interface CartReference { readonly obj?: Cart } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Cart](ctp:api:type:Cart). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Cart](ctp:api:type:Cart). * */ export interface CartResourceIdentifier { @@ -786,8 +788,8 @@ export interface LineItem { */ readonly variant: ProductVariant /** - * The price of a line item is selected from the prices array of the product variant. - * If the `variant` field hasn't been updated, the price may not correspond to a price in `variant.prices`. + * The price of a line item is selected from the product variant according to the Product's [priceMode](ctp:api:type:Product) value. + * If the `priceMode` is `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum) and the `variant` field hasn't been updated, the price may not correspond to a price in `variant.prices`. * */ readonly price: Price @@ -1008,6 +1010,8 @@ export interface ClassificationShippingRateInput { */ readonly key: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly label: LocalizedString @@ -1064,6 +1068,7 @@ export interface TaxPortionDraft { readonly rate: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1111,6 +1116,7 @@ export interface TaxedPrice { export interface TaxedPriceDraft { /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1118,6 +1124,7 @@ export interface TaxedPriceDraft { readonly totalNet: Money /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1132,12 +1139,15 @@ export interface CartAddCustomLineItemAction { readonly action: 'addCustomLineItem' /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * */ readonly money: Money /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -1150,7 +1160,7 @@ export interface CartAddCustomLineItemAction { */ readonly slug: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [TaxCategory](ctp:api:type:TaxCategory). * * */ @@ -1189,7 +1199,7 @@ export interface CartAddLineItemAction { */ readonly custom?: CustomFieldsDraft /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -1215,13 +1225,14 @@ export interface CartAddLineItemAction { */ readonly quantity?: number /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ readonly supplyChannel?: ChannelResourceIdentifier /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1246,19 +1257,19 @@ export interface CartAddPaymentAction { export interface CartAddShoppingListAction { readonly action: 'addShoppingList' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ShoppingList](ctp:api:type:ShoppingList). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShoppingList](ctp:api:type:ShoppingList). * * */ readonly shoppingList: ShoppingListResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ readonly supplyChannel?: ChannelResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -1294,6 +1305,7 @@ export interface CartChangeCustomLineItemMoneyAction { readonly customLineItemId: string /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1323,6 +1335,7 @@ export interface CartChangeLineItemQuantityAction { readonly quantity: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1358,9 +1371,8 @@ export interface CartRecalculateAction { readonly action: 'recalculate' /** * If set to `true`, the line item product data (`name`, `variant` and `productType`) will also be updated. - * If set to `false`, - * only the prices and tax rates of the line item will be updated. - * The updated price of a line item may not correspond to a price in `variant.prices` anymore. + * If set to `false`, only the prices and tax rates of the line item will be updated. + * Notice that if the Product's [priceMode](ctp:api:type:Product) value is `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum), the updated price of a line item may not correspond to a price in `variant.prices` anymore. * */ readonly updateProductData?: boolean @@ -1375,7 +1387,7 @@ export interface CartRemoveCustomLineItemAction { export interface CartRemoveDiscountCodeAction { readonly action: 'removeDiscountCode' /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -1400,6 +1412,7 @@ export interface CartRemoveLineItemAction { readonly quantity?: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1484,7 +1497,7 @@ export interface CartSetCartTotalTaxAction { export interface CartSetCountryAction { readonly action: 'setCountry' /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). * * */ @@ -1592,7 +1605,7 @@ export interface CartSetCustomShippingMethodAction { */ readonly shippingRate: ShippingRateDraft /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [TaxCategory](ctp:api:type:TaxCategory). * * */ @@ -1628,7 +1641,7 @@ export interface CartSetCustomerEmailAction { export interface CartSetCustomerGroupAction { readonly action: 'setCustomerGroup' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -1786,7 +1799,7 @@ export interface CartSetLineItemDistributionChannelAction { */ readonly lineItemId: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -1800,6 +1813,7 @@ export interface CartSetLineItemPriceAction { readonly lineItemId: string /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1824,7 +1838,7 @@ export interface CartSetLineItemSupplyChannelAction { */ readonly lineItemId: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -1913,7 +1927,7 @@ export interface CartSetShippingAddressCustomTypeAction { export interface CartSetShippingMethodAction { readonly action: 'setShippingMethod' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). * * */ diff --git a/packages/platform-sdk/src/generated/models/category.ts b/packages/platform-sdk/src/generated/models/category.ts index 0bceb7f5e..bc8c010ee 100644 --- a/packages/platform-sdk/src/generated/models/category.ts +++ b/packages/platform-sdk/src/generated/models/category.ts @@ -187,6 +187,8 @@ export interface CategoryPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -196,7 +198,7 @@ export interface CategoryPagedQueryResponse { readonly results: Category[] } /** - * [Reference](/../api/types#reference) to a [Category](ctp:api:type:Category). + * [Reference](ctp:api:type:Reference) to a [Category](ctp:api:type:Category). * */ export interface CategoryReference { @@ -215,7 +217,7 @@ export interface CategoryReference { readonly obj?: Category } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Category](ctp:api:type:Category). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Category](ctp:api:type:Category). * */ export interface CategoryResourceIdentifier { diff --git a/packages/platform-sdk/src/generated/models/channel.ts b/packages/platform-sdk/src/generated/models/channel.ts index 13a906bd2..b4a4841af 100644 --- a/packages/platform-sdk/src/generated/models/channel.ts +++ b/packages/platform-sdk/src/generated/models/channel.ts @@ -148,7 +148,7 @@ export interface ChannelDraft { readonly custom?: CustomFieldsDraft /** * GeoJSON geometry object encoding the geo location of the Channel. - * Currently, only the [Point](/../api/types#point) type is supported. + * Currently, only the [Point](ctp:api:type:GeoJsonPoint) type is supported. * * */ @@ -166,8 +166,7 @@ export interface ChannelPagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -196,7 +195,7 @@ export interface ChannelPagedQueryResponse { readonly results: Channel[] } /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * */ export interface ChannelReference { @@ -216,7 +215,7 @@ export interface ChannelReference { readonly obj?: Channel } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * */ export interface ChannelResourceIdentifier { diff --git a/packages/platform-sdk/src/generated/models/common.ts b/packages/platform-sdk/src/generated/models/common.ts index 638d91397..91507f240 100644 --- a/packages/platform-sdk/src/generated/models/common.ts +++ b/packages/platform-sdk/src/generated/models/common.ts @@ -50,6 +50,10 @@ import { ShoppingListReference, ShoppingListResourceIdentifier, } from './shopping-list' +import { + StandalonePriceReference, + StandalonePriceResourceIdentifier, +} from './standalone-price' import { StateReference, StateResourceIdentifier } from './state' import { StoreKeyReference, @@ -70,21 +74,33 @@ import { ZoneReference, ZoneResourceIdentifier } from './zone' export interface PagedQueryResponse { /** + * Number of [results requested](/../api/general-concepts#limit). + * * */ readonly limit: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ - 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/limits#queries). + * * */ - readonly offset: number + readonly total?: number /** * */ @@ -112,6 +128,8 @@ export interface UpdateAction { } export interface Asset { /** + * Platform-generated unique identifier of the Asset. + * * */ readonly id: string @@ -120,34 +138,50 @@ export interface Asset { */ readonly sources: AssetSource[] /** + * Name of the Asset. + * * */ readonly name: LocalizedString /** + * Description of the Asset. + * * */ readonly description?: LocalizedString /** + * Keywords for categorizing and organizing Assets. + * * */ readonly tags?: string[] /** - * Serves as value of the `custom` field on a resource or data type customized with a [Type](ctp:api:type:Type). + * Custom Fields defined for the Asset. * * */ readonly custom?: CustomFields /** + * User-defined unique identifier of the Asset. + * * */ readonly key?: string } +/** + * Dimensions of the Asset source specified by the number of pixels. + * + */ export interface AssetDimensions { /** + * Width of the Asset source. + * * */ readonly w: number /** + * Height of the Asset source. + * * */ readonly h: number @@ -158,161 +192,248 @@ export interface AssetDraft { */ readonly sources: AssetSource[] /** + * Name of the Asset. + * * */ readonly name: LocalizedString /** + * Description of the Asset. + * * */ readonly description?: LocalizedString /** + * Keywords for categorizing and organizing Assets. + * * */ readonly tags?: string[] /** - * The representation used when creating or updating a [customizable data type](/../api/projects/types#list-of-customizable-data-types) with Custom Fields. + * Custom Fields defined for the Asset. * * */ readonly custom?: CustomFieldsDraft /** + * User-defined unique identifier for the Asset. + * * */ readonly key?: string } +/** + * Representation of an [Asset](#asset) in a specific format, for example a video in a certain encoding, or an image in a certain resolution. + * + */ export interface AssetSource { /** + * URI of the AssetSource. + * * */ readonly uri: string /** + * User-defined unique identifier of the AssetSource. * */ readonly key?: string /** + * Width and height of the AssetSource. + * * */ readonly dimensions?: AssetDimensions /** + * Indicates the type of content, for example `application/pdf`. + * * */ readonly contentType?: string } export interface BaseAddress { /** + * Platform-generated unique identifier of the Address. + * * */ readonly id?: string /** + * User-defined unique identifier of the Address. + * * */ readonly key?: string /** + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * + * + */ + readonly country: string + /** + * Title of the contact, for example 'Dr.' + * * */ readonly title?: string /** + * Salutation of the contact, for example 'Mr.' or 'Ms.' + * * */ readonly salutation?: string /** + * Given name (first name) of the contact. + * * */ readonly firstName?: string /** + * Family name (last name) of the contact. + * * */ readonly lastName?: string /** + * Name of the street. + * * */ readonly streetName?: string /** + * Street number. + * * */ readonly streetNumber?: string /** + * Further information on the street address. + * * */ readonly additionalStreetInfo?: string /** + * Postal code. + * * */ readonly postalCode?: string /** + * Name of the city. + * * */ readonly city?: string /** + * Name of the region. + * * */ readonly region?: string /** + * Name of the state, for example, Colorado. + * * */ readonly state?: string /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Name of the company. * * */ - readonly country: string - /** - * - */ readonly company?: string /** + * Name of the department. + * * */ readonly department?: string /** + * Number or name of the building. + * * */ readonly building?: string /** + * Number or name of the apartment. + * * */ readonly apartment?: string /** + * Post office box number. + * * */ readonly pOBox?: string /** + * Phone number of the contact. + * * */ readonly phone?: string /** + * Mobile phone number of the contact. + * * */ readonly mobile?: string /** + * Email address of the contact. + * * */ readonly email?: string /** + * Fax number of the contact. + * * */ readonly fax?: string /** + * Further information on the Address. + * * */ readonly additionalAddressInfo?: string /** + * ID for the contact used in an external system. + * * */ readonly externalId?: string } export interface Address extends BaseAddress { /** + * Platform-generated unique identifier of the Address. + * + * + */ + readonly id?: string + /** + * Custom Fields defined for the Address. * */ readonly custom?: CustomFields } export interface AddressDraft extends BaseAddress { /** + * Custom Fields defined for the Address. * */ readonly custom?: CustomFieldsDraft + /** + * Unique identifier for the Address. Not recommended to set it manually since the Platform overwrites this ID when creating an Address for a [Customer](ctp:api:type:Customer). Use `key` instead and omit this field to let the Platform generate the ID for the Address. + * + * + */ + readonly id?: string + /** + * User-defined unique identifier for the Address. + * + * + */ + readonly key?: string } export interface BaseResource { /** @@ -332,36 +453,74 @@ export interface BaseResource { */ readonly lastModifiedAt: string } +/** + * 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). + * + */ export interface ClientLogging { /** + * `id` of the [APIClient](ctp:api:type:ApiClient) which created the resource. + * + * + */ + readonly clientId?: string + /** + * [External user ID](/../api/client-logging#external-user-ids) provided by `X-External-User-ID` HTTP Header. + * + * + */ + readonly externalUserId?: string + /** + * Indicates the [Customer](ctp:api:type:Customer) who modified the resource using a token from the [password flow](/authorization#password-flow). + * + * + */ + readonly customer?: CustomerReference + /** + * Indicates that the resource was modified during an [anonymous session](/../api/authorization#tokens-for-anonymous-sessions) with the logged ID. + * + * + */ + readonly anonymousId?: string +} +/** + * Present on resources created after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked). + */ +export interface CreatedBy extends ClientLogging { + /** + * `id` of the [APIClient](ctp:api:type:ApiClient) which created the resource. + * * */ readonly clientId?: string /** + * [External user ID](/../api/client-logging#external-user-ids) provided by `X-External-User-ID` HTTP Header. + * * */ readonly externalUserId?: string /** - * [Reference](/../api/types#reference) to a [Customer](ctp:api:type:Customer). + * Indicates the [Customer](ctp:api:type:Customer) who created the resource using a token from the [password flow](/authorization#password-flow). * * */ readonly customer?: CustomerReference /** + * Indicates the [anonymous session](/../api/authorization#tokens-for-anonymous-sessions) during which the resource was created. + * * */ readonly anonymousId?: string } -export interface CreatedBy extends ClientLogging {} export interface DiscountedPrice { /** - * Base polymorphic read-only Money type which is stored in cent precision or high precision. The actual type is determined by the `type` field. + * Money value of the discounted price. * * */ readonly value: TypedMoney /** - * [Reference](/../api/types#reference) to a [ProductDiscount](ctp:api:type:ProductDiscount). + * [ProductDiscount](ctp:api:type:ProductDiscount) related to the discounted price. * * */ @@ -369,23 +528,28 @@ export interface DiscountedPrice { } export interface DiscountedPriceDraft { /** - * Draft type that stores amounts in cent precision for the specified currency. - * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. + * Sets the money value for the discounted price. * * */ readonly value: Money /** - * [Reference](/../api/types#reference) to a [ProductDiscount](ctp:api:type:ProductDiscount). + * Relates the referenced [ProductDiscount](ctp:api:type:ProductDiscount) to the discounted price. * * */ readonly discount: ProductDiscountReference } +/** + * GeoJSON Geometry represents a [Geometry Object](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1) as defined in the GeoJSON standard. + * + */ export type GeoJson = GeoJsonPoint export interface GeoJsonPoint { readonly type: 'Point' /** + * Longitude (stored on index `[0]`) and latitude (stored on index `[1]`) of the [Point](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.2). + * * */ readonly coordinates: number[] @@ -414,158 +578,245 @@ export interface ImageDimensions { */ readonly h: number } +/** + * A KeyReference represents a loose reference to another resource in the same commercetools Project identified by the resource's `key` field. If available, the `key` is immutable and mandatory. KeyReferences do not support [Reference Expansion](/general-concepts#reference-expansion). + * + */ export type KeyReference = StoreKeyReference -export interface LastModifiedBy extends ClientLogging {} +/** + * Present on resources modified after 1 February 2019 except for [events not tracked](/../api/client-logging#events-tracked). + */ +export interface LastModifiedBy extends ClientLogging { + /** + * `id` of the [APIClient](ctp:api:type:ApiClient) which modified the resource. + * + * + */ + readonly clientId?: string + /** + * [External user ID](/../api/client-logging#external-user-ids) provided by `X-External-User-ID` HTTP Header. + * + * + */ + readonly externalUserId?: string + /** + * Indicates the [Customer](ctp:api:type:Customer) who modified the resource using a token from the [password flow](/authorization#password-flow). + * + * + */ + readonly customer?: CustomerReference + /** + * Indicates the [anonymous session](/../api/authorization#tokens-for-anonymous-sessions) during which the resource was modified. + * + * + */ + readonly anonymousId?: string +} +/** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * + */ export interface LocalizedString { [key: string]: string } /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * */ export interface Money { /** - * amount in the smallest indivisible unit of a currency, such as + * Amount in the smallest indivisible unit of a currency, such as: * - * * cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500). - * * the value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5). + * * Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as `500`). + * * The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as `5`). * * */ readonly centAmount: number /** - * The currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * Currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * * */ readonly currencyCode: string } /** - * The platform supports two different types of Money, one for amounts in cent precision and another one for sub-cent amounts up to 12 fraction digits. + * The commercetools Platform supports two different types of Money: one for amounts in cent precision and another one for sub-cent amounts up to 20 fraction digits. + * */ export type MoneyType = 'centPrecision' | 'highPrecision' export interface Price { /** + * Platform-generated unique identifier of this Price. + * * */ readonly id: string /** - * Base polymorphic read-only Money type which is stored in cent precision or high precision. The actual type is determined by the `type` field. + * Money value of this Price. * * */ readonly value: TypedMoney /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Country for which this Price is valid. * * */ readonly country?: string /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [CustomerGroup](ctp:api:type:CustomerGroup) for which this Price is valid. * * */ readonly customerGroup?: CustomerGroupReference /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * `ProductDistribution` [Channel](ctp:api:type:Channel) for which this Price is valid. * * */ readonly channel?: ChannelReference /** + * Date and time from which this Price is valid. + * * */ readonly validFrom?: string /** + * Date and time until this Price is valid. + * * */ readonly validUntil?: string /** + * Is set if a [ProductDiscount](ctp:api:type:ProductDiscount) has been applied. + * If set, the commercetools Platform 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). + * * */ readonly discounted?: DiscountedPrice /** - * Serves as value of the `custom` field on a resource or data type customized with a [Type](ctp:api:type:Type). + * Present if different Prices for certain [LineItem](ctp:api:type:LineItem) quantities have been specified. * * */ - readonly custom?: CustomFields + readonly tiers?: PriceTier[] /** + * Custom Fields defined for the Price. + * * */ - readonly tiers?: PriceTier[] + readonly custom?: CustomFields } export interface PriceDraft { /** - * Draft type that stores amounts in cent precision for the specified currency. - * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. + * Money value of this Price. * * */ readonly value: Money /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Set this field if this Price is only valid for the specified country. * * */ readonly country?: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * Set this field if this Price is only valid for the referenced [CustomerGroup](ctp:api:type:CustomerGroup). * * */ readonly customerGroup?: CustomerGroupResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * Set this field if this Price is only valid for the referenced `ProductDistribution` [Channel](ctp:api:type:Channel). * * */ readonly channel?: ChannelResourceIdentifier /** + * Set this field if this Price is valid only valid from the specified date and time. + * * */ readonly validFrom?: string /** + * Set this field if this Price is valid only valid until the specified date and time. + * * */ readonly validUntil?: string /** - * The representation used when creating or updating a [customizable data type](/../api/projects/types#list-of-customizable-data-types) with Custom Fields. + * Set this field to add a DiscountedPrice from an external service. + * + * The commercetools Platform sets this field automatically if at least one [ProductDiscount](ctp:api:type:ProductDiscount) applies. + * The DiscountedPrice must reference a ProductDiscount with: + * + * * The `isActive` flag set to `true`. + * * A [ProductDiscountValue](ctp:api:type:ProductDiscountValueExternal) of type `external`. + * * A `predicate` that matches the [ProductVariant](ctp:api:type:ProductVariant) the Price is referenced from. * * */ - readonly custom?: CustomFieldsDraft + readonly discounted?: DiscountedPriceDraft /** + * Set this field to specify different Prices for certain [LineItem](ctp:api:type:LineItem) quantities. + * * */ readonly tiers?: PriceTierDraft[] /** + * Custom Fields for the Price. + * * */ - readonly discounted?: DiscountedPriceDraft + readonly custom?: CustomFieldsDraft } +/** + * A Price tier is selected instead of the default Price when a certain quantity of the [ProductVariant](ctp:api:type:ProductVariant) is [added to a Cart](/projects/carts#add-lineitem) and ordered. + * _For example: the Price can be lower if more than 10 items are ordered._ + * If no Price tier is found for the Order quantity, the base Price is used. + * A Price tier is applied for the entire quantity of a Product Variant put as [LineItem](/projects/carts#lineitem) in a Cart as soon as the minimum quantity for the Price tier is reached. + * The Price tier is applied per Line Item of the Product Variant. If, for example, the same Product Variant appears in the same Cart as several Line Items, (what can be achieved by different values of a Custom Field on the Line Items) for each Line Item the minimum quantity must be reached to get the Price tier. + * + */ export interface PriceTier { /** + * Minimum quantity this Price tier is valid for. + * + * The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. + * * */ readonly minimumQuantity: number /** - * Base polymorphic read-only Money type which is stored in cent precision or high precision. The actual type is determined by the `type` field. + * Money value that applies when the `minimumQuantity` is greater than or equal to the [LineItem](ctp:api:type:LineItem) `quantity`. + * + * The `currencyCode` of a Price tier is always the same as the `currencyCode` in the `value` of the related Price. * * */ readonly value: TypedMoney } +/** + * Specifies a Price tier that applies when the minimum quantity for the [LineItem](ctp:api:type:LineItem) of a ProductVariant with the related Price is reached in a Cart. + * + */ export interface PriceTierDraft { /** + * Minimum quantity this Price tier is valid for. + * + * The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. + * * */ readonly minimumQuantity: number /** - * Draft type that stores amounts in cent precision for the specified currency. - * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. + * Money value that applies when the `minimumQuantity` is greater than or equal to the [LineItem](ctp:api:type:LineItem) `quantity`. + * + * The `currencyCode` of a Price tier must be the same as the `currencyCode` in the `value` of the related Price. * * */ @@ -573,57 +824,70 @@ export interface PriceTierDraft { } export interface QueryPrice { /** + * Platform-generated unique identifier of the given Price. + * * */ - readonly id: string + readonly id?: string /** - * Draft type that stores amounts in cent precision for the specified currency. - * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. + * Money value of the given Price. * * */ readonly value: Money /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Country for which the given Price is valid. * * */ readonly country?: string /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [CustomerGroup](ctp:api:type:CustomerGroup) for which the given Price is valid. * * */ readonly customerGroup?: CustomerGroupReference /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * `ProductDistribution` [Channel](ctp:api:type:Channel) for which the given Price is valid. * * */ readonly channel?: ChannelReference /** + * Date from which the given Price is valid. + * * */ readonly validFrom?: string /** + * Date until which the given Price is valid. + * * */ readonly validUntil?: string /** + * [DiscountedPrice](ctp:api:type:DiscountedPrice) you specify for the given Price. + * * */ readonly discounted?: DiscountedPriceDraft /** - * Serves as value of the `custom` field on a resource or data type customized with a [Type](ctp:api:type:Type). + * Custom Fields for the Price. * * */ readonly custom?: CustomFields /** + * Price tier applied when the minimum quantity for the [LineItem](ctp:api:type:LineItem) of a ProductVariant with the related Price is reached in a Cart. + * * */ readonly tiers?: PriceTierDraft[] } +/** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * + */ export type Reference = | CartDiscountReference | CartReference @@ -644,20 +908,23 @@ export type Reference = | ReviewReference | ShippingMethodReference | ShoppingListReference + | StandalonePriceReference | StateReference | StoreReference | TaxCategoryReference | TypeReference | ZoneReference +/** + * supported resource type identifiers: + * + */ export type ReferenceTypeId = | 'cart' | 'cart-discount' | 'category' | 'channel' | 'customer' - | 'customer-email-token' | 'customer-group' - | 'customer-password-token' | 'discount-code' | 'extension' | 'inventory-entry' @@ -667,6 +934,7 @@ export type ReferenceTypeId = | 'payment' | 'product' | 'product-discount' + | 'product-price' | 'product-selection' | 'product-type' | 'review' @@ -678,6 +946,12 @@ export type ReferenceTypeId = | 'tax-category' | 'type' | 'zone' +/** + * 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. + * + * Each resource type has its corresponding ResourceIdentifier, like [ChannelResourceIdentifier](ctp:api:type:ChannelResourceIdentifier). + * + */ export type ResourceIdentifier = | CartDiscountResourceIdentifier | CartResourceIdentifier @@ -697,6 +971,7 @@ export type ResourceIdentifier = | ReviewResourceIdentifier | ShippingMethodResourceIdentifier | ShoppingListResourceIdentifier + | StandalonePriceResourceIdentifier | StateResourceIdentifier | StoreResourceIdentifier | TaxCategoryResourceIdentifier @@ -720,19 +995,19 @@ export interface ScopedPrice { */ readonly currentValue: TypedMoney /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). * * */ readonly country?: string /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ readonly customerGroup?: CustomerGroupReference /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * * */ @@ -761,28 +1036,29 @@ export interface ScopedPrice { * */ export type TypedMoney = CentPrecisionMoney | HighPrecisionMoney +/** + * Object that stores cent amounts in a specific currency. + * + */ export interface CentPrecisionMoney { readonly type: 'centPrecision' /** - * amount in the smallest indivisible unit of a currency, such as + * Amount in the smallest indivisible unit of a currency, such as: * - * * cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500). - * * the value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5). + * * Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as `500`). + * * The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as `5`). * * */ readonly centAmount: number /** - * The currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * Currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * * */ readonly currencyCode: string /** - * number of digits after the decimal separator - * - * * equal to the default number of fraction digits for a currency in [CentPrecisionMoney](ctp:api:type:CentPrecisionMoney). - * * greater than the default number of fraction digits for a currency in [HighPrecisionMoney](ctp:api:type:HighPrecisionMoney). + * The number of default fraction digits for the given currency, like `2` for EUR or `0` for JPY. * * */ @@ -794,31 +1070,28 @@ export interface CentPrecisionMoney { export interface HighPrecisionMoney { readonly type: 'highPrecision' /** - * amount in the smallest indivisible unit of a currency, such as + * Amount in the smallest indivisible unit of a currency, such as: * - * * cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500). - * * the value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5). + * * Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as `500`). + * * The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as `5`). * * */ readonly centAmount: number /** - * The currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * Currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * * */ readonly currencyCode: string /** - * number of digits after the decimal separator - * - * * equal to the default number of fraction digits for a currency in [CentPrecisionMoney](ctp:api:type:CentPrecisionMoney). - * * greater than the default number of fraction digits for a currency in [HighPrecisionMoney](ctp:api:type:HighPrecisionMoney). + * Number of digits after the decimal separator, greater than the default number of fraction digits for a currency. * * */ readonly fractionDigits: number /** - * amount in 1 / (10 ^ `fractionDigits`) of a currency. + * Amount in 1 / (10 ^ `fractionDigits`) of a currency. * * */ @@ -828,22 +1101,22 @@ export type TypedMoneyDraft = CentPrecisionMoneyDraft | HighPrecisionMoneyDraft export interface CentPrecisionMoneyDraft { readonly type: 'centPrecision' /** - * amount in the smallest indivisible unit of a currency, such as + * Amount in the smallest indivisible unit of a currency, such as: * - * * cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500). - * * the value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5). + * * Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as `500`). + * * The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as `5`). * * */ readonly centAmount: number /** - * The currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * Currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * * */ readonly currencyCode: string /** - * Must be equal to the default number of fraction digits for the specified currency. + * This field is optional for cent precision. If provided, it must be equal to the default number of fraction digits for the specified currency. * * */ @@ -855,23 +1128,29 @@ export interface CentPrecisionMoneyDraft { export interface HighPrecisionMoneyDraft { readonly type: 'highPrecision' /** + * Amount in the smallest indivisible unit of a currency. This field is optional for high precision. If provided, it is checked for validity. Example: + * + * A Price of 1.015 USD can be rounded either to 1.01 USD or 1.02 USD. If it lies outside of this range, an error message stating that centAmount must be rounded correctly will be returned. + * + * If `centAmount` is not provided, the commercetools Platform calculates the value automatically using the default rounding mode half even. + * * */ readonly centAmount?: number /** - * The currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * Currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * * */ readonly currencyCode: string /** - * Must be equal to the default number of fraction digits for the specified currency. + * Number of fraction digits for a specified high precision money. It must be greater than the default number of fraction digits for the specified currency. * * */ - readonly fractionDigits?: number + readonly fractionDigits: number /** - * amount in 1 / (10 ^ `fractionDigits`) of a currency. + * Amount in 1 / (10 ^ `fractionDigits`) of a currency. * * */ diff --git a/packages/platform-sdk/src/generated/models/custom-object.ts b/packages/platform-sdk/src/generated/models/custom-object.ts index 1b141c466..2e9c8a80b 100644 --- a/packages/platform-sdk/src/generated/models/custom-object.ts +++ b/packages/platform-sdk/src/generated/models/custom-object.ts @@ -10,68 +10,92 @@ export interface CustomObject extends BaseResource { /** * Platform-generated unique identifier of the CustomObject. * + * */ readonly id: string /** + * Current version of the CustomObject. + * * */ readonly version: number /** + * Date and time (UTC) the CustomObject was initially created. + * * */ readonly createdAt: string /** + * Date and time (UTC) the CustomObject 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 /** - * A namespace to group custom objects. + * Namespace to group CustomObjects. + * * */ readonly container: string /** - * User-defined unique identifier of the CustomObject. + * User-defined unique identifier of the CustomObject within the defined `container`. + * * */ readonly key: string /** + * JSON standard types Number, String, Boolean, Array, Object, and [common API data types](/../api/types). + * For values of type [Reference](ctp:api:type:Reference) the integrity of the data is not guaranteed. + * If the referenced object is deleted, the platform does not delete the corresponding reference to it and the `value` points to a non-existing object in such case. + * * */ readonly value: any } export interface CustomObjectDraft { /** - * A namespace to group custom objects. + * Namespace to group CustomObjects. + * * */ readonly container: string /** - * User-defined unique identifier for the CustomObject. + * User-defined unique identifier of the CustomObject within the defined `container`. * * */ readonly key: string /** + * JSON standard types Number, String, Boolean, Array, Object, and [common API data types](/../api/types). + * For values of type [Reference](ctp:api:type:Reference) the integrity of the data is not guaranteed. + * If the referenced object is deleted, the platform does not delete the corresponding reference to it and the `value` points to a non-existing object in such case. + * * */ readonly value: any /** + * Current version of the CustomObject. + * * */ readonly version?: number } +/** + * [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [CustomObject](ctp:api:type:CustomObject). + * + */ export interface CustomObjectPagedQueryResponse { /** * Number of [results requested](/../api/general-concepts#limit). @@ -80,24 +104,36 @@ export interface CustomObjectPagedQueryResponse { */ readonly limit: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ - readonly count: number + readonly offset: number /** + * Actual number of results returned. + * * */ - readonly total?: number + readonly count: number /** + * The 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/limits#queries). + * * */ - readonly offset: number + readonly total?: number /** + * [CustomObjects](ctp:api:type:CustomObject) matching the query. + * * */ readonly results: CustomObject[] } /** - * [Reference](/../api/types#reference) to a [CustomObject](ctp:api:type:CustomObject). + * [Reference](ctp:api:type:Reference) to a [CustomObject](ctp:api:type:CustomObject). * */ export interface CustomObjectReference { diff --git a/packages/platform-sdk/src/generated/models/customer-group.ts b/packages/platform-sdk/src/generated/models/customer-group.ts index 7013c587e..333098c2d 100644 --- a/packages/platform-sdk/src/generated/models/customer-group.ts +++ b/packages/platform-sdk/src/generated/models/customer-group.ts @@ -14,25 +14,25 @@ import { export interface CustomerGroup extends BaseResource { /** - * Platform-generated unique identifier of the Customer Group. + * Platform-generated unique identifier of the CustomerGroup. * * */ readonly id: string /** - * Current version of the Customer Group. + * Current version of the CustomerGroup. * * */ readonly version: number /** - * Date and time (UTC) the Customer Group was initially created. + * Date and time (UTC) the CustomerGroup was initially created. * * */ readonly createdAt: string /** - * Date and time (UTC) the Customer Group was last updated. + * Date and time (UTC) the CustomerGroup was last updated. * * */ @@ -50,19 +50,19 @@ export interface CustomerGroup extends BaseResource { */ readonly createdBy?: CreatedBy /** - * User-defined unique identifier of the Customer Group. + * User-defined unique identifier for the CustomerGroup. * * */ readonly key?: string /** - * Unique name of the Customer Group. + * Unique name of the CustomerGroup. * * */ readonly name: string /** - * Custom Fields for the Customer Group. + * Custom Fields for the CustomerGroup. * * */ @@ -70,7 +70,7 @@ export interface CustomerGroup extends BaseResource { } export interface CustomerGroupDraft { /** - * User-defined unique identifier for the Customer Group. + * User-defined unique identifier for the CustomerGroup. * * */ @@ -83,7 +83,7 @@ export interface CustomerGroupDraft { */ readonly groupName: string /** - * Custom Fields for the Customer Group. + * Custom Fields for the CustomerGroup. * * */ @@ -101,8 +101,7 @@ export interface CustomerGroupPagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -131,7 +130,7 @@ export interface CustomerGroupPagedQueryResponse { readonly results: CustomerGroup[] } /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * */ export interface CustomerGroupReference { @@ -143,14 +142,14 @@ export interface CustomerGroupReference { */ readonly id: string /** - * 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. + * Contains the representation of the expanded CustomerGroup. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for CustomerGroups. * * */ readonly obj?: CustomerGroup } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). * */ export interface CustomerGroupResourceIdentifier { @@ -170,14 +169,14 @@ export interface CustomerGroupResourceIdentifier { } export interface CustomerGroupUpdate { /** - * Expected version of the Customer Group on which the changes should be applied. + * Expected version of the CustomerGroup on which the changes should be applied. * If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) will be returned. * * */ readonly version: number /** - * Update actions to be performed on the Customer Group. + * Update actions to be performed on the CustomerGroup. * * */ @@ -191,7 +190,7 @@ export type CustomerGroupUpdateAction = export interface CustomerGroupChangeNameAction { readonly action: 'changeName' /** - * New name of the Customer Group. + * New name of the CustomerGroup. * * */ @@ -215,7 +214,7 @@ export interface CustomerGroupSetCustomFieldAction { readonly value?: any } /** - * This action sets or removes the custom type for an existing Customer Group. + * This action sets or removes the custom type for an existing CustomerGroup. * If present, this action overwrites any existing [custom](/../api/projects/custom-fields) type and fields. * */ diff --git a/packages/platform-sdk/src/generated/models/customer.ts b/packages/platform-sdk/src/generated/models/customer.ts index 1f375a0cd..b2a979ec3 100644 --- a/packages/platform-sdk/src/generated/models/customer.ts +++ b/packages/platform-sdk/src/generated/models/customer.ts @@ -380,6 +380,8 @@ export interface CustomerPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -389,7 +391,7 @@ export interface CustomerPagedQueryResponse { readonly results: Customer[] } /** - * [Reference](/../api/types#reference) to a [Customer](ctp:api:type:Customer). + * [Reference](ctp:api:type:Reference) to a [Customer](ctp:api:type:Customer). * */ export interface CustomerReference { @@ -422,7 +424,7 @@ export interface CustomerResetPassword { readonly version?: number } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Customer](ctp:api:type:Customer). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Customer](ctp:api:type:Customer). * */ export interface CustomerResourceIdentifier { @@ -466,7 +468,7 @@ export interface CustomerSignin { */ readonly anonymousCartId?: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Cart](ctp:api:type:Cart). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Cart](ctp:api:type:Cart). * * */ @@ -577,6 +579,24 @@ export interface MyCustomerResetPassword { */ readonly newPassword: string } +export interface MyCustomerSignin { + /** + * + */ + readonly email: string + /** + * + */ + readonly password: string + /** + * + */ + readonly activeCartSignInMode?: AnonymousCartSignInMode + /** + * + */ + readonly updateProductData?: boolean +} export interface CustomerAddAddressAction { readonly action: 'addAddress' /** diff --git a/packages/platform-sdk/src/generated/models/discount-code.ts b/packages/platform-sdk/src/generated/models/discount-code.ts index 570c6a60e..74453ecb9 100644 --- a/packages/platform-sdk/src/generated/models/discount-code.ts +++ b/packages/platform-sdk/src/generated/models/discount-code.ts @@ -26,102 +26,123 @@ export interface DiscountCode extends BaseResource { /** * Platform-generated unique identifier of the DiscountCode. * + * */ readonly id: string /** + * Current version of the DiscountCode. + * * */ readonly version: number /** + * Date and time (UTC) the DiscountCode was initially created. + * * */ readonly createdAt: string /** + * Date and time (UTC) the DiscountCode was last updated. + * * */ 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). * * */ readonly createdBy?: CreatedBy /** + * Name of the DiscountCode. + * * */ readonly name?: LocalizedString /** + * Description of the DiscountCode. + * * */ readonly description?: LocalizedString /** - * User-defined unique identifier of the DiscountCode. - * It is [added to a Cart](/../api/projects/carts#add-discountcode) to enable the related CartDiscounts in that Cart. + * User-defined unique identifier of the DiscountCode [added to the Cart](/../api/projects/carts#add-discountcode) to apply the related [CartDiscounts](ctp:api:type:CartDiscount). + * * */ readonly code: string /** - * The referenced matching cart discounts can be applied to the cart once the DiscountCode is added. + * Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied. + * * */ readonly cartDiscounts: CartDiscountReference[] /** - * The discount code can only be applied to carts that match this predicate. + * DiscountCode can only be applied to Carts that match this predicate. + * * */ readonly cartPredicate?: string /** + * Indicates if the DiscountCode is active and can be applied to the Cart. + * * */ readonly isActive: boolean /** - * The platform will generate this array from the cart predicate. + * Array generated by the commercetools Platform from the Cart predicate. * It contains the references of all the resources that are addressed in the predicate. * + * */ readonly references: Reference[] /** - * The discount code can only be applied `maxApplications` times. + * Number of times the DiscountCode can be applied. + * DiscountCode application is counted at the time of Order creation or edit. However, Order cancellation or deletion does not decrement the count. + * * */ readonly maxApplications?: number /** - * The discount code can only be applied `maxApplicationsPerCustomer` times per customer. + * Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). + * DiscountCode application is counted at the time of Order creation or edit. However, Order cancellation or deletion does not decrement the count. + * * */ readonly maxApplicationsPerCustomer?: number /** + * Custom Fields of the DiscountCode. + * * */ readonly custom?: CustomFields /** - * The groups to which this discount code belong. + * Groups to which the DiscountCode belongs to. + * * */ readonly groups: string[] /** - * The time from which the discount can be applied on a cart. - * Before that time the code is invalid. + * Date and time (UTC) from which the DiscountCode is effective. + * * */ readonly validFrom?: string /** - * The time until the discount can be applied on a cart. - * After that time the code is invalid. + * Date and time (UTC) until which the DiscountCode is effective. + * * */ readonly validUntil?: string /** - * Used for the internal platform only and registers the reservation of use of a discount code. - * Its value is managed by the platform. - * It can change at any time due to internal and external factors. - * It should not be used in customer logic. + * Used and managed by the commercetools Platform and must not be used in customer logic. + * The value can change at any time due to internal and external factors. * * */ @@ -129,64 +150,83 @@ export interface DiscountCode extends BaseResource { } export interface DiscountCodeDraft { /** + * Name of the DiscountCode. + * * */ readonly name?: LocalizedString /** + * Description of the DiscountCode. + * * */ readonly description?: LocalizedString /** - * User-defined unique identifier for the DiscountCode. - * [Add it to a Cart](/../api/projects/carts#add-discountcode) to enable the related CartDiscounts in that Cart. + * User-defined unique identifier for the DiscountCode that can be [added to the Cart](/../api/projects/carts#add-discountcode) to apply the related [CartDiscounts](ctp:api:type:CartDiscount). + * It cannot be modified after the DiscountCode is created. + * * */ readonly code: string /** - * The referenced matching cart discounts can be applied to the cart once the discount code is added. - * The number of cart discounts in a discount code is limited to **10**. + * Specify the CartDiscounts the Platform applies when you add the DiscountCode to the Cart. + * * */ readonly cartDiscounts: CartDiscountResourceIdentifier[] /** - * The discount code can only be applied to carts that match this predicate. + * DiscountCode can only be applied to Carts that match this predicate. + * * */ readonly cartPredicate?: string /** + * Only active DiscountCodes can be applied to the Cart. + * * */ readonly isActive?: boolean /** + * Number of times the DiscountCode can be applied. + * * */ readonly maxApplications?: number /** + * Number of times the DiscountCode can be applied per Customer. + * * */ readonly maxApplicationsPerCustomer?: number /** + * Custom Fields for the DiscountCode. + * * */ readonly custom?: CustomFieldsDraft /** - * The groups to which this discount code shall belong to. + * Groups to which the DiscountCode will belong to. + * * */ readonly groups?: string[] /** - * The time from which the discount can be applied on a cart. - * Before that time the code is invalid. + * Date and time (UTC) from which the DiscountCode is effective. Must be earlier than `validUntil`. + * * */ readonly validFrom?: string /** - * The time until the discount can be applied on a cart. - * After that time the code is invalid. + * Date and time (UTC) until which the DiscountCode is effective. Must be later than `validFrom`. + * * */ readonly validUntil?: string } +/** + * [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [DiscountCode](ctp:api:type:DiscountCode). + * + */ export interface DiscountCodePagedQueryResponse { /** * Number of [results requested](/../api/general-concepts#limit). @@ -195,24 +235,36 @@ export interface DiscountCodePagedQueryResponse { */ readonly limit: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ - 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/limits#queries). + * * */ - readonly offset: number + readonly total?: number /** + * [DiscountCodes](ctp:api:type:DiscountCode) matching the query. + * * */ readonly results: DiscountCode[] } /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * */ export interface DiscountCodeReference { @@ -231,7 +283,7 @@ export interface DiscountCodeReference { readonly obj?: DiscountCode } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [DiscountCode](ctp:api:type:DiscountCode). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [DiscountCode](ctp:api:type:DiscountCode). * */ export interface DiscountCodeResourceIdentifier { @@ -251,10 +303,15 @@ export interface DiscountCodeResourceIdentifier { } export interface DiscountCodeUpdate { /** + * Expected version of the DiscountCode on which the changes should be applied. + * If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) will be returned. + * * */ readonly version: number /** + * Update actions to be performed on the DiscountCode. + * * */ readonly actions: DiscountCodeUpdateAction[] @@ -276,6 +333,8 @@ export type DiscountCodeUpdateAction = export interface DiscountCodeChangeCartDiscountsAction { readonly action: 'changeCartDiscounts' /** + * New value to set. + * * */ readonly cartDiscounts: CartDiscountResourceIdentifier[] @@ -283,8 +342,8 @@ export interface DiscountCodeChangeCartDiscountsAction { export interface DiscountCodeChangeGroupsAction { readonly action: 'changeGroups' /** - * The groups to which this discount code shall belong to. - * Use empty array to remove the code from all groups. + * New value to set. An empty array removes the DiscountCode from all groups. + * * */ readonly groups: string[] @@ -292,6 +351,8 @@ export interface DiscountCodeChangeGroupsAction { export interface DiscountCodeChangeIsActiveAction { readonly action: 'changeIsActive' /** + * New value to set. Set to `true` to activate the DiscountCode for all matching Discounts. + * * */ readonly isActive: boolean @@ -299,7 +360,7 @@ export interface DiscountCodeChangeIsActiveAction { export interface DiscountCodeSetCartPredicateAction { readonly action: 'setCartPredicate' /** - * If the `cartPredicate` parameter is not included, the field will be emptied. + * Value to set. If empty, any existing value will be removed. * */ readonly cartPredicate?: string @@ -317,7 +378,6 @@ export interface DiscountCodeSetCustomFieldAction { * Trying to remove a field that does not exist will fail with an [InvalidOperation](/../api/errors#general-400-invalid-operation) error. * If `value` is provided, it is set for the field defined by `name`. * - * */ readonly value?: any } @@ -340,7 +400,7 @@ export interface DiscountCodeSetCustomTypeAction { export interface DiscountCodeSetDescriptionAction { readonly action: 'setDescription' /** - * If the `description` parameter is not included, the field will be emptied. + * Value to set. If empty, any existing value will be removed. * */ readonly description?: LocalizedString @@ -348,7 +408,8 @@ export interface DiscountCodeSetDescriptionAction { export interface DiscountCodeSetMaxApplicationsAction { readonly action: 'setMaxApplications' /** - * If the `maxApplications` parameter is not included, the field will be emptied. + * Value to set. If empty, any existing value will be removed. + * * */ readonly maxApplications?: number @@ -356,7 +417,8 @@ export interface DiscountCodeSetMaxApplicationsAction { export interface DiscountCodeSetMaxApplicationsPerCustomerAction { readonly action: 'setMaxApplicationsPerCustomer' /** - * If the `maxApplicationsPerCustomer` parameter is not included, the field will be emptied. + * Value to set. If empty, any existing value will be removed. + * * */ readonly maxApplicationsPerCustomer?: number @@ -364,7 +426,7 @@ export interface DiscountCodeSetMaxApplicationsPerCustomerAction { export interface DiscountCodeSetNameAction { readonly action: 'setName' /** - * If the `name` parameter is not included, the field will be emptied. + * Value to set. If empty, any existing value will be removed. * */ readonly name?: LocalizedString @@ -372,7 +434,8 @@ export interface DiscountCodeSetNameAction { export interface DiscountCodeSetValidFromAction { readonly action: 'setValidFrom' /** - * If absent, the field with the value is removed in case a value was set before. + * Value to set that must be earlier than `validUntil`. If empty, any existing value will be removed. + * * */ readonly validFrom?: string @@ -380,12 +443,14 @@ export interface DiscountCodeSetValidFromAction { export interface DiscountCodeSetValidFromAndUntilAction { readonly action: 'setValidFromAndUntil' /** - * If absent, the field with the value is removed in case a value was set before. + * Value to set that must be earlier than `validUntil`. If empty, any existing value will be removed. + * * */ readonly validFrom?: string /** - * If absent, the field with the value is removed in case a value was set before. + * Value to set that must be later than `validFrom`. If empty, any existing value will be removed. + * * */ readonly validUntil?: string @@ -393,7 +458,8 @@ export interface DiscountCodeSetValidFromAndUntilAction { export interface DiscountCodeSetValidUntilAction { readonly action: 'setValidUntil' /** - * If absent, the field with the value is removed in case a value was set before. + * Value to set that must be later than `validFrom`. If empty, any existing value will be removed. + * * */ readonly validUntil?: string diff --git a/packages/platform-sdk/src/generated/models/error.ts b/packages/platform-sdk/src/generated/models/error.ts index c5c615860..6a7e40ee5 100644 --- a/packages/platform-sdk/src/generated/models/error.ts +++ b/packages/platform-sdk/src/generated/models/error.ts @@ -16,9 +16,13 @@ import { Reference, ReferenceTypeId, } from './common' -import { CustomerGroupReference } from './customer-group' +import { + CustomerGroupReference, + CustomerGroupResourceIdentifier, +} from './customer-group' import { OrderEditPreviewFailure } from './order-edit' import { Attribute } from './product' +import { StandalonePriceReference } from './standalone-price' export interface ErrorByExtension { /** @@ -47,6 +51,7 @@ export type ErrorObject = | DuplicateFieldError | DuplicateFieldWithConflictingResourceError | DuplicatePriceScopeError + | DuplicateStandalonePriceScopeError | DuplicateVariantValuesError | EditPreviewFailedError | EnumKeyAlreadyExistsError @@ -80,6 +85,7 @@ export type ErrorObject = | ObjectNotFoundError | OutOfStockError | OverCapacityError + | OverlappingStandalonePriceValidityError | PendingOperationError | PriceChangedError | ProjectNotConfiguredForLanguagesError @@ -270,6 +276,8 @@ export interface DuplicateFieldError { */ readonly duplicateValue?: any /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly conflictingResource?: Reference @@ -290,6 +298,8 @@ export interface DuplicateFieldWithConflictingResourceError { */ readonly duplicateValue: any /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly conflictingResource: Reference @@ -306,6 +316,52 @@ export interface DuplicatePriceScopeError { */ readonly conflictingPrices: Price[] } +export interface DuplicateStandalonePriceScopeError { + readonly code: 'DuplicateStandalonePriceScope' + [key: string]: any + /** + * + */ + readonly message: string + /** + * [Reference](/../api/types#reference) to a [StandalonePrice](ctp:api:type:StandalonePrice). + * + * + */ + readonly conflictingStandalonePrice: StandalonePriceReference + /** + * + */ + readonly sku: string + /** + * + */ + readonly currency: string + /** + * + */ + readonly country?: string + /** + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * + * + */ + readonly customerGroup?: CustomerGroupResourceIdentifier + /** + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). + * + * + */ + readonly channel?: ChannelResourceIdentifier + /** + * + */ + readonly validFrom?: string + /** + * + */ + readonly validUntil?: string +} export interface DuplicateVariantValuesError { readonly code: 'DuplicateVariantValues' [key: string]: any @@ -408,6 +464,8 @@ export interface ExtensionBadResponseError { */ readonly message: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly localizedMessage?: LocalizedString @@ -444,6 +502,8 @@ export interface ExtensionUpdateActionsFailedError { */ readonly message: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly localizedMessage?: LocalizedString @@ -620,13 +680,13 @@ export interface MatchingPriceNotFoundError { */ readonly country?: string /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ readonly customerGroup?: CustomerGroupReference /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * * */ @@ -640,6 +700,8 @@ export interface MaxResourceLimitExceededError { */ readonly message: string /** + * supported resource type identifiers: + * * */ readonly exceededResource: ReferenceTypeId @@ -652,7 +714,7 @@ export interface MissingRoleOnChannelError { */ readonly message: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -732,6 +794,60 @@ export interface OverCapacityError { */ readonly message: string } +export interface OverlappingStandalonePriceValidityError { + readonly code: 'OverlappingStandalonePriceValidity' + [key: string]: any + /** + * + */ + readonly message: string + /** + * [Reference](/../api/types#reference) to a [StandalonePrice](ctp:api:type:StandalonePrice). + * + * + */ + readonly conflictingStandalonePrice: StandalonePriceReference + /** + * + */ + readonly sku: string + /** + * + */ + readonly currency: string + /** + * + */ + readonly country?: string + /** + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * + * + */ + readonly customerGroup?: CustomerGroupResourceIdentifier + /** + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). + * + * + */ + readonly channel?: ChannelResourceIdentifier + /** + * + */ + readonly validFrom?: string + /** + * + */ + readonly validUntil?: string + /** + * + */ + readonly conflictingValidFrom?: string + /** + * + */ + readonly conflictingValidUntil?: string +} export interface PendingOperationError { readonly code: 'PendingOperation' [key: string]: any @@ -792,6 +908,8 @@ export interface ReferenceExistsError { */ readonly message: string /** + * supported resource type identifiers: + * * */ readonly referencedBy?: ReferenceTypeId @@ -804,6 +922,8 @@ export interface ReferencedResourceNotFoundError { */ readonly message: string /** + * supported resource type identifiers: + * * */ readonly typeId: ReferenceTypeId diff --git a/packages/platform-sdk/src/generated/models/extension.ts b/packages/platform-sdk/src/generated/models/extension.ts index 00a98a298..6f38ac28f 100644 --- a/packages/platform-sdk/src/generated/models/extension.ts +++ b/packages/platform-sdk/src/generated/models/extension.ts @@ -161,7 +161,7 @@ export interface ExtensionPagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or server default. It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ diff --git a/packages/platform-sdk/src/generated/models/inventory.ts b/packages/platform-sdk/src/generated/models/inventory.ts index f918560fd..55b3485be 100644 --- a/packages/platform-sdk/src/generated/models/inventory.ts +++ b/packages/platform-sdk/src/generated/models/inventory.ts @@ -119,7 +119,7 @@ export interface InventoryEntryDraft { readonly custom?: CustomFieldsDraft } /** - * [Reference](/../api/types#reference) to a [InventoryEntry](ctp:api:type:InventoryEntry). + * [Reference](ctp:api:type:Reference) to a [InventoryEntry](ctp:api:type:InventoryEntry). * */ export interface InventoryEntryReference { @@ -138,7 +138,7 @@ export interface InventoryEntryReference { readonly obj?: InventoryEntry } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [InventoryEntry](ctp:api:type:InventoryEntry). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [InventoryEntry](ctp:api:type:InventoryEntry). * */ export interface InventoryEntryResourceIdentifier { @@ -192,6 +192,8 @@ export interface InventoryPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number diff --git a/packages/platform-sdk/src/generated/models/me.ts b/packages/platform-sdk/src/generated/models/me.ts index 24c0ba278..4240832ce 100644 --- a/packages/platform-sdk/src/generated/models/me.ts +++ b/packages/platform-sdk/src/generated/models/me.ts @@ -382,6 +382,8 @@ export interface MyPaymentPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -530,7 +532,7 @@ export interface MyCartAddLineItemAction { */ readonly custom?: CustomFieldsDraft /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -556,13 +558,14 @@ export interface MyCartAddLineItemAction { */ readonly quantity?: number /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ readonly supplyChannel?: ChannelResourceIdentifier /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -584,7 +587,7 @@ export interface MyCartAddLineItemAction { export interface MyCartAddPaymentAction { readonly action: 'addPayment' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Payment](ctp:api:type:Payment). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Payment](ctp:api:type:Payment). * * */ @@ -613,6 +616,7 @@ export interface MyCartChangeLineItemQuantityAction { readonly quantity: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -640,7 +644,7 @@ export interface MyCartRecalculateAction { export interface MyCartRemoveDiscountCodeAction { readonly action: 'removeDiscountCode' /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -665,6 +669,7 @@ export interface MyCartRemoveLineItemAction { readonly quantity?: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -682,7 +687,7 @@ export interface MyCartRemoveLineItemAction { export interface MyCartRemovePaymentAction { readonly action: 'removePayment' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Payment](ctp:api:type:Payment). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Payment](ctp:api:type:Payment). * * */ @@ -698,7 +703,7 @@ export interface MyCartSetBillingAddressAction { export interface MyCartSetCountryAction { readonly action: 'setCountry' /** - * A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + * Two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). * * */ @@ -799,7 +804,7 @@ export interface MyCartSetLineItemDistributionChannelAction { */ readonly lineItemId: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -823,7 +828,7 @@ export interface MyCartSetLineItemSupplyChannelAction { */ readonly lineItemId: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -846,7 +851,7 @@ export interface MyCartSetShippingAddressAction { export interface MyCartSetShippingMethodAction { readonly action: 'setShippingMethod' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). * * */ @@ -1076,6 +1081,7 @@ export interface MyPaymentChangeAmountPlannedAction { readonly action: 'changeAmountPlanned' /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1116,6 +1122,8 @@ export interface MyPaymentSetMethodInfoMethodAction { export interface MyPaymentSetMethodInfoNameAction { readonly action: 'setMethodInfoName' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name?: LocalizedString @@ -1169,10 +1177,14 @@ export interface MyShoppingListAddLineItemAction { export interface MyShoppingListAddTextLineItemAction { readonly action: 'addTextLineItem' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly description?: LocalizedString @@ -1212,6 +1224,8 @@ export interface MyShoppingListChangeLineItemsOrderAction { export interface MyShoppingListChangeNameAction { readonly action: 'changeName' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -1223,6 +1237,8 @@ export interface MyShoppingListChangeTextLineItemNameAction { */ readonly textLineItemId: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -1310,6 +1326,8 @@ export interface MyShoppingListSetDeleteDaysAfterLastModificationAction { export interface MyShoppingListSetDescriptionAction { readonly action: 'setDescription' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly description?: LocalizedString @@ -1403,6 +1421,8 @@ export interface MyShoppingListSetTextLineItemDescriptionAction { */ readonly textLineItemId: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly description?: LocalizedString diff --git a/packages/platform-sdk/src/generated/models/message.ts b/packages/platform-sdk/src/generated/models/message.ts index f3935df3d..140ac20d8 100644 --- a/packages/platform-sdk/src/generated/models/message.ts +++ b/packages/platform-sdk/src/generated/models/message.ts @@ -202,6 +202,8 @@ export interface CategoryCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -254,6 +256,8 @@ export interface CategorySlugChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -266,10 +270,14 @@ export interface CategorySlugChangedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly slug: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly oldSlug?: LocalizedString @@ -310,6 +318,8 @@ export interface CustomerAddressAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -362,6 +372,8 @@ export interface CustomerAddressChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -414,6 +426,8 @@ export interface CustomerAddressRemovedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -466,6 +480,8 @@ export interface CustomerCompanyNameSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -518,6 +534,8 @@ export interface CustomerCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -570,6 +588,8 @@ export interface CustomerDateOfBirthSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -622,6 +642,8 @@ export interface CustomerDeletedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -670,6 +692,8 @@ export interface CustomerEmailChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -722,6 +746,8 @@ export interface CustomerEmailVerifiedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -770,6 +796,8 @@ export interface CustomerFirstNameSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -822,6 +850,8 @@ export interface CustomerGroupSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -834,7 +864,7 @@ export interface CustomerGroupSetMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -876,6 +906,8 @@ export interface CustomerLastNameSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -928,6 +960,8 @@ export interface CustomerPasswordUpdatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -981,6 +1015,8 @@ export interface CustomerTitleSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1033,6 +1069,8 @@ export interface InventoryEntryCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1085,6 +1123,8 @@ export interface InventoryEntryDeletedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1101,7 +1141,7 @@ export interface InventoryEntryDeletedMessage { */ readonly sku: string /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * * */ @@ -1143,6 +1183,8 @@ export interface InventoryEntryQuantitySetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1171,7 +1213,7 @@ export interface InventoryEntryQuantitySetMessage { */ readonly newAvailableQuantity: number /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * * */ @@ -1193,6 +1235,8 @@ export interface MessagePagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -1312,6 +1356,8 @@ export interface CustomLineItemStateTransitionMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1336,13 +1382,13 @@ export interface CustomLineItemStateTransitionMessage { */ readonly quantity: number /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ readonly fromState: StateReference /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -1384,6 +1430,8 @@ export interface DeliveryAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1436,6 +1484,8 @@ export interface DeliveryAddressSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1496,6 +1546,8 @@ export interface DeliveryItemsUpdatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1556,6 +1608,8 @@ export interface DeliveryRemovedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1608,6 +1662,8 @@ export interface LineItemStateTransitionMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1632,13 +1688,13 @@ export interface LineItemStateTransitionMessage { */ readonly quantity: number /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ readonly fromState: StateReference /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -1680,6 +1736,8 @@ export interface OrderBillingAddressSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1736,6 +1794,8 @@ export interface OrderCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1788,6 +1848,8 @@ export interface OrderCustomLineItemDiscountSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1848,6 +1910,8 @@ export interface OrderCustomerEmailSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1904,6 +1968,8 @@ export interface OrderCustomerGroupSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1916,13 +1982,13 @@ export interface OrderCustomerGroupSetMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ readonly customerGroup?: CustomerGroupReference /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -1964,6 +2030,8 @@ export interface OrderCustomerSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -1976,25 +2044,25 @@ export interface OrderCustomerSetMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [Customer](ctp:api:type:Customer). + * [Reference](ctp:api:type:Reference) to a [Customer](ctp:api:type:Customer). * * */ readonly customer?: CustomerReference /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ readonly customerGroup?: CustomerGroupReference /** - * [Reference](/../api/types#reference) to a [Customer](ctp:api:type:Customer). + * [Reference](ctp:api:type:Reference) to a [Customer](ctp:api:type:Customer). * * */ readonly oldCustomer?: CustomerReference /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -2036,6 +2104,8 @@ export interface OrderDeletedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2088,6 +2158,8 @@ export interface OrderDiscountCodeAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2100,7 +2172,7 @@ export interface OrderDiscountCodeAddedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -2142,6 +2214,8 @@ export interface OrderDiscountCodeRemovedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2154,7 +2228,7 @@ export interface OrderDiscountCodeRemovedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -2196,6 +2270,8 @@ export interface OrderDiscountCodeStateSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2208,7 +2284,7 @@ export interface OrderDiscountCodeStateSetMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -2258,6 +2334,8 @@ export interface OrderEditAppliedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2270,7 +2348,7 @@ export interface OrderEditAppliedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [OrderEdit](ctp:api:type:OrderEdit). + * [Reference](ctp:api:type:Reference) to a [OrderEdit](ctp:api:type:OrderEdit). * * */ @@ -2316,6 +2394,8 @@ export interface OrderImportedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2368,6 +2448,8 @@ export interface OrderLineItemAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2424,6 +2506,8 @@ export interface OrderLineItemDiscountSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2445,6 +2529,7 @@ export interface OrderLineItemDiscountSetMessage { readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[] /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -2491,6 +2576,8 @@ export interface OrderLineItemDistributionChannelSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2507,7 +2594,7 @@ export interface OrderLineItemDistributionChannelSetMessage { */ readonly lineItemId: string /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * * */ @@ -2549,6 +2636,8 @@ export interface OrderLineItemRemovedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2631,6 +2720,8 @@ export interface OrderPaymentAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2643,7 +2734,7 @@ export interface OrderPaymentAddedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [Payment](ctp:api:type:Payment). + * [Reference](ctp:api:type:Reference) to a [Payment](ctp:api:type:Payment). * * */ @@ -2685,6 +2776,8 @@ export interface OrderPaymentStateChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2741,6 +2834,8 @@ export interface OrderReturnInfoAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2793,6 +2888,8 @@ export interface OrderReturnInfoSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2845,6 +2942,8 @@ export interface OrderReturnShipmentStateChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2901,6 +3000,8 @@ export interface OrderShipmentStateChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -2957,6 +3058,8 @@ export interface OrderShippingAddressSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3013,6 +3116,8 @@ export interface OrderShippingInfoSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3069,6 +3174,8 @@ export interface OrderShippingRateInputSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3125,6 +3232,8 @@ export interface OrderStateChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3181,6 +3290,8 @@ export interface OrderStateTransitionMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3193,13 +3304,13 @@ export interface OrderStateTransitionMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ readonly state: StateReference /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -3245,6 +3356,8 @@ export interface OrderStoreSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3297,6 +3410,8 @@ export interface ParcelAddedToDeliveryMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3353,6 +3468,8 @@ export interface ParcelItemsUpdatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3417,6 +3534,8 @@ export interface ParcelMeasurementsUpdatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3477,6 +3596,8 @@ export interface ParcelRemovedFromDeliveryMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3533,6 +3654,8 @@ export interface ParcelTrackingDataUpdatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3593,6 +3716,8 @@ export interface PaymentCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3645,6 +3770,8 @@ export interface PaymentInteractionAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3699,6 +3826,8 @@ export interface PaymentStatusInterfaceCodeSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3755,6 +3884,8 @@ export interface PaymentStatusStateTransitionMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3767,7 +3898,7 @@ export interface PaymentStatusStateTransitionMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -3813,6 +3944,8 @@ export interface PaymentTransactionAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3865,6 +3998,8 @@ export interface PaymentTransactionStateChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3921,6 +4056,8 @@ export interface ProductAddedToCategoryMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -3933,7 +4070,7 @@ export interface ProductAddedToCategoryMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [Category](ctp:api:type:Category). + * [Reference](ctp:api:type:Reference) to a [Category](ctp:api:type:Category). * * */ @@ -3979,6 +4116,8 @@ export interface ProductCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4031,6 +4170,8 @@ export interface ProductDeletedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4087,6 +4228,8 @@ export interface ProductImageAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4147,6 +4290,8 @@ export interface ProductPriceDiscountsSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4225,6 +4370,8 @@ export interface ProductPriceExternalDiscountSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4297,6 +4444,8 @@ export interface ProductPublishedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4357,6 +4506,8 @@ export interface ProductRemovedFromCategoryMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4369,7 +4520,7 @@ export interface ProductRemovedFromCategoryMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [Category](ctp:api:type:Category). + * [Reference](ctp:api:type:Reference) to a [Category](ctp:api:type:Category). * * */ @@ -4415,6 +4566,8 @@ export interface ProductRevertedStagedChangesMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4467,6 +4620,8 @@ export interface ProductSelectionCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4519,6 +4674,8 @@ export interface ProductSelectionDeletedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4531,6 +4688,8 @@ export interface ProductSelectionDeletedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -4571,6 +4730,8 @@ export interface ProductSelectionProductAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4583,7 +4744,7 @@ export interface ProductSelectionProductAddedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [Product](ctp:api:type:Product). + * [Reference](ctp:api:type:Reference) to a [Product](ctp:api:type:Product). * * */ @@ -4625,6 +4786,8 @@ export interface ProductSelectionProductRemovedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4637,7 +4800,7 @@ export interface ProductSelectionProductRemovedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [Product](ctp:api:type:Product). + * [Reference](ctp:api:type:Reference) to a [Product](ctp:api:type:Product). * * */ @@ -4679,6 +4842,8 @@ export interface ProductSlugChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4691,10 +4856,14 @@ export interface ProductSlugChangedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly slug: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly oldSlug?: LocalizedString @@ -4735,6 +4904,8 @@ export interface ProductStateTransitionMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4747,7 +4918,7 @@ export interface ProductStateTransitionMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -4793,6 +4964,8 @@ export interface ProductUnpublishedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4841,6 +5014,8 @@ export interface ProductVariantAddedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4897,6 +5072,8 @@ export interface ProductVariantDeletedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -4953,6 +5130,8 @@ export interface ReviewCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -5005,6 +5184,8 @@ export interface ReviewRatingSetMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -5029,6 +5210,8 @@ export interface ReviewRatingSetMessage { */ readonly includedInStatistics: boolean /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly target?: Reference @@ -5069,6 +5252,8 @@ export interface ReviewStateTransitionMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -5081,13 +5266,13 @@ export interface ReviewStateTransitionMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ readonly oldState: StateReference /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -5101,6 +5286,8 @@ export interface ReviewStateTransitionMessage { */ readonly newIncludedInStatistics: boolean /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly target: Reference @@ -5145,6 +5332,8 @@ export interface StoreCreatedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -5157,6 +5346,8 @@ export interface StoreCreatedMessage { */ readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name?: LocalizedString @@ -5219,6 +5410,8 @@ export interface StoreDeletedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -5267,6 +5460,8 @@ export interface StoreProductSelectionsChangedMessage { */ readonly sequenceNumber: number /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -5314,6 +5509,8 @@ export interface UserProvidedIdentifiers { */ readonly sku?: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly slug?: LocalizedString @@ -5425,10 +5622,14 @@ export interface CategoryCreatedMessagePayload { export interface CategorySlugChangedMessagePayload { readonly type: 'CategorySlugChanged' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly slug: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly oldSlug?: LocalizedString @@ -5498,7 +5699,7 @@ export interface CustomerFirstNameSetMessagePayload { export interface CustomerGroupSetMessagePayload { readonly type: 'CustomerGroupSet' /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -5540,7 +5741,7 @@ export interface InventoryEntryDeletedMessagePayload { */ readonly sku: string /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * * */ @@ -5565,7 +5766,7 @@ export interface InventoryEntryQuantitySetMessagePayload { */ readonly newAvailableQuantity: number /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * * */ @@ -5625,13 +5826,13 @@ export interface CustomLineItemStateTransitionMessagePayload { */ readonly quantity: number /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ readonly fromState: StateReference /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -5696,13 +5897,13 @@ export interface LineItemStateTransitionMessagePayload { */ readonly quantity: number /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ readonly fromState: StateReference /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -5755,13 +5956,13 @@ export interface OrderCustomerEmailSetMessagePayload { export interface OrderCustomerGroupSetMessagePayload { readonly type: 'OrderCustomerGroupSet' /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ readonly customerGroup?: CustomerGroupReference /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -5770,25 +5971,25 @@ export interface OrderCustomerGroupSetMessagePayload { export interface OrderCustomerSetMessagePayload { readonly type: 'OrderCustomerSet' /** - * [Reference](/../api/types#reference) to a [Customer](ctp:api:type:Customer). + * [Reference](ctp:api:type:Reference) to a [Customer](ctp:api:type:Customer). * * */ readonly customer?: CustomerReference /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ readonly customerGroup?: CustomerGroupReference /** - * [Reference](/../api/types#reference) to a [Customer](ctp:api:type:Customer). + * [Reference](ctp:api:type:Reference) to a [Customer](ctp:api:type:Customer). * * */ readonly oldCustomer?: CustomerReference /** - * [Reference](/../api/types#reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -5804,7 +6005,7 @@ export interface OrderDeletedMessagePayload { export interface OrderDiscountCodeAddedMessagePayload { readonly type: 'OrderDiscountCodeAdded' /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -5813,7 +6014,7 @@ export interface OrderDiscountCodeAddedMessagePayload { export interface OrderDiscountCodeRemovedMessagePayload { readonly type: 'OrderDiscountCodeRemoved' /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -5822,7 +6023,7 @@ export interface OrderDiscountCodeRemovedMessagePayload { export interface OrderDiscountCodeStateSetMessagePayload { readonly type: 'OrderDiscountCodeStateSet' /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -5839,7 +6040,7 @@ export interface OrderDiscountCodeStateSetMessagePayload { export interface OrderEditAppliedMessagePayload { readonly type: 'OrderEditApplied' /** - * [Reference](/../api/types#reference) to a [OrderEdit](ctp:api:type:OrderEdit). + * [Reference](ctp:api:type:Reference) to a [OrderEdit](ctp:api:type:OrderEdit). * * */ @@ -5879,6 +6080,7 @@ export interface OrderLineItemDiscountSetMessagePayload { readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[] /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -5896,7 +6098,7 @@ export interface OrderLineItemDistributionChannelSetMessagePayload { */ readonly lineItemId: string /** - * [Reference](/../api/types#reference) to a [Channel](ctp:api:type:Channel). + * [Reference](ctp:api:type:Reference) to a [Channel](ctp:api:type:Channel). * * */ @@ -5942,7 +6144,7 @@ export interface OrderLineItemRemovedMessagePayload { export interface OrderPaymentAddedMessagePayload { readonly type: 'OrderPaymentAdded' /** - * [Reference](/../api/types#reference) to a [Payment](ctp:api:type:Payment). + * [Reference](ctp:api:type:Reference) to a [Payment](ctp:api:type:Payment). * * */ @@ -6042,13 +6244,13 @@ export interface OrderStateChangedMessagePayload { export interface OrderStateTransitionMessagePayload { readonly type: 'OrderStateTransition' /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ readonly state: StateReference /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -6166,7 +6368,7 @@ export interface PaymentStatusInterfaceCodeSetMessagePayload { export interface PaymentStatusStateTransitionMessagePayload { readonly type: 'PaymentStatusStateTransition' /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -6197,7 +6399,7 @@ export interface PaymentTransactionStateChangedMessagePayload { export interface ProductAddedToCategoryMessagePayload { readonly type: 'ProductAddedToCategory' /** - * [Reference](/../api/types#reference) to a [Category](ctp:api:type:Category). + * [Reference](ctp:api:type:Reference) to a [Category](ctp:api:type:Category). * * */ @@ -6292,7 +6494,7 @@ export interface ProductPublishedMessagePayload { export interface ProductRemovedFromCategoryMessagePayload { readonly type: 'ProductRemovedFromCategory' /** - * [Reference](/../api/types#reference) to a [Category](ctp:api:type:Category). + * [Reference](ctp:api:type:Reference) to a [Category](ctp:api:type:Category). * * */ @@ -6319,6 +6521,8 @@ export interface ProductSelectionCreatedMessagePayload { export interface ProductSelectionDeletedMessagePayload { readonly type: 'ProductSelectionDeleted' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -6326,7 +6530,7 @@ export interface ProductSelectionDeletedMessagePayload { export interface ProductSelectionProductAddedMessagePayload { readonly type: 'ProductSelectionProductAdded' /** - * [Reference](/../api/types#reference) to a [Product](ctp:api:type:Product). + * [Reference](ctp:api:type:Reference) to a [Product](ctp:api:type:Product). * * */ @@ -6335,7 +6539,7 @@ export interface ProductSelectionProductAddedMessagePayload { export interface ProductSelectionProductRemovedMessagePayload { readonly type: 'ProductSelectionProductRemoved' /** - * [Reference](/../api/types#reference) to a [Product](ctp:api:type:Product). + * [Reference](ctp:api:type:Reference) to a [Product](ctp:api:type:Product). * * */ @@ -6344,10 +6548,14 @@ export interface ProductSelectionProductRemovedMessagePayload { export interface ProductSlugChangedMessagePayload { readonly type: 'ProductSlugChanged' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly slug: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly oldSlug?: LocalizedString @@ -6355,7 +6563,7 @@ export interface ProductSlugChangedMessagePayload { export interface ProductStateTransitionMessagePayload { readonly type: 'ProductStateTransition' /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -6412,6 +6620,8 @@ export interface ReviewRatingSetMessagePayload { */ readonly includedInStatistics: boolean /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly target?: Reference @@ -6419,13 +6629,13 @@ export interface ReviewRatingSetMessagePayload { export interface ReviewStateTransitionMessagePayload { readonly type: 'ReviewStateTransition' /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ readonly oldState: StateReference /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * * */ @@ -6439,6 +6649,8 @@ export interface ReviewStateTransitionMessagePayload { */ readonly newIncludedInStatistics: boolean /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly target: Reference @@ -6457,6 +6669,8 @@ export interface ShoppingListStoreSetMessagePayload { export interface StoreCreatedMessagePayload { readonly type: 'StoreCreated' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name?: LocalizedString diff --git a/packages/platform-sdk/src/generated/models/order-edit.ts b/packages/platform-sdk/src/generated/models/order-edit.ts index c976dda42..ac286cb17 100644 --- a/packages/platform-sdk/src/generated/models/order-edit.ts +++ b/packages/platform-sdk/src/generated/models/order-edit.ts @@ -183,6 +183,8 @@ export interface OrderEditPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -192,7 +194,7 @@ export interface OrderEditPagedQueryResponse { readonly results: OrderEdit[] } /** - * [Reference](/../api/types#reference) to a [OrderEdit](ctp:api:type:OrderEdit). + * [Reference](ctp:api:type:Reference) to a [OrderEdit](ctp:api:type:OrderEdit). * */ export interface OrderEditReference { @@ -211,7 +213,7 @@ export interface OrderEditReference { readonly obj?: OrderEdit } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [OrderEdit](ctp:api:type:OrderEdit). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [OrderEdit](ctp:api:type:OrderEdit). * */ export interface OrderEditResourceIdentifier { @@ -373,12 +375,15 @@ export interface StagedOrderAddCustomLineItemAction { readonly action: 'addCustomLineItem' /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * */ readonly money: Money /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -391,7 +396,7 @@ export interface StagedOrderAddCustomLineItemAction { */ readonly slug: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [TaxCategory](ctp:api:type:TaxCategory). * * */ @@ -450,7 +455,7 @@ export interface StagedOrderAddLineItemAction { */ readonly custom?: CustomFieldsDraft /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -480,13 +485,14 @@ export interface StagedOrderAddLineItemAction { */ readonly addedAt?: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ readonly supplyChannel?: ChannelResourceIdentifier /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -523,7 +529,7 @@ export interface StagedOrderAddParcelToDeliveryAction { export interface StagedOrderAddPaymentAction { readonly action: 'addPayment' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Payment](ctp:api:type:Payment). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Payment](ctp:api:type:Payment). * * */ @@ -547,19 +553,19 @@ export interface StagedOrderAddReturnInfoAction { export interface StagedOrderAddShoppingListAction { readonly action: 'addShoppingList' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ShoppingList](ctp:api:type:ShoppingList). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShoppingList](ctp:api:type:ShoppingList). * * */ readonly shoppingList: ShoppingListResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ readonly supplyChannel?: ChannelResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -573,6 +579,7 @@ export interface StagedOrderChangeCustomLineItemMoneyAction { readonly customLineItemId: string /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -602,6 +609,7 @@ export interface StagedOrderChangeLineItemQuantityAction { readonly quantity: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -693,7 +701,7 @@ export interface StagedOrderRemoveDeliveryAction { export interface StagedOrderRemoveDiscountCodeAction { readonly action: 'removeDiscountCode' /** - * [Reference](/../api/types#reference) to a [DiscountCode](ctp:api:type:DiscountCode). + * [Reference](ctp:api:type:Reference) to a [DiscountCode](ctp:api:type:DiscountCode). * * */ @@ -718,6 +726,7 @@ export interface StagedOrderRemoveLineItemAction { readonly quantity?: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -742,7 +751,7 @@ export interface StagedOrderRemoveParcelFromDeliveryAction { export interface StagedOrderRemovePaymentAction { readonly action: 'removePayment' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Payment](ctp:api:type:Payment). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Payment](ctp:api:type:Payment). * * */ @@ -897,7 +906,7 @@ export interface StagedOrderSetCustomShippingMethodAction { */ readonly shippingRate: ShippingRateDraft /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [TaxCategory](ctp:api:type:TaxCategory). * * */ @@ -933,7 +942,7 @@ export interface StagedOrderSetCustomerEmailAction { export interface StagedOrderSetCustomerGroupAction { readonly action: 'setCustomerGroup' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [CustomerGroup](ctp:api:type:CustomerGroup). * * */ @@ -1139,7 +1148,7 @@ export interface StagedOrderSetLineItemDistributionChannelAction { */ readonly lineItemId: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ @@ -1153,6 +1162,7 @@ export interface StagedOrderSetLineItemPriceAction { readonly lineItemId: string /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1221,6 +1231,7 @@ export interface StagedOrderSetOrderTotalTaxAction { readonly action: 'setOrderTotalTax' /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1397,7 +1408,7 @@ export interface StagedOrderSetShippingAddressAndCustomShippingMethodAction { */ readonly shippingRate: ShippingRateDraft /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [TaxCategory](ctp:api:type:TaxCategory). * * */ @@ -1414,7 +1425,7 @@ export interface StagedOrderSetShippingAddressAndShippingMethodAction { */ readonly address: BaseAddress /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). * * */ @@ -1460,7 +1471,7 @@ export interface StagedOrderSetShippingAddressCustomTypeAction { export interface StagedOrderSetShippingMethodAction { readonly action: 'setShippingMethod' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). * * */ @@ -1502,13 +1513,13 @@ export interface StagedOrderTransitionCustomLineItemStateAction { */ readonly quantity: number /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ readonly fromState: StateResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ @@ -1529,13 +1540,13 @@ export interface StagedOrderTransitionLineItemStateAction { */ readonly quantity: number /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ readonly fromState: StateResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ @@ -1548,7 +1559,7 @@ export interface StagedOrderTransitionLineItemStateAction { export interface StagedOrderTransitionStateAction { readonly action: 'transitionState' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ @@ -1568,7 +1579,7 @@ export interface StagedOrderUpdateItemShippingAddressAction { export interface StagedOrderUpdateSyncInfoAction { readonly action: 'updateSyncInfo' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ diff --git a/packages/platform-sdk/src/generated/models/order.ts b/packages/platform-sdk/src/generated/models/order.ts index 2380136c0..08fe38203 100644 --- a/packages/platform-sdk/src/generated/models/order.ts +++ b/packages/platform-sdk/src/generated/models/order.ts @@ -255,12 +255,14 @@ export interface OrderPagedSearchResponse { */ readonly total: number /** - * Number of results skipped, used for pagination. + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset?: number /** - * Number of results the response should contain at maximum, used for pagination. + * Number of [results requested](/../api/general-concepts#limit). + * * */ readonly limit?: number @@ -314,6 +316,7 @@ export interface DeliveryItem { export interface DiscountedLineItemPriceDraft { /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -771,6 +774,8 @@ export interface OrderPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -795,13 +800,13 @@ export interface OrderReference { export interface OrderResourceIdentifier { readonly typeId: 'order' /** - * Unique ID of the referenced resource. Either `id` or `key` is required. + * Platform-generated unique identifier of the referenced resource. Required if `key` is absent. * * */ readonly id?: string /** - * Unique key of the referenced resource. Either `id` or `key` is required. + * User-defined unique identifier of the referenced resource. Required if `id` is absent. * * */ @@ -991,7 +996,7 @@ export interface ProductVariantImportDraft { */ readonly sku?: string /** - * The prices of the variant. + * The [EmbeddedPrices](ctp:api:type:EmbeddedPrice) of the variant. * The prices should not contain two prices for the same price scope (same currency, country and customer group). * If this property is defined, then it will override the `prices` property from the original product variant, otherwise `prices` property from the original product variant would be copied in the resulting order. * @@ -1228,6 +1233,7 @@ export interface SyncInfo { export interface TaxedItemPriceDraft { /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1235,6 +1241,7 @@ export interface TaxedItemPriceDraft { readonly totalNet: Money /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -1315,7 +1322,7 @@ export interface OrderAddParcelToDeliveryAction { export interface OrderAddPaymentAction { readonly action: 'addPayment' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Payment](ctp:api:type:Payment). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Payment](ctp:api:type:Payment). * * */ @@ -1403,7 +1410,7 @@ export interface OrderRemoveParcelFromDeliveryAction { export interface OrderRemovePaymentAction { readonly action: 'removePayment' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Payment](ctp:api:type:Payment). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Payment](ctp:api:type:Payment). * * */ @@ -1961,13 +1968,13 @@ export interface OrderTransitionCustomLineItemStateAction { */ readonly quantity: number /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ readonly fromState: StateResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ @@ -1988,13 +1995,13 @@ export interface OrderTransitionLineItemStateAction { */ readonly quantity: number /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ readonly fromState: StateResourceIdentifier /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ @@ -2007,7 +2014,7 @@ export interface OrderTransitionLineItemStateAction { export interface OrderTransitionStateAction { readonly action: 'transitionState' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ @@ -2027,7 +2034,7 @@ export interface OrderUpdateItemShippingAddressAction { export interface OrderUpdateSyncInfoAction { readonly action: 'updateSyncInfo' /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Channel](ctp:api:type:Channel). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Channel](ctp:api:type:Channel). * * */ diff --git a/packages/platform-sdk/src/generated/models/payment.ts b/packages/platform-sdk/src/generated/models/payment.ts index 6c2c24a6e..f595fb04e 100644 --- a/packages/platform-sdk/src/generated/models/payment.ts +++ b/packages/platform-sdk/src/generated/models/payment.ts @@ -161,6 +161,7 @@ export interface PaymentDraft { readonly amountPlanned: Money /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -172,6 +173,7 @@ export interface PaymentDraft { readonly authorizedUntil?: string /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -179,6 +181,7 @@ export interface PaymentDraft { readonly amountPaid?: Money /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -253,6 +256,8 @@ export interface PaymentPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -262,7 +267,7 @@ export interface PaymentPagedQueryResponse { readonly results: Payment[] } /** - * [Reference](/../api/types#reference) to a [Payment](ctp:api:type:Payment). + * [Reference](ctp:api:type:Reference) to a [Payment](ctp:api:type:Payment). * */ export interface PaymentReference { @@ -281,7 +286,7 @@ export interface PaymentReference { readonly obj?: Payment } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Payment](ctp:api:type:Payment). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Payment](ctp:api:type:Payment). * */ export interface PaymentResourceIdentifier { @@ -325,7 +330,7 @@ export interface PaymentStatusDraft { */ readonly interfaceText?: string /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * * */ @@ -505,6 +510,7 @@ export interface PaymentSetAmountPaidAction { readonly action: 'setAmountPaid' /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -515,6 +521,7 @@ export interface PaymentSetAmountRefundedAction { readonly action: 'setAmountRefunded' /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -534,6 +541,7 @@ export interface PaymentSetAuthorizationAction { readonly action: 'setAuthorization' /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * diff --git a/packages/platform-sdk/src/generated/models/product-discount.ts b/packages/platform-sdk/src/generated/models/product-discount.ts index 86fad02c7..bcb446a72 100644 --- a/packages/platform-sdk/src/generated/models/product-discount.ts +++ b/packages/platform-sdk/src/generated/models/product-discount.ts @@ -6,164 +6,206 @@ import { BaseResource, + CentPrecisionMoney, + CentPrecisionMoneyDraft, CreatedBy, LastModifiedBy, LocalizedString, - Money, QueryPrice, Reference, - TypedMoney, } from './common' export interface ProductDiscount extends BaseResource { /** - * Platform-generated unique identifier of the ProductDiscount + * Platform-generated unique identifier of the ProductDiscount. + * * */ readonly id: string /** - * The current version of the product discount. + * Current version of the ProductDiscount. + * * */ readonly version: number /** + * Date and time (UTC) the ProductDiscount was initially created. + * * */ readonly createdAt: string /** + * Date and time (UTC) the ProductDiscount was last updated. + * * */ 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). * * */ readonly createdBy?: CreatedBy /** + * Name of the ProductDiscount. + * * */ readonly name: LocalizedString /** * User-defined unique identifier of the ProductDiscount. * + * */ readonly key?: string /** + * Description of the ProductDiscount. + * * */ readonly description?: LocalizedString /** + * Type of Discount and its corresponding value. + * * */ readonly value: ProductDiscountValue /** - * A valid ProductDiscount Predicate. + * Valid [ProductDiscount predicate](/../api/projects/predicates#productdiscount-predicates). + * * */ readonly predicate: string /** - * The string contains a number between 0 and 1. - * A discount with greater sortOrder is prioritized higher than a discount with lower sortOrder. - * A sortOrder must be unambiguous. + * Unique decimal value between 0 and 1 (stored as String literal) defining the order of Product Discounts to apply in case more than one is applicable and active. + * A Product Discount with a higher value is prioritized. + * * */ readonly sortOrder: string /** - * Only active discount will be applied to product prices. + * If `true` the Product Discount is applied to Products matching the `predicate`. + * * */ readonly isActive: boolean /** - * The platform will generate this array from the predicate. - * It contains the references of all the resources that are addressed in the predicate. + * References of all the resources that are addressed in the `predicate`. + * * */ readonly references: Reference[] /** - * The time from which the discount should be effective. - * Please take Eventual Consistency into account for calculated product discount values. + * Date and time (UTC) from which the Discount is effective. + * Take [Eventual Consistency](/../api/general-concepts#eventual-consistency) into account for calculated discount values. + * * */ readonly validFrom?: string /** - * The time from which the discount should be ineffective. - * Please take Eventual Consistency into account for calculated undiscounted values. + * Date and time (UTC) until which the Discount is effective. + * Take [Eventual Consistency](/../api/general-concepts#eventual-consistency) into account for calculated undiscounted values. + * * */ readonly validUntil?: string } export interface ProductDiscountDraft { /** + * Name of the ProductDiscount. + * * */ readonly name: LocalizedString /** * User-defined unique identifier for the ProductDiscount. * + * */ readonly key?: string /** + * Description of the ProductDiscount. + * * */ readonly description?: LocalizedString /** + * Type of Discount and its corresponding value. + * * */ readonly value: ProductDiscountValueDraft /** - * A valid ProductDiscount Predicate. + * Valid [ProductDiscount predicate](/../api/projects/predicates#productdiscount-predicates). + * * */ readonly predicate: string /** - * The string must contain a decimal number between 0 and 1. - * A discount with greater sortOrder is prioritized higher than a discount with lower sortOrder. + * Decimal value between 0 and 1 (passed as String literal) that defines the order of ProductDiscounts to apply in case more than one is applicable and active. A ProductDiscount with a higher `sortOrder` is prioritized. + * The value must be **unique** among all ProductDiscounts in the [Project](ctp:api:type:Project). + * * */ readonly sortOrder: string /** - * If set to `true` the discount will be applied to product prices. + * Set to `true` to activate the ProductDiscount, set to `false` to deactivate it (even though the `predicate` matches). + * * */ readonly isActive: boolean /** - * The time from which the discount should be effective. - * Please take Eventual Consistency into account for calculated product discount values. + * Date and time (UTC) from which the Discount is effective. + * Take [Eventual Consistency](/../api/general-concepts#eventual-consistency) into account for calculated discount values. + * * */ readonly validFrom?: string /** - * The time from which the discount should be effective. - * Please take Eventual Consistency into account for calculated undiscounted values. + * Date and time (UTC) until which the Discount is effective. + * Take [Eventual Consistency](/../api/general-concepts#eventual-consistency) into account for calculated undiscounted values. + * * */ readonly validUntil?: string } export interface ProductDiscountMatchQuery { /** + * ID of the specified Product. + * * */ readonly productId: string /** + * ID of the specified Product Variant. + * * */ readonly variantId: number /** + * Controls which [projected representation](/../api/projects/productProjections#current--staged) is applied for the query. + * Set to `true` for the `staged` Product Projection of the specified Product Variant, set to `false` for the `current` one. + * * */ readonly staged: boolean /** + * Specified Price of the specified Product Variant. + * * */ readonly price: QueryPrice } +/** + * [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [ProductDiscount](ctp:api:type:ProductDiscount). + * + */ export interface ProductDiscountPagedQueryResponse { /** * Number of [results requested](/../api/general-concepts#limit). @@ -172,24 +214,36 @@ export interface ProductDiscountPagedQueryResponse { */ readonly limit: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ - 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/limits#queries). + * * */ - readonly offset: number + readonly total?: number /** + * [ProductDiscounts](ctp:api:type:ProductDiscount) matching the query. + * * */ readonly results: ProductDiscount[] } /** - * [Reference](/../api/types#reference) to a [ProductDiscount](ctp:api:type:ProductDiscount). + * [Reference](ctp:api:type:Reference) to a [ProductDiscount](ctp:api:type:ProductDiscount). * */ export interface ProductDiscountReference { @@ -208,7 +262,7 @@ export interface ProductDiscountReference { readonly obj?: ProductDiscount } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ProductDiscount](ctp:api:type:ProductDiscount). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ProductDiscount](ctp:api:type:ProductDiscount). * */ export interface ProductDiscountResourceIdentifier { @@ -228,10 +282,14 @@ export interface ProductDiscountResourceIdentifier { } export interface ProductDiscountUpdate { /** + * Expected version of the ProductDiscount on which the changes should be applied. If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) will be returned. + * * */ readonly version: number /** + * Update actions to be performed on the ProductDiscount. + * * */ readonly actions: ProductDiscountUpdateAction[] @@ -251,40 +309,72 @@ export type ProductDiscountValue = | ProductDiscountValueAbsolute | ProductDiscountValueExternal | ProductDiscountValueRelative +/** + * Discounts the Product's Price by a fixed amount, defined by the `money` field. + */ export interface ProductDiscountValueAbsolute { readonly type: 'absolute' /** + * Money values in different currencies. An absolute [ProductDiscount](ctp:api:type:ProductDiscount) will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15\$. + * * */ - readonly money: TypedMoney[] + readonly money: CentPrecisionMoney[] } export type ProductDiscountValueDraft = | ProductDiscountValueAbsoluteDraft | ProductDiscountValueExternalDraft | ProductDiscountValueRelativeDraft +/** + * Discounts the Product Price by a fixed amount, defined by the `money` field. + * + */ export interface ProductDiscountValueAbsoluteDraft { readonly type: 'absolute' /** + * Money values in different currencies. An absolute [ProductDiscount](ctp:api:type:ProductDiscount) will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15\$. + * * */ - readonly money: Money[] + readonly money: CentPrecisionMoneyDraft[] } +/** + * Discounts the Product Price by allowing the client to explicitly [set a discounted value](/../api/projects/products#set-discounted-embedded-price). + * Used when setting discounts using an external service. + * + */ export interface ProductDiscountValueExternal { readonly type: 'external' } +/** + * Discounts the Product Price by allowing the client to explicitly [set a discounted value](/../api/projects/products#set-discounted-embedded-price). + * Use this when setting discounts using an external service. + * + */ export interface ProductDiscountValueExternalDraft { readonly type: 'external' } +/** + * Discounts the product price by a percentage, defined by the `permyriad` field. + */ export interface ProductDiscountValueRelative { readonly type: 'relative' /** + * Fraction (per ten thousand) the price is reduced by. For example, `1000` will result in a 10% price reduction. + * * */ readonly permyriad: number } +/** + * Discounts the Product Price by a percentage, defined by the `permyriad` field. + * + */ export interface ProductDiscountValueRelativeDraft { readonly type: 'relative' /** + * Fraction (per ten thousand) the price is reduced by. For example, `1000` will result in a 10% price reduction. + * * */ readonly permyriad: number @@ -292,6 +382,9 @@ export interface ProductDiscountValueRelativeDraft { export interface ProductDiscountChangeIsActiveAction { readonly action: 'changeIsActive' /** + * New value to set. + * If set to `true`, the Discount will be applied to Product Prices. + * * */ readonly isActive: boolean @@ -299,6 +392,8 @@ export interface ProductDiscountChangeIsActiveAction { export interface ProductDiscountChangeNameAction { readonly action: 'changeName' /** + * New value to set. Must not be empty. + * * */ readonly name: LocalizedString @@ -306,7 +401,8 @@ export interface ProductDiscountChangeNameAction { export interface ProductDiscountChangePredicateAction { readonly action: 'changePredicate' /** - * A valid ProductDiscount Predicate. + * New value to set. Must be a valid [ProductDiscount predicate](/../api/projects/predicates#productdiscount-predicates). + * * */ readonly predicate: string @@ -314,8 +410,11 @@ export interface ProductDiscountChangePredicateAction { export interface ProductDiscountChangeSortOrderAction { readonly action: 'changeSortOrder' /** - * The string must contain a number between 0 and 1. - * A discount with greater sortOrder is prioritized higher than a discount with lower sortOrder. + * New value to set. + * Must not be empty. + * The string value must be a number between `0` and `1`. + * A Discount with a higher sortOrder is prioritized. + * * */ readonly sortOrder: string @@ -323,6 +422,8 @@ export interface ProductDiscountChangeSortOrderAction { export interface ProductDiscountChangeValueAction { readonly action: 'changeValue' /** + * New value to set. Must not be empty. + * * */ readonly value: ProductDiscountValueDraft @@ -330,6 +431,8 @@ export interface ProductDiscountChangeValueAction { export interface ProductDiscountSetDescriptionAction { readonly action: 'setDescription' /** + * Value to set. If empty, any existing value will be removed. + * * */ readonly description?: LocalizedString @@ -337,8 +440,8 @@ export interface ProductDiscountSetDescriptionAction { export interface ProductDiscountSetKeyAction { readonly action: 'setKey' /** - * The key to set. - * If you provide a `null` value or do not set this field at all, the existing `key` field is removed. + * Value to set. If empty, any existing value will be removed. + * * */ readonly key?: string @@ -346,8 +449,10 @@ export interface ProductDiscountSetKeyAction { export interface ProductDiscountSetValidFromAction { readonly action: 'setValidFrom' /** - * The time from which the discount should be effective. - * Please take Eventual Consistency into account for calculated product discount values. + * Value to set. + * If empty, any existing value will be removed. + * Take [Eventual Consistency](/../api/general-concepts#eventual-consistency) into account for calculated discount values. + * * */ readonly validFrom?: string @@ -355,12 +460,16 @@ export interface ProductDiscountSetValidFromAction { export interface ProductDiscountSetValidFromAndUntilAction { readonly action: 'setValidFromAndUntil' /** + * Value to set. + * Take [Eventual Consistency](/../api/general-concepts#eventual-consistency) into account for calculated undiscounted values. + * * */ readonly validFrom?: string /** - * The timeframe for which the discount should be effective. - * Please take Eventual Consistency into account for calculated undiscounted values. + * Value to set. + * Take [Eventual Consistency](/../api/general-concepts#eventual-consistency) into account for calculated undiscounted values. + * * */ readonly validUntil?: string @@ -368,8 +477,10 @@ export interface ProductDiscountSetValidFromAndUntilAction { export interface ProductDiscountSetValidUntilAction { readonly action: 'setValidUntil' /** - * The time from which the discount should be ineffective. - * Please take Eventual Consistency into account for calculated undiscounted values. + * Value to set. + * If empty, any existing value will be removed. + * Take [Eventual Consistency](/../api/general-concepts#eventual-consistency) into account for calculated undiscounted values. + * * */ readonly validUntil?: string diff --git a/packages/platform-sdk/src/generated/models/product-selection.ts b/packages/platform-sdk/src/generated/models/product-selection.ts index 84893c041..d6dabcf9b 100644 --- a/packages/platform-sdk/src/generated/models/product-selection.ts +++ b/packages/platform-sdk/src/generated/models/product-selection.ts @@ -20,14 +20,14 @@ import { export interface AssignedProductReference { /** - * Reference to a Product that is assigned to the Product Selection. + * Reference to a Product that is assigned to the ProductSelection. * */ readonly product: ProductReference } export interface AssignedProductSelection { /** - * Reference to the Product Selection that this assignment is part of. + * Reference to the ProductSelection that this assignment is part of. * */ readonly productSelection: ProductSelectionReference @@ -44,8 +44,7 @@ export interface AssignedProductSelectionPagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or the server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -67,29 +66,30 @@ export interface AssignedProductSelectionPagedQueryResponse { */ readonly total?: number /** - * References to Product Selection that are assigned to the Product. + * References to ProductSelection that are assigned to the Product. * */ readonly results: AssignedProductSelection[] } export interface ProductSelection extends BaseResource { /** - * Platform-generated unique identifier of the Product Selection. + * Platform-generated unique identifier of the ProductSelection. + * * */ readonly id: string /** - * Current version of the Product Selection. + * Current version of the ProductSelection. * */ readonly version: number /** - * Date and time (UTC) the Product Selection was initially created. + * Date and time (UTC) the ProductSelection was initially created. * */ readonly createdAt: string /** - * Date and time (UTC) the Product Selection was last updated. + * Date and time (UTC) the ProductSelection was last updated. * */ readonly lastModifiedAt: string @@ -104,59 +104,60 @@ export interface ProductSelection extends BaseResource { */ readonly createdBy?: CreatedBy /** - * User-defined unique identifier of the Product Selection. + * User-defined unique identifier of the ProductSelection. + * * */ readonly key?: string /** - * Name of the Product Selection. + * Name of the ProductSelection. * */ readonly name: LocalizedString /** - * Number of Products that are currently assigned to this Product Selection. + * Number of Products that are currently assigned to this ProductSelection. * */ readonly productCount: number /** - * Specifies in which way the Products are assigned to the Product Selection. Currently, the only way of doing this is to specify each Product individually. Hence, the type is fixed to `individual` for now, but we have plans to add other types in the future. + * Specifies in which way the Products are assigned to the ProductSelection. Currently, the only way of doing this is to specify each Product individually. Hence, the type is fixed to `individual` for now, but we have plans to add other types in the future. * */ readonly type: ProductSelectionTypeEnum /** - * Custom Fields of this Product Selection. + * Custom Fields of this ProductSelection. * */ readonly custom?: CustomFields } /** - * Specifies which Product is assigned to which Product Selection. + * Specifies which Product is assigned to which ProductSelection. */ export interface ProductSelectionAssignment { /** - * Reference to a Product that is assigned to the Product Selection. + * Reference to a Product that is assigned to the ProductSelection. * */ readonly product: ProductReference /** - * Reference to the Product Selection that this assignment is part of. + * Reference to the ProductSelection that this assignment is part of. * */ readonly productSelection: ProductSelectionReference } export interface ProductSelectionDraft { /** - * User-defined unique identifier for the Product Selection. + * User-defined unique identifier for the ProductSelection. * */ readonly key?: string /** - * Name of the Product Selection. Not checked for uniqueness, but distinct names are recommended. + * Name of the ProductSelection. Not checked for uniqueness, but distinct names are recommended. * */ readonly name: LocalizedString /** - * Custom Fields of this Product Selection. + * Custom Fields of this ProductSelection. * */ readonly custom?: CustomFieldsDraft @@ -173,8 +174,7 @@ export interface ProductSelectionPagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or the server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -196,7 +196,7 @@ export interface ProductSelectionPagedQueryResponse { */ readonly total?: number /** - * The Product Selections matching the query. + * [ProductSelections](ctp:api:type:ProductSelection) matching the query. * * */ @@ -214,8 +214,7 @@ export interface ProductSelectionProductPagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or the server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -237,13 +236,13 @@ export interface ProductSelectionProductPagedQueryResponse { */ readonly total?: number /** - * References to Products that are assigned to the Product Selection. + * References to Products that are assigned to the ProductSelection. * */ readonly results: AssignedProductReference[] } /** - * [Reference](/../api/types#reference) to a [ProductSelection](ctp:api:type:ProductSelection). + * [Reference](ctp:api:type:Reference) to a [ProductSelection](ctp:api:type:ProductSelection). * */ export interface ProductSelectionReference { @@ -255,13 +254,13 @@ export interface ProductSelectionReference { */ readonly id: string /** - * Contains the representation of the expanded Product Selection. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for Product Selections. + * Contains the representation of the expanded ProductSelection. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for ProductSelections. * */ readonly obj?: ProductSelection } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ProductSelection](ctp:api:type:ProductSelection). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ProductSelection](ctp:api:type:ProductSelection). * */ export interface ProductSelectionResourceIdentifier { @@ -283,7 +282,7 @@ export type ProductSelectionType = IndividualProductSelectionType export interface IndividualProductSelectionType { readonly type: 'individual' /** - * The name of the Product Selection which is recommended to be unique. + * The name of the ProductSelection which is recommended to be unique. * */ readonly name: LocalizedString @@ -322,8 +321,7 @@ export interface ProductsInStorePagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or the server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -345,7 +343,7 @@ export interface ProductsInStorePagedQueryResponse { */ readonly total?: number /** - * Product Selection Assignments. + * ProductSelectionAssignments matching the query. * */ readonly results: ProductSelectionAssignment[] @@ -361,7 +359,7 @@ export interface ProductSelectionAddProductAction { export interface ProductSelectionChangeNameAction { readonly action: 'changeName' /** - * The new name to be set for the Product Selection. + * The new name to be set for the ProductSelection. * */ readonly name: LocalizedString diff --git a/packages/platform-sdk/src/generated/models/product-type.ts b/packages/platform-sdk/src/generated/models/product-type.ts index 23ec315c5..1f721e1e2 100644 --- a/packages/platform-sdk/src/generated/models/product-type.ts +++ b/packages/platform-sdk/src/generated/models/product-type.ts @@ -123,6 +123,8 @@ export interface AttributeLocalizedEnumValue { */ readonly key: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly label: LocalizedString @@ -183,7 +185,7 @@ export interface AttributeMoneyType { export interface AttributeNestedType { readonly name: 'nested' /** - * [Reference](/../api/types#reference) to a [ProductType](ctp:api:type:ProductType). + * [Reference](ctp:api:type:Reference) to a [ProductType](ctp:api:type:ProductType). * * */ @@ -195,6 +197,8 @@ export interface AttributeNumberType { export interface AttributeReferenceType { readonly name: 'reference' /** + * supported resource type identifiers: + * * */ readonly referenceTypeId: ReferenceTypeId @@ -296,6 +300,8 @@ export interface ProductTypePagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -305,7 +311,7 @@ export interface ProductTypePagedQueryResponse { readonly results: ProductType[] } /** - * [Reference](/../api/types#reference) to a [ProductType](ctp:api:type:ProductType). + * [Reference](ctp:api:type:Reference) to a [ProductType](ctp:api:type:ProductType). * */ export interface ProductTypeReference { @@ -324,7 +330,7 @@ export interface ProductTypeReference { readonly obj?: ProductType } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ProductType](ctp:api:type:ProductType). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ProductType](ctp:api:type:ProductType). * */ export interface ProductTypeResourceIdentifier { @@ -491,6 +497,8 @@ export interface ProductTypeChangeLabelAction { */ readonly attributeName: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly label: LocalizedString @@ -572,6 +580,8 @@ export interface ProductTypeSetInputTipAction { */ readonly attributeName: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly inputTip?: LocalizedString diff --git a/packages/platform-sdk/src/generated/models/product.ts b/packages/platform-sdk/src/generated/models/product.ts index c6b86d68b..a492ab0d8 100644 --- a/packages/platform-sdk/src/generated/models/product.ts +++ b/packages/platform-sdk/src/generated/models/product.ts @@ -180,6 +180,11 @@ export interface Product extends BaseResource { * */ readonly reviewRatingStatistics?: ReviewRatingStatistics + /** + * Specifies which type of prices should be used when looking up a price for this product. If not set, `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum) is used. + * + */ + readonly priceMode?: ProductPriceModeEnum } export interface ProductCatalogData { /** @@ -201,6 +206,8 @@ export interface ProductCatalogData { } export interface ProductData { /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -213,22 +220,32 @@ export interface ProductData { */ readonly categoryOrderHints?: CategoryOrderHints /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly description?: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly slug: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly metaTitle?: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly metaDescription?: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly metaKeywords?: LocalizedString @@ -322,6 +339,11 @@ export interface ProductDraft { * */ readonly publish?: boolean + /** + * Specifies which type of prices should be used when looking up a price for this product. If not set, `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum) is used. + * + */ + readonly priceMode?: ProductPriceModeEnum } export interface ProductPagedQueryResponse { /** @@ -339,6 +361,8 @@ export interface ProductPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -347,6 +371,12 @@ export interface ProductPagedQueryResponse { */ readonly results: Product[] } +/** + * + * This mode specifies which type of prices should be used when looking up the price of a product. + * + */ +export type ProductPriceModeEnum = 'Embedded' | 'Standalone' export interface ProductProjection extends BaseResource { /** * The unique ID of the Product. @@ -450,6 +480,8 @@ export interface ProductProjectionPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -474,6 +506,8 @@ export interface ProductProjectionPagedSearchResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -487,7 +521,7 @@ export interface ProductProjectionPagedSearchResponse { readonly facets: FacetResults } /** - * [Reference](/../api/types#reference) to a [Product](ctp:api:type:Product). + * [Reference](ctp:api:type:Reference) to a [Product](ctp:api:type:Product). * */ export interface ProductReference { @@ -506,7 +540,7 @@ export interface ProductReference { readonly obj?: Product } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Product](ctp:api:type:Product). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Product](ctp:api:type:Product). * */ export interface ProductResourceIdentifier { @@ -572,6 +606,7 @@ export type ProductUpdateAction = | ProductSetMetaDescriptionAction | ProductSetMetaKeywordsAction | ProductSetMetaTitleAction + | ProductSetPriceModeAction | ProductSetPricesAction | ProductSetProductPriceCustomFieldAction | ProductSetProductPriceCustomTypeAction @@ -953,7 +988,7 @@ export interface ProductChangeNameAction { export interface ProductChangePriceAction { readonly action: 'changePrice' /** - * ID of the [Price](#price) + * ID of the [EmbeddedPrice](ctp:api:type:EmbeddedPrice) * */ readonly priceId: string @@ -1079,7 +1114,7 @@ export interface ProductRemoveImageAction { export interface ProductRemovePriceAction { readonly action: 'removePrice' /** - * ID of the [Price](#price) + * ID of the [EmbeddedPrice](ctp:api:type:EmbeddedPrice) * */ readonly priceId: string @@ -1443,6 +1478,14 @@ export interface ProductSetMetaTitleAction { */ readonly staged?: boolean } +export interface ProductSetPriceModeAction { + readonly action: 'setPriceMode' + /** + * Specifies which type of prices should be used when looking up a price for this product. If not set, `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum) is used. + * + */ + readonly priceMode?: ProductPriceModeEnum +} export interface ProductSetPricesAction { readonly action: 'setPrices' /** diff --git a/packages/platform-sdk/src/generated/models/review.ts b/packages/platform-sdk/src/generated/models/review.ts index 0af66a899..9b9c0a346 100644 --- a/packages/platform-sdk/src/generated/models/review.ts +++ b/packages/platform-sdk/src/generated/models/review.ts @@ -176,6 +176,8 @@ export interface ReviewPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -215,7 +217,7 @@ export interface ReviewRatingStatistics { readonly ratingsDistribution: any } /** - * [Reference](/../api/types#reference) to a [Review](ctp:api:type:Review). + * [Reference](ctp:api:type:Reference) to a [Review](ctp:api:type:Review). * */ export interface ReviewReference { @@ -234,7 +236,7 @@ export interface ReviewReference { readonly obj?: Review } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Review](ctp:api:type:Review). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Review](ctp:api:type:Review). * */ export interface ReviewResourceIdentifier { diff --git a/packages/platform-sdk/src/generated/models/shipping-method.ts b/packages/platform-sdk/src/generated/models/shipping-method.ts index 7d4346bdb..458fef6ee 100644 --- a/packages/platform-sdk/src/generated/models/shipping-method.ts +++ b/packages/platform-sdk/src/generated/models/shipping-method.ts @@ -26,7 +26,7 @@ import { ZoneReference, ZoneResourceIdentifier } from './zone' export interface PriceFunction { /** - * The currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + * Currency code compliant to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). * * */ @@ -159,6 +159,8 @@ export interface ShippingMethodDraft { } export interface ShippingMethodPagedQueryResponse { /** + * Number of [results requested](/../api/general-concepts#limit). + * * */ readonly limit?: number @@ -171,6 +173,8 @@ export interface ShippingMethodPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset?: number @@ -180,7 +184,7 @@ export interface ShippingMethodPagedQueryResponse { readonly results: ShippingMethod[] } /** - * [Reference](/../api/types#reference) to a [ShippingMethod](ctp:api:type:ShippingMethod). + * [Reference](ctp:api:type:Reference) to a [ShippingMethod](ctp:api:type:ShippingMethod). * */ export interface ShippingMethodReference { @@ -199,7 +203,7 @@ export interface ShippingMethodReference { readonly obj?: ShippingMethod } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShippingMethod](ctp:api:type:ShippingMethod). * */ export interface ShippingMethodResourceIdentifier { @@ -295,6 +299,7 @@ export interface CartClassificationTier { readonly value: string /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -313,6 +318,7 @@ export interface CartScoreTier { readonly score: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * @@ -335,6 +341,7 @@ export interface CartValueTier { readonly minimumCentAmount: number /** * Draft type that stores amounts in cent precision for the specified currency. + * * For storing money values in fractions of the minor unit in a currency, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft) instead. * * diff --git a/packages/platform-sdk/src/generated/models/shopping-list.ts b/packages/platform-sdk/src/generated/models/shopping-list.ts index 73e760aa3..6e35584cf 100644 --- a/packages/platform-sdk/src/generated/models/shopping-list.ts +++ b/packages/platform-sdk/src/generated/models/shopping-list.ts @@ -178,6 +178,8 @@ export interface ShoppingListLineItem { */ readonly id: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -186,11 +188,13 @@ export interface ShoppingListLineItem { */ readonly productId: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly productSlug?: LocalizedString /** - * [Reference](/../api/types#reference) to a [ProductType](ctp:api:type:ProductType). + * [Reference](ctp:api:type:Reference) to a [ProductType](ctp:api:type:ProductType). * * */ @@ -252,6 +256,8 @@ export interface ShoppingListPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -261,7 +267,7 @@ export interface ShoppingListPagedQueryResponse { readonly results: ShoppingList[] } /** - * [Reference](/../api/types#reference) to a [ShoppingList](ctp:api:type:ShoppingList). + * [Reference](ctp:api:type:Reference) to a [ShoppingList](ctp:api:type:ShoppingList). * */ export interface ShoppingListReference { @@ -280,7 +286,7 @@ export interface ShoppingListReference { readonly obj?: ShoppingList } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [ShoppingList](ctp:api:type:ShoppingList). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [ShoppingList](ctp:api:type:ShoppingList). * */ export interface ShoppingListResourceIdentifier { @@ -418,10 +424,14 @@ export interface ShoppingListAddLineItemAction { export interface ShoppingListAddTextLineItemAction { readonly action: 'addTextLineItem' /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly description?: LocalizedString @@ -472,6 +482,8 @@ export interface ShoppingListChangeTextLineItemNameAction { */ readonly textLineItemId: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly name: LocalizedString @@ -690,6 +702,8 @@ export interface ShoppingListSetTextLineItemDescriptionAction { */ readonly textLineItemId: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly description?: LocalizedString diff --git a/packages/platform-sdk/src/generated/models/standalone-price.ts b/packages/platform-sdk/src/generated/models/standalone-price.ts new file mode 100644 index 000000000..c385aeff9 --- /dev/null +++ b/packages/platform-sdk/src/generated/models/standalone-price.ts @@ -0,0 +1,338 @@ +/** + * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT. + * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. + * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. + */ + +import { ChannelReference, ChannelResourceIdentifier } from './channel' +import { + BaseResource, + CreatedBy, + DiscountedPrice, + DiscountedPriceDraft, + LastModifiedBy, + Money, + PriceTier, + PriceTierDraft, + TypedMoney, +} from './common' +import { + CustomerGroupReference, + CustomerGroupResourceIdentifier, +} from './customer-group' +import { + CustomFields, + CustomFieldsDraft, + FieldContainer, + TypeResourceIdentifier, +} from './type' + +export interface StandalonePrice extends BaseResource { + /** + * Platform-generated unique identifier of the StandalonePrice. + * + * + */ + readonly id: string + /** + * Current version of the StandalonePrice. + * + * + */ + readonly version: number + /** + * Date and time (UTC) the StandalonePrice was initially created. + * + * + */ + readonly createdAt: string + /** + * Date and time (UTC) the StandalonePrice was last updated. + * + * + */ + 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 + /** + * User-defined unique identifier of the StandalonePrice. + * + */ + readonly key?: string + /** + * SKU of the [ProductVariant](ctp:api:type:ProductVariant) to which this Price is associated. + * + * + */ + readonly sku: string + /** + * Money value of this Price. + * + * + */ + readonly value: TypedMoney + /** + * Country for which this Price is valid. + * + * + */ + readonly country?: string + /** + * [CustomerGroup](ctp:api:type:CustomerGroup) for which this Price is valid. + * + * + */ + readonly customerGroup?: CustomerGroupReference + /** + * Product distribution [Channel](ctp:api:type:Channel) for which this Price is valid. + * + * + */ + readonly channel?: ChannelReference + /** + * Date from which the Price is valid. + * + * + */ + readonly validFrom?: string + /** + * Date until the Price is valid. + * + * + */ + readonly validUntil?: string + /** + * Price tiers if any are defined. + * + * + */ + readonly tiers?: PriceTier[] + /** + * Set if a matching [ProductDiscount](ctp:api:type:ProductDiscount) exists. If set, the Platform uses the `discounted` value for the [LineItem Price selection](/../api/projects/carts#lineitem-price-selection). + * 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). + * + * + */ + readonly discounted?: DiscountedPrice + /** + * Custom Fields for the StandalonePrice. + * + * + */ + readonly custom?: CustomFields +} +/** + * Standalone Prices are defined with a scope consisting of `currency` and optionally `country`, `customerGroup`, and `channel` and/or a validity period (`validFrom` and/or `validTo`). For more information see [price selection](/../api/projects/products#price-selection). + * Creating a Standalone Price is rejected if there already exists a Standalone Price for the same SKU with exactly the same price scope, or with overlapping validity periods within the same price scope. A Price without validity period does not conflict with a Price defined for a time period. + */ +export interface StandalonePriceDraft { + /** + * User-defined unique identifier for the StandalonePrice. + * + */ + readonly key?: string + /** + * Specifies to which [ProductVariant](ctp:api:type:ProductVariant) the Platform associates this Price. + * It is not validated to exist in product variants. + * + */ + readonly sku: string + /** + * Sets the money value of this Price. + * + * + */ + readonly value: Money + /** + * Sets the country for which this Price is valid. + * + * + */ + readonly country?: string + /** + * Sets the [CustomerGroup](ctp:api:type:CustomerGroup) for which this Price is valid. + * + * + */ + readonly customerGroup?: CustomerGroupResourceIdentifier + /** + * Sets the product distribution [Channel](ctp:api:type:Channel) for which this Price is valid. + * + * + */ + readonly channel?: ChannelResourceIdentifier + /** + * Sets the date from which the Price is valid. + * + * + */ + readonly validFrom?: string + /** + * Sets the date until the Price is valid. + * + * + */ + readonly validUntil?: string + /** + * Sets price tiers. + * + * + */ + readonly tiers?: PriceTierDraft[] + /** + * Sets a discounted price for this Price that is different from the base price with `value`. + * + * + */ + readonly discounted?: DiscountedPriceDraft + /** + * Custom Fields for the StandalonePrice. + * + * + */ + readonly custom?: CustomFieldsDraft +} +export interface StandalonePricePagedQueryResponse { + /** + * Number of requested results. + * + * + */ + readonly limit: number + /** + * Offset supplied by the client or server default. It is the number of elements skipped, not a page number. + * + * + */ + readonly offset: number + /** + * Actual number of results returned. + * + * + */ + 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/limits#queries). + * + * + */ + readonly total?: number + /** + * [StandalonePrices](ctp:api:type:StandalonePrice) matching the query. + * + * + */ + readonly results: StandalonePrice[] +} +/** + * [Reference](/../api/types#reference) to a [StandalonePrice](ctp:api:type:StandalonePrice). + * + */ +export interface StandalonePriceReference { + readonly typeId: 'standalone-price' + /** + * Unique ID of the referenced resource. + * + * + */ + readonly id: string + /** + * Contains the representation of the expanded StandalonePrice. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for StandalonePrice. + * + * + */ + readonly obj?: StandalonePrice +} +/** + * [ResourceIdentifier](/../api/types#resourceidentifier) to a [StandalonePrice](ctp:api:type:StandalonePrice). + * + */ +export interface StandalonePriceResourceIdentifier { + readonly typeId: 'standalone-price' + /** + * Platform-generated unique identifier of the referenced resource. Required if `key` is absent. + * + * + */ + readonly id?: string + /** + * User-defined unique identifier of the referenced resource. Required if `id` is absent. + * + * + */ + readonly key?: string +} +export interface StandalonePriceUpdate { + /** + * Expected version of the StandalonePrice 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 StandalonePrice. + * + * + */ + readonly actions: StandalonePriceUpdateAction[] +} +export type StandalonePriceUpdateAction = + | StandalonePriceChangeValueAction + | StandalonePriceSetCustomFieldAction + | StandalonePriceSetCustomTypeAction +export interface StandalonePriceChangeValueAction { + readonly action: 'changeValue' + /** + * New value to set. Must not be empty. + * + * + */ + readonly value: Money +} +export interface StandalonePriceSetCustomFieldAction { + readonly action: 'setCustomField' + /** + * Name of the [Custom Field](/../api/projects/custom-fields). + * + * + */ + readonly name: string + /** + * If `value` is absent or `null`, this field will be removed if it exists. + * Trying to remove a field that does not exist will fail with an [InvalidOperation](/../api/errors#general-400-invalid-operation) error. + * If `value` is provided, it is set for the field defined by `name`. + * + * + */ + readonly value?: any +} +export interface StandalonePriceSetCustomTypeAction { + readonly action: 'setCustomType' + /** + * Defines the [Type](ctp:api:type:Type) that extends the StandalonePrice with [Custom Fields](/../api/projects/custom-fields). + * If absent, any existing Type and Custom Fields are removed from the StandalonePrice. + * + * + */ + readonly type?: TypeResourceIdentifier + /** + * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the StandalonePrice. + * + * + */ + readonly fields?: FieldContainer +} diff --git a/packages/platform-sdk/src/generated/models/state.ts b/packages/platform-sdk/src/generated/models/state.ts index 4bee16ee9..b073f3aaf 100644 --- a/packages/platform-sdk/src/generated/models/state.ts +++ b/packages/platform-sdk/src/generated/models/state.ts @@ -159,8 +159,7 @@ export interface StatePagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or the server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -189,7 +188,7 @@ export interface StatePagedQueryResponse { readonly results: State[] } /** - * [Reference](/../api/types#reference) to a [State](ctp:api:type:State). + * [Reference](ctp:api:type:Reference) to a [State](ctp:api:type:State). * */ export interface StateReference { @@ -208,7 +207,7 @@ export interface StateReference { readonly obj?: State } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [State](ctp:api:type:State). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [State](ctp:api:type:State). * */ export interface StateResourceIdentifier { diff --git a/packages/platform-sdk/src/generated/models/store.ts b/packages/platform-sdk/src/generated/models/store.ts index 1b7e065dc..e1b5b51e5 100644 --- a/packages/platform-sdk/src/generated/models/store.ts +++ b/packages/platform-sdk/src/generated/models/store.ts @@ -156,6 +156,8 @@ export interface StoreDraft { export interface StoreKeyReference { readonly typeId: 'store' /** + * User-defined unique and immutable key of the referenced resource. + * * */ readonly key: string @@ -176,6 +178,8 @@ export interface StorePagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number @@ -200,13 +204,13 @@ export interface StoreReference { export interface StoreResourceIdentifier { readonly typeId: 'store' /** - * Unique ID of the referenced resource. Either `id` or `key` is required. + * Platform-generated unique identifier of the referenced resource. Required if `key` is absent. * * */ readonly id?: string /** - * Unique key of the referenced resource. Either `id` or `key` is required. + * User-defined unique identifier of the referenced resource. Required if `id` is absent. * * */ diff --git a/packages/platform-sdk/src/generated/models/subscription.ts b/packages/platform-sdk/src/generated/models/subscription.ts index 87653f9c4..c839fb3c0 100644 --- a/packages/platform-sdk/src/generated/models/subscription.ts +++ b/packages/platform-sdk/src/generated/models/subscription.ts @@ -94,6 +94,8 @@ export interface MessageDeliveryPayload { */ readonly projectKey: string /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -160,6 +162,8 @@ export interface ResourceCreatedDeliveryPayload { */ readonly projectKey: string /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -183,6 +187,8 @@ export interface ResourceDeletedDeliveryPayload { */ readonly projectKey: string /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -210,6 +216,8 @@ export interface ResourceUpdatedDeliveryPayload { */ readonly projectKey: string /** + * A Reference represents a loose reference to another resource in the same commercetools Project identified by its `id`. The `typeId` indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like [ChannelReference](ctp:api:type:ChannelReference). A referenced resource can be embedded through [Reference Expansion](/general-concepts#reference-expansion). The expanded reference is the value of an additional `obj` field then. + * * */ readonly resource: Reference @@ -365,6 +373,8 @@ export interface SubscriptionPagedQueryResponse { */ readonly total?: number /** + * Number of [elements skipped](/../api/general-concepts#offset). + * * */ readonly offset: number diff --git a/packages/platform-sdk/src/generated/models/tax-category.ts b/packages/platform-sdk/src/generated/models/tax-category.ts index d9a185abf..a0f1c1d19 100644 --- a/packages/platform-sdk/src/generated/models/tax-category.ts +++ b/packages/platform-sdk/src/generated/models/tax-category.ts @@ -121,8 +121,7 @@ export interface TaxCategoryPagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or the server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -151,7 +150,7 @@ export interface TaxCategoryPagedQueryResponse { readonly results: TaxCategory[] } /** - * [Reference](/../api/types#reference) to a [TaxCategory](ctp:api:type:TaxCategory). + * [Reference](ctp:api:type:Reference) to a [TaxCategory](ctp:api:type:TaxCategory). * */ export interface TaxCategoryReference { @@ -170,7 +169,7 @@ export interface TaxCategoryReference { readonly obj?: TaxCategory } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [TaxCategory](ctp:api:type:TaxCategory). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [TaxCategory](ctp:api:type:TaxCategory). * */ export interface TaxCategoryResourceIdentifier { diff --git a/packages/platform-sdk/src/generated/models/type.ts b/packages/platform-sdk/src/generated/models/type.ts index 0b8a22e78..7cd3358a6 100644 --- a/packages/platform-sdk/src/generated/models/type.ts +++ b/packages/platform-sdk/src/generated/models/type.ts @@ -396,7 +396,7 @@ export interface TypePagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or server default. It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -425,7 +425,7 @@ export interface TypePagedQueryResponse { readonly results: Type[] } /** - * [Reference](/../api/types#reference) to a [Type](ctp:api:type:Type). + * [Reference](ctp:api:type:Reference) to a [Type](ctp:api:type:Type). * */ export interface TypeReference { @@ -445,7 +445,7 @@ export interface TypeReference { readonly obj?: Type } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) of a [Type](ctp:api:type:Type). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) of a [Type](ctp:api:type:Type). * */ export interface TypeResourceIdentifier { @@ -649,6 +649,8 @@ export interface TypeChangeLabelAction { */ readonly fieldName: string /** + * JSON object where the keys are of [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag), and the values are the corresponding strings used for that language. + * * */ readonly label: LocalizedString diff --git a/packages/platform-sdk/src/generated/models/zone.ts b/packages/platform-sdk/src/generated/models/zone.ts index 6b1ff3100..0abd938da 100644 --- a/packages/platform-sdk/src/generated/models/zone.ts +++ b/packages/platform-sdk/src/generated/models/zone.ts @@ -112,8 +112,7 @@ export interface ZonePagedQueryResponse { */ readonly limit: number /** - * Offset supplied by the client or the server default. - * It is the number of elements skipped, not a page number. + * Number of [elements skipped](/../api/general-concepts#offset). * * */ @@ -142,7 +141,7 @@ export interface ZonePagedQueryResponse { readonly results: Zone[] } /** - * [Reference](/../api/types#reference) to a [Zone](ctp:api:type:Zone). + * [Reference](ctp:api:type:Reference) to a [Zone](ctp:api:type:Zone). * */ export interface ZoneReference { @@ -161,7 +160,7 @@ export interface ZoneReference { readonly obj?: Zone } /** - * [ResourceIdentifier](/../api/types#resourceidentifier) to a [Zone](ctp:api:type:Zone). + * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Zone](ctp:api:type:Zone). * */ export interface ZoneResourceIdentifier { diff --git a/packages/platform-sdk/test/generated/client/custom-objects/by-project-key-custom-objects-by-container-by-key-request-builder.test.ts b/packages/platform-sdk/test/generated/client/custom-objects/by-project-key-custom-objects-by-container-by-key-request-builder.test.ts index 52a73df92..7e9e308b0 100644 --- a/packages/platform-sdk/test/generated/client/custom-objects/by-project-key-custom-objects-by-container-by-key-request-builder.test.ts +++ b/packages/platform-sdk/test/generated/client/custom-objects/by-project-key-custom-objects-by-container-by-key-request-builder.test.ts @@ -40,21 +40,21 @@ export function getRequestsWithMethodParameters(): RequestWithMethod[] { }, { method: 'delete', - uri: '/test_projectKey/custom-objects/test_container/test_key?dataErasure=true', + uri: '/test_projectKey/custom-objects/test_container/test_key?expand=expand', request: apiRoot .withProjectKey({ projectKey: 'test_projectKey' }) .customObjects() .withContainerAndKey({ container: 'test_container', key: 'test_key' }) - .delete({ queryArgs: { dataErasure: true } }), + .delete({ queryArgs: { expand: 'expand' } }), }, { method: 'delete', - uri: '/test_projectKey/custom-objects/test_container/test_key?expand=expand', + uri: '/test_projectKey/custom-objects/test_container/test_key?dataErasure=true', request: apiRoot .withProjectKey({ projectKey: 'test_projectKey' }) .customObjects() .withContainerAndKey({ container: 'test_container', key: 'test_key' }) - .delete({ queryArgs: { expand: 'expand' } }), + .delete({ queryArgs: { dataErasure: true } }), }, { method: 'delete', diff --git a/packages/platform-sdk/test/generated/client/custom-objects/by-project-key-custom-objects-by-container-request-builder.test.ts b/packages/platform-sdk/test/generated/client/custom-objects/by-project-key-custom-objects-by-container-request-builder.test.ts index cab5829c8..b75d3ac6e 100644 --- a/packages/platform-sdk/test/generated/client/custom-objects/by-project-key-custom-objects-by-container-request-builder.test.ts +++ b/packages/platform-sdk/test/generated/client/custom-objects/by-project-key-custom-objects-by-container-request-builder.test.ts @@ -11,6 +11,15 @@ const apiRoot: ApiRoot = new ApiRoot({ executeRequest: null }) export function getRequestsWithMethodParameters(): RequestWithMethod[] { return [ + { + method: 'get', + uri: '/test_projectKey/custom-objects/test_container?sort=sort', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .customObjects() + .withContainer({ container: 'test_container' }) + .get({ queryArgs: { sort: 'sort' } }), + }, { method: 'get', uri: '/test_projectKey/custom-objects/test_container?where=where', @@ -20,6 +29,15 @@ export function getRequestsWithMethodParameters(): RequestWithMethod[] { .withContainer({ container: 'test_container' }) .get({ queryArgs: { where: 'where' } }), }, + { + method: 'get', + uri: '/test_projectKey/custom-objects/test_container?expand=expand', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .customObjects() + .withContainer({ container: 'test_container' }) + .get({ queryArgs: { expand: 'expand' } }), + }, { method: 'get', uri: '/test_projectKey/custom-objects/test_container?var.varName=var.varName', @@ -31,12 +49,30 @@ export function getRequestsWithMethodParameters(): RequestWithMethod[] { }, { method: 'get', - uri: '/test_projectKey/custom-objects/test_container?expand=expand', + uri: '/test_projectKey/custom-objects/test_container?limit=7', request: apiRoot .withProjectKey({ projectKey: 'test_projectKey' }) .customObjects() .withContainer({ container: 'test_container' }) - .get({ queryArgs: { expand: 'expand' } }), + .get({ queryArgs: { limit: 7 } }), + }, + { + method: 'get', + uri: '/test_projectKey/custom-objects/test_container?offset=3', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .customObjects() + .withContainer({ container: 'test_container' }) + .get({ queryArgs: { offset: 3 } }), + }, + { + method: 'get', + uri: '/test_projectKey/custom-objects/test_container?withTotal=true', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .customObjects() + .withContainer({ container: 'test_container' }) + .get({ queryArgs: { withTotal: true } }), }, { method: 'get', diff --git a/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-by-id-request-builder.test.ts b/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-by-id-request-builder.test.ts new file mode 100644 index 000000000..051f5063f --- /dev/null +++ b/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-by-id-request-builder.test.ts @@ -0,0 +1,83 @@ +/** + * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT. + * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. + * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. + */ + +import { RequestWithMethod } from '../../../request-with-method' +import { ApiRoot } from '../../../../src' + +const apiRoot: ApiRoot = new ApiRoot({ executeRequest: null }) + +export function getRequestsWithMethodParameters(): RequestWithMethod[] { + return [ + { + method: 'get', + uri: '/test_projectKey/standalone-prices/test_ID?expand=expand', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withId({ ID: 'test_ID' }) + .get({ queryArgs: { expand: 'expand' } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices/test_ID', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withId({ ID: 'test_ID' }) + .get(), + }, + { + method: 'post', + uri: '/test_projectKey/standalone-prices/test_ID?expand=expand', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withId({ ID: 'test_ID' }) + .post({ body: null, headers: null, queryArgs: { expand: 'expand' } }), + }, + { + method: 'post', + uri: '/test_projectKey/standalone-prices/test_ID', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withId({ ID: 'test_ID' }) + .post({ body: null, headers: null }), + }, + { + method: 'delete', + uri: '/test_projectKey/standalone-prices/test_ID?version=2', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withId({ ID: 'test_ID' }) + .delete({ queryArgs: { version: 2 } }), + }, + { + method: 'delete', + uri: '/test_projectKey/standalone-prices/test_ID?expand=expand&version=2', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withId({ ID: 'test_ID' }) + .delete({ queryArgs: { expand: 'expand', version: 2 } }), + }, + ] +} + +describe('Testing ByProjectKeyStandalonePricesByIDRequestBuilder Requests', () => { + const requestsToTest = getRequestsWithMethodParameters() + requestsToTest.forEach((rm) => { + test(`Testing => request method: ${rm.method} and url: ${rm.uri}`, async () => { + expect(rm.method.toLowerCase()).toBe( + rm.request.clientRequest().method.toLowerCase() + ) + expect(rm.uri.toLowerCase()).toBe( + rm.request.clientRequest().uri.toLowerCase() + ) + }) + }) +}) diff --git a/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-key-by-key-request-builder.test.ts b/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-key-by-key-request-builder.test.ts new file mode 100644 index 000000000..24856d390 --- /dev/null +++ b/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-key-by-key-request-builder.test.ts @@ -0,0 +1,83 @@ +/** + * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT. + * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. + * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. + */ + +import { RequestWithMethod } from '../../../request-with-method' +import { ApiRoot } from '../../../../src' + +const apiRoot: ApiRoot = new ApiRoot({ executeRequest: null }) + +export function getRequestsWithMethodParameters(): RequestWithMethod[] { + return [ + { + method: 'get', + uri: '/test_projectKey/standalone-prices/key=test_key?expand=expand', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withKey({ key: 'test_key' }) + .get({ queryArgs: { expand: 'expand' } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices/key=test_key', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withKey({ key: 'test_key' }) + .get(), + }, + { + method: 'post', + uri: '/test_projectKey/standalone-prices/key=test_key?expand=expand', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withKey({ key: 'test_key' }) + .post({ body: null, headers: null, queryArgs: { expand: 'expand' } }), + }, + { + method: 'post', + uri: '/test_projectKey/standalone-prices/key=test_key', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withKey({ key: 'test_key' }) + .post({ body: null, headers: null }), + }, + { + method: 'delete', + uri: '/test_projectKey/standalone-prices/key=test_key?version=2', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withKey({ key: 'test_key' }) + .delete({ queryArgs: { version: 2 } }), + }, + { + method: 'delete', + uri: '/test_projectKey/standalone-prices/key=test_key?expand=expand&version=2', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .withKey({ key: 'test_key' }) + .delete({ queryArgs: { expand: 'expand', version: 2 } }), + }, + ] +} + +describe('Testing ByProjectKeyStandalonePricesKeyByKeyRequestBuilder Requests', () => { + const requestsToTest = getRequestsWithMethodParameters() + requestsToTest.forEach((rm) => { + test(`Testing => request method: ${rm.method} and url: ${rm.uri}`, async () => { + expect(rm.method.toLowerCase()).toBe( + rm.request.clientRequest().method.toLowerCase() + ) + expect(rm.uri.toLowerCase()).toBe( + rm.request.clientRequest().uri.toLowerCase() + ) + }) + }) +}) diff --git a/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-request-builder.test.ts b/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-request-builder.test.ts new file mode 100644 index 000000000..1d2e1fc58 --- /dev/null +++ b/packages/platform-sdk/test/generated/client/standalone-prices/by-project-key-standalone-prices-request-builder.test.ts @@ -0,0 +1,109 @@ +/** + * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT. + * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it. + * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/. + */ + +import { RequestWithMethod } from '../../../request-with-method' +import { ApiRoot } from '../../../../src' + +const apiRoot: ApiRoot = new ApiRoot({ executeRequest: null }) + +export function getRequestsWithMethodParameters(): RequestWithMethod[] { + return [ + { + method: 'get', + uri: '/test_projectKey/standalone-prices?expand=expand', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .get({ queryArgs: { expand: 'expand' } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices?sort=sort', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .get({ queryArgs: { sort: 'sort' } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices?limit=7', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .get({ queryArgs: { limit: 7 } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices?offset=3', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .get({ queryArgs: { offset: 3 } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices?withTotal=true', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .get({ queryArgs: { withTotal: true } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices?where=where', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .get({ queryArgs: { where: 'where' } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices?var.varName=var.varName', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .get({ queryArgs: { 'var.varName': 'var.varName' } }), + }, + { + method: 'get', + uri: '/test_projectKey/standalone-prices', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .get(), + }, + { + method: 'post', + uri: '/test_projectKey/standalone-prices?expand=expand', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .post({ body: null, headers: null, queryArgs: { expand: 'expand' } }), + }, + { + method: 'post', + uri: '/test_projectKey/standalone-prices', + request: apiRoot + .withProjectKey({ projectKey: 'test_projectKey' }) + .standalonePrices() + .post({ body: null, headers: null }), + }, + ] +} + +describe('Testing ByProjectKeyStandalonePricesRequestBuilder Requests', () => { + const requestsToTest = getRequestsWithMethodParameters() + requestsToTest.forEach((rm) => { + test(`Testing => request method: ${rm.method} and url: ${rm.uri}`, async () => { + expect(rm.method.toLowerCase()).toBe( + rm.request.clientRequest().method.toLowerCase() + ) + expect(rm.uri.toLowerCase()).toBe( + rm.request.clientRequest().uri.toLowerCase() + ) + }) + }) +})