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