66
77import { 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