Skip to content

Commit 1994ddb

Browse files
committed
build(codegen): updating SDK
1 parent ade3efe commit 1994ddb

File tree

5 files changed

+410
-1
lines changed

5 files changed

+410
-1
lines changed

.changeset/changes_api.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77
<details>
88
<summary>Added Type(s)</summary>
99

10+
- added type `BusinessUnitAddCustomerGroupAssignmentAction`
11+
- added type `BusinessUnitRemoveCustomerGroupAssignmentAction`
12+
- added type `BusinessUnitSetCustomerGroupAssignmentsAction`
1013
- added type `CartMergeMode`
1114
- added type `MergeCartDraft`
1215
- added type `AddressRole`
1316
- added type `RecurringOrderFailureError`
1417
- added type `GraphQLRecurringOrderFailureError`
18+
- added type `BusinessUnitCustomerGroupAssignmentAddedMessage`
19+
- added type `BusinessUnitCustomerGroupAssignmentRemovedMessage`
20+
- added type `BusinessUnitCustomerGroupAssignmentsSetMessage`
1521
- added type `CartFrozenMessage`
1622
- added type `CartUnfrozenMessage`
1723
- added type `CustomerBillingAddressAddedMessage`
@@ -21,6 +27,9 @@
2127
- added type `CustomerShippingAddressRemovedMessage`
2228
- added type `OrderPaymentRemovedMessage`
2329
- added type `RecurringOrderFailedMessage`
30+
- added type `BusinessUnitCustomerGroupAssignmentAddedMessagePayload`
31+
- added type `BusinessUnitCustomerGroupAssignmentRemovedMessagePayload`
32+
- added type `BusinessUnitCustomerGroupAssignmentsSetMessagePayload`
2433
- added type `CartFrozenMessagePayload`
2534
- added type `CartUnfrozenMessagePayload`
2635
- added type `CustomerBillingAddressAddedMessagePayload`
@@ -69,6 +78,12 @@
6978
<details>
7079
<summary>Added Property(s)</summary>
7180

81+
- added property `customerGroupAssignments` to type `BusinessUnit`
82+
- added property `customerGroupAssignments` to type `BusinessUnitDraft`
83+
- added property `customerGroupAssignments` to type `Company`
84+
- added property `customerGroupAssignments` to type `CompanyDraft`
85+
- added property `customerGroupAssignments` to type `Division`
86+
- added property `customerGroupAssignments` to type `DivisionDraft`
7287
- added property `addressRoles` to type `BusinessUnitAddressChangedMessage`
7388
- added property `addressRoles` to type `BusinessUnitAddressRemovedMessage`
7489
- added property `addressRoles` to type `CustomerAddressChangedMessage`

changes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
<details>
44
<summary>Added Type(s)</summary>
55

6+
- added type `BusinessUnitAddCustomerGroupAssignmentAction`
7+
- added type `BusinessUnitRemoveCustomerGroupAssignmentAction`
8+
- added type `BusinessUnitSetCustomerGroupAssignmentsAction`
69
- added type `CartMergeMode`
710
- added type `MergeCartDraft`
811
- added type `AddressRole`
912
- added type `RecurringOrderFailureError`
1013
- added type `GraphQLRecurringOrderFailureError`
14+
- added type `BusinessUnitCustomerGroupAssignmentAddedMessage`
15+
- added type `BusinessUnitCustomerGroupAssignmentRemovedMessage`
16+
- added type `BusinessUnitCustomerGroupAssignmentsSetMessage`
1117
- added type `CartFrozenMessage`
1218
- added type `CartUnfrozenMessage`
1319
- added type `CustomerBillingAddressAddedMessage`
@@ -17,6 +23,9 @@
1723
- added type `CustomerShippingAddressRemovedMessage`
1824
- added type `OrderPaymentRemovedMessage`
1925
- added type `RecurringOrderFailedMessage`
26+
- added type `BusinessUnitCustomerGroupAssignmentAddedMessagePayload`
27+
- added type `BusinessUnitCustomerGroupAssignmentRemovedMessagePayload`
28+
- added type `BusinessUnitCustomerGroupAssignmentsSetMessagePayload`
2029
- added type `CartFrozenMessagePayload`
2130
- added type `CartUnfrozenMessagePayload`
2231
- added type `CustomerBillingAddressAddedMessagePayload`
@@ -65,6 +74,12 @@
6574
<details>
6675
<summary>Added Property(s)</summary>
6776

