@wix/auto_sdk_automations_automation-templates 1.0.0

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.
Files changed (39) hide show
  1. package/build/cjs/index.d.ts +1491 -0
  2. package/build/cjs/index.js +895 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +809 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1353 -0
  8. package/build/cjs/meta.js +728 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +1491 -0
  11. package/build/es/index.mjs +852 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1 -0
  14. package/build/es/index.typings.mjs +766 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +1353 -0
  17. package/build/es/meta.mjs +682 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +110 -0
  21. package/build/internal/cjs/index.js +895 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +1608 -0
  24. package/build/internal/cjs/index.typings.js +809 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +1354 -0
  27. package/build/internal/cjs/meta.js +728 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +110 -0
  30. package/build/internal/es/index.mjs +852 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +1608 -0
  33. package/build/internal/es/index.typings.mjs +766 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +1354 -0
  36. package/build/internal/es/meta.mjs +682 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +55 -0
@@ -0,0 +1,1491 @@
1
+ /** An AutomationTemplate holds a reusable automation blueprint with template-specific metadata. */
2
+ interface AutomationTemplate {
3
+ /**
4
+ * AutomationTemplate ID.
5
+ * @format GUID
6
+ * @readonly
7
+ */
8
+ _id?: string | null;
9
+ /**
10
+ * Revision number. This increments by 1 whenever the automation template is updated. Specify the current revision number whenever updating an existing automation template.
11
+ * @readonly
12
+ */
13
+ revision?: string | null;
14
+ /**
15
+ * Date and time the AutomationTemplate was created.
16
+ * @readonly
17
+ */
18
+ _createdDate?: Date | null;
19
+ /**
20
+ * Date and time the AutomationTemplate was last updated.
21
+ * @readonly
22
+ */
23
+ _updatedDate?: Date | null;
24
+ /** The automation blueprint this template is based on. */
25
+ automation?: Automation;
26
+ /**
27
+ * Component ID that owns this template.
28
+ * @format GUID
29
+ * @readonly
30
+ */
31
+ componentId?: string | null;
32
+ /**
33
+ * Component version.
34
+ * @readonly
35
+ */
36
+ componentVersion?: number | null;
37
+ /**
38
+ * App ID that owns this template.
39
+ * @format GUID
40
+ * @readonly
41
+ */
42
+ appId?: string;
43
+ /**
44
+ * Display name for the automation template.
45
+ * @minLength 1
46
+ * @maxLength 500
47
+ */
48
+ name?: string;
49
+ /**
50
+ * description of what the automation template does.
51
+ * @minLength 1
52
+ * @maxLength 2000
53
+ */
54
+ description?: string;
55
+ /**
56
+ * goal or intent of the automation template.
57
+ * @maxLength 500
58
+ */
59
+ goal?: string | null;
60
+ }
61
+ declare enum Category {
62
+ SELL_MORE_ONLINE = "SELL_MORE_ONLINE",
63
+ ENGAGE_WITH_CLIENTS = "ENGAGE_WITH_CLIENTS",
64
+ GET_PAID_ON_TIME = "GET_PAID_ON_TIME",
65
+ MANAGE_BUSINESS = "MANAGE_BUSINESS",
66
+ RETAIN_CUSTOMERS = "RETAIN_CUSTOMERS",
67
+ POPULAR = "POPULAR"
68
+ }
69
+ /** @enumType */
70
+ type CategoryWithLiterals = Category | 'SELL_MORE_ONLINE' | 'ENGAGE_WITH_CLIENTS' | 'GET_PAID_ON_TIME' | 'MANAGE_BUSINESS' | 'RETAIN_CUSTOMERS' | 'POPULAR';
71
+ interface Automation extends AutomationOriginInfoOneOf {
72
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
73
+ applicationInfo?: ApplicationOrigin;
74
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
75
+ preinstalledInfo?: PreinstalledOrigin;
76
+ /** When the origin of the automation is `TEMPLATE`, the details of the template automation. */
77
+ templateInfo?: TemplateOrigin;
78
+ /**
79
+ * Automation ID.
80
+ * @format GUID
81
+ * @readonly
82
+ */
83
+ _id?: string | null;
84
+ /**
85
+ * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.
86
+ * @readonly
87
+ */
88
+ revision?: string | null;
89
+ /**
90
+ * Who created the automation.
91
+ * @immutable
92
+ * @readonly
93
+ */
94
+ createdBy?: AuditInfo;
95
+ /**
96
+ * When the automation was created.
97
+ * @readonly
98
+ */
99
+ _createdDate?: Date | null;
100
+ /**
101
+ * Who last updated the automation.
102
+ * @readonly
103
+ */
104
+ updatedBy?: AuditInfo;
105
+ /**
106
+ * When the automation was last updated.
107
+ * @readonly
108
+ */
109
+ _updatedDate?: Date | null;
110
+ /**
111
+ * Automation name as displayed on the user's site.
112
+ * @minLength 1
113
+ * @maxLength 500
114
+ */
115
+ name?: string;
116
+ /**
117
+ * Automation description.
118
+ * @maxLength 2000
119
+ */
120
+ description?: string | null;
121
+ /** Automation configuration. */
122
+ configuration?: AutomationConfiguration;
123
+ /**
124
+ * How the automation was added to the user's site.
125
+ * @immutable
126
+ */
127
+ origin?: OriginWithLiterals;
128
+ /** Automation settings. Applied only for pre-installed and application automations. Not applied to User origin automations */
129
+ settings?: AutomationSettings;
130
+ /**
131
+ * When the automation is a draft, the draft details.
132
+ * @readonly
133
+ */
134
+ draftInfo?: DraftInfo;
135
+ /**
136
+ * Whether the automation is archived.
137
+ *
138
+ * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.
139
+ */
140
+ archived?: boolean;
141
+ /** Auto archive policy */
142
+ autoArchivePolicy?: AutoArchivePolicy;
143
+ }
144
+ /** @oneof */
145
+ interface AutomationOriginInfoOneOf {
146
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
147
+ applicationInfo?: ApplicationOrigin;
148
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
149
+ preinstalledInfo?: PreinstalledOrigin;
150
+ /** When the origin of the automation is `TEMPLATE`, the details of the template automation. */
151
+ templateInfo?: TemplateOrigin;
152
+ }
153
+ interface AIMetadata {
154
+ /**
155
+ * Origin agent identifier.
156
+ * @minLength 1
157
+ * @maxLength 64
158
+ */
159
+ originAgentIdentifier?: string | null;
160
+ }
161
+ interface ActionSettings {
162
+ /**
163
+ * IDs of actions whose `skipActionExpression` can't be modified.
164
+ *
165
+ * An action's `skipActionExpression` determines whether the action is skipped. Including an action's ID in this array makes its `skipActionExpression` permanent, so it can't be changed.
166
+ *
167
+ * When empty, the `skipActionExpression` of all actions can be edited.
168
+ * @maxSize 30
169
+ * @format GUID
170
+ */
171
+ permanentActionIds?: string[];
172
+ /**
173
+ * IDs of read-only actions. Read-only actions cannot be modified.
174
+ *
175
+ * When empty and the automation's `settings.readonly` is `false`, all actions are modifiable.
176
+ * @maxSize 30
177
+ * @format GUID
178
+ */
179
+ readonlyActionIds?: string[];
180
+ }
181
+ declare enum Domain {
182
+ /** User domain (default). */
183
+ USER = "USER",
184
+ /** Wix domain. */
185
+ WIX = "WIX",
186
+ /** Wix account-level domain. */
187
+ WIX_ACCOUNT = "WIX_ACCOUNT"
188
+ }
189
+ /** @enumType */
190
+ type DomainWithLiterals = Domain | 'USER' | 'WIX' | 'WIX_ACCOUNT';
191
+ interface TriggerSettings {
192
+ }
193
+ interface Enrichment {
194
+ /**
195
+ * Enrichment input mappings.
196
+ * @maxSize 2
197
+ */
198
+ inputMappings?: Record<string, any>[] | null;
199
+ }
200
+ interface AuditInfo extends AuditInfoIdOneOf {
201
+ /**
202
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
203
+ * @format GUID
204
+ */
205
+ userId?: string;
206
+ /**
207
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
208
+ *
209
+ * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.
210
+ * @format GUID
211
+ */
212
+ appId?: string;
213
+ }
214
+ /** @oneof */
215
+ interface AuditInfoIdOneOf {
216
+ /**
217
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
218
+ * @format GUID
219
+ */
220
+ userId?: string;
221
+ /**
222
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
223
+ *
224
+ * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.
225
+ * @format GUID
226
+ */
227
+ appId?: string;
228
+ }
229
+ interface AutomationConfiguration {
230
+ /** Status of the automation on the site. */
231
+ status?: StatusWithLiterals;
232
+ /** Trigger configuration. */
233
+ trigger?: Trigger;
234
+ /**
235
+ * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.
236
+ *
237
+ * > **Note**: You can currently only specify 1 root action.
238
+ * @maxSize 20
239
+ * @format GUID
240
+ */
241
+ rootActionIds?: string[];
242
+ /** Actions the automation can execute, as `key:value` pairs. For the key, specify the action ID. The value must be an object structured as described below. */
243
+ actions?: Record<string, Action>;
244
+ }
245
+ declare enum TimeUnit {
246
+ /** Minutes. */
247
+ MINUTES = "MINUTES",
248
+ /** Hours. */
249
+ HOURS = "HOURS",
250
+ /** Days. */
251
+ DAYS = "DAYS",
252
+ /** Weeks. */
253
+ WEEKS = "WEEKS",
254
+ /** Months. */
255
+ MONTHS = "MONTHS"
256
+ }
257
+ /** @enumType */
258
+ type TimeUnitWithLiterals = TimeUnit | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS';
259
+ interface Filter {
260
+ /**
261
+ * Filter ID.
262
+ * @format GUID
263
+ */
264
+ _id?: string;
265
+ /**
266
+ * Field key.
267
+ *
268
+ * You can find the field key in [the trigger payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema).
269
+ * @minLength 1
270
+ * @maxLength 110
271
+ */
272
+ fieldKey?: string;
273
+ /**
274
+ * Filter expression in bracket notation.
275
+ *
276
+ * For the automation to run, the expression must evaluate to `true`.
277
+ * @maxLength 5000
278
+ */
279
+ filterExpression?: string;
280
+ }
281
+ interface FutureDateActivationOffset {
282
+ /**
283
+ * Amount of time before the trigger to run the automation.
284
+ *
285
+ * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#delay-action).
286
+ * @maxLength 1000
287
+ */
288
+ preScheduledEventOffsetExpression?: string;
289
+ /** Unit in which to set the action offset. */
290
+ scheduledEventOffsetTimeUnit?: TimeUnitWithLiterals;
291
+ }
292
+ interface RateLimit {
293
+ /**
294
+ * Maximum number of times the trigger can be activated.
295
+ * @maxLength 1000
296
+ */
297
+ maxActivationsExpression?: string;
298
+ /**
299
+ * Duration of the rate limit. The rate limit applies for the specified duration and then expires.
300
+ *
301
+ * When empty, the rate limit does not expire.
302
+ * @maxLength 1000
303
+ */
304
+ durationExpression?: string | null;
305
+ /** Unit in which to set the duration of the rate limit. */
306
+ durationTimeUnit?: TimeUnitWithLiterals;
307
+ /**
308
+ * Activation identifier used to count the number of activations.
309
+ * @minLength 1
310
+ * @maxLength 400
311
+ */
312
+ uniqueIdentifierExpression?: string | null;
313
+ }
314
+ interface FilterValueSelection {
315
+ /**
316
+ * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.
317
+ * @maxLength 80
318
+ * @maxSize 50
319
+ */
320
+ selectedFilterValues?: string[];
321
+ }
322
+ interface ConditionExpressionGroup {
323
+ /** Logical operator used to evaluate the condition expressions. */
324
+ operator?: OperatorWithLiterals;
325
+ /**
326
+ * Expressions evaluated using the selected operator.
327
+ * @minSize 1
328
+ * @maxSize 20
329
+ * @maxLength 5000
330
+ */
331
+ booleanExpressions?: string[];
332
+ }
333
+ declare enum Operator {
334
+ /** `OR` operator. */
335
+ OR = "OR",
336
+ /** `AND` operator. */
337
+ AND = "AND"
338
+ }
339
+ /** @enumType */
340
+ type OperatorWithLiterals = Operator | 'OR' | 'AND';
341
+ interface CodeSnippet {
342
+ /** Logical operator used to evaluate the condition expressions. */
343
+ language?: LanguageWithLiterals;
344
+ /**
345
+ * Expressions evaluated using the selected operator. this code should comply the language syntax. and format
346
+ * @maxLength 1500
347
+ */
348
+ code?: string;
349
+ }
350
+ declare enum Language {
351
+ /** JavaScript. */
352
+ JAVASCRIPT = "JAVASCRIPT"
353
+ }
354
+ /** @enumType */
355
+ type LanguageWithLiterals = Language | 'JAVASCRIPT';
356
+ /** Path definition */
357
+ interface Path {
358
+ /**
359
+ * Unique path ID.
360
+ * @format GUID
361
+ */
362
+ _id?: string;
363
+ /**
364
+ * Path name.
365
+ * @minLength 1
366
+ * @maxLength 100
367
+ */
368
+ name?: string;
369
+ /**
370
+ * ID of the action to run when this path is taken.
371
+ * @format GUID
372
+ */
373
+ postActionId?: string | null;
374
+ /**
375
+ * Editable display name for the path.
376
+ * @minLength 1
377
+ * @maxLength 60
378
+ */
379
+ displayName?: string | null;
380
+ }
381
+ declare enum Type {
382
+ /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */
383
+ APP_DEFINED = "APP_DEFINED",
384
+ /**
385
+ * Condition action. Evaluates a condition to determine which action runs next.
386
+ *
387
+ * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.
388
+ *
389
+ * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `conditionInfo.truePostActionIds` run and those in `conditionInfo.falsePostActionIds` are skipped.
390
+ */
391
+ CONDITION = "CONDITION",
392
+ /**
393
+ * Code condition action. Evaluates custom code to determine which action runs next.
394
+ *
395
+ * Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.
396
+ *
397
+ * > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `codeConditionInfo.truePostActionIds` run and those in `codeConditionInfo.falsePostActionIds` are skipped.
398
+ */
399
+ CODE_CONDITION = "CODE_CONDITION",
400
+ /** Delay. The automation must wait before executing the next step. */
401
+ DELAY = "DELAY",
402
+ /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
403
+ RATE_LIMIT = "RATE_LIMIT"
404
+ }
405
+ /** @enumType */
406
+ type TypeWithLiterals = Type | 'APP_DEFINED' | 'CONDITION' | 'CODE_CONDITION' | 'DELAY' | 'RATE_LIMIT';
407
+ interface AppDefinedAction {
408
+ /**
409
+ * ID of the app that defines the action.
410
+ * @format GUID
411
+ */
412
+ appId?: string;
413
+ /**
414
+ * Action key.
415
+ * @minLength 1
416
+ * @maxLength 100
417
+ */
418
+ actionKey?: string;
419
+ /**
420
+ * Action input mapping as defined in the action's [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema).
421
+ *
422
+ * The input mapping must include all parameters specified in the action's input schema's `required` array, and can include any other parameters from the schema.
423
+ */
424
+ inputMapping?: Record<string, any> | null;
425
+ /**
426
+ * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
427
+ *
428
+ * > **Note**: Actions that follow a skipped action still run.
429
+ * @maxSize 10
430
+ * @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
431
+ *
432
+ * > **Note**: Actions that follow a skipped action still run.
433
+ * @replacedBy skip_action_expression
434
+ * @targetRemovalDate 2026-02-01
435
+ */
436
+ skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
437
+ /**
438
+ * IDs of actions that run in parallel after the action completes.
439
+ * @maxSize 1
440
+ * @format GUID
441
+ */
442
+ postActionIds?: string[];
443
+ /** Action output schema. When specified, this replaces the action schema. */
444
+ overrideOutputSchema?: Record<string, any> | null;
445
+ }
446
+ interface ConditionAction {
447
+ /**
448
+ * Condition is `true` if one or more of the expression groups evaluates to `true`.
449
+ * @minSize 1
450
+ * @maxSize 10
451
+ */
452
+ orExpressionGroups?: ConditionExpressionGroup[];
453
+ /**
454
+ * IDs of actions to run when the condition evaluates to `true`.
455
+ * @maxSize 1
456
+ * @format GUID
457
+ */
458
+ truePostActionIds?: string[];
459
+ /**
460
+ * IDs of actions to run when the condition evaluates to `false`.
461
+ * @maxSize 1
462
+ * @format GUID
463
+ */
464
+ falsePostActionIds?: string[];
465
+ /**
466
+ * ID of the MERGE action for this condition. When absent, branches run independently (current behavior).
467
+ * @format GUID
468
+ */
469
+ mergeActionId?: string | null;
470
+ }
471
+ interface CodeConditionAction {
472
+ /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */
473
+ snippet?: CodeSnippet;
474
+ /**
475
+ * dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.
476
+ * this list is mainly for validation purpose.
477
+ * @maxSize 50
478
+ * @maxLength 100
479
+ */
480
+ dynamicVariableExpressions?: string[];
481
+ /**
482
+ * IDs of actions to run when the condition evaluates to `true`.
483
+ * @maxSize 1
484
+ * @format GUID
485
+ */
486
+ truePostActionIds?: string[];
487
+ /**
488
+ * IDs of actions to run when the condition evaluates to `false`.
489
+ * @maxSize 1
490
+ * @format GUID
491
+ */
492
+ falsePostActionIds?: string[];
493
+ /**
494
+ * ID of the MERGE action for this condition. When absent, branches run independently (current behavior).
495
+ * @format GUID
496
+ */
497
+ mergeActionId?: string | null;
498
+ }
499
+ interface DelayAction {
500
+ /**
501
+ * Time to wait before running the action. The wait time starts from when the current action completes.
502
+ *
503
+ * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.
504
+ * @maxLength 1000
505
+ */
506
+ offsetExpression?: string | null;
507
+ /** Unit in which to set the wait time to wait before the action runs. */
508
+ offsetTimeUnit?: TimeUnitWithLiterals;
509
+ /**
510
+ * Action run date in milliseconds elapsed since January 1, 1970 UTC.
511
+ *
512
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
513
+ * @maxLength 1000
514
+ * @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.
515
+ *
516
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
517
+ * @replacedBy due_date_expression
518
+ * @targetRemovalDate 2026-02-01
519
+ */
520
+ dueDateEpochExpression?: string | null;
521
+ /**
522
+ * Action run date as a timestamp or DateTime expression using bracket notation.
523
+ *
524
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
525
+ * @maxLength 1000
526
+ */
527
+ dueDateExpression?: string | null;
528
+ /**
529
+ * IDs of actions to run in parallel after the time delay.
530
+ * @maxSize 1
531
+ * @format GUID
532
+ */
533
+ postActionIds?: string[];
534
+ }
535
+ interface RateLimitAction {
536
+ /**
537
+ * Maximum number of times the action can run.
538
+ * @maxLength 1000
539
+ */
540
+ maxActivationsExpression?: string;
541
+ /**
542
+ * Rate limit duration.
543
+ *
544
+ * When empty, the rate limit does not expire.
545
+ * @maxLength 1000
546
+ */
547
+ rateLimitDurationExpression?: string | null;
548
+ /** Unit in which to set the duration of the rate limit. */
549
+ rateLimitDurationTimeUnit?: TimeUnitWithLiterals;
550
+ /**
551
+ * Unique identifier of each activation by which rate limiter counts activations.
552
+ * @minLength 1
553
+ * @maxLength 400
554
+ */
555
+ uniqueIdentifierExpression?: string | null;
556
+ /**
557
+ * IDs of actions to run in parallel after the action completes.
558
+ * @maxSize 1
559
+ * @format GUID
560
+ */
561
+ postActionIds?: string[];
562
+ }
563
+ interface SetVariablesAction {
564
+ /** Output mapping. For example: `{"someField": "{{10}}", "someOtherField": "{{multiply( var('account.points.balance') ;2 )}}" }`. */
565
+ outputMapping?: Record<string, any> | null;
566
+ /**
567
+ * Output JSON schema representation.
568
+ *
569
+ * > **Note**: To minimize request size, you can also specify a string.
570
+ */
571
+ outputSchema?: Record<string, any> | null;
572
+ /**
573
+ * IDs of actions to run in parallel after variable initialization.
574
+ * @maxSize 1
575
+ * @format GUID
576
+ */
577
+ postActionIds?: string[];
578
+ }
579
+ interface OutputAction {
580
+ /** Output action output mapping. */
581
+ outputMapping?: Record<string, any> | null;
582
+ }
583
+ interface SplitAction {
584
+ /**
585
+ * List of paths to split execution into.
586
+ * @minSize 2
587
+ * @maxSize 10
588
+ */
589
+ paths?: Path[];
590
+ }
591
+ interface MergeAction {
592
+ /**
593
+ * ID of the action to execute after the arriving branch completes.
594
+ * @format GUID
595
+ */
596
+ postActionId?: string | null;
597
+ }
598
+ declare enum Status {
599
+ /** Active. Active automations can be triggered. */
600
+ ACTIVE = "ACTIVE",
601
+ /** Inactive. Inactive automations cannot be triggered. */
602
+ INACTIVE = "INACTIVE"
603
+ }
604
+ /** @enumType */
605
+ type StatusWithLiterals = Status | 'ACTIVE' | 'INACTIVE';
606
+ interface Trigger {
607
+ /**
608
+ * ID of the app that defines the trigger.
609
+ * @format GUID
610
+ */
611
+ appId?: string;
612
+ /**
613
+ * Trigger key.
614
+ *
615
+ * Learn about [setting up a trigger](https://dev.wix.com/docs/rest/business-management/automations/triggers/add-a-trigger-to-your-app#step-1--set-up-the-trigger).
616
+ * @minLength 1
617
+ * @maxLength 100
618
+ */
619
+ triggerKey?: string;
620
+ /**
621
+ * Schema field filters. All filter conditions must be met for the automation to run.
622
+ *
623
+ * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#filters).
624
+ * @maxSize 5
625
+ */
626
+ filters?: Filter[];
627
+ /**
628
+ * Automation offset. You can schedule automations to run before the trigger occurs.
629
+ *
630
+ * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).
631
+ */
632
+ scheduledEventOffset?: FutureDateActivationOffset;
633
+ /** Limit on the number of times an automation can be triggered. */
634
+ rateLimit?: RateLimit;
635
+ /** Trigger schema override. When specified, this replaces the trigger schema. */
636
+ overrideSchema?: Record<string, any> | null;
637
+ }
638
+ interface Action extends ActionInfoOneOf {
639
+ /** Details of the action whose `type` is `APP_DEFINED`. */
640
+ appDefinedInfo?: AppDefinedAction;
641
+ /** Details of the action whose `type` is `CONDITION`. */
642
+ conditionInfo?: ConditionAction;
643
+ /** Details of the action whose `type` is `CODE_CONDITION`. */
644
+ codeConditionInfo?: CodeConditionAction;
645
+ /** Details of the action whose `type` is `DELAY`. */
646
+ delayInfo?: DelayAction;
647
+ /** Details of the action whose `type` is `RATE_LIMIT`. */
648
+ rateLimitInfo?: RateLimitAction;
649
+ /**
650
+ * Action ID.
651
+ *
652
+ * Unique identifier for the action instance in the current automation. Use this to refer to this action in the automation flow.
653
+ *
654
+ * If not specified, automatically generated by Wix.
655
+ * @format GUID
656
+ */
657
+ _id?: string | null;
658
+ /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#action-type). */
659
+ type?: TypeWithLiterals;
660
+ /**
661
+ * Editable display name for the action.
662
+ * @minLength 1
663
+ * @maxLength 60
664
+ */
665
+ displayName?: string | null;
666
+ /**
667
+ * [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#namespace). This differentiates it from other actions of the same type.
668
+ *
669
+ * If the action outputs any data, the data appears under the namespace in the payload sent to the subsequent steps in the automation. If the user has multiple actions with the same `appId` and `actionKey`, the output of the previous action is overwritten.
670
+ * @minLength 1
671
+ * @maxLength 100
672
+ */
673
+ namespace?: string | null;
674
+ /**
675
+ * Evaluated to determine whether the action is skipped. When evaluated to `true`, the action is skipped. Otherwise, the action runs.
676
+ *
677
+ * When empty, the action runs.
678
+ * @maxLength 1000
679
+ */
680
+ skipActionExpression?: string | null;
681
+ }
682
+ /** @oneof */
683
+ interface ActionInfoOneOf {
684
+ /** Details of the action whose `type` is `APP_DEFINED`. */
685
+ appDefinedInfo?: AppDefinedAction;
686
+ /** Details of the action whose `type` is `CONDITION`. */
687
+ conditionInfo?: ConditionAction;
688
+ /** Details of the action whose `type` is `CODE_CONDITION`. */
689
+ codeConditionInfo?: CodeConditionAction;
690
+ /** Details of the action whose `type` is `DELAY`. */
691
+ delayInfo?: DelayAction;
692
+ /** Details of the action whose `type` is `RATE_LIMIT`. */
693
+ rateLimitInfo?: RateLimitAction;
694
+ }
695
+ interface FilterableAppDefinedActions {
696
+ /**
697
+ * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.
698
+ * @minSize 1
699
+ * @maxSize 100
700
+ * @minLength 1
701
+ * @maxLength 150
702
+ */
703
+ actionIdentifiers?: string[];
704
+ }
705
+ declare enum Origin {
706
+ /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
707
+ USER = "USER",
708
+ /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */
709
+ APPLICATION = "APPLICATION",
710
+ /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */
711
+ PREINSTALLED = "PREINSTALLED"
712
+ }
713
+ /** @enumType */
714
+ type OriginWithLiterals = Origin | 'USER' | 'APPLICATION' | 'PREINSTALLED';
715
+ interface ApplicationOrigin {
716
+ /**
717
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
718
+ *
719
+ * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.
720
+ * @format GUID
721
+ */
722
+ appId?: string;
723
+ }
724
+ interface PreinstalledOrigin {
725
+ /**
726
+ * ID of the app that added the [preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations).
727
+ * @format GUID
728
+ */
729
+ appId?: string;
730
+ /**
731
+ * Whether the automation is an override.
732
+ *
733
+ * When a user modifies the preinstalled automation installed on their site, a site-specific version of the automation is created that overrides the automation that was originally installed. This override automation has the same automation ID as the original preinstalled automation.
734
+ *
735
+ * > **Note**: An override automation can no longer be updated by the app that originally installed it.
736
+ * >
737
+ * > To revert to the original preinstalled version, the user must delete the override by calling the Delete Automation method. Calling Delete Automation on an override automation removes the override method and restores the preinstalled automation that was previously installed.
738
+ *
739
+ * Default: `false`.
740
+ * @immutable
741
+ * @readonly
742
+ */
743
+ override?: boolean | null;
744
+ }
745
+ interface TemplateOrigin {
746
+ /**
747
+ * ID of the app that added the template automation.
748
+ * @format GUID
749
+ */
750
+ appId?: string;
751
+ }
752
+ interface AutomationSettings {
753
+ /**
754
+ * Whether the automation is hidden from users.
755
+ *
756
+ * Default: `false`
757
+ */
758
+ hidden?: boolean;
759
+ /**
760
+ * Whether the automation is read-only.
761
+ *
762
+ * When `true`, site owners can't modify the automation or any of its actions. When `false`, users can configure specific actions as skippable or read-only using `settings.actionSettings`.
763
+ *
764
+ * Default: `false`.
765
+ *
766
+ * > **Note**: Setting `readOnly` to `true` overrides `settings.actionSettings`.
767
+ */
768
+ readonly?: boolean;
769
+ /**
770
+ * Whether to disable the option to delete the automation from the site.
771
+ *
772
+ * Default: `false`.
773
+ */
774
+ disableDelete?: boolean;
775
+ /**
776
+ * Whether to disable the option to change the automation's `configuration.status`.
777
+ *
778
+ * Default: `false`.
779
+ */
780
+ disableStatusChange?: boolean;
781
+ /** Automation action settings. */
782
+ actionSettings?: ActionSettings;
783
+ }
784
+ interface DraftInfo {
785
+ /**
786
+ * ID of the original automation.
787
+ * @format GUID
788
+ * @readonly
789
+ */
790
+ originalAutomationId?: string | null;
791
+ }
792
+ interface Enrichments {
793
+ /** Whether the studio site enrichment is wanted. */
794
+ studioSite?: Enrichment;
795
+ }
796
+ interface ExtendedFields {
797
+ /**
798
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
799
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
800
+ *
801
+ * You can only access fields for which you have the appropriate permissions.
802
+ *
803
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
804
+ */
805
+ namespaces?: Record<string, Record<string, any>>;
806
+ }
807
+ interface AutoArchivePolicy {
808
+ /**
809
+ * Date when to archive the automation
810
+ * If this date in the past, nothing will happen (automation will not go into archived state)
811
+ * If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE
812
+ * After this date the automation may be unarchived and archived again, this date will have no influence
813
+ */
814
+ archiveDate?: Date | null;
815
+ }
816
+ interface Notes {
817
+ }
818
+ interface Note {
819
+ }
820
+ interface Position {
821
+ }
822
+ interface Offset {
823
+ }
824
+ interface Dimensions {
825
+ }
826
+ /** A category with its order for ordering the template within the category. */
827
+ interface CategoryInfo {
828
+ /** The category. */
829
+ category?: CategoryWithLiterals;
830
+ }
831
+ /** Information needed to create or resolve a segment from an automation template. */
832
+ interface SegmentInfo {
833
+ /** Segment template JSON that may contain placeholder values. */
834
+ segmentTemplate?: Record<string, any> | null;
835
+ /**
836
+ * Automation action values keyed by segment template parameter.
837
+ * @maxSize 100
838
+ */
839
+ templateParameterOverrides?: Record<string, any>;
840
+ }
841
+ interface AutomationTemplateDeletedWithEntity {
842
+ /** The AutomationTemplate that was deleted. */
843
+ automationTemplate?: AutomationTemplate;
844
+ }
845
+ interface CreateAutomationTemplateRequest {
846
+ /** AutomationTemplate to be created. */
847
+ automationTemplate: AutomationTemplate;
848
+ /**
849
+ * ID of the app to which the automation template belongs.
850
+ * @format GUID
851
+ */
852
+ appId: string;
853
+ /**
854
+ * The meta site ID from which the original automation was taken.
855
+ * @format GUID
856
+ */
857
+ originalMetaSiteId: string;
858
+ }
859
+ interface AutomationTemplateSpecInfo {
860
+ /**
861
+ * Spec to conduct on for the automation.
862
+ *
863
+ * For internal use only.
864
+ * @minLength 1
865
+ * @maxLength 128
866
+ */
867
+ spec?: string;
868
+ /**
869
+ * Value the spec should return in order to affect the user with the operation
870
+ * e.g. creation - show the users the automation template, update - show the users the updated automation template, deletion - not show the users the automation template
871
+ * @minLength 1
872
+ * @maxLength 128
873
+ */
874
+ variantValue?: string | null;
875
+ /**
876
+ * Version from which the experiment should decide whether to expose it to users when !conduct(spec).contains(variant_value)
877
+ * For example, if 50 is set, version 49 and below (including 49) will not expose the automation template to the user.
878
+ */
879
+ experimentVersion?: number;
880
+ }
881
+ interface CreateAutomationTemplateResponse {
882
+ /** The created AutomationTemplate. */
883
+ automationTemplate?: AutomationTemplate;
884
+ }
885
+ interface CreateDraftAutomationTemplateRequest {
886
+ /** Draft AutomationTemplate to be created. May be partial. */
887
+ automationTemplate: AutomationTemplate;
888
+ /**
889
+ * ID of the app to which the draft automation template belongs.
890
+ * @format GUID
891
+ */
892
+ appId: string;
893
+ }
894
+ interface CreateDraftAutomationTemplateResponse {
895
+ /** The created draft AutomationTemplate. */
896
+ automationTemplate?: AutomationTemplate;
897
+ }
898
+ interface GetAutomationTemplateRequest {
899
+ /**
900
+ * ID of the AutomationTemplate to retrieve.
901
+ * @format GUID
902
+ */
903
+ automationTemplateId: string;
904
+ }
905
+ interface GetAutomationTemplateResponse {
906
+ /** The requested AutomationTemplate. */
907
+ automationTemplate?: AutomationTemplate;
908
+ }
909
+ interface UpdateAutomationTemplateRequest {
910
+ /** AutomationTemplate to be updated, may be partial. */
911
+ automationTemplate: AutomationTemplate;
912
+ /**
913
+ * ID of the app to which the automation template belongs.
914
+ * @format GUID
915
+ */
916
+ appId: string;
917
+ }
918
+ interface UpdateAutomationTemplateResponse {
919
+ /** Updated AutomationTemplate. */
920
+ automationTemplate?: AutomationTemplate;
921
+ }
922
+ interface UpdateDraftAutomationTemplateRequest {
923
+ /** Draft AutomationTemplate content to persist. */
924
+ automationTemplate: AutomationTemplate;
925
+ /**
926
+ * ID of the app to which the automation template belongs.
927
+ * @format GUID
928
+ */
929
+ appId: string;
930
+ /**
931
+ * The meta site ID from which the draft automation was taken.
932
+ * @format GUID
933
+ */
934
+ metaSiteId?: string | null;
935
+ }
936
+ interface UpdateDraftAutomationTemplateResponse {
937
+ /** Updated draft AutomationTemplate. */
938
+ automationTemplate?: AutomationTemplate;
939
+ }
940
+ interface DeleteAutomationTemplateRequest {
941
+ /**
942
+ * App id of the AutomationTemplate to delete.
943
+ * @format GUID
944
+ */
945
+ appId: string;
946
+ /**
947
+ * Component id of the AutomationTemplate to delete.
948
+ * @format GUID
949
+ */
950
+ componentId: string;
951
+ }
952
+ interface DeleteAutomationTemplateResponse {
953
+ }
954
+ interface ResolveAutomationTemplatesRequest {
955
+ /** Query options. */
956
+ query: QueryV2;
957
+ }
958
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
959
+ /** Paging options to limit and offset the number of items. */
960
+ paging?: Paging;
961
+ /** 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`. */
962
+ cursorPaging?: CommonCursorPaging;
963
+ /**
964
+ * Filter object.
965
+ *
966
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
967
+ */
968
+ filter?: Record<string, any> | null;
969
+ /**
970
+ * Sort object.
971
+ *
972
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
973
+ */
974
+ sort?: CommonSorting[];
975
+ /** 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. */
976
+ fields?: string[];
977
+ /** 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. */
978
+ fieldsets?: string[];
979
+ }
980
+ /** @oneof */
981
+ interface QueryV2PagingMethodOneOf {
982
+ /** Paging options to limit and offset the number of items. */
983
+ paging?: Paging;
984
+ /** 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`. */
985
+ cursorPaging?: CommonCursorPaging;
986
+ }
987
+ interface CommonSorting {
988
+ /**
989
+ * Name of the field to sort by.
990
+ * @maxLength 512
991
+ */
992
+ fieldName?: string;
993
+ /** Sort order. */
994
+ order?: CommonSortOrderWithLiterals;
995
+ }
996
+ declare enum CommonSortOrder {
997
+ ASC = "ASC",
998
+ DESC = "DESC"
999
+ }
1000
+ /** @enumType */
1001
+ type CommonSortOrderWithLiterals = CommonSortOrder | 'ASC' | 'DESC';
1002
+ interface Paging {
1003
+ /** Number of items to load. */
1004
+ limit?: number | null;
1005
+ /** Number of items to skip in the current sort order. */
1006
+ offset?: number | null;
1007
+ }
1008
+ interface CommonCursorPaging {
1009
+ /**
1010
+ * Maximum number of items to return in the results.
1011
+ * @max 100
1012
+ */
1013
+ limit?: number | null;
1014
+ /**
1015
+ * Pointer to the next or previous page in the list of results.
1016
+ *
1017
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1018
+ * Not relevant for the first request.
1019
+ * @maxLength 16000
1020
+ */
1021
+ cursor?: string | null;
1022
+ }
1023
+ interface ResolveAutomationTemplatesResponse {
1024
+ /** Retrieved AutomationTemplates. */
1025
+ automationTemplates?: AutomationTemplate[];
1026
+ /** Paging metadata of the response. */
1027
+ pagingMetadata?: CommonCursorPagingMetadata;
1028
+ }
1029
+ interface CommonCursorPagingMetadata {
1030
+ /** Number of items returned in current page. */
1031
+ count?: number | null;
1032
+ /** Cursor strings that point to the next page, previous page, or both. */
1033
+ cursors?: CommonCursors;
1034
+ /**
1035
+ * Whether there are more pages to retrieve following the current page.
1036
+ *
1037
+ * + `true`: Another page of results can be retrieved.
1038
+ * + `false`: This is the last page.
1039
+ */
1040
+ hasNext?: boolean | null;
1041
+ }
1042
+ interface CommonCursors {
1043
+ /**
1044
+ * Cursor string pointing to the next page in the list of results.
1045
+ * @maxLength 16000
1046
+ */
1047
+ next?: string | null;
1048
+ /**
1049
+ * Cursor pointing to the previous page in the list of results.
1050
+ * @maxLength 16000
1051
+ */
1052
+ prev?: string | null;
1053
+ }
1054
+ interface QueryAutomationTemplatesForAppRequest {
1055
+ /** Query options. */
1056
+ query: CursorQuery;
1057
+ /**
1058
+ * ID of the app for which to query template automations.
1059
+ * @format GUID
1060
+ */
1061
+ appId: string;
1062
+ }
1063
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
1064
+ /**
1065
+ * Cursor paging options.
1066
+ *
1067
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1068
+ */
1069
+ cursorPaging?: CursorPaging;
1070
+ /**
1071
+ * Filter object.
1072
+ *
1073
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1074
+ */
1075
+ filter?: Record<string, any> | null;
1076
+ /**
1077
+ * Sort object.
1078
+ *
1079
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1080
+ * @maxSize 5
1081
+ */
1082
+ sort?: Sorting[];
1083
+ }
1084
+ /** @oneof */
1085
+ interface CursorQueryPagingMethodOneOf {
1086
+ /**
1087
+ * Cursor paging options.
1088
+ *
1089
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
1090
+ */
1091
+ cursorPaging?: CursorPaging;
1092
+ }
1093
+ interface Sorting {
1094
+ /**
1095
+ * Name of the field to sort by.
1096
+ * @maxLength 512
1097
+ */
1098
+ fieldName?: string;
1099
+ /** Sort order. */
1100
+ order?: SortOrderWithLiterals;
1101
+ }
1102
+ declare enum SortOrder {
1103
+ ASC = "ASC",
1104
+ DESC = "DESC"
1105
+ }
1106
+ /** @enumType */
1107
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
1108
+ interface CursorPaging {
1109
+ /**
1110
+ * Maximum number of items to return in the results.
1111
+ * @max 100
1112
+ */
1113
+ limit?: number | null;
1114
+ /**
1115
+ * Pointer to the next or previous page in the list of results.
1116
+ *
1117
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1118
+ * Not relevant for the first request.
1119
+ * @maxLength 16000
1120
+ */
1121
+ cursor?: string | null;
1122
+ }
1123
+ interface QueryAutomationTemplatesForAppResponse {
1124
+ /** Retrieved AutomationTemplates. */
1125
+ automationTemplates?: AutomationTemplate[];
1126
+ /** Paging metadata. */
1127
+ pagingMetadata?: CursorPagingMetadata;
1128
+ }
1129
+ interface CursorPagingMetadata {
1130
+ /** Number of items returned in current page. */
1131
+ count?: number | null;
1132
+ /** Cursor strings that point to the next page, previous page, or both. */
1133
+ cursors?: Cursors;
1134
+ /**
1135
+ * Whether there are more pages to retrieve following the current page.
1136
+ *
1137
+ * + `true`: Another page of results can be retrieved.
1138
+ * + `false`: This is the last page.
1139
+ */
1140
+ hasNext?: boolean | null;
1141
+ }
1142
+ interface Cursors {
1143
+ /**
1144
+ * Cursor string pointing to the next page in the list of results.
1145
+ * @maxLength 16000
1146
+ */
1147
+ next?: string | null;
1148
+ /**
1149
+ * Cursor pointing to the previous page in the list of results.
1150
+ * @maxLength 16000
1151
+ */
1152
+ prev?: string | null;
1153
+ }
1154
+ interface GenerateTemplateFromAutomationRequest {
1155
+ /** Automation to generate a template from. */
1156
+ automation: Automation;
1157
+ /**
1158
+ * ID of the app generating the template.
1159
+ * @format GUID
1160
+ */
1161
+ appId: string;
1162
+ }
1163
+ interface GenerateTemplateFromAutomationResponse {
1164
+ /** The generated AutomationTemplate. */
1165
+ automationTemplate?: AutomationTemplate;
1166
+ }
1167
+ interface DomainEvent extends DomainEventBodyOneOf {
1168
+ createdEvent?: EntityCreatedEvent;
1169
+ updatedEvent?: EntityUpdatedEvent;
1170
+ deletedEvent?: EntityDeletedEvent;
1171
+ actionEvent?: ActionEvent;
1172
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1173
+ _id?: string;
1174
+ /**
1175
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1176
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1177
+ */
1178
+ entityFqdn?: string;
1179
+ /**
1180
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
1181
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1182
+ */
1183
+ slug?: string;
1184
+ /** ID of the entity associated with the event. */
1185
+ entityId?: string;
1186
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1187
+ eventTime?: Date | null;
1188
+ /**
1189
+ * Whether the event was triggered as a result of a privacy regulation application
1190
+ * (for example, GDPR).
1191
+ */
1192
+ triggeredByAnonymizeRequest?: boolean | null;
1193
+ /** If present, indicates the action that triggered the event. */
1194
+ originatedFrom?: string | null;
1195
+ /**
1196
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
1197
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
1198
+ */
1199
+ entityEventSequence?: string | null;
1200
+ }
1201
+ /** @oneof */
1202
+ interface DomainEventBodyOneOf {
1203
+ createdEvent?: EntityCreatedEvent;
1204
+ updatedEvent?: EntityUpdatedEvent;
1205
+ deletedEvent?: EntityDeletedEvent;
1206
+ actionEvent?: ActionEvent;
1207
+ }
1208
+ interface EntityCreatedEvent {
1209
+ entity?: string;
1210
+ }
1211
+ interface RestoreInfo {
1212
+ deletedDate?: Date | null;
1213
+ }
1214
+ interface EntityUpdatedEvent {
1215
+ /**
1216
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1217
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1218
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1219
+ */
1220
+ currentEntity?: string;
1221
+ }
1222
+ interface EntityDeletedEvent {
1223
+ /** Entity that was deleted. */
1224
+ deletedEntity?: string | null;
1225
+ }
1226
+ interface ActionEvent {
1227
+ body?: string;
1228
+ }
1229
+ interface MessageEnvelope {
1230
+ /**
1231
+ * App instance ID.
1232
+ * @format GUID
1233
+ */
1234
+ instanceId?: string | null;
1235
+ /**
1236
+ * Event type.
1237
+ * @maxLength 150
1238
+ */
1239
+ eventType?: string;
1240
+ /** The identification type and identity data. */
1241
+ identity?: IdentificationData;
1242
+ /** Stringify payload. */
1243
+ data?: string;
1244
+ /** Details related to the account */
1245
+ accountInfo?: AccountInfo;
1246
+ }
1247
+ interface IdentificationData extends IdentificationDataIdOneOf {
1248
+ /**
1249
+ * ID of a site visitor that has not logged in to the site.
1250
+ * @format GUID
1251
+ */
1252
+ anonymousVisitorId?: string;
1253
+ /**
1254
+ * ID of a site visitor that has logged in to the site.
1255
+ * @format GUID
1256
+ */
1257
+ memberId?: string;
1258
+ /**
1259
+ * ID of a Wix user (site owner, contributor, etc.).
1260
+ * @format GUID
1261
+ */
1262
+ wixUserId?: string;
1263
+ /**
1264
+ * ID of an app.
1265
+ * @format GUID
1266
+ */
1267
+ appId?: string;
1268
+ /** @readonly */
1269
+ identityType?: WebhookIdentityTypeWithLiterals;
1270
+ }
1271
+ /** @oneof */
1272
+ interface IdentificationDataIdOneOf {
1273
+ /**
1274
+ * ID of a site visitor that has not logged in to the site.
1275
+ * @format GUID
1276
+ */
1277
+ anonymousVisitorId?: string;
1278
+ /**
1279
+ * ID of a site visitor that has logged in to the site.
1280
+ * @format GUID
1281
+ */
1282
+ memberId?: string;
1283
+ /**
1284
+ * ID of a Wix user (site owner, contributor, etc.).
1285
+ * @format GUID
1286
+ */
1287
+ wixUserId?: string;
1288
+ /**
1289
+ * ID of an app.
1290
+ * @format GUID
1291
+ */
1292
+ appId?: string;
1293
+ }
1294
+ declare enum WebhookIdentityType {
1295
+ UNKNOWN = "UNKNOWN",
1296
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1297
+ MEMBER = "MEMBER",
1298
+ WIX_USER = "WIX_USER",
1299
+ APP = "APP"
1300
+ }
1301
+ /** @enumType */
1302
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1303
+ interface AccountInfo {
1304
+ /**
1305
+ * ID of the Wix account associated with the event.
1306
+ * @format GUID
1307
+ */
1308
+ accountId?: string | null;
1309
+ /**
1310
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
1311
+ * @format GUID
1312
+ */
1313
+ parentAccountId?: string | null;
1314
+ /**
1315
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
1316
+ * @format GUID
1317
+ */
1318
+ siteId?: string | null;
1319
+ }
1320
+ interface CreateAutomationTemplateOptions {
1321
+ /**
1322
+ * ID of the app to which the automation template belongs.
1323
+ * @format GUID
1324
+ */
1325
+ appId: string;
1326
+ /**
1327
+ * The meta site ID from which the original automation was taken.
1328
+ * @format GUID
1329
+ */
1330
+ originalMetaSiteId: string;
1331
+ }
1332
+ interface CreateDraftAutomationTemplateOptions {
1333
+ /**
1334
+ * ID of the app to which the draft automation template belongs.
1335
+ * @format GUID
1336
+ */
1337
+ appId: string;
1338
+ }
1339
+ interface UpdateAutomationTemplate {
1340
+ /**
1341
+ * AutomationTemplate ID.
1342
+ * @format GUID
1343
+ * @readonly
1344
+ */
1345
+ _id?: string | null;
1346
+ /**
1347
+ * Revision number. This increments by 1 whenever the automation template is updated. Specify the current revision number whenever updating an existing automation template.
1348
+ * @readonly
1349
+ */
1350
+ revision?: string | null;
1351
+ /**
1352
+ * Date and time the AutomationTemplate was created.
1353
+ * @readonly
1354
+ */
1355
+ _createdDate?: Date | null;
1356
+ /**
1357
+ * Date and time the AutomationTemplate was last updated.
1358
+ * @readonly
1359
+ */
1360
+ _updatedDate?: Date | null;
1361
+ /** The automation blueprint this template is based on. */
1362
+ automation?: Automation;
1363
+ /**
1364
+ * Component ID that owns this template.
1365
+ * @format GUID
1366
+ * @readonly
1367
+ */
1368
+ componentId?: string | null;
1369
+ /**
1370
+ * Component version.
1371
+ * @readonly
1372
+ */
1373
+ componentVersion?: number | null;
1374
+ /**
1375
+ * App ID that owns this template.
1376
+ * @format GUID
1377
+ * @readonly
1378
+ */
1379
+ appId?: string;
1380
+ /**
1381
+ * Display name for the automation template.
1382
+ * @minLength 1
1383
+ * @maxLength 500
1384
+ */
1385
+ name?: string;
1386
+ /**
1387
+ * description of what the automation template does.
1388
+ * @minLength 1
1389
+ * @maxLength 2000
1390
+ */
1391
+ description?: string;
1392
+ /**
1393
+ * goal or intent of the automation template.
1394
+ * @maxLength 500
1395
+ */
1396
+ goal?: string | null;
1397
+ }
1398
+ interface UpdateAutomationTemplateOptions {
1399
+ /**
1400
+ * ID of the app to which the automation template belongs.
1401
+ * @format GUID
1402
+ */
1403
+ appId: string;
1404
+ }
1405
+ interface UpdateDraftAutomationTemplate {
1406
+ /**
1407
+ * AutomationTemplate ID.
1408
+ * @format GUID
1409
+ * @readonly
1410
+ */
1411
+ _id?: string | null;
1412
+ /**
1413
+ * Revision number. This increments by 1 whenever the automation template is updated. Specify the current revision number whenever updating an existing automation template.
1414
+ * @readonly
1415
+ */
1416
+ revision?: string | null;
1417
+ /**
1418
+ * Date and time the AutomationTemplate was created.
1419
+ * @readonly
1420
+ */
1421
+ _createdDate?: Date | null;
1422
+ /**
1423
+ * Date and time the AutomationTemplate was last updated.
1424
+ * @readonly
1425
+ */
1426
+ _updatedDate?: Date | null;
1427
+ /** The automation blueprint this template is based on. */
1428
+ automation?: Automation;
1429
+ /**
1430
+ * Component ID that owns this template.
1431
+ * @format GUID
1432
+ * @readonly
1433
+ */
1434
+ componentId?: string | null;
1435
+ /**
1436
+ * Component version.
1437
+ * @readonly
1438
+ */
1439
+ componentVersion?: number | null;
1440
+ /**
1441
+ * App ID that owns this template.
1442
+ * @format GUID
1443
+ * @readonly
1444
+ */
1445
+ appId?: string;
1446
+ /**
1447
+ * Display name for the automation template.
1448
+ * @minLength 1
1449
+ * @maxLength 500
1450
+ */
1451
+ name?: string;
1452
+ /**
1453
+ * description of what the automation template does.
1454
+ * @minLength 1
1455
+ * @maxLength 2000
1456
+ */
1457
+ description?: string;
1458
+ /**
1459
+ * goal or intent of the automation template.
1460
+ * @maxLength 500
1461
+ */
1462
+ goal?: string | null;
1463
+ }
1464
+ interface UpdateDraftAutomationTemplateOptions {
1465
+ /**
1466
+ * ID of the app to which the automation template belongs.
1467
+ * @format GUID
1468
+ */
1469
+ appId: string;
1470
+ /**
1471
+ * The meta site ID from which the draft automation was taken.
1472
+ * @format GUID
1473
+ */
1474
+ metaSiteId?: string | null;
1475
+ }
1476
+ interface QueryAutomationTemplatesForAppOptions {
1477
+ /**
1478
+ * ID of the app for which to query template automations.
1479
+ * @format GUID
1480
+ */
1481
+ appId: string;
1482
+ }
1483
+ interface GenerateTemplateFromAutomationOptions {
1484
+ /**
1485
+ * ID of the app generating the template.
1486
+ * @format GUID
1487
+ */
1488
+ appId: string;
1489
+ }
1490
+
1491
+ export { type AIMetadata, type AccountInfo, type Action, type ActionEvent, type ActionInfoOneOf, type ActionSettings, type AppDefinedAction, type ApplicationOrigin, type AuditInfo, type AuditInfoIdOneOf, type AutoArchivePolicy, type Automation, type AutomationConfiguration, type AutomationOriginInfoOneOf, type AutomationSettings, type AutomationTemplate, type AutomationTemplateDeletedWithEntity, type AutomationTemplateSpecInfo, Category, type CategoryInfo, type CategoryWithLiterals, type CodeConditionAction, type CodeSnippet, type CommonCursorPaging, type CommonCursorPagingMetadata, type CommonCursors, CommonSortOrder, type CommonSortOrderWithLiterals, type CommonSorting, type ConditionAction, type ConditionExpressionGroup, type CreateAutomationTemplateOptions, type CreateAutomationTemplateRequest, type CreateAutomationTemplateResponse, type CreateDraftAutomationTemplateOptions, type CreateDraftAutomationTemplateRequest, type CreateDraftAutomationTemplateResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DelayAction, type DeleteAutomationTemplateRequest, type DeleteAutomationTemplateResponse, type Dimensions, Domain, type DomainEvent, type DomainEventBodyOneOf, type DomainWithLiterals, type DraftInfo, type Enrichment, type Enrichments, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type Filter, type FilterValueSelection, type FilterableAppDefinedActions, type FutureDateActivationOffset, type GenerateTemplateFromAutomationOptions, type GenerateTemplateFromAutomationRequest, type GenerateTemplateFromAutomationResponse, type GetAutomationTemplateRequest, type GetAutomationTemplateResponse, type IdentificationData, type IdentificationDataIdOneOf, Language, type LanguageWithLiterals, type MergeAction, type MessageEnvelope, type Note, type Notes, type Offset, Operator, type OperatorWithLiterals, Origin, type OriginWithLiterals, type OutputAction, type Paging, type Path, type Position, type PreinstalledOrigin, type QueryAutomationTemplatesForAppOptions, type QueryAutomationTemplatesForAppRequest, type QueryAutomationTemplatesForAppResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RateLimit, type RateLimitAction, type ResolveAutomationTemplatesRequest, type ResolveAutomationTemplatesResponse, type RestoreInfo, type SegmentInfo, type SetVariablesAction, SortOrder, type SortOrderWithLiterals, type Sorting, type SplitAction, Status, type StatusWithLiterals, type TemplateOrigin, TimeUnit, type TimeUnitWithLiterals, type Trigger, type TriggerSettings, Type, type TypeWithLiterals, type UpdateAutomationTemplate, type UpdateAutomationTemplateOptions, type UpdateAutomationTemplateRequest, type UpdateAutomationTemplateResponse, type UpdateDraftAutomationTemplate, type UpdateDraftAutomationTemplateOptions, type UpdateDraftAutomationTemplateRequest, type UpdateDraftAutomationTemplateResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals };