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 Jun 28, 2024
1 parent b07996d commit 5d5aa4d
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .changeset/changes_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<details>
<summary>Added Property(s)</summary>

- added property `approvalRuleMode` to type `BusinessUnit`
- added property `approvalRuleMode` to type `BusinessUnitDraft`
- added property `approvalRuleMode` to type `Company`
- added property `approvalRuleMode` to type `CompanyDraft`
- added property `approvalRuleMode` to type `Division`
- added property `approvalRuleMode` to type `DivisionDraft`
- added property `metaTitle` to type `ProductTailoringCreatedMessage`
- added property `metaDescription` to type `ProductTailoringCreatedMessage`
- added property `metaKeywords` to type `ProductTailoringCreatedMessage`
Expand Down Expand Up @@ -123,16 +129,20 @@
<details>
<summary>Added Type(s)</summary>

- added type `BusinessUnitApprovalRuleMode`
- added type `BusinessUnitChangeApprovalRuleModeAction`
- added type `CustomerIndexingProgress`
- added type `CustomerIndexingStatus`
- added type `CustomerPagedSearchResponse`
- added type `CustomerSearchIndexingStatusResponse`
- added type `CustomerSearchRequest`
- added type `CustomerSearchResult`
- added type `BusinessUnitApprovalRuleModeChangedMessage`
- added type `ProductTailoringImageAddedMessage`
- added type `ProductTailoringImagesSetMessage`
- added type `ProductVariantTailoringAddedMessage`
- added type `ProductVariantTailoringRemovedMessage`
- added type `BusinessUnitApprovalRuleModeChangedMessagePayload`
- added type `ProductTailoringImageAddedMessagePayload`
- added type `ProductTailoringImagesSetMessagePayload`
- added type `ProductVariantTailoringAddedMessagePayload`
Expand Down
10 changes: 10 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<details>
<summary>Added Property(s)</summary>

- added property `approvalRuleMode` to type `BusinessUnit`
- added property `approvalRuleMode` to type `BusinessUnitDraft`
- added property `approvalRuleMode` to type `Company`
- added property `approvalRuleMode` to type `CompanyDraft`
- added property `approvalRuleMode` to type `Division`
- added property `approvalRuleMode` to type `DivisionDraft`
- added property `metaTitle` to type `ProductTailoringCreatedMessage`
- added property `metaDescription` to type `ProductTailoringCreatedMessage`
- added property `metaKeywords` to type `ProductTailoringCreatedMessage`
Expand Down Expand Up @@ -119,16 +125,20 @@
<details>
<summary>Added Type(s)</summary>

