Skip to content

Commit ec67dbe

Browse files
authored
build(codegen): updating SDK (#1025)
Co-authored-by: ct-sdks[bot] <153784748+ct-sdks[bot]@users.noreply.github.com>
1 parent b440628 commit ec67dbe

5 files changed

Lines changed: 402 additions & 286 deletions

File tree

.changeset/changes_api.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,35 @@
44

55
**Api changes**
66

7+
<details>
8+
<summary>Changed Type(s)</summary>
9+
10+
- :warning: changed type `DeliveryPayload` from type `object` to `SubscriptionNotification`
11+
- :warning: changed type `EventDeliveryPayload` from type `DeliveryPayload` to `SubscriptionNotification`
12+
</details>
13+
714
<details>
815
<summary>Added Type(s)</summary>
916

1017
- added type `BusinessUnitSetUnitTypeAction`
18+
- added type `BaseEvent`
1119
- added type `BusinessUnitTopLevelUnitSetMessage`
1220
- added type `BusinessUnitTypeSetMessage`
1321
- added type `BusinessUnitTopLevelUnitSetMessagePayload`
1422
- added type `BusinessUnitTypeSetMessagePayload`
23+
- added type `SubscriptionNotification`
24+
</details>
25+
26+
<details>
27+
<summary>Removed Property(s)</summary>
28+
29+
- :warning: removed property `data` from type `Event`
30+
</details>
31+
32+
<details>
33+
<summary>Added Property(s)</summary>
34+
35+
- added property `projectKey` to type `DeliveryPayload`
36+
- added property `resource` to type `DeliveryPayload`
37+
- added property `resourceUserProvidedIdentifiers` to type `DeliveryPayload`
1538
</details>

changes.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
**Api changes**
22

3+
<details>
4+
<summary>Changed Type(s)</summary>
5+
6+
- :warning: changed type `DeliveryPayload` from type `object` to `SubscriptionNotification`
7+
- :warning: changed type `EventDeliveryPayload` from type `DeliveryPayload` to `SubscriptionNotification`
8+
</details>
9+
310
<details>
411
<summary>Added Type(s)</summary>
512

613
- added type `BusinessUnitSetUnitTypeAction`
14+
- added type `BaseEvent`
715
- added type `BusinessUnitTopLevelUnitSetMessage`
816
- added type `BusinessUnitTypeSetMessage`
917
- added type `BusinessUnitTopLevelUnitSetMessagePayload`
1018
- added type `BusinessUnitTypeSetMessagePayload`
19+
- added type `SubscriptionNotification`
20+
</details>
21+
22+
<details>
23+
<summary>Removed Property(s)</summary>
24+
25+
- :warning: removed property `data` from type `Event`
26+
</details>
27+
28+
<details>
29+
<summary>Added Property(s)</summary>
30+
31+
- added property `projectKey` to type `DeliveryPayload`
32+
- added property `resource` to type `DeliveryPayload`
33+
- added property `resourceUserProvidedIdentifiers` to type `DeliveryPayload`
1134
</details>

packages/platform-sdk/src/generated/models/event.ts

Lines changed: 68 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,44 @@
66

77
import { EventSubscriptionResourceTypeId, EventType } from './subscription'
88

9+
/**
10+
* Base representation of an Event containing common fields to all [Event Types](#eventtype).
11+
*
12+
*/
13+
export interface BaseEvent {
14+
/**
15+
* Unique identifier of the Event.
16+
*
17+
*/
18+
readonly id: string
19+
/**
20+
*
21+
*/
22+
readonly notificationType: string
23+
/**
24+
* The type of resource targeted by the Event.
25+
*
26+
*
27+
*/
28+
readonly resourceType: EventSubscriptionResourceTypeId
29+
/**
30+
* The type of Event that has occurred.
31+
*
32+
*
33+
*/
34+
readonly type: EventType
35+
/**
36+
* An object containing details related to the Event.
37+
*
38+
*
39+
*/
40+
readonly data: any
41+
/**
42+
* Date and time (UTC) the Event was generated.
43+
*
44+
*/
45+
readonly createdAt: string
46+
}
947
/**
1048
* Base representation of an Event containing common fields to all [Event Types](#eventtype).
1149
*
@@ -39,12 +77,6 @@ export interface IEvent {
3977
*
4078
*/
4179
readonly type: EventType
42-
/**
43-
* An object containing details related to the Event.
44-
*
45-
*
46-
*/
47-
readonly data: any
4880
/**
4981
* Date and time (UTC) the Event was generated.
5082
*
@@ -70,16 +102,16 @@ export interface ImportContainerCreatedEvent extends IEvent {
70102
*/
71103
readonly resourceType: EventSubscriptionResourceTypeId
72104
/**
73-
* An object containing details of the created Import Container.
74-
*
105+
* Date and time (UTC) the Event was generated.
75106
*
76107
*/
77-
readonly data: ImportContainerCreatedEventData
108+
readonly createdAt: string
78109
/**
79-
* Date and time (UTC) the Event was generated.
110+
* An object containing details of the created Import Container.
111+
*
80112
*
81113
*/
82-
readonly createdAt: string
114+
readonly data: ImportContainerCreatedEventData
83115
}
84116
/**
85117
* The `data` of the [Import Container Created Event](ctp:api:type:ImportContainerCreatedEvent).
@@ -129,16 +161,16 @@ export interface ImportContainerDeletedEvent extends IEvent {
129161
*/
130162
readonly resourceType: EventSubscriptionResourceTypeId
131163
/**
132-
* An object containing details of the deleted Import Container.
133-
*
164+
* Date and time (UTC) the Event was generated.
134165
*
135166
*/
136-
readonly data: ImportContainerDeletedEventData
167+
readonly createdAt: string
137168
/**
138-
* Date and time (UTC) the Event was generated.
169+
* An object containing details of the deleted Import Container.
170+
*
139171
*
140172
*/
141-
readonly createdAt: string
173+
readonly data: ImportContainerDeletedEventData
142174
}
143175
/**
144176
* The `data` of the [Import Container Deleted Event](ctp:api:type:ImportContainerDeletedEvent).
@@ -176,16 +208,16 @@ export interface ImportOperationRejectedEvent extends IEvent {
176208
*/
177209
readonly resourceType: EventSubscriptionResourceTypeId
178210
/**
179-
* An object containing details of the Import Operation with the `rejected` state.
180-
*
211+
* Date and time (UTC) the Event was generated.
181212
*
182213
*/
183-
readonly data: ImportOperationRejectedEventData
214+
readonly createdAt: string
184215
/**
185-
* Date and time (UTC) the Event was generated.
216+
* An object containing details of the Import Operation with the `rejected` state.
217+
*
186218
*
187219
*/
188-
readonly createdAt: string
220+
readonly data: ImportOperationRejectedEventData
189221
}
190222
/**
191223
* The `data` of the [Import Operation Rejected Event](ctp:api:type:ImportOperationRejectedEvent).
@@ -217,16 +249,16 @@ export interface ImportUnresolvedEvent extends IEvent {
217249
*/
218250
readonly resourceType: EventSubscriptionResourceTypeId
219251
/**
220-
* An object containing details of the Import Operation with the `unresolved` state.
221-
*
252+
* Date and time (UTC) the Event was generated.
222253
*
223254
*/
224-
readonly data: ImportUnresolvedEventData
255+
readonly createdAt: string
225256
/**
226-
* Date and time (UTC) the Event was generated.
257+
* An object containing details of the Import Operation with the `unresolved` state.
258+
*
227259
*
228260
*/
229-
readonly createdAt: string
261+
readonly data: ImportUnresolvedEventData
230262
}
231263
/**
232264
* The `data` of the [Import Unresolved Event](ctp:api:type:ImportUnresolvedEvent).
@@ -270,16 +302,16 @@ export interface ImportValidationFailedEvent extends IEvent {
270302
*/
271303
readonly resourceType: EventSubscriptionResourceTypeId
272304
/**
273-
* An object containing details of the Import Operation with the `validationFailed` state.
274-
*
305+
* Date and time (UTC) the Event was generated.
275306
*
276307
*/
277-
readonly data: ImportValidationFailedEventData
308+
readonly createdAt: string
278309
/**
279-
* Date and time (UTC) the Event was generated.
310+
* An object containing details of the Import Operation with the `validationFailed` state.
311+
*
280312
*
281313
*/
282-
readonly createdAt: string
314+
readonly data: ImportValidationFailedEventData
283315
}
284316
/**
285317
* The `data` of the [Import Validation Failed Event](ctp:api:type:ImportValidationFailedEvent).
@@ -323,16 +355,16 @@ export interface ImportWaitForMasterVariantEvent extends IEvent {
323355
*/
324356
readonly resourceType: EventSubscriptionResourceTypeId
325357
/**
326-
* An object containing details of the Import Operation with the `waitForMasterVariant` state.
327-
*
358+
* Date and time (UTC) the Event was generated.
328359
*
329360
*/
330-
readonly data: ImportWaitForMasterVariantEventData
361+
readonly createdAt: string
331362
/**
332-
* Date and time (UTC) the Event was generated.
363+
* An object containing details of the Import Operation with the `waitForMasterVariant` state.
364+
*
333365
*
334366
*/
335-
readonly createdAt: string
367+
readonly data: ImportWaitForMasterVariantEventData
336368
}
337369
/**
338370
* The `data` of the [Import Wait For Master Variant Event](ctp:api:type:ImportWaitForMasterVariantEvent).

0 commit comments

Comments
 (0)