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