Skip to content

Commit

Permalink
Update generated SDKs (#837)
Browse files Browse the repository at this point in the history
* build(codegen): updating SDK

* build(codegen): updating SDK

---------

Co-authored-by: ct-sdks[bot] <153784748+ct-sdks[bot]@users.noreply.github.com>
  • Loading branch information
ct-sdks[bot] authored Nov 1, 2024
1 parent 77247c2 commit cd54482
Show file tree
Hide file tree
Showing 8 changed files with 402 additions and 8 deletions.
298 changes: 298 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>
13 changes: 13 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
<details>
<summary>Added Type(s)</summary>

- added type `ApprovalRuleSetCustomFieldAction`
- added type `ApprovalRuleSetCustomTypeAction`
- added type `BusinessUnitApprovalRuleMode`
- added type `BusinessUnitChangeApprovalRuleModeAction`
- added type `DiscountApplicationMode`
Expand Down Expand Up @@ -184,14 +186,17 @@
- added enum `attribute-group` to type `ChangeSubscriptionResourceTypeId`
- added enum `product-tailoring` to type `ChangeSubscriptionResourceTypeId`
- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId`
- added enum `approval-rule` to type `CustomFieldReferenceValue`
- added enum `cart-discount` to type `CustomFieldReferenceValue`
- added enum `customer-group` to type `CustomFieldReferenceValue`
- added enum `approval-rule` to type `ResourceTypeId`
- added enum `product-tailoring` to type `ResourceTypeId`
</details>

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

- added property `custom` to type `ApprovalRule`
- added property `approvalRuleMode` to type `BusinessUnit`
- added property `approvalRuleMode` to type `BusinessUnitDraft`
- added property `approvalRuleMode` to type `Company`
Expand Down Expand Up @@ -310,3 +315,11 @@

- added enum `customer-group` to type `CustomFieldReferenceValue`
</details>

**History changes**

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

- changed property `id` of type `ModifiedBy` to be optional
</details>
16 changes: 8 additions & 8 deletions packages/history-sdk/src/generated/models/change-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,20 @@ export interface ErrorResponse {
*
*/
export interface ModifiedBy {
/**
* `true` if the change was made using the Merchant Center or [ImpEx](https://impex.europe-west1.gcp.commercetools.com/).
*
*
*/
readonly isPlatformClient: boolean
/**
* [ID](/general-concepts#identifier) of the Merchant Center user who made the change.
*
* Present only if the change was made in the Merchant Center.
* Present only if `isPlatformClient` is `true`.
*
*
*/
readonly id: string
readonly id?: string
/**
* Indicates who performed the change.
*
Expand Down Expand Up @@ -248,12 +254,6 @@ export interface ModifiedBy {
*
*/
readonly associate?: Reference
/**
* `true` if the change was made using the Merchant Center or [ImpEx](https://impex.europe-west1.gcp.commercetools.com/).
*
*
*/
readonly isPlatformClient: boolean
}
/**
* Updates that are triggered automatically as a result of a user-initiated change.
Expand Down
42 changes: 42 additions & 0 deletions packages/platform-sdk/src/generated/models/approval-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from './associate-role'
import { BusinessUnitKeyReference } from './business-unit'
import { BaseResource, CreatedBy, LastModifiedBy } from './common'
import { CustomFields, FieldContainer, TypeResourceIdentifier } from './type'

export interface ApprovalRule extends BaseResource {
/**
Expand Down Expand Up @@ -96,6 +97,12 @@ export interface ApprovalRule extends BaseResource {
*
*/
readonly businessUnit: BusinessUnitKeyReference
/**
* Custom Fields on the Approval Rule.
*
*
*/
readonly custom?: CustomFields
}
export interface ApprovalRuleDraft {
/**
Expand Down Expand Up @@ -203,6 +210,8 @@ export interface ApprovalRuleUpdate {
}
export type ApprovalRuleUpdateAction =
| ApprovalRuleSetApproversAction
| ApprovalRuleSetCustomFieldAction
| ApprovalRuleSetCustomTypeAction
| ApprovalRuleSetDescriptionAction
| ApprovalRuleSetKeyAction
| ApprovalRuleSetNameAction
Expand All @@ -222,6 +231,39 @@ export interface ApprovalRuleSetApproversAction {
*/
readonly approvers: ApproverHierarchyDraft
}
export interface ApprovalRuleSetCustomFieldAction {
readonly action: 'setCustomField'
/**
* Name of the [Custom Field](ctp:api:type:CustomFields).
*
*
*/
readonly name: string
/**
* If `value` is absent or `null`, this field will be removed if it exists.
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
* If `value` is provided, it is set for the field defined by `name`.
*
*
*/
readonly value?: any
}
export interface ApprovalRuleSetCustomTypeAction {
readonly action: 'setCustomType'
/**
* Defines the [Type](ctp:api:type:Type) that extends the ApprovalRule with [Custom Fields](ctp:api:type:CustomFields).
* If absent, any existing Type and Custom Fields are removed from the ApprovalRule.
*
*
*/
readonly type?: TypeResourceIdentifier
/**
* Sets the [Custom Fields](ctp:api:type:CustomFields) fields for the ApprovalRule.
*
*
*/
readonly fields?: FieldContainer
}
/**
* Setting the description for an [Approval Rule](ctp:api:type:ApprovalRule) generates an [ApprovalRuleDescriptionSet](ctp:api:type:ApprovalRuleDescriptionSetMessage) Message.
*
Expand Down
2 changes: 2 additions & 0 deletions packages/platform-sdk/src/generated/models/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export interface CustomFieldLocalizedEnumValue {
*/
export type CustomFieldReferenceValue =
| 'approval-flow'
| 'approval-rule'
| 'associate-role'
| 'business-unit'
| 'cart'
Expand Down Expand Up @@ -272,6 +273,7 @@ export interface CustomFieldTimeType {
export type ResourceTypeId =
| 'address'
| 'approval-flow'
| 'approval-rule'
| 'asset'
| 'associate-role'
| 'business-unit'
Expand Down
2 changes: 2 additions & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,5 @@ cac013ef26a2c100979f66df86f605953dd5d736
c8c2455221baca20421082b7715eaa0a712af7f1
8e5c10a0c61ddaa5eabbd15344258f53ce6971ee
71b6bfba97b7019e0ba081bb188e43c90c6d79e8
41774e015e4f946bd57f0e2dc76522ed757860c4
1406d1e9ac4945b1179cfce2a956a39f67b757a9

0 comments on commit cd54482

Please sign in to comment.