@wix/automations 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,1762 @@
1
+ /** Automation */
2
+ interface Automation$1 {
3
+ /**
4
+ * Automation ID
5
+ * @readonly
6
+ */
7
+ _id?: string | null;
8
+ /** Revision */
9
+ revision?: string | null;
10
+ /** Automation name */
11
+ name?: string;
12
+ /** Automation description */
13
+ description?: string;
14
+ /**
15
+ * Automation Type
16
+ * @readonly
17
+ */
18
+ type?: Type$1;
19
+ /** Automation Status */
20
+ status?: Status$1;
21
+ /** Rule that contains a trigger and some actions */
22
+ rule?: Rule;
23
+ /**
24
+ * Source Application Automation
25
+ * @readonly
26
+ */
27
+ source?: Source;
28
+ /**
29
+ * Metadata
30
+ * @readonly
31
+ */
32
+ metadata?: AutomationMetadata;
33
+ /**
34
+ * Created date
35
+ * @readonly
36
+ */
37
+ _createdDate?: Date;
38
+ /**
39
+ * Updated date
40
+ * @readonly
41
+ */
42
+ _updatedDate?: Date;
43
+ /**
44
+ * ESB Configuration ID
45
+ * @readonly
46
+ */
47
+ esbConfigurationId?: string | null;
48
+ /**
49
+ * Was this automation migrated from v1
50
+ * @readonly
51
+ */
52
+ migratedFromV1?: boolean | null;
53
+ /** @readonly */
54
+ migratedToV3?: boolean | null;
55
+ }
56
+ declare enum Type$1 {
57
+ CUSTOM = "CUSTOM",
58
+ APPLICATION = "APPLICATION"
59
+ }
60
+ declare enum Status$1 {
61
+ ACTIVE = "ACTIVE",
62
+ INACTIVE = "INACTIVE"
63
+ }
64
+ interface Rule {
65
+ /** an event triggered by visitors on a site, or by a site manager (owner & team). */
66
+ trigger?: Trigger$1;
67
+ /**
68
+ * the actions responding to the trigger happening.
69
+ * ** IMPORTANT NOTE: the order of the actions is important, and will be executed in the order they appear in the list **
70
+ */
71
+ actions?: Action$1[];
72
+ }
73
+ interface Trigger$1 {
74
+ /** the id of the app defining the trigger */
75
+ appId?: string;
76
+ /** Identifier for this trigger - human readable action key */
77
+ triggerKey?: string;
78
+ /** optional list of filters on schema fields */
79
+ filters?: Filter$1[];
80
+ /**
81
+ * optional - allows to define a trigger whose following actions will be executed only if the same event for the same resource has not in the last X seconds.
82
+ * for example, if the trigger is "session booked", the resource is a contact and the timeframe is 3600 seconds (contact hasn't booked another session in the last hour),
83
+ * then the actions will be executed only if the same event (session booked for that contact) has not happened in the last hour.
84
+ */
85
+ debounce?: Debounce;
86
+ }
87
+ interface Filter$1 {
88
+ /** the filter identifier */
89
+ _id?: string | null;
90
+ /** the field key from the schema, for example "formId" */
91
+ fieldKey?: string;
92
+ /** filter expression that evaluates to a boolean, for example - {{ contains(["guid1","guid2"];formId) }} */
93
+ filterExpression?: string;
94
+ }
95
+ interface Debounce {
96
+ /**
97
+ * Amount of time in seconds to wait for any additional events to occur before triggering the actions.
98
+ * If no additional events occur within the specified time, the actions will be triggered.
99
+ * If additional events occur within the specified time, the timer will be reset.
100
+ */
101
+ timeFrameInSeconds?: number;
102
+ /**
103
+ * The field key in the trigger's payload of the entity/event to debounce on
104
+ * For example: if the trigger is "user logged in", the resource is a contact and the resource key is "contactId",
105
+ * Another example: if the trigger is "visitor logged in", the resource is a visitor and the resource key is "visitorId".
106
+ */
107
+ fieldKey?: string;
108
+ }
109
+ interface Action$1 {
110
+ /**
111
+ * the id of the action for delayed events
112
+ * @readonly
113
+ */
114
+ _id?: string | null;
115
+ /** the id of the app defining the action */
116
+ appId?: string;
117
+ /** Identifier for this action - human readable action key - unique per app def id */
118
+ actionKey?: string;
119
+ /**
120
+ * input mapping expression for the action inputs
121
+ * for example:
122
+ * `{ "subject": "Thanks for reaching out!"
123
+ * "message": "Hi {{contact.name.first}}, thanks for contacting our business"
124
+ * }`
125
+ * where the value for "contact.name.first" comes from the trigger's payload
126
+ */
127
+ actionConfig?: string;
128
+ /**
129
+ * output mapping expression for the action output
130
+ * for example in get-contact action:
131
+ * `{ "author": "{{$}}" }`
132
+ * This will map the entire entity of contact under `author` namespace
133
+ */
134
+ outputActionConfig?: string | null;
135
+ /** Optional delay configuration for the action */
136
+ delay?: Delay$1;
137
+ /** allows you define an activation policy - like number of activations in a time frame, or limit by some identifier, like contact (e.g. send email to user only at first login) */
138
+ rateLimit?: RateLimit;
139
+ /**
140
+ * allows the user to define a condition for the action to be executed, if the condition fails the action (and following actions) will not be executed
141
+ * @deprecated allows the user to define a condition for the action to be executed, if the condition fails the action (and following actions) will not be executed
142
+ * @replacedBy conditions
143
+ * @targetRemovalDate 2023-08-01
144
+ */
145
+ condition?: Condition;
146
+ conditions?: Conditions;
147
+ /** allows the user to define a namespace for the action output */
148
+ namespace?: string | null;
149
+ }
150
+ declare enum BlockType$1 {
151
+ UNKNOWN = "UNKNOWN",
152
+ OR = "OR",
153
+ AND = "AND"
154
+ }
155
+ interface ConditionBlock$1 {
156
+ type?: BlockType$1;
157
+ lineExpressions?: string[];
158
+ }
159
+ interface Offset extends OffsetValueOneOf {
160
+ /** A delay in seconds */
161
+ seconds?: number;
162
+ /** The key of the field in the trigger payload which contains a delay, in seconds. */
163
+ delayFieldKey?: string;
164
+ }
165
+ /** @oneof */
166
+ interface OffsetValueOneOf {
167
+ /** A delay in seconds */
168
+ seconds?: number;
169
+ /** The key of the field in the trigger payload which contains a delay, in seconds. */
170
+ delayFieldKey?: string;
171
+ }
172
+ /** calculated as date + delay */
173
+ interface Until {
174
+ /** The key of the field in the trigger payload which contains the date to delay until */
175
+ dateFieldKey?: string;
176
+ /** Optional: a delay to add together with the date described in the payload */
177
+ offset?: Offset;
178
+ }
179
+ interface Delay$1 extends DelayTypeOneOf {
180
+ /** A delay which is calculated based on the immediate time when the action is triggered. */
181
+ for?: Offset;
182
+ /** A delay which is calculated based on a date field in the trigger payload. May also be used together with an Offset delay. */
183
+ until?: Until;
184
+ }
185
+ /** @oneof */
186
+ interface DelayTypeOneOf {
187
+ /** A delay which is calculated based on the immediate time when the action is triggered. */
188
+ for?: Offset;
189
+ /** A delay which is calculated based on a date field in the trigger payload. May also be used together with an Offset delay. */
190
+ until?: Until;
191
+ }
192
+ interface RateLimit {
193
+ /** time frame in minutes */
194
+ timeFrame?: number | null;
195
+ /** number of activations allowed in the given time frame */
196
+ activations?: number;
197
+ /** limit the activation by an entity, for example activate once per contact. example: {{contact.id}} */
198
+ uniqueIdentifierExpression?: string | null;
199
+ }
200
+ interface Condition {
201
+ /**
202
+ * entity object is deprecated due to the new approach to conditions
203
+ * the condition expression, for example - {{and(gt(price;10);lt(price;100))}}
204
+ */
205
+ conditionExpression?: string;
206
+ }
207
+ interface Conditions {
208
+ /** condition evaluates to `true` if either of the blocks evaluate to `true` (aka OR between all) */
209
+ conditionBlocks?: ConditionBlock$1[];
210
+ }
211
+ interface Source {
212
+ /** Automation ID */
213
+ automationId?: string | null;
214
+ /** Application ID */
215
+ appId?: string | null;
216
+ /** Component ID */
217
+ componentId?: string | null;
218
+ /** Version */
219
+ version?: number | null;
220
+ }
221
+ interface AutomationMetadata {
222
+ /** Is this Automation hidden on a site? */
223
+ hidden?: boolean;
224
+ /** Can this Automation be dismissed (inactivated) on a site? */
225
+ alwaysActive?: boolean;
226
+ /** Is this Automation's scheduling modification is disabled on a site? */
227
+ schedulingModificationDisabled?: boolean;
228
+ /** Is the removal of this Automation's actions disabled? */
229
+ actionRemovalDisabled?: boolean;
230
+ /** Is conditions editing for this Automation allowed on a site? */
231
+ actionConditionsEditingDisabled?: boolean;
232
+ }
233
+ interface ExtendedFields {
234
+ /**
235
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
236
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
237
+ *
238
+ * You can only access fields for which you have the appropriate permissions.
239
+ *
240
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
241
+ */
242
+ namespaces?: Record<string, Record<string, any>>;
243
+ }
244
+ interface UnprocessedTargetEvent {
245
+ /** The target that was not marked as processed */
246
+ target?: Target$1;
247
+ }
248
+ interface Target$1 {
249
+ /** Some unique identifier for the target, this can change between result store client configurations */
250
+ _id?: string | null;
251
+ /** The unique location of the target in Bazel notation i.e @repo//path/to/target:target_name */
252
+ location?: string | null;
253
+ /** The combined digest of all files within the target */
254
+ combinedDigest?: string | null;
255
+ /** The vcs commit timestamp of the target */
256
+ commitTimestamp?: string;
257
+ /** The type of the target */
258
+ type?: TargetType;
259
+ }
260
+ declare enum TargetType {
261
+ NONE = "NONE",
262
+ WIX_PROTO_BUNDLE_EXPORT = "WIX_PROTO_BUNDLE_EXPORT",
263
+ WIX_APPENDIX_BUNDLE_EXPORT = "WIX_APPENDIX_BUNDLE_EXPORT",
264
+ WIX_API_REGISTRY_INFO_EXPORT = "WIX_API_REGISTRY_INFO_EXPORT"
265
+ }
266
+ interface GetApplicationAutomationRequest {
267
+ /** Application Automation ID */
268
+ automationId?: string;
269
+ }
270
+ interface GetApplicationAutomationResponse {
271
+ /** Automation */
272
+ automation?: Automation$1;
273
+ }
274
+ interface QueryApplicationAutomationsRequest {
275
+ /** Query */
276
+ query?: QueryV2;
277
+ }
278
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
279
+ /** Paging options to limit and skip the number of items. */
280
+ paging?: Paging;
281
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
282
+ cursorPaging?: CursorPaging;
283
+ /**
284
+ * Filter object in the following format:
285
+ * `"filter" : {
286
+ * "fieldName1": "value1",
287
+ * "fieldName2":{"$operator":"value2"}
288
+ * }`
289
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
290
+ */
291
+ filter?: Record<string, any> | null;
292
+ /**
293
+ * Sort object in the following format:
294
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
295
+ */
296
+ sort?: Sorting[];
297
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
298
+ fields?: string[];
299
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
300
+ fieldsets?: string[];
301
+ }
302
+ /** @oneof */
303
+ interface QueryV2PagingMethodOneOf {
304
+ /** Paging options to limit and skip the number of items. */
305
+ paging?: Paging;
306
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
307
+ cursorPaging?: CursorPaging;
308
+ }
309
+ interface Sorting {
310
+ /** Name of the field to sort by. */
311
+ fieldName?: string;
312
+ /** Sort order. */
313
+ order?: SortOrder;
314
+ }
315
+ declare enum SortOrder {
316
+ ASC = "ASC",
317
+ DESC = "DESC"
318
+ }
319
+ interface Paging {
320
+ /** Number of items to load. */
321
+ limit?: number | null;
322
+ /** Number of items to skip in the current sort order. */
323
+ offset?: number | null;
324
+ }
325
+ interface CursorPaging {
326
+ /** Maximum number of items to return in the results. */
327
+ limit?: number | null;
328
+ /**
329
+ * Pointer to the next or previous page in the list of results.
330
+ *
331
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
332
+ * Not relevant for the first request.
333
+ */
334
+ cursor?: string | null;
335
+ }
336
+ interface QueryApplicationAutomationsResponse {
337
+ /** List of automations */
338
+ automations?: Automation$1[];
339
+ /** Paging metadata */
340
+ paging?: PagingMetadataV2;
341
+ }
342
+ interface PagingMetadataV2 {
343
+ /** Number of items returned in the response. */
344
+ count?: number | null;
345
+ /** Offset that was requested. */
346
+ offset?: number | null;
347
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
348
+ total?: number | null;
349
+ /** Flag that indicates the server failed to calculate the `total` field. */
350
+ tooManyToCount?: boolean | null;
351
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
352
+ cursors?: Cursors;
353
+ }
354
+ interface Cursors {
355
+ /** Cursor string pointing to the next page in the list of results. */
356
+ next?: string | null;
357
+ /** Cursor pointing to the previous page in the list of results. */
358
+ prev?: string | null;
359
+ }
360
+ interface UpdateApplicationAutomationConfigurationIdRequest {
361
+ /** Application Automation ID */
362
+ automationId?: string;
363
+ /** Configuration ID */
364
+ esbConfigurationId?: string;
365
+ }
366
+ interface UpdateApplicationAutomationConfigurationIdResponse {
367
+ }
368
+ interface UpdateApplicationAutomationToMigratedFromV1Request {
369
+ /** Application Automation ID */
370
+ automationId?: string;
371
+ /**
372
+ * Revision
373
+ * @readonly
374
+ */
375
+ revision?: string | null;
376
+ /** value to be set */
377
+ value?: boolean | null;
378
+ }
379
+ interface UpdateApplicationAutomationToMigratedFromV1Response {
380
+ }
381
+ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
382
+ createdEvent?: EntityCreatedEvent$1;
383
+ updatedEvent?: EntityUpdatedEvent$1;
384
+ deletedEvent?: EntityDeletedEvent$1;
385
+ actionEvent?: ActionEvent$1;
386
+ /**
387
+ * Unique event ID.
388
+ * Allows clients to ignore duplicate webhooks.
389
+ */
390
+ _id?: string;
391
+ /**
392
+ * Assumes actions are also always typed to an entity_type
393
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
394
+ */
395
+ entityFqdn?: string;
396
+ /**
397
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
398
+ * This is although the created/updated/deleted notion is duplication of the oneof types
399
+ * Example: created/updated/deleted/started/completed/email_opened
400
+ */
401
+ slug?: string;
402
+ /** ID of the entity associated with the event. */
403
+ entityId?: string;
404
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
405
+ eventTime?: Date;
406
+ /**
407
+ * Whether the event was triggered as a result of a privacy regulation application
408
+ * (for example, GDPR).
409
+ */
410
+ triggeredByAnonymizeRequest?: boolean | null;
411
+ /** If present, indicates the action that triggered the event. */
412
+ originatedFrom?: string | null;
413
+ /**
414
+ * A sequence number defining the order of updates to the underlying entity.
415
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
416
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
417
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
418
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
419
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
420
+ */
421
+ entityEventSequence?: string | null;
422
+ }
423
+ /** @oneof */
424
+ interface DomainEventBodyOneOf$1 {
425
+ createdEvent?: EntityCreatedEvent$1;
426
+ updatedEvent?: EntityUpdatedEvent$1;
427
+ deletedEvent?: EntityDeletedEvent$1;
428
+ actionEvent?: ActionEvent$1;
429
+ }
430
+ interface EntityCreatedEvent$1 {
431
+ entity?: string;
432
+ }
433
+ interface RestoreInfo {
434
+ deletedDate?: Date;
435
+ }
436
+ interface EntityUpdatedEvent$1 {
437
+ /**
438
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
439
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
440
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
441
+ */
442
+ currentEntity?: string;
443
+ }
444
+ interface EntityDeletedEvent$1 {
445
+ /** Entity that was deleted */
446
+ deletedEntity?: string | null;
447
+ }
448
+ interface ActionEvent$1 {
449
+ body?: string;
450
+ }
451
+ interface Empty$1 {
452
+ }
453
+ interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
454
+ /** Emitted on a meta site creation. */
455
+ siteCreated?: SiteCreated;
456
+ /** Emitted on a meta site transfer completion. */
457
+ siteTransferred?: SiteTransferred;
458
+ /** Emitted on a meta site deletion. */
459
+ siteDeleted?: SiteDeleted;
460
+ /** Emitted on a meta site restoration. */
461
+ siteUndeleted?: SiteUndeleted;
462
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
463
+ sitePublished?: SitePublished;
464
+ /** Emitted on a meta site unpublish. */
465
+ siteUnpublished?: SiteUnpublished;
466
+ /** Emitted when meta site is marked as template. */
467
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
468
+ /** Emitted when meta site is marked as a WixSite. */
469
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
470
+ /** Emitted when an application is provisioned (installed). */
471
+ serviceProvisioned?: ServiceProvisioned;
472
+ /** Emitted when an application is removed (uninstalled). */
473
+ serviceRemoved?: ServiceRemoved;
474
+ /** Emitted when meta site name (URL slug) is changed. */
475
+ siteRenamedPayload?: SiteRenamed;
476
+ /** Emitted when meta site was permanently deleted. */
477
+ hardDeleted?: SiteHardDeleted;
478
+ /** Emitted on a namespace change. */
479
+ namespaceChanged?: NamespaceChanged;
480
+ /** Emitted when Studio is attached. */
481
+ studioAssigned?: StudioAssigned;
482
+ /** Emitted when Studio is detached. */
483
+ studioUnassigned?: StudioUnassigned;
484
+ /** A meta site id. */
485
+ metaSiteId?: string;
486
+ /** A meta site version. Monotonically increasing. */
487
+ version?: string;
488
+ /** A timestamp of the event. */
489
+ timestamp?: string;
490
+ /** A list of "assets" (applications). The same as MetaSiteContext. */
491
+ assets?: Asset[];
492
+ }
493
+ /** @oneof */
494
+ interface MetaSiteSpecialEventPayloadOneOf {
495
+ /** Emitted on a meta site creation. */
496
+ siteCreated?: SiteCreated;
497
+ /** Emitted on a meta site transfer completion. */
498
+ siteTransferred?: SiteTransferred;
499
+ /** Emitted on a meta site deletion. */
500
+ siteDeleted?: SiteDeleted;
501
+ /** Emitted on a meta site restoration. */
502
+ siteUndeleted?: SiteUndeleted;
503
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
504
+ sitePublished?: SitePublished;
505
+ /** Emitted on a meta site unpublish. */
506
+ siteUnpublished?: SiteUnpublished;
507
+ /** Emitted when meta site is marked as template. */
508
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
509
+ /** Emitted when meta site is marked as a WixSite. */
510
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
511
+ /** Emitted when an application is provisioned (installed). */
512
+ serviceProvisioned?: ServiceProvisioned;
513
+ /** Emitted when an application is removed (uninstalled). */
514
+ serviceRemoved?: ServiceRemoved;
515
+ /** Emitted when meta site name (URL slug) is changed. */
516
+ siteRenamedPayload?: SiteRenamed;
517
+ /** Emitted when meta site was permanently deleted. */
518
+ hardDeleted?: SiteHardDeleted;
519
+ /** Emitted on a namespace change. */
520
+ namespaceChanged?: NamespaceChanged;
521
+ /** Emitted when Studio is attached. */
522
+ studioAssigned?: StudioAssigned;
523
+ /** Emitted when Studio is detached. */
524
+ studioUnassigned?: StudioUnassigned;
525
+ }
526
+ interface Asset {
527
+ /** An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). */
528
+ appDefId?: string;
529
+ /** An instance id. For legacy reasons may be UUID or a string. */
530
+ instanceId?: string;
531
+ /** An application state. */
532
+ state?: State;
533
+ }
534
+ declare enum State {
535
+ UNKNOWN = "UNKNOWN",
536
+ ENABLED = "ENABLED",
537
+ DISABLED = "DISABLED",
538
+ PENDING = "PENDING",
539
+ DEMO = "DEMO"
540
+ }
541
+ interface SiteCreated {
542
+ /** A template identifier (empty if not created from a template). */
543
+ originTemplateId?: string;
544
+ /** An account id of the owner. */
545
+ ownerId?: string;
546
+ /** A context in which meta site was created. */
547
+ context?: SiteCreatedContext;
548
+ /**
549
+ * A meta site id from which this site was created.
550
+ *
551
+ * In case of a creation from a template it's a template id.
552
+ * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
553
+ */
554
+ originMetaSiteId?: string | null;
555
+ /** A meta site name (URL slug). */
556
+ siteName?: string;
557
+ /** A namespace. */
558
+ namespace?: Namespace;
559
+ }
560
+ declare enum SiteCreatedContext {
561
+ /** A valid option, we don't expose all reasons why site might be created. */
562
+ OTHER = "OTHER",
563
+ /** A meta site was created from template. */
564
+ FROM_TEMPLATE = "FROM_TEMPLATE",
565
+ /** A meta site was created by copying of the transfferred meta site. */
566
+ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
567
+ /** A copy of existing meta site. */
568
+ DUPLICATE = "DUPLICATE",
569
+ /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
570
+ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
571
+ /** deprecated A meta site was created for Flash editor. */
572
+ FLASH = "FLASH"
573
+ }
574
+ declare enum Namespace {
575
+ UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
576
+ /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
577
+ WIX = "WIX",
578
+ /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
579
+ SHOUT_OUT = "SHOUT_OUT",
580
+ /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
581
+ ALBUMS = "ALBUMS",
582
+ /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
583
+ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
584
+ /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
585
+ HOTELS = "HOTELS",
586
+ /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
587
+ CLUBS = "CLUBS",
588
+ /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
589
+ ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
590
+ /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
591
+ DEV_SITE = "DEV_SITE",
592
+ /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
593
+ LOGOS = "LOGOS",
594
+ /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
595
+ VIDEO_MAKER = "VIDEO_MAKER",
596
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
597
+ PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
598
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
599
+ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
600
+ /**
601
+ * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
602
+ *
603
+ * Meta site with this namespace will *not* be shown in a user's site list by default.
604
+ */
605
+ HTML_DRAFT = "HTML_DRAFT",
606
+ /**
607
+ * the user-journey for Fitness users who want to start from managing their business instead of designing their website.
608
+ * Will be accessible from Site List and will not have a website app.
609
+ * Once the user attaches a site, the site will become a regular wixsite.
610
+ */
611
+ SITELESS_BUSINESS = "SITELESS_BUSINESS",
612
+ /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
613
+ CREATOR_ECONOMY = "CREATOR_ECONOMY",
614
+ /** It is to be used in the Business First efforts. */
615
+ DASHBOARD_FIRST = "DASHBOARD_FIRST",
616
+ /** Bookings business flow with no site. */
617
+ ANYWHERE = "ANYWHERE",
618
+ /** Namespace for Headless Backoffice with no editor */
619
+ HEADLESS = "HEADLESS",
620
+ /**
621
+ * Namespace for master site that will exist in parent account that will be referenced by subaccounts
622
+ * The site will be used for account level CSM feature for enterprise
623
+ */
624
+ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
625
+ /** Rise.ai Siteless account management for Gift Cards and Store Credit. */
626
+ RISE = "RISE",
627
+ /**
628
+ * As part of the branded app new funnel, users now can create a meta site that will be branded app first.
629
+ * There's a blank site behind the scene but it's blank).
630
+ * The Mobile company will be the owner of this namespace.
631
+ */
632
+ BRANDED_FIRST = "BRANDED_FIRST"
633
+ }
634
+ /** Site transferred to another user. */
635
+ interface SiteTransferred {
636
+ /** A previous owner id (user that transfers meta site). */
637
+ oldOwnerId?: string;
638
+ /** A new owner id (user that accepts meta site). */
639
+ newOwnerId?: string;
640
+ }
641
+ /** Soft deletion of the meta site. Could be restored. */
642
+ interface SiteDeleted {
643
+ /** A deletion context. */
644
+ deleteContext?: DeleteContext;
645
+ }
646
+ interface DeleteContext {
647
+ /** When the meta site was deleted. */
648
+ dateDeleted?: Date;
649
+ /** A status. */
650
+ deleteStatus?: DeleteStatus;
651
+ /** A reason (flow). */
652
+ deleteOrigin?: string;
653
+ /** A service that deleted it. */
654
+ initiatorId?: string | null;
655
+ }
656
+ declare enum DeleteStatus {
657
+ UNKNOWN = "UNKNOWN",
658
+ TRASH = "TRASH",
659
+ DELETED = "DELETED",
660
+ PENDING_PURGE = "PENDING_PURGE"
661
+ }
662
+ /** Restoration of the meta site. */
663
+ interface SiteUndeleted {
664
+ }
665
+ /** First publish of a meta site. Or subsequent publish after unpublish. */
666
+ interface SitePublished {
667
+ }
668
+ interface SiteUnpublished {
669
+ /** A list of URLs previously associated with the meta site. */
670
+ urls?: string[];
671
+ }
672
+ interface SiteMarkedAsTemplate {
673
+ }
674
+ interface SiteMarkedAsWixSite {
675
+ }
676
+ interface ServiceProvisioned {
677
+ /** Either UUID or EmbeddedServiceType. */
678
+ appDefId?: string;
679
+ /** Not only UUID. Something here could be something weird. */
680
+ instanceId?: string;
681
+ /** An instance id from which this instance is originated. */
682
+ originInstanceId?: string;
683
+ /** A version. */
684
+ version?: string | null;
685
+ }
686
+ interface ServiceRemoved {
687
+ /** Either UUID or EmbeddedServiceType. */
688
+ appDefId?: string;
689
+ /** Not only UUID. Something here could be something weird. */
690
+ instanceId?: string;
691
+ /** A version. */
692
+ version?: string | null;
693
+ }
694
+ /** Rename of the site. Meaning, free public url has been changed as well. */
695
+ interface SiteRenamed {
696
+ /** A new meta site name (URL slug). */
697
+ newSiteName?: string;
698
+ /** A previous meta site name (URL slug). */
699
+ oldSiteName?: string;
700
+ }
701
+ /**
702
+ * Hard deletion of the meta site.
703
+ *
704
+ * Could not be restored. Therefore it's desirable to cleanup data.
705
+ */
706
+ interface SiteHardDeleted {
707
+ /** A deletion context. */
708
+ deleteContext?: DeleteContext;
709
+ }
710
+ interface NamespaceChanged {
711
+ /** A previous namespace. */
712
+ oldNamespace?: Namespace;
713
+ /** A new namespace. */
714
+ newNamespace?: Namespace;
715
+ }
716
+ /** Assigned Studio editor */
717
+ interface StudioAssigned {
718
+ }
719
+ /** Unassigned Studio editor */
720
+ interface StudioUnassigned {
721
+ }
722
+ interface SyncApplicationAutomationsRequest {
723
+ /** List of app IDs */
724
+ appIds?: string[];
725
+ }
726
+ interface SyncApplicationAutomationsResponse {
727
+ }
728
+ interface BulkCreateApplicationAutomationRequest {
729
+ /** Automations to be created */
730
+ automations?: Automation$1[];
731
+ }
732
+ interface BulkCreateApplicationAutomationResponse {
733
+ /** The created Automations */
734
+ results?: Automation$1[];
735
+ /** Bulk create metadata. */
736
+ bulkActionMetadata?: BulkActionMetadata$1;
737
+ }
738
+ interface BulkActionMetadata$1 {
739
+ /** Number of items that were successfully processed. */
740
+ totalSuccesses?: number;
741
+ /** Number of items that couldn't be processed. */
742
+ totalFailures?: number;
743
+ /** Number of failures without details because detailed failure threshold was exceeded. */
744
+ undetailedFailures?: number;
745
+ }
746
+ interface MessageEnvelope$1 {
747
+ /** App instance ID. */
748
+ instanceId?: string | null;
749
+ /** Event type. */
750
+ eventType?: string;
751
+ /** The identification type and identity data. */
752
+ identity?: IdentificationData$1;
753
+ /** Stringify payload. */
754
+ data?: string;
755
+ }
756
+ interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
757
+ /** ID of a site visitor that has not logged in to the site. */
758
+ anonymousVisitorId?: string;
759
+ /** ID of a site visitor that has logged in to the site. */
760
+ memberId?: string;
761
+ /** ID of a Wix user (site owner, contributor, etc.). */
762
+ wixUserId?: string;
763
+ /** ID of an app. */
764
+ appId?: string;
765
+ /** @readonly */
766
+ identityType?: WebhookIdentityType$1;
767
+ }
768
+ /** @oneof */
769
+ interface IdentificationDataIdOneOf$1 {
770
+ /** ID of a site visitor that has not logged in to the site. */
771
+ anonymousVisitorId?: string;
772
+ /** ID of a site visitor that has logged in to the site. */
773
+ memberId?: string;
774
+ /** ID of a Wix user (site owner, contributor, etc.). */
775
+ wixUserId?: string;
776
+ /** ID of an app. */
777
+ appId?: string;
778
+ }
779
+ declare enum WebhookIdentityType$1 {
780
+ UNKNOWN = "UNKNOWN",
781
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
782
+ MEMBER = "MEMBER",
783
+ WIX_USER = "WIX_USER",
784
+ APP = "APP"
785
+ }
786
+ interface CreateAutomationRequest {
787
+ /** Automation to be created */
788
+ automation: Automation$1;
789
+ }
790
+ interface CreateAutomationResponse {
791
+ /** The created Automation */
792
+ automation?: Automation$1;
793
+ }
794
+ interface MigrationBulkCreateAutomationsRequest {
795
+ /** Automations to be created */
796
+ automations?: Automation$1[];
797
+ /** V1 Activity type (trigger name) */
798
+ activityType?: string;
799
+ /** automation id to counter map */
800
+ automationIdToCounter?: Record<string, string>;
801
+ /** automation id to last triggered map */
802
+ automationIdToLastTriggered?: Record<string, string>;
803
+ }
804
+ interface MigrationBulkCreateAutomationsResponse {
805
+ /** bulk action metadata */
806
+ bulkActionMetadata?: BulkActionMetadata$1;
807
+ /** item metadata */
808
+ itemMetadata?: ItemMetadata$1[];
809
+ }
810
+ interface ItemMetadata$1 {
811
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
812
+ _id?: string | null;
813
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
814
+ originalIndex?: number;
815
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
816
+ success?: boolean;
817
+ /** Details about the error in case of failure. */
818
+ error?: ApplicationError$1;
819
+ }
820
+ interface ApplicationError$1 {
821
+ /** Error code. */
822
+ code?: string;
823
+ /** Description of the error. */
824
+ description?: string;
825
+ /** Data related to the error. */
826
+ data?: Record<string, any> | null;
827
+ }
828
+ interface MigrationBulkCreateAutomations {
829
+ /** Automations to be created */
830
+ automations?: Automation$1[];
831
+ /** V1 Activity type (trigger name) */
832
+ activityType?: string;
833
+ /** automation id to counter map */
834
+ automationIdToCounter?: Record<string, string>;
835
+ /** automation id to last triggered map */
836
+ automationIdToLastTriggered?: Record<string, string>;
837
+ }
838
+ interface GetAutomationRequest {
839
+ /** Automation ID */
840
+ automationId: string;
841
+ /** Automation type */
842
+ automationType?: Type$1;
843
+ }
844
+ interface GetAutomationResponse {
845
+ /** Automation */
846
+ automation?: Automation$1;
847
+ }
848
+ interface UpdateAutomationRequest {
849
+ /** Automation to be updated, may be partial */
850
+ automation: Automation$1;
851
+ }
852
+ interface UpdateAutomationResponse {
853
+ /** The updated Automation */
854
+ automation?: Automation$1;
855
+ }
856
+ interface UpdatedWithPreviousEntity {
857
+ /** previous automation */
858
+ previousAutomation?: Automation$1;
859
+ /** updated automation */
860
+ currentAutomation?: Automation$1;
861
+ }
862
+ interface DeleteAutomationRequest {
863
+ /** Id of the Automation to delete */
864
+ automationId: string;
865
+ /** The revision of the Automation */
866
+ revision?: string;
867
+ }
868
+ interface DeleteAutomationResponse {
869
+ }
870
+ interface DeletedWithEntity {
871
+ /** Deleted automation */
872
+ automation?: Automation$1;
873
+ }
874
+ interface QueryAutomationsRequest {
875
+ /** WQL expression */
876
+ query: QueryV2;
877
+ /** Automation type */
878
+ automationType?: Type$1;
879
+ }
880
+ interface QueryAutomationsResponse {
881
+ /** List of automations */
882
+ automations?: Automation$1[];
883
+ /** Paging metadata */
884
+ paging?: PagingMetadataV2;
885
+ }
886
+ interface OverrideApplicationAutomationRequest {
887
+ /** Application Automation */
888
+ automation: Automation$1;
889
+ }
890
+ interface OverrideApplicationAutomationResponse {
891
+ /** Custom Automation */
892
+ automation?: Automation$1;
893
+ }
894
+ interface GenerateApplicationAutomationFromCustomRequest {
895
+ /** Custom Automation */
896
+ automation?: Automation$1;
897
+ }
898
+ interface GenerateApplicationAutomationFromCustomResponse {
899
+ /** Application Automation */
900
+ automation?: Automation$1;
901
+ }
902
+ interface ValidateAutomationByIdRequest {
903
+ /** Automation ID */
904
+ automationId: string;
905
+ /** Automation type */
906
+ automationType?: Type$1;
907
+ }
908
+ interface ValidateAutomationByIdResponse {
909
+ /** is the Automation valid */
910
+ valid?: boolean;
911
+ /** list of validation errors for the automation Trigger */
912
+ triggerValidationErrors?: TriggerValidationError[];
913
+ /** list of validation information for the automation Actions */
914
+ actionValidationInfo?: ActionValidationInfo[];
915
+ }
916
+ interface TriggerValidationError extends TriggerValidationErrorErrorOneOf {
917
+ /** trigger configuration error */
918
+ configurationError?: TriggerConfigurationError;
919
+ /** provider configuration error */
920
+ providerConfigurationError?: ProviderConfigurationError;
921
+ /** validation error type */
922
+ errorType?: TriggerValidationErrorValidationErrorType;
923
+ }
924
+ /** @oneof */
925
+ interface TriggerValidationErrorErrorOneOf {
926
+ /** trigger configuration error */
927
+ configurationError?: TriggerConfigurationError;
928
+ /** provider configuration error */
929
+ providerConfigurationError?: ProviderConfigurationError;
930
+ }
931
+ declare enum TriggerValidationErrorValidationErrorType {
932
+ UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
933
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
934
+ PROVIDER_ERROR = "PROVIDER_ERROR"
935
+ }
936
+ interface TriggerConfigurationError {
937
+ /** trigger error type */
938
+ errorType?: TriggerErrorType;
939
+ /** optional - related filter field key */
940
+ filterFieldKey?: string | null;
941
+ }
942
+ declare enum TriggerErrorType {
943
+ UNKNOWN_TRIGGER_ERROR_TYPE = "UNKNOWN_TRIGGER_ERROR_TYPE",
944
+ NOT_FOUND = "NOT_FOUND",
945
+ APP_NOT_INSTALLED = "APP_NOT_INSTALLED",
946
+ MODERATION_MISMATCH = "MODERATION_MISMATCH",
947
+ DEPRECATED = "DEPRECATED",
948
+ INVALID_TRIGGER_KEY = "INVALID_TRIGGER_KEY",
949
+ INVALID_FILTER_FIELD_KEY = "INVALID_FILTER_FIELD_KEY",
950
+ INVALID_FILTER_EXPRESSION = "INVALID_FILTER_EXPRESSION"
951
+ }
952
+ interface ProviderConfigurationError {
953
+ /** Key corresponding to the field in the schema. */
954
+ fieldKey?: string | null;
955
+ /** Error message. */
956
+ message?: string;
957
+ /** Label for a call-to-action button that's displayed with the error. Translated according to the SPI language context. */
958
+ ctaLabel?: string | null;
959
+ /** URL to redirect to when the call-to-action button is clicked. */
960
+ ctaUrl?: string | null;
961
+ /** Title for the error. */
962
+ title?: string;
963
+ }
964
+ interface ActionValidationInfo {
965
+ /** the id of the action in the automation */
966
+ actionId?: string | null;
967
+ /** the id of the app defining the action */
968
+ appId?: string;
969
+ /** human readable identifier of the action per app */
970
+ actionKey?: string;
971
+ /** list of action validation errors */
972
+ validationErrors?: ActionValidationError[];
973
+ }
974
+ interface ActionValidationError extends ActionValidationErrorErrorOneOf {
975
+ /** action configuration error */
976
+ configurationError?: ActionConfigurationError;
977
+ /** provider configuration error */
978
+ providerConfigurationError?: ProviderConfigurationError;
979
+ /** validation error type */
980
+ errorType?: ValidationErrorType;
981
+ }
982
+ /** @oneof */
983
+ interface ActionValidationErrorErrorOneOf {
984
+ /** action configuration error */
985
+ configurationError?: ActionConfigurationError;
986
+ /** provider configuration error */
987
+ providerConfigurationError?: ProviderConfigurationError;
988
+ }
989
+ declare enum ValidationErrorType {
990
+ UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
991
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
992
+ PROVIDER_ERROR = "PROVIDER_ERROR"
993
+ }
994
+ interface ActionConfigurationError {
995
+ /** action error type */
996
+ errorType?: ActionErrorType;
997
+ /** optional - related field key */
998
+ fieldKey?: string | null;
999
+ }
1000
+ declare enum ActionErrorType {
1001
+ UNKNOWN_ACTION_ERROR_TYPE = "UNKNOWN_ACTION_ERROR_TYPE",
1002
+ NOT_FOUND = "NOT_FOUND",
1003
+ APP_NOT_INSTALLED = "APP_NOT_INSTALLED",
1004
+ MODERATION_MISMATCH = "MODERATION_MISMATCH",
1005
+ DEPRECATED = "DEPRECATED",
1006
+ INVALID_ACTION_KEY = "INVALID_ACTION_KEY",
1007
+ INVALID_INPUT_MAPPING = "INVALID_INPUT_MAPPING",
1008
+ INVALID_OUTPUT_MAPPING = "INVALID_OUTPUT_MAPPING",
1009
+ INVALID_DELAY = "INVALID_DELAY",
1010
+ INVALID_RATE_LIMIT = "INVALID_RATE_LIMIT",
1011
+ INPUT_MAPPING_TYPE_MISMATCH = "INPUT_MAPPING_TYPE_MISMATCH",
1012
+ INPUT_MAPPING_MISSING_REQUIRED_FIELD = "INPUT_MAPPING_MISSING_REQUIRED_FIELD",
1013
+ INPUT_MAPPING_SCHEMA_MISMATCH = "INPUT_MAPPING_SCHEMA_MISMATCH",
1014
+ INPUT_MAPPING_VARIABLE_MISSING_FROM_SCHEMA = "INPUT_MAPPING_VARIABLE_MISSING_FROM_SCHEMA"
1015
+ }
1016
+ interface ValidateAutomationRequest {
1017
+ /** Automation to validate */
1018
+ automation: Automation$1;
1019
+ }
1020
+ interface ValidateAutomationResponse {
1021
+ /** is the Automation valid */
1022
+ valid?: boolean;
1023
+ /** list of validation errors for the automation Trigger */
1024
+ triggerValidationErrors?: TriggerValidationError[];
1025
+ /** list of validation information for the automation Actions */
1026
+ actionValidationInfo?: ActionValidationInfo[];
1027
+ }
1028
+ interface GetAutomationActivationReportsRequest {
1029
+ /** Automation ID */
1030
+ automationId: string;
1031
+ paging?: Paging;
1032
+ /** Fields projection - pass in the field key you want to get back */
1033
+ fields?: string[];
1034
+ }
1035
+ interface GetAutomationActivationReportsResponse {
1036
+ /** Automation activation reports */
1037
+ activationReports?: ActivationReport[];
1038
+ metadata?: PagingMetadata;
1039
+ /** activationStatus -> count */
1040
+ stats?: Record<string, number>;
1041
+ }
1042
+ interface ActivationReport {
1043
+ activationId?: string;
1044
+ requestId?: string;
1045
+ status?: ActivationStatus$1;
1046
+ creationDate?: Date;
1047
+ updateDate?: Date;
1048
+ /** will be populated when status = FAILED */
1049
+ error?: string | null;
1050
+ }
1051
+ declare enum ActivationStatus$1 {
1052
+ UNKNOWN_ACTIVATION_REQUEST = "UNKNOWN_ACTIVATION_REQUEST",
1053
+ IN_PROGRESS = "IN_PROGRESS",
1054
+ SUCCESS = "SUCCESS",
1055
+ FAILED = "FAILED",
1056
+ SCHEDULED = "SCHEDULED",
1057
+ RETRY = "RETRY",
1058
+ RESUMED = "RESUMED",
1059
+ PAUSED = "PAUSED"
1060
+ }
1061
+ interface PagingMetadata {
1062
+ /** Number of items returned in the response. */
1063
+ count?: number | null;
1064
+ /** Offset that was requested. */
1065
+ offset?: number | null;
1066
+ /** Total number of items that match the query. */
1067
+ total?: number | null;
1068
+ /** Flag that indicates the server failed to calculate the `total` field. */
1069
+ tooManyToCount?: boolean | null;
1070
+ }
1071
+ interface GetAutomationActionSchemaRequest {
1072
+ /** Automation's Configuration ID */
1073
+ esbConfigurationId?: string;
1074
+ /** Specific action ID */
1075
+ actionId?: string;
1076
+ }
1077
+ interface GetAutomationActionSchemaResponse {
1078
+ /** The payload schema of the automation for the specific action */
1079
+ schema?: Record<string, any> | null;
1080
+ }
1081
+ interface GetActionsQuotaInfoRequest {
1082
+ }
1083
+ interface GetActionsQuotaInfoResponse {
1084
+ /** list of action quota information */
1085
+ actionProviderQuotaInfo?: ActionProviderQuotaInfo[];
1086
+ }
1087
+ interface ActionProviderQuotaInfo {
1088
+ /** action app id */
1089
+ appId?: string;
1090
+ /** the action key */
1091
+ actionKey?: string;
1092
+ /** the action quota information */
1093
+ actionQuotaInfo?: ActionQuotaInfo;
1094
+ }
1095
+ interface ActionQuotaInfo {
1096
+ /**
1097
+ * Whether the quotas for your action are enforced. If you mark this as `true` in the response body,
1098
+ * Wix displays the information in the quota object on the site dashboard. If you mark this as `false` for
1099
+ * a user, Wix does not display any quota info on the site dashboard for your service.
1100
+ */
1101
+ enforced?: boolean;
1102
+ /**
1103
+ * The plans your service provides, together with the quotas enforced by each plan. A site may be enrolled
1104
+ * in multiple plans. Plans and quotas can be related as follows:
1105
+ *
1106
+ * + A single plan has a single quota.
1107
+ * + A single plan has multiple quotas.
1108
+ * + Multiple plans are associated with multiple quotas.
1109
+ *
1110
+ * Plans and quotas that are related should be grouped together in a single `quotaInfo`
1111
+ * object.
1112
+ */
1113
+ quotaInfo?: QuotaInfo[];
1114
+ }
1115
+ interface QuotaInfo {
1116
+ /** List of plans associated with the site making the request. */
1117
+ plans?: Plan[];
1118
+ /** List of quotas associated with the plans the site is enrolled in. */
1119
+ quotas?: Quota[];
1120
+ /**
1121
+ * Details for an upgrade call-to-action button.
1122
+ * Displayed in the site contributor’s dashboard together with the quota details.
1123
+ */
1124
+ upgradeCta?: UpgradeCTA;
1125
+ }
1126
+ interface Plan {
1127
+ /** Plan ID defined by the action provider. */
1128
+ _id?: string;
1129
+ /** Plan name to display in the site contributor’s dashboard. */
1130
+ name?: string;
1131
+ }
1132
+ interface Quota {
1133
+ /** Name of the feature the quota is related to. For example, "Messages sent". */
1134
+ featureName?: string;
1135
+ /**
1136
+ * Quota renewal date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
1137
+ * For example, 10 July 2020 at 15:00 is written as `2020-07-10 15:00:00.000`.
1138
+ */
1139
+ renewalDate?: Date;
1140
+ /** The user's current quota usage. */
1141
+ currentUsage?: string;
1142
+ /** Quota limit data. */
1143
+ limit?: string | null;
1144
+ /** Additional information about the quota. Displayed as a tooltip in the site contributor’s dashboard. */
1145
+ additionalInfo?: AdditionalInfo;
1146
+ }
1147
+ interface CTA {
1148
+ /** Call-to-action redirect URL. */
1149
+ url?: string;
1150
+ /** Call-to-action label. */
1151
+ label?: string;
1152
+ }
1153
+ interface AdditionalInfo {
1154
+ /** Tooltip content. */
1155
+ description?: string;
1156
+ /** Details for an options call-to-action link that appears in the tooltip. */
1157
+ cta?: CTA;
1158
+ }
1159
+ interface UpgradeCTA {
1160
+ /** CTA button redirect URL. */
1161
+ url?: string;
1162
+ /** CTA button label. */
1163
+ label?: string;
1164
+ }
1165
+ interface BulkDeleteAutomationsRequest {
1166
+ /** Automation IDs to delete */
1167
+ automationIds?: string[];
1168
+ }
1169
+ interface BulkDeleteAutomationsResponse {
1170
+ }
1171
+ interface GenerateActionInputMappingFromTemplateRequest {
1172
+ /** action app id */
1173
+ appId?: string;
1174
+ /** the action key */
1175
+ actionKey?: string;
1176
+ /** action input mapping template the action spi provider will generate input mapping from */
1177
+ actionInputMappingTemplate?: Record<string, any> | null;
1178
+ }
1179
+ interface GenerateActionInputMappingFromTemplateResponse {
1180
+ /** generated action input mapping */
1181
+ generatedActionInputMapping?: Record<string, any> | null;
1182
+ }
1183
+ interface MigrationUpdateMigratedToV3AutomationRequest {
1184
+ /** Automation id */
1185
+ automationId?: string;
1186
+ }
1187
+ interface MigrationUpdateMigratedToV3AutomationResponse {
1188
+ }
1189
+ interface FilterNonNullableFields {
1190
+ fieldKey: string;
1191
+ filterExpression: string;
1192
+ }
1193
+ interface DebounceNonNullableFields {
1194
+ timeFrameInSeconds: number;
1195
+ fieldKey: string;
1196
+ }
1197
+ interface TriggerNonNullableFields {
1198
+ appId: string;
1199
+ triggerKey: string;
1200
+ filters: FilterNonNullableFields[];
1201
+ debounce?: DebounceNonNullableFields;
1202
+ }
1203
+ interface OffsetNonNullableFields {
1204
+ seconds: number;
1205
+ delayFieldKey: string;
1206
+ }
1207
+ interface UntilNonNullableFields {
1208
+ dateFieldKey: string;
1209
+ offset?: OffsetNonNullableFields;
1210
+ }
1211
+ interface DelayNonNullableFields {
1212
+ for?: OffsetNonNullableFields;
1213
+ until?: UntilNonNullableFields;
1214
+ }
1215
+ interface RateLimitNonNullableFields {
1216
+ activations: number;
1217
+ }
1218
+ interface ConditionNonNullableFields {
1219
+ conditionExpression: string;
1220
+ }
1221
+ interface ConditionBlockNonNullableFields {
1222
+ type: BlockType$1;
1223
+ lineExpressions: string[];
1224
+ }
1225
+ interface ConditionsNonNullableFields {
1226
+ conditionBlocks: ConditionBlockNonNullableFields[];
1227
+ }
1228
+ interface ActionNonNullableFields {
1229
+ appId: string;
1230
+ actionKey: string;
1231
+ actionConfig: string;
1232
+ delay?: DelayNonNullableFields;
1233
+ rateLimit?: RateLimitNonNullableFields;
1234
+ condition?: ConditionNonNullableFields;
1235
+ conditions?: ConditionsNonNullableFields;
1236
+ }
1237
+ interface RuleNonNullableFields {
1238
+ trigger?: TriggerNonNullableFields;
1239
+ actions: ActionNonNullableFields[];
1240
+ }
1241
+ interface AutomationMetadataNonNullableFields {
1242
+ hidden: boolean;
1243
+ alwaysActive: boolean;
1244
+ schedulingModificationDisabled: boolean;
1245
+ actionRemovalDisabled: boolean;
1246
+ actionConditionsEditingDisabled: boolean;
1247
+ }
1248
+ interface AutomationNonNullableFields {
1249
+ name: string;
1250
+ description: string;
1251
+ type: Type$1;
1252
+ status: Status$1;
1253
+ rule?: RuleNonNullableFields;
1254
+ metadata?: AutomationMetadataNonNullableFields;
1255
+ }
1256
+ interface CreateAutomationResponseNonNullableFields {
1257
+ automation?: AutomationNonNullableFields;
1258
+ }
1259
+ interface GetAutomationResponseNonNullableFields {
1260
+ automation?: AutomationNonNullableFields;
1261
+ }
1262
+ interface UpdateAutomationResponseNonNullableFields {
1263
+ automation?: AutomationNonNullableFields;
1264
+ }
1265
+ interface QueryAutomationsResponseNonNullableFields {
1266
+ automations: AutomationNonNullableFields[];
1267
+ }
1268
+ interface OverrideApplicationAutomationResponseNonNullableFields {
1269
+ automation?: AutomationNonNullableFields;
1270
+ }
1271
+ interface TriggerConfigurationErrorNonNullableFields {
1272
+ errorType: TriggerErrorType;
1273
+ }
1274
+ interface ProviderConfigurationErrorNonNullableFields {
1275
+ message: string;
1276
+ title: string;
1277
+ }
1278
+ interface TriggerValidationErrorNonNullableFields {
1279
+ configurationError?: TriggerConfigurationErrorNonNullableFields;
1280
+ providerConfigurationError?: ProviderConfigurationErrorNonNullableFields;
1281
+ errorType: TriggerValidationErrorValidationErrorType;
1282
+ }
1283
+ interface ActionConfigurationErrorNonNullableFields {
1284
+ errorType: ActionErrorType;
1285
+ }
1286
+ interface ActionValidationErrorNonNullableFields {
1287
+ configurationError?: ActionConfigurationErrorNonNullableFields;
1288
+ providerConfigurationError?: ProviderConfigurationErrorNonNullableFields;
1289
+ errorType: ValidationErrorType;
1290
+ }
1291
+ interface ActionValidationInfoNonNullableFields {
1292
+ appId: string;
1293
+ actionKey: string;
1294
+ validationErrors: ActionValidationErrorNonNullableFields[];
1295
+ }
1296
+ interface ValidateAutomationByIdResponseNonNullableFields {
1297
+ valid: boolean;
1298
+ triggerValidationErrors: TriggerValidationErrorNonNullableFields[];
1299
+ actionValidationInfo: ActionValidationInfoNonNullableFields[];
1300
+ }
1301
+ interface ValidateAutomationResponseNonNullableFields {
1302
+ valid: boolean;
1303
+ triggerValidationErrors: TriggerValidationErrorNonNullableFields[];
1304
+ actionValidationInfo: ActionValidationInfoNonNullableFields[];
1305
+ }
1306
+ interface ActivationReportNonNullableFields {
1307
+ activationId: string;
1308
+ requestId: string;
1309
+ status: ActivationStatus$1;
1310
+ }
1311
+ interface GetAutomationActivationReportsResponseNonNullableFields {
1312
+ activationReports: ActivationReportNonNullableFields[];
1313
+ }
1314
+ interface BaseEventMetadata$1 {
1315
+ /** App instance ID. */
1316
+ instanceId?: string | null;
1317
+ /** Event type. */
1318
+ eventType?: string;
1319
+ /** The identification type and identity data. */
1320
+ identity?: IdentificationData$1;
1321
+ }
1322
+ interface EventMetadata$1 extends BaseEventMetadata$1 {
1323
+ /**
1324
+ * Unique event ID.
1325
+ * Allows clients to ignore duplicate webhooks.
1326
+ */
1327
+ _id?: string;
1328
+ /**
1329
+ * Assumes actions are also always typed to an entity_type
1330
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1331
+ */
1332
+ entityFqdn?: string;
1333
+ /**
1334
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1335
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1336
+ * Example: created/updated/deleted/started/completed/email_opened
1337
+ */
1338
+ slug?: string;
1339
+ /** ID of the entity associated with the event. */
1340
+ entityId?: string;
1341
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1342
+ eventTime?: Date;
1343
+ /**
1344
+ * Whether the event was triggered as a result of a privacy regulation application
1345
+ * (for example, GDPR).
1346
+ */
1347
+ triggeredByAnonymizeRequest?: boolean | null;
1348
+ /** If present, indicates the action that triggered the event. */
1349
+ originatedFrom?: string | null;
1350
+ /**
1351
+ * A sequence number defining the order of updates to the underlying entity.
1352
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1353
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1354
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1355
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1356
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1357
+ */
1358
+ entityEventSequence?: string | null;
1359
+ }
1360
+ interface AutomationCreatedEnvelope {
1361
+ entity: Automation$1;
1362
+ metadata: EventMetadata$1;
1363
+ }
1364
+ interface AutomationUpdatedEnvelope {
1365
+ entity: Automation$1;
1366
+ metadata: EventMetadata$1;
1367
+ }
1368
+ interface AutomationDeletedEnvelope {
1369
+ metadata: EventMetadata$1;
1370
+ }
1371
+ interface AutomationUpdatedWithPreviousEntityEnvelope {
1372
+ data: UpdatedWithPreviousEntity;
1373
+ metadata: EventMetadata$1;
1374
+ }
1375
+ interface AutomationDeletedWithEntityEnvelope {
1376
+ data: DeletedWithEntity;
1377
+ metadata: EventMetadata$1;
1378
+ }
1379
+ interface GetAutomationOptions {
1380
+ /** Automation type */
1381
+ automationType?: Type$1;
1382
+ }
1383
+ interface UpdateAutomation {
1384
+ /**
1385
+ * Automation ID
1386
+ * @readonly
1387
+ */
1388
+ _id?: string | null;
1389
+ /** Revision */
1390
+ revision?: string | null;
1391
+ /** Automation name */
1392
+ name?: string;
1393
+ /** Automation description */
1394
+ description?: string;
1395
+ /**
1396
+ * Automation Type
1397
+ * @readonly
1398
+ */
1399
+ type?: Type$1;
1400
+ /** Automation Status */
1401
+ status?: Status$1;
1402
+ /** Rule that contains a trigger and some actions */
1403
+ rule?: Rule;
1404
+ /**
1405
+ * Source Application Automation
1406
+ * @readonly
1407
+ */
1408
+ source?: Source;
1409
+ /**
1410
+ * Metadata
1411
+ * @readonly
1412
+ */
1413
+ metadata?: AutomationMetadata;
1414
+ /**
1415
+ * Created date
1416
+ * @readonly
1417
+ */
1418
+ _createdDate?: Date;
1419
+ /**
1420
+ * Updated date
1421
+ * @readonly
1422
+ */
1423
+ _updatedDate?: Date;
1424
+ /**
1425
+ * ESB Configuration ID
1426
+ * @readonly
1427
+ */
1428
+ esbConfigurationId?: string | null;
1429
+ /**
1430
+ * Was this automation migrated from v1
1431
+ * @readonly
1432
+ */
1433
+ migratedFromV1?: boolean | null;
1434
+ /** @readonly */
1435
+ migratedToV3?: boolean | null;
1436
+ }
1437
+ interface DeleteAutomationOptions {
1438
+ /** The revision of the Automation */
1439
+ revision?: string;
1440
+ }
1441
+ interface QueryAutomationsOptions {
1442
+ /** Automation type */
1443
+ automationType?: Type$1 | undefined;
1444
+ }
1445
+ interface QueryCursorResult {
1446
+ cursors: Cursors;
1447
+ hasNext: () => boolean;
1448
+ hasPrev: () => boolean;
1449
+ length: number;
1450
+ pageSize: number;
1451
+ }
1452
+ interface AutomationsQueryResult extends QueryCursorResult {
1453
+ items: Automation$1[];
1454
+ query: AutomationsQueryBuilder;
1455
+ next: () => Promise<AutomationsQueryResult>;
1456
+ prev: () => Promise<AutomationsQueryResult>;
1457
+ }
1458
+ interface AutomationsQueryBuilder {
1459
+ /** @param propertyName - Property whose value is compared with `value`.
1460
+ * @param value - Value to compare against.
1461
+ * @documentationMaturity preview
1462
+ */
1463
+ eq: (propertyName: '_id' | 'revision' | 'name' | 'description' | 'type' | 'status' | 'rule.trigger.appId' | 'rule.trigger.triggerKey' | 'rule.actions.id' | 'rule.actions.appId' | 'rule.actions.actionKey' | 'source.automationId' | 'source.appId' | 'source.componentId' | 'source.version' | 'metadata.hidden' | 'metadata.alwaysActive' | 'metadata.schedulingModificationDisabled' | 'metadata.actionRemovalDisabled' | 'metadata.actionConditionsEditingDisabled' | '_createdDate' | '_updatedDate' | 'esbConfigurationId', value: any) => AutomationsQueryBuilder;
1464
+ /** @param propertyName - Property whose value is compared with `value`.
1465
+ * @param value - Value to compare against.
1466
+ * @documentationMaturity preview
1467
+ */
1468
+ ne: (propertyName: '_id' | 'revision' | 'name' | 'description' | 'type' | 'status' | 'rule.trigger.appId' | 'rule.trigger.triggerKey' | 'rule.actions.id' | 'rule.actions.appId' | 'rule.actions.actionKey' | 'source.automationId' | 'source.appId' | 'source.componentId' | 'source.version' | 'metadata.hidden' | 'metadata.alwaysActive' | 'metadata.schedulingModificationDisabled' | 'metadata.actionRemovalDisabled' | 'metadata.actionConditionsEditingDisabled' | '_createdDate' | '_updatedDate' | 'esbConfigurationId', value: any) => AutomationsQueryBuilder;
1469
+ /** @param propertyName - Property whose value is compared with `value`.
1470
+ * @param value - Value to compare against.
1471
+ * @documentationMaturity preview
1472
+ */
1473
+ ge: (propertyName: 'revision' | 'source.version' | '_createdDate' | '_updatedDate', value: any) => AutomationsQueryBuilder;
1474
+ /** @param propertyName - Property whose value is compared with `value`.
1475
+ * @param value - Value to compare against.
1476
+ * @documentationMaturity preview
1477
+ */
1478
+ gt: (propertyName: 'revision' | 'source.version' | '_createdDate' | '_updatedDate', value: any) => AutomationsQueryBuilder;
1479
+ /** @param propertyName - Property whose value is compared with `value`.
1480
+ * @param value - Value to compare against.
1481
+ * @documentationMaturity preview
1482
+ */
1483
+ le: (propertyName: 'revision' | 'source.version' | '_createdDate' | '_updatedDate', value: any) => AutomationsQueryBuilder;
1484
+ /** @param propertyName - Property whose value is compared with `value`.
1485
+ * @param value - Value to compare against.
1486
+ * @documentationMaturity preview
1487
+ */
1488
+ lt: (propertyName: 'revision' | 'source.version' | '_createdDate' | '_updatedDate', value: any) => AutomationsQueryBuilder;
1489
+ /** @param propertyName - Property whose value is compared with `string`.
1490
+ * @param string - String to compare against. Case-insensitive.
1491
+ * @documentationMaturity preview
1492
+ */
1493
+ startsWith: (propertyName: '_id' | 'name' | 'description' | 'rule.trigger.appId' | 'rule.trigger.triggerKey' | 'rule.actions.id' | 'rule.actions.appId' | 'rule.actions.actionKey' | 'source.automationId' | 'source.appId' | 'source.componentId' | 'esbConfigurationId', value: string) => AutomationsQueryBuilder;
1494
+ /** @param propertyName - Property whose value is compared with `values`.
1495
+ * @param values - List of values to compare against.
1496
+ * @documentationMaturity preview
1497
+ */
1498
+ hasSome: (propertyName: '_id' | 'revision' | 'name' | 'description' | 'type' | 'status' | 'rule.trigger.appId' | 'rule.trigger.triggerKey' | 'rule.actions.id' | 'rule.actions.appId' | 'rule.actions.actionKey' | 'source.automationId' | 'source.appId' | 'source.componentId' | 'source.version' | 'metadata.hidden' | 'metadata.alwaysActive' | 'metadata.schedulingModificationDisabled' | 'metadata.actionRemovalDisabled' | 'metadata.actionConditionsEditingDisabled' | '_createdDate' | '_updatedDate' | 'esbConfigurationId', value: any[]) => AutomationsQueryBuilder;
1499
+ /** @documentationMaturity preview */
1500
+ in: (propertyName: '_id' | 'revision' | 'name' | 'description' | 'type' | 'status' | 'rule.trigger.appId' | 'rule.trigger.triggerKey' | 'rule.actions.id' | 'rule.actions.appId' | 'rule.actions.actionKey' | 'source.automationId' | 'source.appId' | 'source.componentId' | 'source.version' | 'metadata.hidden' | 'metadata.alwaysActive' | 'metadata.schedulingModificationDisabled' | 'metadata.actionRemovalDisabled' | 'metadata.actionConditionsEditingDisabled' | '_createdDate' | '_updatedDate' | 'esbConfigurationId', value: any) => AutomationsQueryBuilder;
1501
+ /** @documentationMaturity preview */
1502
+ exists: (propertyName: '_id' | 'revision' | 'name' | 'description' | 'type' | 'status' | 'rule.trigger.appId' | 'rule.trigger.triggerKey' | 'rule.actions.id' | 'rule.actions.appId' | 'rule.actions.actionKey' | 'source.automationId' | 'source.appId' | 'source.componentId' | 'source.version' | 'metadata.hidden' | 'metadata.alwaysActive' | 'metadata.schedulingModificationDisabled' | 'metadata.actionRemovalDisabled' | 'metadata.actionConditionsEditingDisabled' | '_createdDate' | '_updatedDate' | 'esbConfigurationId', value: boolean) => AutomationsQueryBuilder;
1503
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1504
+ * @documentationMaturity preview
1505
+ */
1506
+ ascending: (...propertyNames: Array<'_id' | 'revision' | 'name' | 'description' | 'type' | 'status' | 'rule.trigger.appId' | 'rule.trigger.triggerKey' | 'rule.actions.id' | 'rule.actions.appId' | 'rule.actions.actionKey' | 'source.automationId' | 'source.appId' | 'source.componentId' | 'source.version' | 'metadata.hidden' | 'metadata.alwaysActive' | 'metadata.schedulingModificationDisabled' | 'metadata.actionRemovalDisabled' | 'metadata.actionConditionsEditingDisabled' | '_createdDate' | '_updatedDate' | 'esbConfigurationId'>) => AutomationsQueryBuilder;
1507
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1508
+ * @documentationMaturity preview
1509
+ */
1510
+ descending: (...propertyNames: Array<'_id' | 'revision' | 'name' | 'description' | 'type' | 'status' | 'rule.trigger.appId' | 'rule.trigger.triggerKey' | 'rule.actions.id' | 'rule.actions.appId' | 'rule.actions.actionKey' | 'source.automationId' | 'source.appId' | 'source.componentId' | 'source.version' | 'metadata.hidden' | 'metadata.alwaysActive' | 'metadata.schedulingModificationDisabled' | 'metadata.actionRemovalDisabled' | 'metadata.actionConditionsEditingDisabled' | '_createdDate' | '_updatedDate' | 'esbConfigurationId'>) => AutomationsQueryBuilder;
1511
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1512
+ * @documentationMaturity preview
1513
+ */
1514
+ limit: (limit: number) => AutomationsQueryBuilder;
1515
+ /** @param cursor - A pointer to specific record
1516
+ * @documentationMaturity preview
1517
+ */
1518
+ skipTo: (cursor: string) => AutomationsQueryBuilder;
1519
+ /** @documentationMaturity preview */
1520
+ find: () => Promise<AutomationsQueryResult>;
1521
+ }
1522
+ interface ValidateAutomationByIdOptions {
1523
+ /** Automation type */
1524
+ automationType?: Type$1;
1525
+ }
1526
+ interface GetAutomationActivationStatsOptions {
1527
+ paging?: Paging;
1528
+ /** Fields projection - pass in the field key you want to get back */
1529
+ fields?: string[];
1530
+ }
1531
+
1532
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
1533
+ interface HttpClient {
1534
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1535
+ fetchWithAuth: typeof fetch;
1536
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1537
+ }
1538
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1539
+ type HttpResponse<T = any> = {
1540
+ data: T;
1541
+ status: number;
1542
+ statusText: string;
1543
+ headers: any;
1544
+ request?: any;
1545
+ };
1546
+ type RequestOptions<_TResponse = any, Data = any> = {
1547
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1548
+ url: string;
1549
+ data?: Data;
1550
+ params?: URLSearchParams;
1551
+ } & APIMetadata;
1552
+ type APIMetadata = {
1553
+ methodFqn?: string;
1554
+ entityFqdn?: string;
1555
+ packageName?: string;
1556
+ };
1557
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
1558
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
1559
+ __type: 'event-definition';
1560
+ type: Type;
1561
+ isDomainEvent?: boolean;
1562
+ transformations?: (envelope: unknown) => Payload;
1563
+ __payload: Payload;
1564
+ };
1565
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
1566
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
1567
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
1568
+
1569
+ declare global {
1570
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1571
+ interface SymbolConstructor {
1572
+ readonly observable: symbol;
1573
+ }
1574
+ }
1575
+
1576
+ declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
1577
+
1578
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
1579
+
1580
+ declare const createAutomation: ReturnType<typeof createRESTModule$1<typeof publicCreateAutomation>>;
1581
+ declare const getAutomation: ReturnType<typeof createRESTModule$1<typeof publicGetAutomation>>;
1582
+ declare const updateAutomation: ReturnType<typeof createRESTModule$1<typeof publicUpdateAutomation>>;
1583
+ declare const deleteAutomation: ReturnType<typeof createRESTModule$1<typeof publicDeleteAutomation>>;
1584
+ declare const queryAutomations: ReturnType<typeof createRESTModule$1<typeof publicQueryAutomations>>;
1585
+ declare const overrideApplicationAutomation: ReturnType<typeof createRESTModule$1<typeof publicOverrideApplicationAutomation>>;
1586
+ declare const validateAutomationById: ReturnType<typeof createRESTModule$1<typeof publicValidateAutomationById>>;
1587
+ declare const validateAutomation: ReturnType<typeof createRESTModule$1<typeof publicValidateAutomation>>;
1588
+ declare const getAutomationActivationStats: ReturnType<typeof createRESTModule$1<typeof publicGetAutomationActivationStats>>;
1589
+ declare const onAutomationCreated: ReturnType<typeof createEventModule$1<typeof publicOnAutomationCreated>>;
1590
+ declare const onAutomationUpdated: ReturnType<typeof createEventModule$1<typeof publicOnAutomationUpdated>>;
1591
+ declare const onAutomationDeleted: ReturnType<typeof createEventModule$1<typeof publicOnAutomationDeleted>>;
1592
+ declare const onAutomationUpdatedWithPreviousEntity: ReturnType<typeof createEventModule$1<typeof publicOnAutomationUpdatedWithPreviousEntity>>;
1593
+ declare const onAutomationDeletedWithEntity: ReturnType<typeof createEventModule$1<typeof publicOnAutomationDeletedWithEntity>>;
1594
+
1595
+ type context$1_ActionConfigurationError = ActionConfigurationError;
1596
+ type context$1_ActionErrorType = ActionErrorType;
1597
+ declare const context$1_ActionErrorType: typeof ActionErrorType;
1598
+ type context$1_ActionProviderQuotaInfo = ActionProviderQuotaInfo;
1599
+ type context$1_ActionQuotaInfo = ActionQuotaInfo;
1600
+ type context$1_ActionValidationError = ActionValidationError;
1601
+ type context$1_ActionValidationErrorErrorOneOf = ActionValidationErrorErrorOneOf;
1602
+ type context$1_ActionValidationInfo = ActionValidationInfo;
1603
+ type context$1_ActivationReport = ActivationReport;
1604
+ type context$1_AdditionalInfo = AdditionalInfo;
1605
+ type context$1_Asset = Asset;
1606
+ type context$1_AutomationCreatedEnvelope = AutomationCreatedEnvelope;
1607
+ type context$1_AutomationDeletedEnvelope = AutomationDeletedEnvelope;
1608
+ type context$1_AutomationDeletedWithEntityEnvelope = AutomationDeletedWithEntityEnvelope;
1609
+ type context$1_AutomationMetadata = AutomationMetadata;
1610
+ type context$1_AutomationNonNullableFields = AutomationNonNullableFields;
1611
+ type context$1_AutomationUpdatedEnvelope = AutomationUpdatedEnvelope;
1612
+ type context$1_AutomationUpdatedWithPreviousEntityEnvelope = AutomationUpdatedWithPreviousEntityEnvelope;
1613
+ type context$1_AutomationsQueryBuilder = AutomationsQueryBuilder;
1614
+ type context$1_AutomationsQueryResult = AutomationsQueryResult;
1615
+ type context$1_BulkCreateApplicationAutomationRequest = BulkCreateApplicationAutomationRequest;
1616
+ type context$1_BulkCreateApplicationAutomationResponse = BulkCreateApplicationAutomationResponse;
1617
+ type context$1_BulkDeleteAutomationsRequest = BulkDeleteAutomationsRequest;
1618
+ type context$1_BulkDeleteAutomationsResponse = BulkDeleteAutomationsResponse;
1619
+ type context$1_CTA = CTA;
1620
+ type context$1_Condition = Condition;
1621
+ type context$1_Conditions = Conditions;
1622
+ type context$1_CreateAutomationRequest = CreateAutomationRequest;
1623
+ type context$1_CreateAutomationResponse = CreateAutomationResponse;
1624
+ type context$1_CreateAutomationResponseNonNullableFields = CreateAutomationResponseNonNullableFields;
1625
+ type context$1_CursorPaging = CursorPaging;
1626
+ type context$1_Cursors = Cursors;
1627
+ type context$1_Debounce = Debounce;
1628
+ type context$1_DelayTypeOneOf = DelayTypeOneOf;
1629
+ type context$1_DeleteAutomationOptions = DeleteAutomationOptions;
1630
+ type context$1_DeleteAutomationRequest = DeleteAutomationRequest;
1631
+ type context$1_DeleteAutomationResponse = DeleteAutomationResponse;
1632
+ type context$1_DeleteContext = DeleteContext;
1633
+ type context$1_DeleteStatus = DeleteStatus;
1634
+ declare const context$1_DeleteStatus: typeof DeleteStatus;
1635
+ type context$1_DeletedWithEntity = DeletedWithEntity;
1636
+ type context$1_ExtendedFields = ExtendedFields;
1637
+ type context$1_GenerateActionInputMappingFromTemplateRequest = GenerateActionInputMappingFromTemplateRequest;
1638
+ type context$1_GenerateActionInputMappingFromTemplateResponse = GenerateActionInputMappingFromTemplateResponse;
1639
+ type context$1_GenerateApplicationAutomationFromCustomRequest = GenerateApplicationAutomationFromCustomRequest;
1640
+ type context$1_GenerateApplicationAutomationFromCustomResponse = GenerateApplicationAutomationFromCustomResponse;
1641
+ type context$1_GetActionsQuotaInfoRequest = GetActionsQuotaInfoRequest;
1642
+ type context$1_GetActionsQuotaInfoResponse = GetActionsQuotaInfoResponse;
1643
+ type context$1_GetApplicationAutomationRequest = GetApplicationAutomationRequest;
1644
+ type context$1_GetApplicationAutomationResponse = GetApplicationAutomationResponse;
1645
+ type context$1_GetAutomationActionSchemaRequest = GetAutomationActionSchemaRequest;
1646
+ type context$1_GetAutomationActionSchemaResponse = GetAutomationActionSchemaResponse;
1647
+ type context$1_GetAutomationActivationReportsRequest = GetAutomationActivationReportsRequest;
1648
+ type context$1_GetAutomationActivationReportsResponse = GetAutomationActivationReportsResponse;
1649
+ type context$1_GetAutomationActivationReportsResponseNonNullableFields = GetAutomationActivationReportsResponseNonNullableFields;
1650
+ type context$1_GetAutomationActivationStatsOptions = GetAutomationActivationStatsOptions;
1651
+ type context$1_GetAutomationOptions = GetAutomationOptions;
1652
+ type context$1_GetAutomationRequest = GetAutomationRequest;
1653
+ type context$1_GetAutomationResponse = GetAutomationResponse;
1654
+ type context$1_GetAutomationResponseNonNullableFields = GetAutomationResponseNonNullableFields;
1655
+ type context$1_MetaSiteSpecialEvent = MetaSiteSpecialEvent;
1656
+ type context$1_MetaSiteSpecialEventPayloadOneOf = MetaSiteSpecialEventPayloadOneOf;
1657
+ type context$1_MigrationBulkCreateAutomations = MigrationBulkCreateAutomations;
1658
+ type context$1_MigrationBulkCreateAutomationsRequest = MigrationBulkCreateAutomationsRequest;
1659
+ type context$1_MigrationBulkCreateAutomationsResponse = MigrationBulkCreateAutomationsResponse;
1660
+ type context$1_MigrationUpdateMigratedToV3AutomationRequest = MigrationUpdateMigratedToV3AutomationRequest;
1661
+ type context$1_MigrationUpdateMigratedToV3AutomationResponse = MigrationUpdateMigratedToV3AutomationResponse;
1662
+ type context$1_Namespace = Namespace;
1663
+ declare const context$1_Namespace: typeof Namespace;
1664
+ type context$1_NamespaceChanged = NamespaceChanged;
1665
+ type context$1_Offset = Offset;
1666
+ type context$1_OffsetValueOneOf = OffsetValueOneOf;
1667
+ type context$1_OverrideApplicationAutomationRequest = OverrideApplicationAutomationRequest;
1668
+ type context$1_OverrideApplicationAutomationResponse = OverrideApplicationAutomationResponse;
1669
+ type context$1_OverrideApplicationAutomationResponseNonNullableFields = OverrideApplicationAutomationResponseNonNullableFields;
1670
+ type context$1_Paging = Paging;
1671
+ type context$1_PagingMetadata = PagingMetadata;
1672
+ type context$1_PagingMetadataV2 = PagingMetadataV2;
1673
+ type context$1_Plan = Plan;
1674
+ type context$1_ProviderConfigurationError = ProviderConfigurationError;
1675
+ type context$1_QueryApplicationAutomationsRequest = QueryApplicationAutomationsRequest;
1676
+ type context$1_QueryApplicationAutomationsResponse = QueryApplicationAutomationsResponse;
1677
+ type context$1_QueryAutomationsOptions = QueryAutomationsOptions;
1678
+ type context$1_QueryAutomationsRequest = QueryAutomationsRequest;
1679
+ type context$1_QueryAutomationsResponse = QueryAutomationsResponse;
1680
+ type context$1_QueryAutomationsResponseNonNullableFields = QueryAutomationsResponseNonNullableFields;
1681
+ type context$1_QueryV2 = QueryV2;
1682
+ type context$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
1683
+ type context$1_Quota = Quota;
1684
+ type context$1_QuotaInfo = QuotaInfo;
1685
+ type context$1_RateLimit = RateLimit;
1686
+ type context$1_RestoreInfo = RestoreInfo;
1687
+ type context$1_Rule = Rule;
1688
+ type context$1_ServiceProvisioned = ServiceProvisioned;
1689
+ type context$1_ServiceRemoved = ServiceRemoved;
1690
+ type context$1_SiteCreated = SiteCreated;
1691
+ type context$1_SiteCreatedContext = SiteCreatedContext;
1692
+ declare const context$1_SiteCreatedContext: typeof SiteCreatedContext;
1693
+ type context$1_SiteDeleted = SiteDeleted;
1694
+ type context$1_SiteHardDeleted = SiteHardDeleted;
1695
+ type context$1_SiteMarkedAsTemplate = SiteMarkedAsTemplate;
1696
+ type context$1_SiteMarkedAsWixSite = SiteMarkedAsWixSite;
1697
+ type context$1_SitePublished = SitePublished;
1698
+ type context$1_SiteRenamed = SiteRenamed;
1699
+ type context$1_SiteTransferred = SiteTransferred;
1700
+ type context$1_SiteUndeleted = SiteUndeleted;
1701
+ type context$1_SiteUnpublished = SiteUnpublished;
1702
+ type context$1_SortOrder = SortOrder;
1703
+ declare const context$1_SortOrder: typeof SortOrder;
1704
+ type context$1_Sorting = Sorting;
1705
+ type context$1_Source = Source;
1706
+ type context$1_State = State;
1707
+ declare const context$1_State: typeof State;
1708
+ type context$1_StudioAssigned = StudioAssigned;
1709
+ type context$1_StudioUnassigned = StudioUnassigned;
1710
+ type context$1_SyncApplicationAutomationsRequest = SyncApplicationAutomationsRequest;
1711
+ type context$1_SyncApplicationAutomationsResponse = SyncApplicationAutomationsResponse;
1712
+ type context$1_TargetType = TargetType;
1713
+ declare const context$1_TargetType: typeof TargetType;
1714
+ type context$1_TriggerConfigurationError = TriggerConfigurationError;
1715
+ type context$1_TriggerErrorType = TriggerErrorType;
1716
+ declare const context$1_TriggerErrorType: typeof TriggerErrorType;
1717
+ type context$1_TriggerValidationError = TriggerValidationError;
1718
+ type context$1_TriggerValidationErrorErrorOneOf = TriggerValidationErrorErrorOneOf;
1719
+ type context$1_TriggerValidationErrorValidationErrorType = TriggerValidationErrorValidationErrorType;
1720
+ declare const context$1_TriggerValidationErrorValidationErrorType: typeof TriggerValidationErrorValidationErrorType;
1721
+ type context$1_UnprocessedTargetEvent = UnprocessedTargetEvent;
1722
+ type context$1_Until = Until;
1723
+ type context$1_UpdateApplicationAutomationConfigurationIdRequest = UpdateApplicationAutomationConfigurationIdRequest;
1724
+ type context$1_UpdateApplicationAutomationConfigurationIdResponse = UpdateApplicationAutomationConfigurationIdResponse;
1725
+ type context$1_UpdateApplicationAutomationToMigratedFromV1Request = UpdateApplicationAutomationToMigratedFromV1Request;
1726
+ type context$1_UpdateApplicationAutomationToMigratedFromV1Response = UpdateApplicationAutomationToMigratedFromV1Response;
1727
+ type context$1_UpdateAutomation = UpdateAutomation;
1728
+ type context$1_UpdateAutomationRequest = UpdateAutomationRequest;
1729
+ type context$1_UpdateAutomationResponse = UpdateAutomationResponse;
1730
+ type context$1_UpdateAutomationResponseNonNullableFields = UpdateAutomationResponseNonNullableFields;
1731
+ type context$1_UpdatedWithPreviousEntity = UpdatedWithPreviousEntity;
1732
+ type context$1_UpgradeCTA = UpgradeCTA;
1733
+ type context$1_ValidateAutomationByIdOptions = ValidateAutomationByIdOptions;
1734
+ type context$1_ValidateAutomationByIdRequest = ValidateAutomationByIdRequest;
1735
+ type context$1_ValidateAutomationByIdResponse = ValidateAutomationByIdResponse;
1736
+ type context$1_ValidateAutomationByIdResponseNonNullableFields = ValidateAutomationByIdResponseNonNullableFields;
1737
+ type context$1_ValidateAutomationRequest = ValidateAutomationRequest;
1738
+ type context$1_ValidateAutomationResponse = ValidateAutomationResponse;
1739
+ type context$1_ValidateAutomationResponseNonNullableFields = ValidateAutomationResponseNonNullableFields;
1740
+ type context$1_ValidationErrorType = ValidationErrorType;
1741
+ declare const context$1_ValidationErrorType: typeof ValidationErrorType;
1742
+ declare const context$1_createAutomation: typeof createAutomation;
1743
+ declare const context$1_deleteAutomation: typeof deleteAutomation;
1744
+ declare const context$1_getAutomation: typeof getAutomation;
1745
+ declare const context$1_getAutomationActivationStats: typeof getAutomationActivationStats;
1746
+ declare const context$1_onAutomationCreated: typeof onAutomationCreated;
1747
+ declare const context$1_onAutomationDeleted: typeof onAutomationDeleted;
1748
+ declare const context$1_onAutomationDeletedWithEntity: typeof onAutomationDeletedWithEntity;
1749
+ declare const context$1_onAutomationUpdated: typeof onAutomationUpdated;
1750
+ declare const context$1_onAutomationUpdatedWithPreviousEntity: typeof onAutomationUpdatedWithPreviousEntity;
1751
+ declare const context$1_overrideApplicationAutomation: typeof overrideApplicationAutomation;
1752
+ declare const context$1_queryAutomations: typeof queryAutomations;
1753
+ declare const context$1_updateAutomation: typeof updateAutomation;
1754
+ declare const context$1_validateAutomation: typeof validateAutomation;
1755
+ declare const context$1_validateAutomationById: typeof validateAutomationById;
1756
+ declare namespace context$1 {
1757
+ export { type Action$1 as Action, type context$1_ActionConfigurationError as ActionConfigurationError, context$1_ActionErrorType as ActionErrorType, type ActionEvent$1 as ActionEvent, type context$1_ActionProviderQuotaInfo as ActionProviderQuotaInfo, type context$1_ActionQuotaInfo as ActionQuotaInfo, type context$1_ActionValidationError as ActionValidationError, type context$1_ActionValidationErrorErrorOneOf as ActionValidationErrorErrorOneOf, type context$1_ActionValidationInfo as ActionValidationInfo, type context$1_ActivationReport as ActivationReport, ActivationStatus$1 as ActivationStatus, type context$1_AdditionalInfo as AdditionalInfo, type ApplicationError$1 as ApplicationError, type context$1_Asset as Asset, type Automation$1 as Automation, type context$1_AutomationCreatedEnvelope as AutomationCreatedEnvelope, type context$1_AutomationDeletedEnvelope as AutomationDeletedEnvelope, type context$1_AutomationDeletedWithEntityEnvelope as AutomationDeletedWithEntityEnvelope, type context$1_AutomationMetadata as AutomationMetadata, type context$1_AutomationNonNullableFields as AutomationNonNullableFields, type context$1_AutomationUpdatedEnvelope as AutomationUpdatedEnvelope, type context$1_AutomationUpdatedWithPreviousEntityEnvelope as AutomationUpdatedWithPreviousEntityEnvelope, type context$1_AutomationsQueryBuilder as AutomationsQueryBuilder, type context$1_AutomationsQueryResult as AutomationsQueryResult, type BaseEventMetadata$1 as BaseEventMetadata, BlockType$1 as BlockType, type BulkActionMetadata$1 as BulkActionMetadata, type context$1_BulkCreateApplicationAutomationRequest as BulkCreateApplicationAutomationRequest, type context$1_BulkCreateApplicationAutomationResponse as BulkCreateApplicationAutomationResponse, type context$1_BulkDeleteAutomationsRequest as BulkDeleteAutomationsRequest, type context$1_BulkDeleteAutomationsResponse as BulkDeleteAutomationsResponse, type context$1_CTA as CTA, type context$1_Condition as Condition, type ConditionBlock$1 as ConditionBlock, type context$1_Conditions as Conditions, type context$1_CreateAutomationRequest as CreateAutomationRequest, type context$1_CreateAutomationResponse as CreateAutomationResponse, type context$1_CreateAutomationResponseNonNullableFields as CreateAutomationResponseNonNullableFields, type context$1_CursorPaging as CursorPaging, type context$1_Cursors as Cursors, type context$1_Debounce as Debounce, type Delay$1 as Delay, type context$1_DelayTypeOneOf as DelayTypeOneOf, type context$1_DeleteAutomationOptions as DeleteAutomationOptions, type context$1_DeleteAutomationRequest as DeleteAutomationRequest, type context$1_DeleteAutomationResponse as DeleteAutomationResponse, type context$1_DeleteContext as DeleteContext, context$1_DeleteStatus as DeleteStatus, type context$1_DeletedWithEntity as DeletedWithEntity, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type Empty$1 as Empty, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type context$1_ExtendedFields as ExtendedFields, type Filter$1 as Filter, type context$1_GenerateActionInputMappingFromTemplateRequest as GenerateActionInputMappingFromTemplateRequest, type context$1_GenerateActionInputMappingFromTemplateResponse as GenerateActionInputMappingFromTemplateResponse, type context$1_GenerateApplicationAutomationFromCustomRequest as GenerateApplicationAutomationFromCustomRequest, type context$1_GenerateApplicationAutomationFromCustomResponse as GenerateApplicationAutomationFromCustomResponse, type context$1_GetActionsQuotaInfoRequest as GetActionsQuotaInfoRequest, type context$1_GetActionsQuotaInfoResponse as GetActionsQuotaInfoResponse, type context$1_GetApplicationAutomationRequest as GetApplicationAutomationRequest, type context$1_GetApplicationAutomationResponse as GetApplicationAutomationResponse, type context$1_GetAutomationActionSchemaRequest as GetAutomationActionSchemaRequest, type context$1_GetAutomationActionSchemaResponse as GetAutomationActionSchemaResponse, type context$1_GetAutomationActivationReportsRequest as GetAutomationActivationReportsRequest, type context$1_GetAutomationActivationReportsResponse as GetAutomationActivationReportsResponse, type context$1_GetAutomationActivationReportsResponseNonNullableFields as GetAutomationActivationReportsResponseNonNullableFields, type context$1_GetAutomationActivationStatsOptions as GetAutomationActivationStatsOptions, type context$1_GetAutomationOptions as GetAutomationOptions, type context$1_GetAutomationRequest as GetAutomationRequest, type context$1_GetAutomationResponse as GetAutomationResponse, type context$1_GetAutomationResponseNonNullableFields as GetAutomationResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type ItemMetadata$1 as ItemMetadata, type MessageEnvelope$1 as MessageEnvelope, type context$1_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type context$1_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, type context$1_MigrationBulkCreateAutomations as MigrationBulkCreateAutomations, type context$1_MigrationBulkCreateAutomationsRequest as MigrationBulkCreateAutomationsRequest, type context$1_MigrationBulkCreateAutomationsResponse as MigrationBulkCreateAutomationsResponse, type context$1_MigrationUpdateMigratedToV3AutomationRequest as MigrationUpdateMigratedToV3AutomationRequest, type context$1_MigrationUpdateMigratedToV3AutomationResponse as MigrationUpdateMigratedToV3AutomationResponse, context$1_Namespace as Namespace, type context$1_NamespaceChanged as NamespaceChanged, type context$1_Offset as Offset, type context$1_OffsetValueOneOf as OffsetValueOneOf, type context$1_OverrideApplicationAutomationRequest as OverrideApplicationAutomationRequest, type context$1_OverrideApplicationAutomationResponse as OverrideApplicationAutomationResponse, type context$1_OverrideApplicationAutomationResponseNonNullableFields as OverrideApplicationAutomationResponseNonNullableFields, type context$1_Paging as Paging, type context$1_PagingMetadata as PagingMetadata, type context$1_PagingMetadataV2 as PagingMetadataV2, type context$1_Plan as Plan, type context$1_ProviderConfigurationError as ProviderConfigurationError, type context$1_QueryApplicationAutomationsRequest as QueryApplicationAutomationsRequest, type context$1_QueryApplicationAutomationsResponse as QueryApplicationAutomationsResponse, type context$1_QueryAutomationsOptions as QueryAutomationsOptions, type context$1_QueryAutomationsRequest as QueryAutomationsRequest, type context$1_QueryAutomationsResponse as QueryAutomationsResponse, type context$1_QueryAutomationsResponseNonNullableFields as QueryAutomationsResponseNonNullableFields, type context$1_QueryV2 as QueryV2, type context$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type context$1_Quota as Quota, type context$1_QuotaInfo as QuotaInfo, type context$1_RateLimit as RateLimit, type context$1_RestoreInfo as RestoreInfo, type context$1_Rule as Rule, type context$1_ServiceProvisioned as ServiceProvisioned, type context$1_ServiceRemoved as ServiceRemoved, type context$1_SiteCreated as SiteCreated, context$1_SiteCreatedContext as SiteCreatedContext, type context$1_SiteDeleted as SiteDeleted, type context$1_SiteHardDeleted as SiteHardDeleted, type context$1_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type context$1_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type context$1_SitePublished as SitePublished, type context$1_SiteRenamed as SiteRenamed, type context$1_SiteTransferred as SiteTransferred, type context$1_SiteUndeleted as SiteUndeleted, type context$1_SiteUnpublished as SiteUnpublished, context$1_SortOrder as SortOrder, type context$1_Sorting as Sorting, type context$1_Source as Source, context$1_State as State, Status$1 as Status, type context$1_StudioAssigned as StudioAssigned, type context$1_StudioUnassigned as StudioUnassigned, type context$1_SyncApplicationAutomationsRequest as SyncApplicationAutomationsRequest, type context$1_SyncApplicationAutomationsResponse as SyncApplicationAutomationsResponse, type Target$1 as Target, context$1_TargetType as TargetType, type Trigger$1 as Trigger, type context$1_TriggerConfigurationError as TriggerConfigurationError, context$1_TriggerErrorType as TriggerErrorType, type context$1_TriggerValidationError as TriggerValidationError, type context$1_TriggerValidationErrorErrorOneOf as TriggerValidationErrorErrorOneOf, context$1_TriggerValidationErrorValidationErrorType as TriggerValidationErrorValidationErrorType, Type$1 as Type, type context$1_UnprocessedTargetEvent as UnprocessedTargetEvent, type context$1_Until as Until, type context$1_UpdateApplicationAutomationConfigurationIdRequest as UpdateApplicationAutomationConfigurationIdRequest, type context$1_UpdateApplicationAutomationConfigurationIdResponse as UpdateApplicationAutomationConfigurationIdResponse, type context$1_UpdateApplicationAutomationToMigratedFromV1Request as UpdateApplicationAutomationToMigratedFromV1Request, type context$1_UpdateApplicationAutomationToMigratedFromV1Response as UpdateApplicationAutomationToMigratedFromV1Response, type context$1_UpdateAutomation as UpdateAutomation, type context$1_UpdateAutomationRequest as UpdateAutomationRequest, type context$1_UpdateAutomationResponse as UpdateAutomationResponse, type context$1_UpdateAutomationResponseNonNullableFields as UpdateAutomationResponseNonNullableFields, type context$1_UpdatedWithPreviousEntity as UpdatedWithPreviousEntity, type context$1_UpgradeCTA as UpgradeCTA, type context$1_ValidateAutomationByIdOptions as ValidateAutomationByIdOptions, type context$1_ValidateAutomationByIdRequest as ValidateAutomationByIdRequest, type context$1_ValidateAutomationByIdResponse as ValidateAutomationByIdResponse, type context$1_ValidateAutomationByIdResponseNonNullableFields as ValidateAutomationByIdResponseNonNullableFields, type context$1_ValidateAutomationRequest as ValidateAutomationRequest, type context$1_ValidateAutomationResponse as ValidateAutomationResponse, type context$1_ValidateAutomationResponseNonNullableFields as ValidateAutomationResponseNonNullableFields, context$1_ValidationErrorType as ValidationErrorType, WebhookIdentityType$1 as WebhookIdentityType, context$1_createAutomation as createAutomation, context$1_deleteAutomation as deleteAutomation, context$1_getAutomation as getAutomation, context$1_getAutomationActivationStats as getAutomationActivationStats, context$1_onAutomationCreated as onAutomationCreated, context$1_onAutomationDeleted as onAutomationDeleted, context$1_onAutomationDeletedWithEntity as onAutomationDeletedWithEntity, context$1_onAutomationUpdated as onAutomationUpdated, context$1_onAutomationUpdatedWithPreviousEntity as onAutomationUpdatedWithPreviousEntity, context$1_overrideApplicationAutomation as overrideApplicationAutomation, context$1_queryAutomations as queryAutomations, context$1_updateAutomation as updateAutomation, context$1_validateAutomation as validateAutomation, context$1_validateAutomationById as validateAutomationById };
1758
+ }
1759
+
1
1760
  interface Activation {
2
1761
  /** Activation ID */
3
1762
  _id?: string;
@@ -1393,48 +3152,44 @@ interface ActivationScheduleCompleted {
1393
3152
  interface ReportEventResponseNonNullableFields {
1394
3153
  activationIds: string[];
1395
3154
  }
3155
+ interface ApplicationErrorNonNullableFields {
3156
+ code: string;
3157
+ description: string;
3158
+ }
3159
+ interface ItemMetadataNonNullableFields {
3160
+ originalIndex: number;
3161
+ success: boolean;
3162
+ error?: ApplicationErrorNonNullableFields;
3163
+ }
3164
+ interface IdempotencyNonNullableFields {
3165
+ key: string;
3166
+ }
3167
+ interface EventInfoNonNullableFields {
3168
+ idempotency?: IdempotencyNonNullableFields;
3169
+ }
3170
+ interface BulkReportEventResultNonNullableFields {
3171
+ itemMetadata?: ItemMetadataNonNullableFields;
3172
+ eventInfo?: EventInfoNonNullableFields;
3173
+ activationIds: string[];
3174
+ }
3175
+ interface BulkActionMetadataNonNullableFields {
3176
+ totalSuccesses: number;
3177
+ totalFailures: number;
3178
+ undetailedFailures: number;
3179
+ }
1396
3180
  interface BulkReportEventResponseNonNullableFields {
1397
3181
  triggerKey: string;
1398
- results: {
1399
- itemMetadata?: {
1400
- originalIndex: number;
1401
- success: boolean;
1402
- error?: {
1403
- code: string;
1404
- description: string;
1405
- };
1406
- };
1407
- eventInfo?: {
1408
- idempotency?: {
1409
- key: string;
1410
- };
1411
- };
1412
- activationIds: string[];
1413
- }[];
1414
- bulkActionMetadata?: {
1415
- totalSuccesses: number;
1416
- totalFailures: number;
1417
- undetailedFailures: number;
1418
- };
3182
+ results: BulkReportEventResultNonNullableFields[];
3183
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
3184
+ }
3185
+ interface BulkCancelEventResultNonNullableFields {
3186
+ itemMetadata?: ItemMetadataNonNullableFields;
3187
+ externalEntityId: string;
1419
3188
  }
1420
3189
  interface BulkCancelEventResponseNonNullableFields {
1421
3190
  triggerKey: string;
1422
- results: {
1423
- itemMetadata?: {
1424
- originalIndex: number;
1425
- success: boolean;
1426
- error?: {
1427
- code: string;
1428
- description: string;
1429
- };
1430
- };
1431
- externalEntityId: string;
1432
- }[];
1433
- bulkActionMetadata?: {
1434
- totalSuccesses: number;
1435
- totalFailures: number;
1436
- undetailedFailures: number;
1437
- };
3191
+ results: BulkCancelEventResultNonNullableFields[];
3192
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1438
3193
  }
1439
3194
  interface BaseEventMetadata {
1440
3195
  /** App instance ID. */
@@ -1537,50 +3292,6 @@ interface CancelEventOptions {
1537
3292
  triggerKey: string;
1538
3293
  }
1539
3294
 
1540
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
1541
- interface HttpClient {
1542
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1543
- fetchWithAuth: typeof fetch;
1544
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1545
- }
1546
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1547
- type HttpResponse<T = any> = {
1548
- data: T;
1549
- status: number;
1550
- statusText: string;
1551
- headers: any;
1552
- request?: any;
1553
- };
1554
- type RequestOptions<_TResponse = any, Data = any> = {
1555
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1556
- url: string;
1557
- data?: Data;
1558
- params?: URLSearchParams;
1559
- } & APIMetadata;
1560
- type APIMetadata = {
1561
- methodFqn?: string;
1562
- entityFqdn?: string;
1563
- packageName?: string;
1564
- };
1565
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
1566
- type EventDefinition<Payload = unknown, Type extends string = string> = {
1567
- __type: 'event-definition';
1568
- type: Type;
1569
- isDomainEvent?: boolean;
1570
- transformations?: (envelope: unknown) => Payload;
1571
- __payload: Payload;
1572
- };
1573
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
1574
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
1575
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
1576
-
1577
- declare global {
1578
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1579
- interface SymbolConstructor {
1580
- readonly observable: symbol;
1581
- }
1582
- }
1583
-
1584
3295
  declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
1585
3296
 
1586
3297
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
@@ -1766,4 +3477,4 @@ declare namespace context {
1766
3477
  export { type context_Action as Action, type context_ActionActionOneOf as ActionActionOneOf, type context_ActionCompletedRequest as ActionCompletedRequest, type context_ActionData as ActionData, type context_ActionEvent as ActionEvent, type context_ActionSettings as ActionSettings, type context_ActionStatus as ActionStatus, type context_ActionsData as ActionsData, type context_Activation as Activation, type context_ActivationActionStatusChanged as ActivationActionStatusChanged, context_ActivationActionStatusChangedStatus as ActivationActionStatusChangedStatus, type context_ActivationActionStatusChangedStatusInfoOneOf as ActivationActionStatusChangedStatusInfoOneOf, type context_ActivationContinuedAfterSchedule as ActivationContinuedAfterSchedule, type context_ActivationRequest as ActivationRequest, type context_ActivationResumeAfterDelay as ActivationResumeAfterDelay, type context_ActivationScheduleCompleted as ActivationScheduleCompleted, type context_ActivationScheduleRequested as ActivationScheduleRequested, type context_ActivationSource as ActivationSource, type context_ActivationSourceOfOneOf as ActivationSourceOfOneOf, type context_ActivationStatus as ActivationStatus, type context_ActivationStatusChanged as ActivationStatusChanged, type context_ActivationStatusChangedEnvelope as ActivationStatusChangedEnvelope, type context_ActivationStatusChangedFailedStatusInfo as ActivationStatusChangedFailedStatusInfo, context_ActivationStatusChangedStatus as ActivationStatusChangedStatus, type context_ActivationStatusChangedStatusInfoOneOf as ActivationStatusChangedStatusInfoOneOf, type context_AppDefinedAction as AppDefinedAction, type context_AppDefinedActionInfo as AppDefinedActionInfo, type context_ApplicationError as ApplicationError, type context_ApplicationOrigin as ApplicationOrigin, type context_AsyncAction as AsyncAction, type context_AuditInfo as AuditInfo, type context_AuditInfoIdOneOf as AuditInfoIdOneOf, type context_Automation as Automation, type context_AutomationConfiguration as AutomationConfiguration, type context_AutomationConfigurationAction as AutomationConfigurationAction, type context_AutomationConfigurationActionInfoOneOf as AutomationConfigurationActionInfoOneOf, context_AutomationConfigurationStatus as AutomationConfigurationStatus, type context_AutomationIdentifier as AutomationIdentifier, type context_AutomationInfo as AutomationInfo, type context_AutomationInfoOriginInfoOneOf as AutomationInfoOriginInfoOneOf, type context_AutomationOriginInfoOneOf as AutomationOriginInfoOneOf, type context_AutomationSettings as AutomationSettings, type context_BaseEventMetadata as BaseEventMetadata, type context_BatchActivationRequest as BatchActivationRequest, context_BlockType as BlockType, type context_BulkActionMetadata as BulkActionMetadata, type context_BulkCancelEventOptions as BulkCancelEventOptions, type context_BulkCancelEventRequest as BulkCancelEventRequest, type context_BulkCancelEventResponse as BulkCancelEventResponse, type context_BulkCancelEventResponseNonNullableFields as BulkCancelEventResponseNonNullableFields, type context_BulkCancelEventResult as BulkCancelEventResult, type context_BulkReportEventOptions as BulkReportEventOptions, type context_BulkReportEventRequest as BulkReportEventRequest, type context_BulkReportEventResponse as BulkReportEventResponse, type context_BulkReportEventResponseNonNullableFields as BulkReportEventResponseNonNullableFields, type context_BulkReportEventResult as BulkReportEventResult, type context_CancelEventOptions as CancelEventOptions, type context_CancelEventRequest as CancelEventRequest, type context_CancelEventResponse as CancelEventResponse, type context_CancelPendingScheduleRequest as CancelPendingScheduleRequest, type context_CancelPendingScheduleRequestByOneOf as CancelPendingScheduleRequestByOneOf, type context_CancelPendingScheduleResponse as CancelPendingScheduleResponse, context_CancellationReason as CancellationReason, type context_CancelledStatusInfo as CancelledStatusInfo, type context_Case as Case, type context_ConditionAction as ConditionAction, type context_ConditionActionInfo as ConditionActionInfo, type context_ConditionBlock as ConditionBlock, type context_ConditionExpressionGroup as ConditionExpressionGroup, type context_ConditionFilter as ConditionFilter, type context_Delay as Delay, type context_DelayAction as DelayAction, type context_DelayActionInfo as DelayActionInfo, type context_DelayHelper as DelayHelper, type context_DelayOfOneOf as DelayOfOneOf, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EndedStatusInfo as EndedStatusInfo, type context_EndedStatusInfoTypeInfoOneOf as EndedStatusInfoTypeInfoOneOf, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventInfo as EventInfo, type context_EventMetadata as EventMetadata, type context_ExecuteFromActionRequest as ExecuteFromActionRequest, type context_ExecuteFromActionResponse as ExecuteFromActionResponse, type context_ExpressionEvaluationResult as ExpressionEvaluationResult, type context_FailedStatusInfo as FailedStatusInfo, type context_Filter as Filter, type context_FutureDateActivationOffset as FutureDateActivationOffset, type context_Idempotency as Idempotency, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_IdentifierType as IdentifierType, type context_Identity as Identity, type context_IfFilter as IfFilter, type context_InitiatedStatusInfo as InitiatedStatusInfo, type context_ItemMetadata as ItemMetadata, type context_MessageEnvelope as MessageEnvelope, context_Operator as Operator, context_Origin as Origin, type context_Output as Output, type context_OutputAction as OutputAction, type context_PreinstalledIdentifier as PreinstalledIdentifier, type context_PreinstalledOrigin as PreinstalledOrigin, type context_RateLimitAction as RateLimitAction, type context_RateLimitActionInfo as RateLimitActionInfo, type context_RateLimiting as RateLimiting, type context_RefreshPayloadRequest as RefreshPayloadRequest, type context_RefreshPayloadResponse as RefreshPayloadResponse, type context_ReportDomainEventRequest as ReportDomainEventRequest, type context_ReportDomainEventResponse as ReportDomainEventResponse, type context_ReportEventOptions as ReportEventOptions, type context_ReportEventRequest as ReportEventRequest, type context_ReportEventResponse as ReportEventResponse, type context_ReportEventResponseNonNullableFields as ReportEventResponseNonNullableFields, type context_RunAutomationRequest as RunAutomationRequest, type context_RunAutomationResponse as RunAutomationResponse, type context_Runtime as Runtime, type context_Schedule as Schedule, type context_ScheduleRequest as ScheduleRequest, type context_ScheduleResponse as ScheduleResponse, context_ScheduleStatus as ScheduleStatus, type context_ScheduledAction as ScheduledAction, type context_ScheduledStatusInfo as ScheduledStatusInfo, type context_Scheduler as Scheduler, type context_Service as Service, type context_ServiceMapping as ServiceMapping, type context_SimpleDelay as SimpleDelay, type context_SpiAction as SpiAction, type context_StartedStatusInfo as StartedStatusInfo, type context_StartedStatusInfoAppDefinedActionInfo as StartedStatusInfoAppDefinedActionInfo, type context_StartedStatusInfoTypeInfoOneOf as StartedStatusInfoTypeInfoOneOf, context_Status as Status, type context_SwitchFilter as SwitchFilter, type context_SystemHelper as SystemHelper, type context_SystemHelperHelperOneOf as SystemHelperHelperOneOf, context_Target as Target, context_TimeUnit as TimeUnit, type context_Trigger as Trigger, type context_TriggerInfo as TriggerInfo, context_Type as Type, type context_UndeleteInfo as UndeleteInfo, context_Units as Units, type context_UpdatePendingSchedulesPayloadRequest as UpdatePendingSchedulesPayloadRequest, type context_UpdatePendingSchedulesPayloadResponse as UpdatePendingSchedulesPayloadResponse, type context_V1RunAutomationRequest as V1RunAutomationRequest, type context_V1RunAutomationRequestIdentifierOneOf as V1RunAutomationRequestIdentifierOneOf, type context_V1RunAutomationResponse as V1RunAutomationResponse, context_WebhookIdentityType as WebhookIdentityType, context_bulkCancelEvent as bulkCancelEvent, context_bulkReportEvent as bulkReportEvent, context_cancelEvent as cancelEvent, context_onActivationStatusChanged as onActivationStatusChanged, context_reportEvent as reportEvent };
1767
3478
  }
1768
3479
 
1769
- export { context as activations };
3480
+ export { context as activations, context$1 as automationsService };