- added type `BusinessUnitApprovalRuleMode`
- added type `BusinessUnitChangeApprovalRuleModeAction`
- added type `CustomerIndexingProgress`
- added type `CustomerIndexingStatus`
- added type `CustomerPagedSearchResponse`
- added type `CustomerSearchIndexingStatusResponse`
- added type `CustomerSearchRequest`
- added type `CustomerSearchResult`
- added type `BusinessUnitApprovalRuleModeChangedMessage`
- added type `ProductTailoringImageAddedMessage`
- added type `ProductTailoringImagesSetMessage`
- added type `ProductVariantTailoringAddedMessage`
- added type `ProductVariantTailoringRemovedMessage`
- added type `BusinessUnitApprovalRuleModeChangedMessagePayload`
- added type `ProductTailoringImageAddedMessagePayload`
- added type `ProductTailoringImagesSetMessagePayload`
- added type `ProductVariantTailoringAddedMessagePayload`
Expand Down
56 changes: 54 additions & 2 deletions packages/platform-sdk/src/generated/models/business-unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ export type AssociateRoleInheritanceMode = 'Disabled' | 'Enabled' | string
*
*/
export type BusinessUnit = Company | Division
/**
* Determines whether a Business Unit can inherit [Approval Rules](/projects/approval-rules) from a parent. Only Business Units of type `Division` can use `ExplicitAndFromParent`.
*
*/
export type BusinessUnitApprovalRuleMode =
| 'Explicit'
| 'ExplicitAndFromParent'
| string
/**
* Determines whether a Business Unit can inherit Associates from a parent.
*
Expand Down Expand Up @@ -231,6 +239,7 @@ export type BusinessUnitUpdateAction =
| BusinessUnitAddShippingAddressIdAction
| BusinessUnitAddStoreAction
| BusinessUnitChangeAddressAction
| BusinessUnitChangeApprovalRuleModeAction
| BusinessUnitChangeAssociateAction
| BusinessUnitChangeAssociateModeAction
| BusinessUnitChangeNameAction
Expand Down Expand Up @@ -317,7 +326,7 @@ export interface Company {
*/
readonly stores?: StoreKeyReference[]
/**
* Is always `Explicit` since a Company cannot have a parent Business Unit that Stores can be inherited from.
* The value of this field is always `Explicit` because a Company cannot have a parent Business Unit that Stores can be inherited from.
*
*
*/
Expand Down Expand Up @@ -371,7 +380,7 @@ export interface Company {
*/
readonly defaultBillingAddressId?: string
/**
* Is always `Explicit` since a Company cannot have a parent Business Unit that Associates can be inherited from.
* The value of this field is always `Explicit` because a Company cannot have a parent Business Unit that Associates can be inherited from.
*
*
*/
Expand Down Expand Up @@ -400,6 +409,12 @@ export interface Company {
*
*/
readonly topLevelUnit: BusinessUnitKeyReference
/**
* The value of this field is always `Explicit` because a Company cannot have a parent Business Unit that Approval Rules can be inherited from.
*
*
*/
readonly approvalRuleMode: BusinessUnitApprovalRuleMode
}
/**
* Draft type to represent the top level of a business. Contains the fields and values of the generic [BusinessUnitDraft](ctp:api:type:BusinessUnitDraft) that are used specifically for creating a [Company](ctp:api:type:Company).
Expand Down Expand Up @@ -462,6 +477,14 @@ export interface CompanyDraft {
*
*/
readonly associates?: AssociateDraft[]
/**
* Determines whether the Business Unit can inherit Approval Rules from a parent.
* For [Companies](ctp:api:type:BusinessUnitType), the value of this field is always `Explicit`.
* For [Divisions](ctp:api:type:BusinessUnitType), the default value is `ExplicitAndFromParent`.
*
*
*/
readonly approvalRuleMode?: BusinessUnitApprovalRuleMode
/**
* Addresses used by the Business Unit.
*
Expand Down Expand Up @@ -650,6 +673,12 @@ export interface Division {
*
*/
readonly topLevelUnit: BusinessUnitKeyReference
/**
* Determines whether a Business Unit can inherit Approval Rules from a parent.
*
*
*/
readonly approvalRuleMode: BusinessUnitApprovalRuleMode
}
/**
* Draft type to model divisions that are part of a [Company](ctp:api:type:Company) or a higher-order [Division](ctp:api:type:Division).
Expand Down Expand Up @@ -712,6 +741,12 @@ export interface DivisionDraft {
*
*/
readonly associates?: AssociateDraft[]
/**
* Determines whether the Division can inherit Approval Rules from a parent.
*
*
*/
readonly approvalRuleMode?: BusinessUnitApprovalRuleMode
/**
* Addresses used by the Business Unit.
*
Expand Down Expand Up @@ -888,6 +923,23 @@ export interface BusinessUnitChangeAddressAction {
*/
readonly address: _BaseAddress
}
/**
* Updates [Approval Rules](/projects/approval-rules) inheritance behavior between Business Units.
*
* Only Business Units of type `Division` can be changed to `ExplicitAndFromParent`.
*
* This update action generates a [BusinessUnitApprovalRuleModeChanged](ctp:api:type:BusinessUnitApprovalRuleModeChangedMessage) Message.
*
*/
export interface BusinessUnitChangeApprovalRuleModeAction {
readonly action: 'changeApprovalRuleMode'
/**
* The new value for `approvalRuleMode`.
*
*
*/
readonly approvalRuleMode: BusinessUnitApprovalRuleMode
}
/**
* Updating the [Associate](ctp:api:type:Associate) on a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitAssociateChanged](ctp:api:type:BusinessUnitAssociateChangedMessage) Message.
*
Expand Down
98 changes: 98 additions & 0 deletions packages/platform-sdk/src/generated/models/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { AssociateRole, Permission } from './associate-role'
import {
Associate,
BusinessUnit,
BusinessUnitApprovalRuleMode,
BusinessUnitAssociateMode,
BusinessUnitKeyReference,
BusinessUnitStatus,
Expand Down Expand Up @@ -144,6 +145,7 @@ export type Message =
| BusinessUnitAddressCustomTypeRemovedMessage
| BusinessUnitAddressCustomTypeSetMessage
| BusinessUnitAddressRemovedMessage
| BusinessUnitApprovalRuleModeChangedMessage
| BusinessUnitAssociateAddedMessage
| BusinessUnitAssociateChangedMessage
| BusinessUnitAssociateModeChangedMessage
Expand Down Expand Up @@ -2322,6 +2324,82 @@ export interface BusinessUnitAddressRemovedMessage {
*/
readonly address: Address
}
/**
* Generated after a successful [Change Approval Rule Mode](ctp:api:type:BusinessUnitChangeApprovalRuleModeAction) update action.
*
*/
export interface BusinessUnitApprovalRuleModeChangedMessage {
readonly type: 'BusinessUnitApprovalRuleModeChanged'
/**
* Unique identifier of the Message. Can be used to track which Messages have been processed.
*
*/
readonly id: string
/**
* Version of a resource. In case of Messages, this is always `1`.
*
*/
readonly version: number
/**
* Date and time (UTC) the Message was generated.
*
*/
readonly createdAt: string
/**
* Value of `createdAt`.
*
*/
readonly lastModifiedAt: string
/**
* IDs and references that last modified the Message.
*
*
*/
readonly lastModifiedBy?: LastModifiedBy
/**
* IDs and references that created the Message.
*
*
*/
readonly createdBy?: CreatedBy
/**
* Message number in relation to other Messages for a given resource. The `sequenceNumber` of the next Message for the resource is the successor of the `sequenceNumber` of the current Message. Meaning, the `sequenceNumber` of the next Message equals the `sequenceNumber` of the current Message + 1.
* `sequenceNumber` can be used to ensure that Messages are processed in the correct order for a particular resource.
*
*
*/
readonly sequenceNumber: number
/**
* [Reference](ctp:api:type:Reference) to the resource on which the change or action was performed.
*
*
*/
readonly resource: Reference
/**
* Version of the resource on which the change or action was performed.
*
*
*/
readonly resourceVersion: number
/**
* User-provided identifiers of the resource, such as `key` or `externalId`. Only present if the resource has such identifiers.
*
*
*/
readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers
/**
* [BusinessUnitApprovalRuleMode](ctp:api:type:BusinessUnitApprovalRuleMode) of the Business Unit after the [Change Approval Rule Mode](ctp:api:type:BusinessUnitChangeApprovalRuleModeAction) update action.
*
*
*/
readonly approvalRuleMode: BusinessUnitApprovalRuleMode
/**
* [BusinessUnitApprovalRuleMode](ctp:api:type:BusinessUnitApprovalRuleMode) of the Business Unit before the [Change Approval Rule Mode](ctp:api:type:BusinessUnitChangeApprovalRuleModeAction) update action.
*
*
*/
readonly oldApprovalRuleMode?: BusinessUnitApprovalRuleMode
}
/**
* Generated after a successful [Add Associate](ctp:api:type:BusinessUnitAddAssociateAction) update action.
*
Expand Down Expand Up @@ -18253,6 +18331,7 @@ export type MessagePayload =
| BusinessUnitAddressCustomTypeRemovedMessagePayload
| BusinessUnitAddressCustomTypeSetMessagePayload
| BusinessUnitAddressRemovedMessagePayload
| BusinessUnitApprovalRuleModeChangedMessagePayload
| BusinessUnitAssociateAddedMessagePayload
| BusinessUnitAssociateChangedMessagePayload
| BusinessUnitAssociateModeChangedMessagePayload
Expand Down Expand Up @@ -18893,6 +18972,25 @@ export interface BusinessUnitAddressRemovedMessagePayload {
*/
readonly address: Address
}
/**
* Generated after a successful [Change Approval Rule Mode](ctp:api:type:BusinessUnitChangeApprovalRuleModeAction) update action.
*
*/
export interface BusinessUnitApprovalRuleModeChangedMessagePayload {
readonly type: 'BusinessUnitApprovalRuleModeChanged'
/**
* [BusinessUnitApprovalRuleMode](ctp:api:type:BusinessUnitApprovalRuleMode) of the Business Unit after the [Change Approval Rule Mode](ctp:api:type:BusinessUnitChangeApprovalRuleModeAction) update action.
*
*
*/
readonly approvalRuleMode: BusinessUnitApprovalRuleMode
/**
* [BusinessUnitApprovalRuleMode](ctp:api:type:BusinessUnitApprovalRuleMode) of the Business Unit before the [Change Approval Rule Mode](ctp:api:type:BusinessUnitChangeApprovalRuleModeAction) update action.
*
*
*/
readonly oldApprovalRuleMode?: BusinessUnitApprovalRuleMode
}
/**
* Generated after a successful [Add Associate](ctp:api:type:BusinessUnitAddAssociateAction) update action.
*
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,4 @@ c59cca7c5461c092dba5dc5bd547a9d62e404ad5
dd8eca14a0c47d154e4c705909a3d2696369bfd1
63b10d36aea8ef676ec3c5cdbcf59eab1242d827
f406baef04eced1a7bda3817e935f54e234a9f4e
c163df6435d9b4770f1d07cd2cb379c1f620ceb5

0 comments on commit 5d5aa4d

Please sign in to comment.