@wix/auto_sdk_functions_function-productions 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 +44 -0
  2. package/build/cjs/index.js +423 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1121 -0
  5. package/build/cjs/index.typings.js +393 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1048 -0
  8. package/build/cjs/meta.js +373 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +44 -0
  11. package/build/es/index.mjs +388 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1121 -0
  14. package/build/es/index.typings.mjs +358 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +1048 -0
  17. package/build/es/meta.mjs +335 -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 +44 -0
  21. package/build/internal/cjs/index.js +423 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +1121 -0
  24. package/build/internal/cjs/index.typings.js +393 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +1048 -0
  27. package/build/internal/cjs/meta.js +373 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +44 -0
  30. package/build/internal/es/index.mjs +388 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +1121 -0
  33. package/build/internal/es/index.typings.mjs +358 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +1048 -0
  36. package/build/internal/es/meta.mjs +335 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,1048 @@
1
+ import { CreateFunctionProductionRequest as CreateFunctionProductionRequest$1, CreateFunctionProductionResponse as CreateFunctionProductionResponse$1, UpdateFunctionProductionRequest as UpdateFunctionProductionRequest$1, UpdateFunctionProductionResponse as UpdateFunctionProductionResponse$1, DeleteFunctionProductionRequest as DeleteFunctionProductionRequest$1, DeleteFunctionProductionResponse as DeleteFunctionProductionResponse$1 } from './index.typings.mjs';
2
+ import '@wix/sdk-types';
3
+
4
+ /** A function production defines a function and its related entities. */
5
+ interface FunctionProduction extends FunctionProductionOptionsOneOf {
6
+ /** Options for creating a function from a function type. */
7
+ blankOptions?: BlankOptions;
8
+ /** Options for creating a function from a function template. */
9
+ templateOptions?: TemplateOptions;
10
+ /**
11
+ * Function production ID. This is the same as the created function's ID.
12
+ * @format GUID
13
+ * @readonly
14
+ */
15
+ id?: string | null;
16
+ /**
17
+ * App ID of the business solution that created the function type the function production is based on.
18
+ * @format GUID
19
+ */
20
+ appId?: string;
21
+ /** Type that the function is created from. */
22
+ type?: FunctionProductionTypeWithLiterals;
23
+ /** Service plugin configuration for the function. */
24
+ functionSpiConfiguration?: FunctionSpiConfiguration;
25
+ /** Function created from the function production. */
26
+ function?: _Function;
27
+ /**
28
+ * Function methods created from the function production.
29
+ * @readonly
30
+ * @maxSize 100
31
+ */
32
+ functionMethods?: FunctionMethod[];
33
+ /**
34
+ * Automations created from the function production.
35
+ * @readonly
36
+ * @maxSize 100
37
+ */
38
+ automations?: Automation[];
39
+ /**
40
+ * Date and time the function production was created.
41
+ * @readonly
42
+ */
43
+ createdDate?: Date | null;
44
+ /**
45
+ * Date and time the function production was last updated.
46
+ * @readonly
47
+ */
48
+ updatedDate?: Date | null;
49
+ }
50
+ /** @oneof */
51
+ interface FunctionProductionOptionsOneOf {
52
+ /** Options for creating a function from a function type. */
53
+ blankOptions?: BlankOptions;
54
+ /** Options for creating a function from a function template. */
55
+ templateOptions?: TemplateOptions;
56
+ }
57
+ declare enum FunctionProductionType {
58
+ /** Unknown function production type. */
59
+ UNKNOWN_FUNCTION_PRODUCTION = "UNKNOWN_FUNCTION_PRODUCTION",
60
+ /** Function created from a function type. */
61
+ BLANK = "BLANK",
62
+ /** Function created from a function template. */
63
+ TEMPLATE = "TEMPLATE"
64
+ }
65
+ /** @enumType */
66
+ type FunctionProductionTypeWithLiterals = FunctionProductionType | 'UNKNOWN_FUNCTION_PRODUCTION' | 'BLANK' | 'TEMPLATE';
67
+ interface BlankOptions {
68
+ /**
69
+ * ID of the function type that the function was created from.
70
+ * @format GUID
71
+ */
72
+ functionExtensionId?: string;
73
+ }
74
+ interface TemplateOptions {
75
+ /**
76
+ * ID of the function template that the function was created from.
77
+ * @format GUID
78
+ */
79
+ functionTemplateExtensionId?: string;
80
+ }
81
+ /** SpiConfiguration is a spi configuration for a specific function. */
82
+ interface FunctionSpiConfiguration {
83
+ /**
84
+ * SpiConfiguration ID.
85
+ * @format GUID
86
+ * @readonly
87
+ */
88
+ id?: string | null;
89
+ /**
90
+ * SpiConfiguration revision.
91
+ * @readonly
92
+ */
93
+ revision?: string | null;
94
+ /**
95
+ * Date and time the SpiConfiguration was created.
96
+ * @readonly
97
+ */
98
+ createdDate?: Date | null;
99
+ /**
100
+ * Date and time the SpiConfiguration was last updated.
101
+ * @readonly
102
+ */
103
+ updatedDate?: Date | null;
104
+ /**
105
+ * Function ID
106
+ * @format GUID
107
+ * @readonly
108
+ */
109
+ functionId?: string | null;
110
+ /** Function SPI configuration dev center component payload. */
111
+ configuration?: Record<string, any> | null;
112
+ }
113
+ interface _Function {
114
+ /**
115
+ * Function ID.
116
+ * @format GUID
117
+ * @readonly
118
+ */
119
+ id?: string | null;
120
+ /**
121
+ * Revision number, which increments by 1 each time the function is updated.
122
+ * To prevent conflicting changes,
123
+ * the current revision must be passed when updating the function.
124
+ *
125
+ * Ignored when creating a function.
126
+ * @readonly
127
+ */
128
+ revision?: string | null;
129
+ /**
130
+ * Date and time the function was created.
131
+ * @readonly
132
+ */
133
+ createdDate?: Date | null;
134
+ /**
135
+ * Date and time the function was last updated.
136
+ * @readonly
137
+ */
138
+ updatedDate?: Date | null;
139
+ /**
140
+ * The function's app extension ID.
141
+ * @readonly
142
+ * @format GUID
143
+ */
144
+ functionExtensionId?: string | null;
145
+ /**
146
+ * Function name.
147
+ * @readonly
148
+ * @maxLength 100
149
+ */
150
+ functionName?: string | null;
151
+ /**
152
+ * Activation status
153
+ * @readonly
154
+ */
155
+ activationStatus?: ActivationStatusWithLiterals;
156
+ /**
157
+ * ID of the app that defines the function.
158
+ * @readonly
159
+ * @format GUID
160
+ */
161
+ appId?: string | null;
162
+ /**
163
+ * The function's app extension name.
164
+ * @readonly
165
+ * @minLength 1
166
+ * @maxLength 100
167
+ */
168
+ functionExtensionName?: string | null;
169
+ /**
170
+ * Function template extension id
171
+ * @readonly
172
+ * @format GUID
173
+ */
174
+ functionTemplateExtensionId?: string | null;
175
+ }
176
+ declare enum ActivationStatus {
177
+ /** Activation status is unknown. */
178
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
179
+ /** Function is activated. */
180
+ ACTIVE = "ACTIVE",
181
+ /** Function is deactivated. */
182
+ INACTIVE = "INACTIVE",
183
+ /** Function is saved but has never been activated. */
184
+ DRAFT = "DRAFT"
185
+ }
186
+ /** @enumType */
187
+ type ActivationStatusWithLiterals = ActivationStatus | 'UNKNOWN_STATUS' | 'ACTIVE' | 'INACTIVE' | 'DRAFT';
188
+ /** A function method is a link between a function and an automation, which defines the logic that runs when a function is triggered. */
189
+ interface FunctionMethod {
190
+ /**
191
+ * Function method ID.
192
+ * @format GUID
193
+ * @readonly
194
+ */
195
+ id?: string | null;
196
+ /**
197
+ * Function method revision.
198
+ * @readonly
199
+ */
200
+ revision?: string | null;
201
+ /**
202
+ * Date and time the function method was created.
203
+ * @readonly
204
+ */
205
+ createdDate?: Date | null;
206
+ /**
207
+ * Date and time the function method was last updated.
208
+ * @readonly
209
+ */
210
+ updatedDate?: Date | null;
211
+ /**
212
+ * ID of the automation to link to the function.
213
+ * @format GUID
214
+ */
215
+ automationId?: string;
216
+ /**
217
+ * ID of the function that this method links to an automation.
218
+ * @format GUID
219
+ */
220
+ functionId?: string;
221
+ /**
222
+ * Display name for the function method.
223
+ * @maxLength 160
224
+ */
225
+ methodName?: string;
226
+ }
227
+ interface Automation extends AutomationOriginInfoOneOf {
228
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
229
+ applicationInfo?: ApplicationOrigin;
230
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
231
+ preinstalledInfo?: PreinstalledOrigin;
232
+ /**
233
+ * Automation ID.
234
+ * @format GUID
235
+ * @readonly
236
+ */
237
+ id?: string | null;
238
+ /**
239
+ * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.
240
+ * @readonly
241
+ */
242
+ revision?: string | null;
243
+ /**
244
+ * Who created the automation.
245
+ * @immutable
246
+ * @readonly
247
+ */
248
+ createdBy?: AuditInfo;
249
+ /**
250
+ * When the automation was created.
251
+ * @readonly
252
+ */
253
+ createdDate?: Date | null;
254
+ /**
255
+ * Who last updated the automation.
256
+ * @readonly
257
+ */
258
+ updatedBy?: AuditInfo;
259
+ /**
260
+ * When the automation was last updated.
261
+ * @readonly
262
+ */
263
+ updatedDate?: Date | null;
264
+ /**
265
+ * Automation name as displayed on the user's site.
266
+ * @minLength 1
267
+ * @maxLength 500
268
+ */
269
+ name?: string;
270
+ /**
271
+ * Automation description.
272
+ * @maxLength 2000
273
+ */
274
+ description?: string | null;
275
+ /** Automation configuration. */
276
+ configuration?: AutomationConfiguration;
277
+ /**
278
+ * How the automation was added to the user's site.
279
+ * @immutable
280
+ */
281
+ origin?: OriginWithLiterals;
282
+ /** Automation settings. */
283
+ settings?: AutomationSettings;
284
+ /**
285
+ * When the automation is a draft, the draft details.
286
+ * @readonly
287
+ */
288
+ draftInfo?: DraftInfo;
289
+ /**
290
+ * Whether the automation is archived.
291
+ *
292
+ * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.
293
+ */
294
+ archived?: boolean;
295
+ /** Auto archive policy */
296
+ autoArchivePolicy?: AutoArchivePolicy;
297
+ }
298
+ /** @oneof */
299
+ interface AutomationOriginInfoOneOf {
300
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
301
+ applicationInfo?: ApplicationOrigin;
302
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
303
+ preinstalledInfo?: PreinstalledOrigin;
304
+ }
305
+ interface AIMetadata {
306
+ }
307
+ interface ActionSettings {
308
+ /**
309
+ * Permanent actions. PermanentAction's skipActionExpression cannot be modified.
310
+ *
311
+ * When empty, all actions can be set as skipped
312
+ * @maxSize 30
313
+ * @format GUID
314
+ */
315
+ permanentActionIds?: string[];
316
+ /**
317
+ * Read-only actions. Read-only actions cannot be edited.
318
+ *
319
+ * When empty, all actions are editable.
320
+ * @maxSize 30
321
+ * @format GUID
322
+ */
323
+ readonlyActionIds?: string[];
324
+ /**
325
+ * Whether to disable the ability to add a delay to the automation.
326
+ *
327
+ * Default: `false`.
328
+ */
329
+ disableDelayAddition?: boolean;
330
+ /**
331
+ * Whether to disable the ability to add a condition to the automation.
332
+ *
333
+ * Default: `false`.
334
+ */
335
+ disableConditionAddition?: boolean;
336
+ }
337
+ declare enum Domain {
338
+ /** User domain (default). */
339
+ USER = "USER",
340
+ /** Wix domain. */
341
+ WIX = "WIX",
342
+ /** Wix account-level domain. */
343
+ WIX_ACCOUNT = "WIX_ACCOUNT"
344
+ }
345
+ /** @enumType */
346
+ type DomainWithLiterals = Domain | 'USER' | 'WIX' | 'WIX_ACCOUNT';
347
+ interface Enrichment {
348
+ /**
349
+ * Enrichment input mappings.
350
+ * @maxSize 2
351
+ */
352
+ inputMappings?: Record<string, any>[] | null;
353
+ }
354
+ interface AuditInfo extends AuditInfoIdOneOf {
355
+ /**
356
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
357
+ * @format GUID
358
+ */
359
+ userId?: string;
360
+ /**
361
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
362
+ *
363
+ * 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.
364
+ * @format GUID
365
+ */
366
+ appId?: string;
367
+ }
368
+ /** @oneof */
369
+ interface AuditInfoIdOneOf {
370
+ /**
371
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
372
+ * @format GUID
373
+ */
374
+ userId?: string;
375
+ /**
376
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
377
+ *
378
+ * 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.
379
+ * @format GUID
380
+ */
381
+ appId?: string;
382
+ }
383
+ interface AutomationConfiguration {
384
+ /** Status of the automation on the site. */
385
+ status?: StatusWithLiterals;
386
+ /** Trigger configuration. */
387
+ trigger?: Trigger;
388
+ /**
389
+ * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.
390
+ *
391
+ * > **Note**: You can currently only specify 1 root action.
392
+ * @maxSize 20
393
+ * @format GUID
394
+ */
395
+ rootActionIds?: string[];
396
+ /** 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. */
397
+ actions?: Record<string, Action>;
398
+ }
399
+ declare enum TimeUnit {
400
+ UNKNOWN_TIME_UNIT = "UNKNOWN_TIME_UNIT",
401
+ /** Minutes. */
402
+ MINUTES = "MINUTES",
403
+ /** Hours. */
404
+ HOURS = "HOURS",
405
+ /** Days. */
406
+ DAYS = "DAYS",
407
+ /** Weeks. */
408
+ WEEKS = "WEEKS",
409
+ /** Months. */
410
+ MONTHS = "MONTHS"
411
+ }
412
+ /** @enumType */
413
+ type TimeUnitWithLiterals = TimeUnit | 'UNKNOWN_TIME_UNIT' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS';
414
+ interface Filter {
415
+ /**
416
+ * Filter ID.
417
+ * @format GUID
418
+ */
419
+ id?: string;
420
+ /**
421
+ * Field key.
422
+ *
423
+ * 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).
424
+ * @minLength 1
425
+ * @maxLength 110
426
+ */
427
+ fieldKey?: string;
428
+ /**
429
+ * Filter expression.
430
+ *
431
+ * For the automation to run, the expression must evaluate to `true`.
432
+ * @maxLength 2500
433
+ */
434
+ filterExpression?: string;
435
+ }
436
+ interface FutureDateActivationOffset {
437
+ /**
438
+ * Amount of time before the trigger to run the automation.
439
+ *
440
+ * > **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).
441
+ * @maxLength 1000
442
+ */
443
+ preScheduledEventOffsetExpression?: string;
444
+ /** Unit in which to set the action offset. */
445
+ scheduledEventOffsetTimeUnit?: TimeUnitWithLiterals;
446
+ }
447
+ interface RateLimit {
448
+ /**
449
+ * Maximum number of times the trigger can be activated.
450
+ * @maxLength 1000
451
+ */
452
+ maxActivationsExpression?: string;
453
+ /**
454
+ * Duration of the rate limit. The rate limit applies for the specified duration and then expires.
455
+ *
456
+ * When empty, the rate limit does not expire.
457
+ * @maxLength 1000
458
+ */
459
+ durationExpression?: string | null;
460
+ /** Unit in which to set the duration of the rate limit. */
461
+ durationTimeUnit?: TimeUnitWithLiterals;
462
+ /**
463
+ * Activation identifier used to count the number of activations.
464
+ * @minLength 1
465
+ * @maxLength 400
466
+ */
467
+ uniqueIdentifierExpression?: string | null;
468
+ }
469
+ interface FilterValueSelection {
470
+ /**
471
+ * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.
472
+ * @maxLength 80
473
+ * @maxSize 50
474
+ */
475
+ selectedFilterValues?: string[];
476
+ }
477
+ interface ConditionExpressionGroup {
478
+ /** Logical operator used to evaluate the condition expressions. */
479
+ operator?: OperatorWithLiterals;
480
+ /**
481
+ * Expressions evaluated using the selected operator.
482
+ * @minSize 1
483
+ * @maxSize 20
484
+ * @maxLength 2500
485
+ */
486
+ booleanExpressions?: string[];
487
+ }
488
+ declare enum Operator {
489
+ /** Unknown. */
490
+ UNKNOWN_OPERATOR = "UNKNOWN_OPERATOR",
491
+ /** `OR` operator. */
492
+ OR = "OR",
493
+ /** `AND` operator. */
494
+ AND = "AND"
495
+ }
496
+ /** @enumType */
497
+ type OperatorWithLiterals = Operator | 'UNKNOWN_OPERATOR' | 'OR' | 'AND';
498
+ interface CodeSnippet {
499
+ /** Logical operator used to evaluate the condition expressions. */
500
+ language?: LanguageWithLiterals;
501
+ /**
502
+ * Expressions evaluated using the selected operator. this code should comply the language syntax. and format
503
+ * @maxLength 1000
504
+ */
505
+ code?: string;
506
+ }
507
+ declare enum Language {
508
+ /** Unknown. */
509
+ UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
510
+ /** JavaScript. */
511
+ JAVASCRIPT = "JAVASCRIPT"
512
+ }
513
+ /** @enumType */
514
+ type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';
515
+ /** Path definition */
516
+ interface Path {
517
+ /**
518
+ * Unique path ID.
519
+ * @format GUID
520
+ */
521
+ id?: string;
522
+ /**
523
+ * Path display name.
524
+ * @minLength 1
525
+ * @maxLength 100
526
+ */
527
+ name?: string;
528
+ /**
529
+ * ID of the action to run when this path is taken.
530
+ * @format GUID
531
+ */
532
+ postActionId?: string | null;
533
+ }
534
+ declare enum Type {
535
+ /** Based on the trigger. */
536
+ UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
537
+ /** 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. */
538
+ APP_DEFINED = "APP_DEFINED",
539
+ /** Condition. This determines which action runs next. */
540
+ CONDITION = "CONDITION",
541
+ /** Delay. The automation must wait before executing the next step. */
542
+ DELAY = "DELAY",
543
+ /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
544
+ RATE_LIMIT = "RATE_LIMIT"
545
+ }
546
+ /** @enumType */
547
+ type TypeWithLiterals = Type | 'UNKNOWN_ACTION_TYPE' | 'APP_DEFINED' | 'CONDITION' | 'DELAY' | 'RATE_LIMIT';
548
+ interface AppDefinedAction {
549
+ /**
550
+ * ID of the app that defines the action.
551
+ * @format GUID
552
+ */
553
+ appId?: string;
554
+ /**
555
+ * Action key.
556
+ * @minLength 1
557
+ * @maxLength 100
558
+ */
559
+ actionKey?: string;
560
+ /**
561
+ * 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).
562
+ *
563
+ * 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.
564
+ */
565
+ inputMapping?: Record<string, any> | null;
566
+ /**
567
+ * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
568
+ *
569
+ * > **Note**: Actions that follow a skipped action still run.
570
+ * @maxSize 10
571
+ * @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
572
+ *
573
+ * > **Note**: Actions that follow a skipped action still run.
574
+ * @replacedBy skip_expression
575
+ * @targetRemovalDate 2026-02-01
576
+ */
577
+ skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
578
+ /**
579
+ * IDs of actions that run in parallel after the action completes.
580
+ * @maxSize 1
581
+ * @format GUID
582
+ */
583
+ postActionIds?: string[];
584
+ /** Action output schema. When specified, this replaces the action schema. */
585
+ overrideOutputSchema?: Record<string, any> | null;
586
+ }
587
+ interface ConditionAction {
588
+ /**
589
+ * Condition is `true` if one or more of the expression groups evaluates to `true`.
590
+ * @minSize 1
591
+ * @maxSize 10
592
+ */
593
+ orExpressionGroups?: ConditionExpressionGroup[];
594
+ /**
595
+ * IDs of actions to run when the condition evaluates to `true`.
596
+ * @maxSize 1
597
+ * @format GUID
598
+ */
599
+ truePostActionIds?: string[];
600
+ /**
601
+ * IDs of actions to run when the condition evaluates to `false`.
602
+ * @maxSize 1
603
+ * @format GUID
604
+ */
605
+ falsePostActionIds?: string[];
606
+ }
607
+ interface CodeConditionAction {
608
+ /** 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. */
609
+ snippet?: CodeSnippet;
610
+ /**
611
+ * IDs of actions to run when the condition evaluates to `true`.
612
+ * @maxSize 1
613
+ * @format GUID
614
+ */
615
+ truePostActionIds?: string[];
616
+ /**
617
+ * IDs of actions to run when the condition evaluates to `false`.
618
+ * @maxSize 1
619
+ * @format GUID
620
+ */
621
+ falsePostActionIds?: string[];
622
+ }
623
+ interface DelayAction {
624
+ /**
625
+ * Time to wait before running the action. The wait time starts from when the current action completes.
626
+ *
627
+ * > **Note**: To define the wait time from a specific moment in time, use `dueDateExpression`.
628
+ * @maxLength 1000
629
+ */
630
+ offsetExpression?: string | null;
631
+ /** Unit in which to set the wait time to wait before the action runs. */
632
+ offsetTimeUnit?: TimeUnitWithLiterals;
633
+ /**
634
+ * Action run date in milliseconds elapsed since January 1, 1970 UTC.
635
+ *
636
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
637
+ * @maxLength 1000
638
+ * @deprecated Action run date in milliseconds elapsed since January 1, 1970 UTC.
639
+ *
640
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
641
+ * @replacedBy due_date_expression
642
+ * @targetRemovalDate 2026-02-01
643
+ */
644
+ dueDateEpochExpression?: string | null;
645
+ /**
646
+ * Action run date as a timestamp or DateTime expression using bracket notation.
647
+ *
648
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
649
+ * @maxLength 1000
650
+ */
651
+ dueDateExpression?: string | null;
652
+ /**
653
+ * IDs of actions to run in parallel after the time delay.
654
+ * @maxSize 1
655
+ * @format GUID
656
+ */
657
+ postActionIds?: string[];
658
+ }
659
+ interface RateLimitAction {
660
+ /**
661
+ * Maximum number of times the action can run.
662
+ * @maxLength 1000
663
+ */
664
+ maxActivationsExpression?: string;
665
+ /**
666
+ * Rate limit duration.
667
+ *
668
+ * When empty, the rate limit does not expire.
669
+ * @maxLength 1000
670
+ */
671
+ rateLimitDurationExpression?: string | null;
672
+ /** Unit in which to set the duration of the rate limit. */
673
+ rateLimitDurationTimeUnit?: TimeUnitWithLiterals;
674
+ /**
675
+ * Unique identifier of each activation by which rate limiter counts activations.
676
+ * @minLength 1
677
+ * @maxLength 400
678
+ */
679
+ uniqueIdentifierExpression?: string | null;
680
+ /**
681
+ * IDs of actions to run in parallel after the action completes.
682
+ * @maxSize 1
683
+ * @format GUID
684
+ */
685
+ postActionIds?: string[];
686
+ }
687
+ interface SetVariablesAction {
688
+ /** Output mapping. For example: `{"someField": "{{10}}", "someOtherField": "{{multiply( var('account.points.balance') ;2 )}}" }`. */
689
+ outputMapping?: Record<string, any> | null;
690
+ /**
691
+ * Output JSON schema representation.
692
+ *
693
+ * > **Note**: To minimize request size, you can also specify a string.
694
+ */
695
+ outputSchema?: Record<string, any> | null;
696
+ /**
697
+ * IDs of actions to run in parallel after variable initialization.
698
+ * @maxSize 1
699
+ * @format GUID
700
+ */
701
+ postActionIds?: string[];
702
+ }
703
+ interface OutputAction {
704
+ /** Output action output mapping. */
705
+ outputMapping?: Record<string, any> | null;
706
+ }
707
+ interface SplitAction {
708
+ /**
709
+ * List of paths to split execution into.
710
+ * @minSize 2
711
+ * @maxSize 10
712
+ */
713
+ paths?: Path[];
714
+ }
715
+ declare enum Status {
716
+ /** Unknown. */
717
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
718
+ /** Active. Active automations can be triggered. */
719
+ ACTIVE = "ACTIVE",
720
+ /** Inactive. Inactive automations cannot be triggered. */
721
+ INACTIVE = "INACTIVE"
722
+ }
723
+ /** @enumType */
724
+ type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'ACTIVE' | 'INACTIVE';
725
+ interface Trigger {
726
+ /**
727
+ * ID of the app that defines the trigger.
728
+ * @format GUID
729
+ */
730
+ appId?: string;
731
+ /**
732
+ * Trigger key.
733
+ *
734
+ * 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).
735
+ * @minLength 1
736
+ * @maxLength 100
737
+ */
738
+ triggerKey?: string;
739
+ /**
740
+ * Schema field filters. All filter conditions must be met for the automation to run.
741
+ *
742
+ * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#filters).
743
+ * @maxSize 5
744
+ */
745
+ filters?: Filter[];
746
+ /**
747
+ * Automation offset. You can schedule automations to run before the trigger occurs.
748
+ *
749
+ * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).
750
+ */
751
+ scheduledEventOffset?: FutureDateActivationOffset;
752
+ /** Limit on the number of times an automation can be triggered. */
753
+ rateLimit?: RateLimit;
754
+ /** Trigger schema override. When specified, this replaces the trigger schema. */
755
+ overrideSchema?: Record<string, any> | null;
756
+ }
757
+ interface Action extends ActionInfoOneOf {
758
+ /** Details of the action when its `type` is `APP_DEFINED`. */
759
+ appDefinedInfo?: AppDefinedAction;
760
+ /** Details of the action when its `type` is `CONDITION`. */
761
+ conditionInfo?: ConditionAction;
762
+ /** Details of the action when its `type` is `CODE_CONDITION`. */
763
+ codeConditionInfo?: CodeConditionAction;
764
+ /** Details of the action when its `type` is `DELAY`. */
765
+ delayInfo?: DelayAction;
766
+ /** Details of the action when its `type` is `RATE_LIMIT`. */
767
+ rateLimitInfo?: RateLimitAction;
768
+ /**
769
+ * Action ID.
770
+ *
771
+ * Unique identifier for the action instance in the current automation. Use this to refer to this action in the automation flow.
772
+ *
773
+ * If not specified, automatically generated by Wix.
774
+ * @format GUID
775
+ */
776
+ id?: string | null;
777
+ /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#action-type). */
778
+ type?: TypeWithLiterals;
779
+ /**
780
+ * Editable display name for the action.
781
+ * @minLength 1
782
+ * @maxLength 60
783
+ */
784
+ displayName?: string | null;
785
+ /**
786
+ * [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.
787
+ *
788
+ * 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.
789
+ * @minLength 1
790
+ * @maxLength 100
791
+ */
792
+ namespace?: string | null;
793
+ /**
794
+ * Evaluated to boolean to decide whether the action is skipped.
795
+ * For ConditionAction: if skipped, true_post_action_ids execute; false_post_action_ids are skipped
796
+ * SplitAction and OutputAction do not support skip_action_expression
797
+ * @maxLength 1000
798
+ */
799
+ skipActionExpression?: string | null;
800
+ }
801
+ /** @oneof */
802
+ interface ActionInfoOneOf {
803
+ /** Details of the action when its `type` is `APP_DEFINED`. */
804
+ appDefinedInfo?: AppDefinedAction;
805
+ /** Details of the action when its `type` is `CONDITION`. */
806
+ conditionInfo?: ConditionAction;
807
+ /** Details of the action when its `type` is `CODE_CONDITION`. */
808
+ codeConditionInfo?: CodeConditionAction;
809
+ /** Details of the action when its `type` is `DELAY`. */
810
+ delayInfo?: DelayAction;
811
+ /** Details of the action when its `type` is `RATE_LIMIT`. */
812
+ rateLimitInfo?: RateLimitAction;
813
+ }
814
+ interface FilterableAppDefinedActions {
815
+ /**
816
+ * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.
817
+ * @minSize 1
818
+ * @maxSize 100
819
+ * @minLength 1
820
+ * @maxLength 150
821
+ */
822
+ actionIdentifiers?: string[];
823
+ }
824
+ declare enum Origin {
825
+ /** Default value. */
826
+ UNKNOWN_ORIGIN = "UNKNOWN_ORIGIN",
827
+ /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
828
+ USER = "USER",
829
+ /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */
830
+ APPLICATION = "APPLICATION",
831
+ /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */
832
+ PREINSTALLED = "PREINSTALLED"
833
+ }
834
+ /** @enumType */
835
+ type OriginWithLiterals = Origin | 'UNKNOWN_ORIGIN' | 'USER' | 'APPLICATION' | 'PREINSTALLED';
836
+ interface ApplicationOrigin {
837
+ /**
838
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
839
+ *
840
+ * 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.
841
+ * @format GUID
842
+ */
843
+ appId?: string;
844
+ }
845
+ interface PreinstalledOrigin {
846
+ /**
847
+ * 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).
848
+ * @format GUID
849
+ */
850
+ appId?: string;
851
+ /**
852
+ * Whether the automation is an override.
853
+ *
854
+ * 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.
855
+ *
856
+ * > **Note**: An override automation can no longer be updated by the app that originally installed it.
857
+ * >
858
+ * > 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.
859
+ *
860
+ * Default: `false`.
861
+ * @immutable
862
+ * @readonly
863
+ */
864
+ override?: boolean | null;
865
+ }
866
+ interface AutomationSettings {
867
+ /**
868
+ * Whether the automation is hidden from users.
869
+ *
870
+ * Default: `false`
871
+ */
872
+ hidden?: boolean;
873
+ /**
874
+ * Whether the automation is read-only.
875
+ *
876
+ * Default: `false`
877
+ */
878
+ readonly?: boolean;
879
+ /**
880
+ * Whether to disable the option to delete the automation from the site.
881
+ *
882
+ * Default: `false`.
883
+ */
884
+ disableDelete?: boolean;
885
+ /**
886
+ * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.
887
+ *
888
+ * Default: `false`.
889
+ */
890
+ disableStatusChange?: boolean;
891
+ /** Automation action settings. */
892
+ actionSettings?: ActionSettings;
893
+ }
894
+ interface DraftInfo {
895
+ /**
896
+ * ID of the original automation.
897
+ * @format GUID
898
+ * @readonly
899
+ */
900
+ originalAutomationId?: string | null;
901
+ }
902
+ interface Enrichments {
903
+ /** Whether the studio site enrichment is wanted. */
904
+ studioSite?: Enrichment;
905
+ }
906
+ interface ExtendedFields {
907
+ /**
908
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
909
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
910
+ *
911
+ * You can only access fields for which you have the appropriate permissions.
912
+ *
913
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
914
+ */
915
+ namespaces?: Record<string, Record<string, any>>;
916
+ }
917
+ interface AutoArchivePolicy {
918
+ /**
919
+ * Date when to archive the automation
920
+ * If this date in the past, nothing will happen (automation will not go into archived state)
921
+ * If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE
922
+ * After this date the automation may be unarchived and archived again, this date will have no influence
923
+ */
924
+ archiveDate?: Date | null;
925
+ }
926
+ interface Notes {
927
+ }
928
+ interface Note {
929
+ }
930
+ interface Position {
931
+ }
932
+ interface Offset {
933
+ }
934
+ interface Dimensions {
935
+ }
936
+ /** Creation of function production */
937
+ interface CreateFunctionProductionRequest {
938
+ /** Function production to create. */
939
+ functionProduction: FunctionProduction;
940
+ }
941
+ interface CreateFunctionProductionResponse {
942
+ /** The created function production. */
943
+ functionProduction?: FunctionProduction;
944
+ }
945
+ /** Update of function production */
946
+ interface UpdateFunctionProductionRequest {
947
+ /** Function production to update. */
948
+ functionProduction: FunctionProduction;
949
+ }
950
+ interface UpdateFunctionProductionResponse {
951
+ /** Updated function production. */
952
+ functionProduction?: FunctionProduction;
953
+ }
954
+ interface DeleteFunctionProductionRequest {
955
+ /**
956
+ * ID of the function production to delete.
957
+ * @format GUID
958
+ */
959
+ functionProductionId: string;
960
+ }
961
+ interface DeleteFunctionProductionResponse {
962
+ }
963
+ interface DomainEvent extends DomainEventBodyOneOf {
964
+ createdEvent?: EntityCreatedEvent;
965
+ updatedEvent?: EntityUpdatedEvent;
966
+ deletedEvent?: EntityDeletedEvent;
967
+ actionEvent?: ActionEvent;
968
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
969
+ id?: string;
970
+ /**
971
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
972
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
973
+ */
974
+ entityFqdn?: string;
975
+ /**
976
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
977
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
978
+ */
979
+ slug?: string;
980
+ /** ID of the entity associated with the event. */
981
+ entityId?: string;
982
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
983
+ eventTime?: Date | null;
984
+ /**
985
+ * Whether the event was triggered as a result of a privacy regulation application
986
+ * (for example, GDPR).
987
+ */
988
+ triggeredByAnonymizeRequest?: boolean | null;
989
+ /** If present, indicates the action that triggered the event. */
990
+ originatedFrom?: string | null;
991
+ /**
992
+ * 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.
993
+ * 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.
994
+ */
995
+ entityEventSequence?: string | null;
996
+ }
997
+ /** @oneof */
998
+ interface DomainEventBodyOneOf {
999
+ createdEvent?: EntityCreatedEvent;
1000
+ updatedEvent?: EntityUpdatedEvent;
1001
+ deletedEvent?: EntityDeletedEvent;
1002
+ actionEvent?: ActionEvent;
1003
+ }
1004
+ interface EntityCreatedEvent {
1005
+ entityAsJson?: string;
1006
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
1007
+ restoreInfo?: RestoreInfo;
1008
+ }
1009
+ interface RestoreInfo {
1010
+ deletedDate?: Date | null;
1011
+ }
1012
+ interface EntityUpdatedEvent {
1013
+ /**
1014
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1015
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1016
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1017
+ */
1018
+ currentEntityAsJson?: string;
1019
+ }
1020
+ interface EntityDeletedEvent {
1021
+ /** Entity that was deleted. */
1022
+ deletedEntityAsJson?: string | null;
1023
+ }
1024
+ interface ActionEvent {
1025
+ bodyAsJson?: string;
1026
+ }
1027
+ interface Empty {
1028
+ }
1029
+
1030
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1031
+ getUrl: (context: any) => string;
1032
+ httpMethod: K;
1033
+ path: string;
1034
+ pathParams: M;
1035
+ __requestType: T;
1036
+ __originalRequestType: S;
1037
+ __responseType: Q;
1038
+ __originalResponseType: R;
1039
+ };
1040
+ declare function createFunctionProduction(): __PublicMethodMetaInfo<'POST', {}, CreateFunctionProductionRequest$1, CreateFunctionProductionRequest, CreateFunctionProductionResponse$1, CreateFunctionProductionResponse>;
1041
+ declare function updateFunctionProduction(): __PublicMethodMetaInfo<'PATCH', {
1042
+ functionProductionId: string;
1043
+ }, UpdateFunctionProductionRequest$1, UpdateFunctionProductionRequest, UpdateFunctionProductionResponse$1, UpdateFunctionProductionResponse>;
1044
+ declare function deleteFunctionProduction(): __PublicMethodMetaInfo<'DELETE', {
1045
+ functionProductionId: string;
1046
+ }, DeleteFunctionProductionRequest$1, DeleteFunctionProductionRequest, DeleteFunctionProductionResponse$1, DeleteFunctionProductionResponse>;
1047
+
1048
+ export { type AIMetadata as AIMetadataOriginal, type ActionEvent as ActionEventOriginal, type ActionInfoOneOf as ActionInfoOneOfOriginal, type Action as ActionOriginal, type ActionSettings as ActionSettingsOriginal, ActivationStatus as ActivationStatusOriginal, type ActivationStatusWithLiterals as ActivationStatusWithLiteralsOriginal, 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 BlankOptions as BlankOptionsOriginal, type CodeConditionAction as CodeConditionActionOriginal, type CodeSnippet as CodeSnippetOriginal, type ConditionAction as ConditionActionOriginal, type ConditionExpressionGroup as ConditionExpressionGroupOriginal, type CreateFunctionProductionRequest as CreateFunctionProductionRequestOriginal, type CreateFunctionProductionResponse as CreateFunctionProductionResponseOriginal, type DelayAction as DelayActionOriginal, type DeleteFunctionProductionRequest as DeleteFunctionProductionRequestOriginal, type DeleteFunctionProductionResponse as DeleteFunctionProductionResponseOriginal, type Dimensions as DimensionsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, Domain as DomainOriginal, type DomainWithLiterals as DomainWithLiteralsOriginal, type DraftInfo as DraftInfoOriginal, type Empty as EmptyOriginal, 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 FunctionMethod as FunctionMethodOriginal, type FunctionProductionOptionsOneOf as FunctionProductionOptionsOneOfOriginal, type FunctionProduction as FunctionProductionOriginal, FunctionProductionType as FunctionProductionTypeOriginal, type FunctionProductionTypeWithLiterals as FunctionProductionTypeWithLiteralsOriginal, type FunctionSpiConfiguration as FunctionSpiConfigurationOriginal, type FutureDateActivationOffset as FutureDateActivationOffsetOriginal, Language as LanguageOriginal, type LanguageWithLiterals as LanguageWithLiteralsOriginal, 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 Path as PathOriginal, type Position as PositionOriginal, type PreinstalledOrigin as PreinstalledOriginOriginal, type RateLimitAction as RateLimitActionOriginal, type RateLimit as RateLimitOriginal, type RestoreInfo as RestoreInfoOriginal, type SetVariablesAction as SetVariablesActionOriginal, type SplitAction as SplitActionOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type TemplateOptions as TemplateOptionsOriginal, TimeUnit as TimeUnitOriginal, type TimeUnitWithLiterals as TimeUnitWithLiteralsOriginal, type Trigger as TriggerOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, type UpdateFunctionProductionRequest as UpdateFunctionProductionRequestOriginal, type UpdateFunctionProductionResponse as UpdateFunctionProductionResponseOriginal, type _Function as _FunctionOriginal, type __PublicMethodMetaInfo, createFunctionProduction, deleteFunctionProduction, updateFunctionProduction };