Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Dec 4, 2024
1 parent d09a417 commit 3f2e747
Show file tree
Hide file tree
Showing 24 changed files with 553 additions and 130 deletions.
309 changes: 309 additions & 0 deletions .changeset/changes_api.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions .changeset/changes_history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@commercetools/history-sdk': minor
---

**History changes**

<details>
<summary>Required Property(s)</summary>

- changed property `id` of type `ModifiedBy` to be optional
</details>
26 changes: 26 additions & 0 deletions .changeset/changes_import.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
'@commercetools/importapi-sdk': minor
---

**Import changes**

<details>
<summary>Added Type(s)</summary>

- added type `InvalidFieldsUpdateError`
- added type `NewMasterVariantAdditionNotAllowedError`
- added type `ReferencedResourceNotFound`
</details>

<details>
<summary>Deprecated Property(s)</summary>

- property `PriceImport::publish` is removed
- property `ProductVariantImport::publish` is removed
</details>

<details>
<summary>Added Enum(s)</summary>

- added enum `customer-group` to type `CustomFieldReferenceValue`
</details>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ByProjectKeyProductVariantPatchesImportContainersByImportContainerK
) {}
/**
* Creates a new import request for Product Variant Patches.
* Returns an [InvalidField](/error#invalidfielderror) error if the [ProductVariantPatchRequest](ctp:import:type:ProductVariantPatchRequest) contains patches with and without the `product` field set.
* Returns an [InvalidField](ctp:import:type:InvalidFieldError) error if the [ProductVariantPatchRequest](ctp:import:type:ProductVariantPatchRequest) contains patches with and without the `product` field set.
*
*/
public post(methodArgs: {
Expand Down
10 changes: 6 additions & 4 deletions packages/importapi-sdk/src/generated/models/categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import {
import { Custom } from './customfields'

/**
* The data representation for a Category to be imported that is persisted as a [Category](/../api/projects/categories#category) in the Project.
* The data representation for a Category to be imported that is persisted as a [Category](ctp:api:type:Category) in the Project.
*
*/
export interface CategoryImport extends ImportResource {
/**
* User-defined unique identifier. If a [Category](/../api/projects/categories#category) with this `key` exists, it will be updated with the imported data.
* User-defined unique identifier. If a [Category](ctp:api:type:Category) with this `key` exists, it will be updated with the imported data.
*
*/
readonly key: string
Expand All @@ -43,8 +43,8 @@ export interface CategoryImport extends ImportResource {
readonly description?: LocalizedString
/**
* Maps to `Category.parent`.
* The Reference to the parent [Category](/../api/projects/categories#category) with which the Category is associated.
* If referenced Category does not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Category is created.
* The Reference to the parent [Category](ctp:api:type:Category) with which the Category is associated.
* If referenced Category does not exist, the `state` of the [ImportOperation](ctp:import:type:ImportOperation) will be set to `unresolved` until the necessary Category is created.
*
*
*/
Expand Down Expand Up @@ -80,6 +80,8 @@ export interface CategoryImport extends ImportResource {
*/
readonly metaKeywords?: LocalizedString
/**
* Maps to `Category.assets`.
*
*
*/
readonly assets?: Asset[]
Expand Down
10 changes: 7 additions & 3 deletions packages/importapi-sdk/src/generated/models/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,17 @@ export interface CustomObjectKeyReference {
*/
readonly container: string
}
/**
* References a resource which could not be resolved.
*/
export interface UnresolvedReferences {
/**
* The `key` of the resource.
*
*/
readonly key: string
/**
* The type of the referenced resource.
*
* The type of resource.
*
*/
readonly typeId: ReferenceType
Expand Down Expand Up @@ -471,6 +474,7 @@ export interface Money {
}
export interface DiscountedPrice {
/**
* Money value of the discounted price.
*
*/
readonly value: TypedMoney
Expand Down Expand Up @@ -544,7 +548,7 @@ export type ReferenceType =
| 'type'
| string
/**
* Every [Import Operation](/import-operation) is assigned one of the following states.
* Every [Import Operation](ctp:import:type:ImportOperation) is assigned one of the following states.
*
*/
export type ProcessingState =
Expand Down
66 changes: 55 additions & 11 deletions packages/importapi-sdk/src/generated/models/customers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Custom } from './customfields'

export type AuthenticationMode = 'ExternalAuth' | 'Password' | string
/**
* Different from Address in that `key` is required and `id` is not supported.
* Different from [Address](/types#address) in that `key` is required and `id` is not supported.
*
*/
export interface CustomerAddress {
Expand All @@ -25,96 +25,140 @@ export interface CustomerAddress {
*/
readonly key: string
/**
* Name of the country.
*
*
*/
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
Expand All @@ -125,12 +169,12 @@ export interface CustomerAddress {
readonly custom?: Custom
}
/**
* The data representation for a Customer to be imported that is persisted as a [Customer](/../api/projects/customers#top) in the Project.
* The data representation for a Customer to be imported that is persisted as a [Customer](ctp:api:type:Customer) in the Project.
*
*/
export interface CustomerImport extends ImportResource {
/**
* User-defined unique identifier. If a [Customer](/../api/projects/customers#customer) with this `key` exists, it will be updated with the imported data.
* User-defined unique identifier. If a [Customer](ctp:api:type:Customer) with this `key` exists, it will be updated with the imported data.
*
*/
readonly key: string
Expand All @@ -153,7 +197,7 @@ export interface CustomerImport extends ImportResource {
*/
readonly password?: string
/**
* The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the `state` of the [ImportOperation](/import-operation#importoperation) will be set to `unresolved` until the necessary Stores are created.
* The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the `state` of the [ImportOperation](ctp:import:type:ImportOperation) will be set to `unresolved` until the necessary Stores are created.
*
*
*/
Expand Down Expand Up @@ -219,8 +263,8 @@ export interface CustomerImport extends ImportResource {
*/
readonly isEmailVerified?: boolean
/**
* The Reference to the [CustomerGroup](/../api/projects/customerGroups#customergroup) with which the Customer 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.
* The Reference to the [CustomerGroup](ctp:api:type:CustomerGroup) with which the Customer is associated.
* If referenced CustomerGroup does not exist, the `state` of the [ImportOperation](ctp:import:type:ImportOperation) will be set to `unresolved` until the necessary CustomerGroup is created.
*
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface DiscountCodeImport extends ImportResource {
/**
* User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.
*
* The value cannot be updated. Attempting to update the value will result in an [InvalidFieldsUpdate](/error#invalidfieldsupdateerror) error.
* The value cannot be updated. Attempting to update the value will result in an [InvalidFieldsUpdate](/import-export/error#invalidfieldsupdateerror) error.
*
*
*/
Expand Down
Loading

0 comments on commit 3f2e747

Please sign in to comment.