Skip to content

Commit

Permalink
Update generated SDKs (#258)
Browse files Browse the repository at this point in the history
Co-authored-by: Auto Mation <automation@commercetools.com>
Co-authored-by: Jens Schulze <jens.schulze@commercetools.com>
  • Loading branch information
3 people committed May 23, 2022
1 parent c605309 commit ba52d38
Show file tree
Hide file tree
Showing 64 changed files with 2,484 additions and 472 deletions.
10 changes: 10 additions & 0 deletions .changeset/calm-crabs-unite.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
*
*/
Expand Down
6 changes: 4 additions & 2 deletions packages/history-sdk/src/generated/models/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions packages/history-sdk/src/generated/models/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface LocalizedString {
}
export interface Address {
/**
* Unique ID of the Address.
*
*/
readonly id: string
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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).
*
*
*/
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions packages/importapi-sdk/src/generated/models/importsinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
*
*/
Expand Down
16 changes: 8 additions & 8 deletions packages/importapi-sdk/src/generated/models/prices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
*
*
Expand All @@ -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.
*
*
*/
Expand All @@ -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.
*
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export interface ProjectCategoryRecommendationPagedQueryResponse {
*/
readonly total: number
/**
* Number of [elements skipped](/../api/general-concepts#offset).
*
*
*/
readonly offset: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export interface GeneralCategoryRecommendationPagedQueryResponse {
*/
readonly total: number
/**
* Number of [elements skipped](/../api/general-concepts#offset).
*
*
*/
readonly offset: number
Expand Down
2 changes: 1 addition & 1 deletion packages/ml-sdk/src/generated/models/image-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
*
*/
Expand Down
18 changes: 18 additions & 0 deletions packages/ml-sdk/src/generated/models/missing-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -182,6 +186,8 @@ export interface MissingAttributesPagedQueryResult {
*/
readonly total: number
/**
* Number of [elements skipped](/../api/general-concepts#offset).
*
*
*/
readonly offset: number
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -335,6 +345,8 @@ export interface MissingImagesPagedQueryResult {
*/
readonly total: number
/**
* Number of [elements skipped](/../api/general-concepts#offset).
*
*
*/
readonly offset: number
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -487,6 +503,8 @@ export interface MissingPricesPagedQueryResult {
*/
readonly total: number
/**
* Number of [elements skipped](/../api/general-concepts#offset).
*
*
*/
readonly offset: number
Expand Down
6 changes: 6 additions & 0 deletions packages/ml-sdk/src/generated/models/similar-products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -188,6 +192,8 @@ export interface SimilarProductsPagedQueryResult {
*/
readonly total: number
/**
* Number of [elements skipped](/../api/general-concepts#offset).
*
*
*/
readonly offset: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export class ByProjectKeyCustomObjectsByContainerByKeyRequestBuilder {
baseUri?: string
}
) {}
/**
* Get CustomObject by container and key
*/
public get(methodArgs?: {
queryArgs?: {
expand?: string | string[]
Expand All @@ -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?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?: {
Expand Down

0 comments on commit ba52d38

Please sign in to comment.