77+
- added property `customerGroupAssignments` to type `BusinessUnit`
78+
- added property `customerGroupAssignments` to type `BusinessUnitDraft`
79+
- added property `customerGroupAssignments` to type `Company`
80+
- added property `customerGroupAssignments` to type `CompanyDraft`
81+
- added property `customerGroupAssignments` to type `Division`
82+
- added property `customerGroupAssignments` to type `DivisionDraft`
6883
- added property `addressRoles` to type `BusinessUnitAddressChangedMessage`
6984
- added property `addressRoles` to type `BusinessUnitAddressRemovedMessage`
7085
- added property `addressRoles` to type `CustomerAddressChangedMessage`

packages/platform-sdk/src/generated/models/business-unit.ts

Lines changed: 106 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ import {
2020
LastModifiedBy,
2121
_BaseAddress,
2222
} from './common'
23-
import { CustomerReference, CustomerResourceIdentifier } from './customer'
23+
import {
24+
CustomerGroupAssignment,
25+
CustomerGroupAssignmentDraft,
26+
CustomerReference,
27+
CustomerResourceIdentifier,
28+
} from './customer'
29+
import { CustomerGroupResourceIdentifier } from './customer-group'
2430
import { StoreKeyReference, StoreResourceIdentifier } from './store'
2531
import {
2632
CustomFields,
@@ -198,6 +204,14 @@ export interface IBusinessUnit {
198204
*
199205
*/
200206
readonly custom?: CustomFields
207+
/**
208+
* Customer Groups assigned to the Business Unit.
209+
*
210+
* They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
211+
*
212+
*
213+
*/
214+
readonly customerGroupAssignments?: CustomerGroupAssignment[]
201215
/**
202216
* Addresses used by the Business Unit.
203217
*
@@ -435,6 +449,14 @@ export interface IBusinessUnitDraft {
435449
*
436450
*/
437451
readonly custom?: CustomFieldsDraft
452+
/**
453+
* Customer Groups to assign the Business Unit to.
454+
*
455+
* They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
456+
*
457+
*
458+
*/
459+
readonly customerGroupAssignments?: CustomerGroupAssignmentDraft[]
438460
}
439461
/**
440462
* [KeyReference](ctp:api:type:KeyReference) to a [BusinessUnit](ctp:api:type:BusinessUnit).
@@ -576,6 +598,7 @@ export type BusinessUnitUpdateAction =
576598
| BusinessUnitAddAddressAction
577599
| BusinessUnitAddAssociateAction
578600
| BusinessUnitAddBillingAddressIdAction
601+
| BusinessUnitAddCustomerGroupAssignmentAction
579602
| BusinessUnitAddShippingAddressIdAction
580603
| BusinessUnitAddStoreAction
581604
| BusinessUnitChangeAddressAction
@@ -588,6 +611,7 @@ export type BusinessUnitUpdateAction =
588611
| BusinessUnitRemoveAddressAction
589612
| BusinessUnitRemoveAssociateAction
590613
| BusinessUnitRemoveBillingAddressIdAction
614+
| BusinessUnitRemoveCustomerGroupAssignmentAction
591615
| BusinessUnitRemoveShippingAddressIdAction
592616
| BusinessUnitRemoveStoreAction
593617
| BusinessUnitSetAddressCustomFieldAction
@@ -596,6 +620,7 @@ export type BusinessUnitUpdateAction =
596620
| BusinessUnitSetContactEmailAction
597621
| BusinessUnitSetCustomFieldAction
598622
| BusinessUnitSetCustomTypeAction
623+
| BusinessUnitSetCustomerGroupAssignmentsAction
599624
| BusinessUnitSetDefaultBillingAddressAction
600625
| BusinessUnitSetDefaultShippingAddressAction
601626
| BusinessUnitSetStoreModeAction
@@ -702,6 +727,14 @@ export interface Company extends IBusinessUnit {
702727
*
703728
*/
704729
readonly custom?: CustomFields
730+
/**
731+
* Customer Groups assigned to the Business Unit.
732+
*
733+
* They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
734+
*
735+
*
736+
*/
737+
readonly customerGroupAssignments?: CustomerGroupAssignment[]
705738
/**
706739
* Addresses used by the Business Unit.
707740
*
@@ -876,6 +909,14 @@ export interface CompanyDraft extends IBusinessUnitDraft {
876909
*
877910
*/
878911
readonly custom?: CustomFieldsDraft
912+
/**
913+
* Customer Groups to assign the Business Unit to.
914+
*
915+
* They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
916+
*
917+
*
918+
*/
919+
readonly customerGroupAssignments?: CustomerGroupAssignmentDraft[]
879920
}
880921
/**
881922
* Business Unit type to model divisions that are part of the [Company](ctp:api:type:Company) or a higher-order Division.
@@ -972,6 +1013,14 @@ export interface Division extends IBusinessUnit {
9721013
*
9731014
*/
9741015
readonly custom?: CustomFields
1016+
/**
1017+
* Customer Groups assigned to the Business Unit.
1018+
*
1019+
* They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
1020+
*
1021+
*
1022+
*/
1023+
readonly customerGroupAssignments?: CustomerGroupAssignment[]
9751024
/**
9761025
* Addresses used by the Business Unit.
9771026
*
@@ -1144,6 +1193,14 @@ export interface DivisionDraft extends IBusinessUnitDraft {
11441193
*
11451194
*/
11461195
readonly custom?: CustomFieldsDraft
1196+
/**
1197+
* Customer Groups to assign the Business Unit to.
1198+
*
1199+
* They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
1200+
*
1201+
*
1202+
*/
1203+
readonly customerGroupAssignments?: CustomerGroupAssignmentDraft[]
11471204
/**
11481205
* The parent unit of this Division. Can be a Company or a Division.
11491206
*
@@ -1227,6 +1284,22 @@ export interface BusinessUnitAddBillingAddressIdAction
12271284
*/
12281285
readonly addressKey?: string
12291286
}
1287+
/**
1288+
* Assigns a Customer Group to a Business Unit.
1289+
*
1290+
* This action generates the [BusinessUnitCustomerGroupAssignmentAdded](ctp:api:type:BusinessUnitCustomerGroupAssignmentAddedMessage) Message.
1291+
*
1292+
*/
1293+
export interface BusinessUnitAddCustomerGroupAssignmentAction
1294+
extends IBusinessUnitUpdateAction {
1295+
readonly action: 'addCustomerGroupAssignment'
1296+
/**
1297+
* Customer Group to assign the Business Unit to.
1298+
*
1299+
*
1300+
*/
1301+
readonly customerGroupAssignment: CustomerGroupAssignmentDraft
1302+
}
12301303
/**
12311304
* Adding a shipping address to a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitShippingAddressAdded](ctp:api:type:BusinessUnitShippingAddressAddedMessage) Message.
12321305
*
@@ -1439,6 +1512,22 @@ export interface BusinessUnitRemoveBillingAddressIdAction
14391512
*/
14401513
readonly addressKey?: string
14411514
}
1515+
/**
1516+
* Unassigns a Customer Group from a Business Unit.
1517+
*
1518+
* This action generates the [BusinessUnitCustomerGroupAssignmentRemoved](ctp:api:type:BusinessUnitCustomerGroupAssignmentRemovedMessage) Message.
1519+
*
1520+
*/
1521+
export interface BusinessUnitRemoveCustomerGroupAssignmentAction
1522+
extends IBusinessUnitUpdateAction {
1523+
readonly action: 'removeCustomerGroupAssignment'
1524+
/**
1525+
* Customer Group to unassign the Business Unit from.
1526+
*
1527+
*
1528+
*/
1529+
readonly customerGroup: CustomerGroupResourceIdentifier
1530+
}
14421531
/**
14431532
* Removing a shipping address from a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitShippingAddressRemoved](ctp:api:type:BusinessUnitShippingAddressRemovedMessage) Message.
14441533
*
@@ -1605,6 +1694,22 @@ export interface BusinessUnitSetCustomTypeAction
16051694
*/
16061695
readonly fields?: FieldContainer
16071696
}
1697+
/**
1698+
* Assigns multiple Customer Groups to a Business Unit.
1699+
*
1700+
* This action generates the [BusinessUnitCustomerGroupAssignmentsSet](ctp:api:type:BusinessUnitCustomerGroupAssignmentsSetMessage) Message.
1701+
*
1702+
*/
1703+
export interface BusinessUnitSetCustomerGroupAssignmentsAction
1704+
extends IBusinessUnitUpdateAction {
1705+
readonly action: 'setCustomerGroupAssignments'
1706+
/**
1707+
* Customer Groups to assign the Business Unit to.
1708+
*
1709+
*
1710+
*/
1711+
readonly customerGroupAssignments?: CustomerGroupAssignmentDraft[]
1712+
}
16081713
/**
16091714
* Setting the default billing address on a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitDefaultBillingAddressSet](ctp:api:type:BusinessUnitDefaultBillingAddressSetMessage) Message.
16101715
*

0 commit comments

Comments
 (0)