@wix/auto_sdk_automations_activation-log 1.0.1 → 1.0.3

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 (57) hide show
  1. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.context.d.ts +2 -2
  2. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.context.js +2 -1
  3. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.context.js.map +1 -1
  4. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.meta.d.ts +3 -3
  5. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.meta.js.map +1 -1
  6. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.public.d.ts +5 -5
  7. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.public.js +2 -1
  8. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.public.js.map +1 -1
  9. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.types.d.ts +239 -209
  10. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.types.js +30 -19
  11. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.types.js.map +1 -1
  12. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.universal.d.ts +256 -212
  13. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.universal.js +37 -19
  14. package/build/cjs/src/automations-activation-logs-v1-activation-log-activation-log.universal.js.map +1 -1
  15. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.context.d.ts +2 -2
  16. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.context.js +1 -1
  17. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.context.js.map +1 -1
  18. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.meta.d.ts +3 -3
  19. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.meta.js.map +1 -1
  20. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.public.d.ts +5 -5
  21. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.public.js +1 -1
  22. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.public.js.map +1 -1
  23. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.types.d.ts +239 -209
  24. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.types.js +29 -18
  25. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.types.js.map +1 -1
  26. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.universal.d.ts +256 -212
  27. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.universal.js +36 -18
  28. package/build/es/src/automations-activation-logs-v1-activation-log-activation-log.universal.js.map +1 -1
  29. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.context.d.ts +2 -2
  30. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.context.js +2 -1
  31. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.context.js.map +1 -1
  32. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.meta.d.ts +3 -3
  33. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.meta.js.map +1 -1
  34. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.public.d.ts +5 -5
  35. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.public.js +2 -1
  36. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.public.js.map +1 -1
  37. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.types.d.ts +239 -209
  38. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.types.js +30 -19
  39. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.types.js.map +1 -1
  40. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.universal.d.ts +256 -212
  41. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.universal.js +37 -19
  42. package/build/internal/cjs/src/automations-activation-logs-v1-activation-log-activation-log.universal.js.map +1 -1
  43. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.context.d.ts +2 -2
  44. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.context.js +1 -1
  45. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.context.js.map +1 -1
  46. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.meta.d.ts +3 -3
  47. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.meta.js.map +1 -1
  48. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.public.d.ts +5 -5
  49. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.public.js +1 -1
  50. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.public.js.map +1 -1
  51. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.types.d.ts +239 -209
  52. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.types.js +29 -18
  53. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.types.js.map +1 -1
  54. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.universal.d.ts +256 -212
  55. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.universal.js +36 -18
  56. package/build/internal/es/src/automations-activation-logs-v1-activation-log-activation-log.universal.js.map +1 -1
  57. package/package.json +4 -4
@@ -235,25 +235,21 @@ export interface DomainEvent extends DomainEventBodyOneOf {
235
235
  updatedEvent?: EntityUpdatedEvent;
236
236
  deletedEvent?: EntityDeletedEvent;
237
237
  actionEvent?: ActionEvent;
238
- /**
239
- * Unique event ID.
240
- * Allows clients to ignore duplicate webhooks.
241
- */
238
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
242
239
  id?: string;
243
240
  /**
244
- * Assumes actions are also always typed to an entity_type
245
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
241
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
242
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
246
243
  */
247
244
  entityFqdn?: string;
248
245
  /**
249
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
250
- * This is although the created/updated/deleted notion is duplication of the oneof types
251
- * Example: created/updated/deleted/started/completed/email_opened
246
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
247
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
252
248
  */
253
249
  slug?: string;
254
250
  /** ID of the entity associated with the event. */
255
251
  entityId?: string;
256
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
252
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
257
253
  eventTime?: Date | null;
258
254
  /**
259
255
  * Whether the event was triggered as a result of a privacy regulation application
@@ -263,12 +259,8 @@ export interface DomainEvent extends DomainEventBodyOneOf {
263
259
  /** If present, indicates the action that triggered the event. */
264
260
  originatedFrom?: string | null;
265
261
  /**
266
- * A sequence number defining the order of updates to the underlying entity.
267
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
268
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
269
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
270
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
271
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
262
+ * 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.
263
+ * 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.
272
264
  */
273
265
  entityEventSequence?: string | null;
274
266
  }
@@ -296,7 +288,7 @@ export interface EntityUpdatedEvent {
296
288
  currentEntityAsJson?: string;
297
289
  }
298
290
  export interface EntityDeletedEvent {
299
- /** Entity that was deleted */
291
+ /** Entity that was deleted. */
300
292
  deletedEntityAsJson?: string | null;
301
293
  }
302
294
  export interface ActionEvent {
@@ -314,9 +306,9 @@ export interface ActivationContinuedAfterSchedule {
314
306
  automation?: Automation;
315
307
  }
316
308
  export interface Automation extends AutomationOriginInfoOneOf {
317
- /** Application info */
309
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
318
310
  applicationInfo?: ApplicationOrigin;
319
- /** Preinstalled info */
311
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
320
312
  preinstalledInfo?: PreinstalledOrigin;
321
313
  /**
322
314
  * Automation ID.
@@ -325,37 +317,33 @@ export interface Automation extends AutomationOriginInfoOneOf {
325
317
  */
326
318
  id?: string | null;
327
319
  /**
328
- * Revision number, which increments by 1 each time the automation is updated.
329
- * To prevent conflicting changes,
330
- * the current revision must be passed when updating the automation.
331
- *
332
- * Ignored when creating an automation.
320
+ * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.
333
321
  * @readonly
334
322
  */
335
323
  revision?: string | null;
336
324
  /**
337
- * Information about the creator of the automation.
325
+ * Who created the automation.
338
326
  * @immutable
339
327
  * @readonly
340
328
  */
341
329
  createdBy?: AuditInfo;
342
330
  /**
343
- * Date and time the automation was created.
331
+ * When the automation was created.
344
332
  * @readonly
345
333
  */
346
334
  createdDate?: Date | null;
347
335
  /**
348
- * The entity that last updated the automation.
336
+ * Who last updated the automation.
349
337
  * @readonly
350
338
  */
351
339
  updatedBy?: AuditInfo;
352
340
  /**
353
- * Date and time the automation was last updated.
341
+ * When the automation was last updated.
354
342
  * @readonly
355
343
  */
356
344
  updatedDate?: Date | null;
357
345
  /**
358
- * Automation name that is displayed on the user's site.
346
+ * Automation name as displayed on the user's site.
359
347
  * @minLength 1
360
348
  * @maxLength 500
361
349
  */
@@ -365,60 +353,71 @@ export interface Automation extends AutomationOriginInfoOneOf {
365
353
  * @maxLength 2000
366
354
  */
367
355
  description?: string | null;
368
- /** Object that defines the automation's trigger, actions, and activation status. */
356
+ /** Automation configuration. */
369
357
  configuration?: AutomationConfiguration;
370
358
  /**
371
- * Defines how the automation was added to the site.
359
+ * How the automation was added to the user's site.
372
360
  * @immutable
373
361
  */
374
362
  origin?: Origin;
375
363
  /** Automation settings. */
376
364
  settings?: AutomationSettings;
377
365
  /**
378
- * Draft info (optional - only if the automation is a draft)
366
+ * When the automation is a draft, the draft details.
379
367
  * @readonly
380
368
  */
381
369
  draftInfo?: DraftInfo;
382
370
  /**
383
- * Namespace
384
- * @maxLength 50
371
+ * Whether the automation is archived.
372
+ *
373
+ * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.
385
374
  */
386
- namespace?: string | null;
387
- /** Extended Fields */
388
- extendedFields?: ExtendedFields;
375
+ archived?: boolean;
389
376
  }
390
377
  /** @oneof */
391
378
  export interface AutomationOriginInfoOneOf {
392
- /** Application info */
379
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
393
380
  applicationInfo?: ApplicationOrigin;
394
- /** Preinstalled info */
381
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
395
382
  preinstalledInfo?: PreinstalledOrigin;
396
383
  }
397
384
  export interface ActionSettings {
398
385
  /**
399
- * List of actions that cannot be deleted.
400
- * Default: Empty. All actions are deletable by default.
386
+ * Permanent actions. Permanent actions cannot be deleted.
387
+ *
388
+ * When empty, all actions can be deleted by the user.
401
389
  * @maxSize 30
402
390
  * @format GUID
403
391
  */
404
392
  permanentActionIds?: string[];
405
393
  /**
406
- * List of actions that cannot be edited.
407
- * Default: Empty. All actions are editable by default.
394
+ * Read-only actions. Read-only actions cannot be edited.
395
+ *
396
+ * When empty, all actions are editable.
408
397
  * @maxSize 30
409
398
  * @format GUID
410
399
  */
411
400
  readonlyActionIds?: string[];
412
- /** Whether the option to add a delay is disabled for the automation. */
401
+ /**
402
+ * Whether to disable the ability to add a delay to the automation.
403
+ *
404
+ * Default: `false`.
405
+ */
413
406
  disableDelayAddition?: boolean;
414
- /** Whether the option to add a condition is disabled for the automation. */
407
+ /**
408
+ * Whether to disable the ability to add a condition to the automation.
409
+ *
410
+ * Default: `false`.
411
+ */
415
412
  disableConditionAddition?: boolean;
416
413
  }
417
414
  export declare enum Domain {
418
415
  /** User domain (default). */
419
416
  USER = "USER",
420
417
  /** Wix domain. */
421
- WIX = "WIX"
418
+ WIX = "WIX",
419
+ /** Wix account-level domain. */
420
+ WIX_ACCOUNT = "WIX_ACCOUNT"
422
421
  }
423
422
  export interface Enrichment {
424
423
  /**
@@ -429,12 +428,14 @@ export interface Enrichment {
429
428
  }
430
429
  export interface AuditInfo extends AuditInfoIdOneOf {
431
430
  /**
432
- * User ID.
431
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
433
432
  * @format GUID
434
433
  */
435
434
  userId?: string;
436
435
  /**
437
- * Application ID.
436
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
437
+ *
438
+ * 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.
438
439
  * @format GUID
439
440
  */
440
441
  appId?: string;
@@ -442,40 +443,45 @@ export interface AuditInfo extends AuditInfoIdOneOf {
442
443
  /** @oneof */
443
444
  export interface AuditInfoIdOneOf {
444
445
  /**
445
- * User ID.
446
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
446
447
  * @format GUID
447
448
  */
448
449
  userId?: string;
449
450
  /**
450
- * Application ID.
451
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
452
+ *
453
+ * 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.
451
454
  * @format GUID
452
455
  */
453
456
  appId?: string;
454
457
  }
455
- /** Automation runtime configuration */
456
458
  export interface AutomationConfiguration {
457
459
  /** Status of the automation on the site. */
458
460
  status?: AutomationConfigurationStatus;
459
- /** Automation trigger configuration. */
461
+ /** Trigger configuration. */
460
462
  trigger?: Trigger;
461
463
  /**
462
- * List of IDs of root actions. Root actions are the first actions to run after the trigger. The actions in the list run in parallel.
464
+ * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.
465
+ *
466
+ * > **Note**: You can currently only specify 1 root action.
463
467
  * @maxSize 20
464
468
  * @format GUID
465
469
  */
466
470
  rootActionIds?: string[];
467
- /**
468
- * Map of all actions that the automation may execute.
469
- * The key is the action ID, and the value is the action configuration.
470
- */
471
+ /** 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. */
471
472
  actions?: Record<string, Action>;
472
473
  }
473
474
  export declare enum TimeUnit {
474
475
  UNKNOWN_TIME_UNIT = "UNKNOWN_TIME_UNIT",
476
+ /** Minutes. */
475
477
  MINUTES = "MINUTES",
478
+ /** Hours. */
476
479
  HOURS = "HOURS",
480
+ /** Days. */
477
481
  DAYS = "DAYS",
482
+ /** Weeks. */
478
483
  WEEKS = "WEEKS",
484
+ /** Months. */
479
485
  MONTHS = "MONTHS"
480
486
  }
481
487
  export interface Filter {
@@ -485,42 +491,49 @@ export interface Filter {
485
491
  */
486
492
  id?: string;
487
493
  /**
488
- * Field key from the payload schema, for example "formId".
494
+ * Field key.
495
+ *
496
+ * 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).
489
497
  * @minLength 1
490
498
  * @maxLength 110
491
499
  */
492
500
  fieldKey?: string;
493
501
  /**
494
- * Filter expression that evaluates to a boolean.
502
+ * Filter expression.
503
+ *
504
+ * For the automation to run, the expression must evaluate to `true`.
495
505
  * @maxLength 2500
496
506
  */
497
507
  filterExpression?: string;
498
508
  }
499
509
  export interface FutureDateActivationOffset {
500
510
  /**
501
- * The offset value. The value is always taken as negative, so that the automation runs before the trigger date.
502
- * To create an offset that causes the automation to run after the trigger date, use a delay action.
511
+ * Amount of time before the trigger to run the automation.
512
+ *
513
+ * > **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/about-automation-configuration#delay-action).
503
514
  * @maxLength 1000
504
515
  */
505
516
  preScheduledEventOffsetExpression?: string;
506
- /** Time unit for the scheduled event offset. */
517
+ /** Unit in which to set the action offset. */
507
518
  scheduledEventOffsetTimeUnit?: TimeUnit;
508
519
  }
509
520
  export interface RateLimit {
510
521
  /**
511
- * Value expressing the maximum number of times the trigger can be activated.
522
+ * Maximum number of times the trigger can be activated.
512
523
  * @maxLength 1000
513
524
  */
514
525
  maxActivationsExpression?: string;
515
526
  /**
516
- * Duration of the rate limiting window in the selected time unit. If no value is set, the rate limit is permanent.
527
+ * Duration of the rate limit. The rate limit applies for the specified duration and then expires.
528
+ *
529
+ * When empty, the rate limit does not expire.
517
530
  * @maxLength 1000
518
531
  */
519
532
  durationExpression?: string | null;
520
- /** Time unit for the rate limit duration. */
533
+ /** Unit in which to set the duration of the rate limit. */
521
534
  durationTimeUnit?: TimeUnit;
522
535
  /**
523
- * Unique identifier of each activation, by which rate limiter will count activations.
536
+ * Activation identifier used to count the number of activations.
524
537
  * @minLength 1
525
538
  * @maxLength 400
526
539
  */
@@ -528,17 +541,17 @@ export interface RateLimit {
528
541
  }
529
542
  export interface FilterValueSelection {
530
543
  /**
531
- * Values that can help the user filter certain automations, values will look like "<filter_id>__<selected_value>"
544
+ * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.
532
545
  * @maxLength 80
533
546
  * @maxSize 50
534
547
  */
535
548
  selectedFilterValues?: string[];
536
549
  }
537
550
  export interface ConditionExpressionGroup {
538
- /** Expression group operator. */
551
+ /** Logical operator used to evaluate the condition expressions. */
539
552
  operator?: Operator;
540
553
  /**
541
- * List of boolean expressions to be evaluated with the given operator.
554
+ * Expressions evaluated using the selected operator.
542
555
  * @minSize 1
543
556
  * @maxSize 20
544
557
  * @maxLength 2500
@@ -546,25 +559,58 @@ export interface ConditionExpressionGroup {
546
559
  booleanExpressions?: string[];
547
560
  }
548
561
  export declare enum Operator {
562
+ /** Unknown. */
549
563
  UNKNOWN_OPERATOR = "UNKNOWN_OPERATOR",
564
+ /** `OR` operator. */
550
565
  OR = "OR",
566
+ /** `AND` operator. */
551
567
  AND = "AND"
552
568
  }
569
+ export interface CodeSnippet {
570
+ /** Logical operator used to evaluate the condition expressions. */
571
+ language?: Language;
572
+ /**
573
+ * Expressions evaluated using the selected operator. this code should comply the language syntax. and format
574
+ * @maxLength 1000
575
+ */
576
+ code?: string;
577
+ }
578
+ export declare enum Language {
579
+ /** Unknown. */
580
+ UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
581
+ /** `JAVASCRIPT` language. */
582
+ JAVASCRIPT = "JAVASCRIPT"
583
+ }
584
+ /** Path definition */
585
+ export interface Path {
586
+ /**
587
+ * Unique path ID.
588
+ * @format GUID
589
+ */
590
+ id?: string;
591
+ /**
592
+ * Path display name.
593
+ * @minLength 1
594
+ * @maxLength 100
595
+ */
596
+ name?: string;
597
+ /**
598
+ * ID of the action to run when this path is taken.
599
+ * @format GUID
600
+ */
601
+ postActionId?: string | null;
602
+ }
553
603
  export declare enum Type {
554
- /** Automation will be triggered according to the trigger configuration. */
604
+ /** Based on the trigger. */
555
605
  UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
556
- /** App defined Action. */
606
+ /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#app-defined-actions). This action type is available in the site dashboard. */
557
607
  APP_DEFINED = "APP_DEFINED",
558
- /** Condition Action. */
608
+ /** Condition. This determines which action runs next. */
559
609
  CONDITION = "CONDITION",
560
- /** Delay Action. */
610
+ /** Delay. The automation must wait before executing the next step. */
561
611
  DELAY = "DELAY",
562
- /** RateLimit Action. */
563
- RATE_LIMIT = "RATE_LIMIT",
564
- /** Set Variables Action. */
565
- SET_VARIABLES = "SET_VARIABLES",
566
- /** Output Action. */
567
- OUTPUT = "OUTPUT"
612
+ /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
613
+ RATE_LIMIT = "RATE_LIMIT"
568
614
  }
569
615
  export interface AppDefinedAction {
570
616
  /**
@@ -578,39 +624,55 @@ export interface AppDefinedAction {
578
624
  * @maxLength 100
579
625
  */
580
626
  actionKey?: string;
581
- /** Action input mapping. */
627
+ /** 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). */
582
628
  inputMapping?: Record<string, any> | null;
583
629
  /**
584
- * Array of conditions determining whether to skip the action in the automation flow.
585
- * The action will be skipped if any of the expression groups evaluate to `true`.
586
- * Actions following a skipped action will still run.
630
+ * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
631
+ *
632
+ * > **Note**: Actions that follow a skipped action still run.
587
633
  * @maxSize 10
588
634
  */
589
635
  skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
590
636
  /**
591
- * List of IDs of actions to run in parallel once the action completes.
637
+ * IDs of actions that run in parallel after the action completes.
592
638
  * @maxSize 20
593
639
  * @format GUID
594
640
  */
595
641
  postActionIds?: string[];
596
- /** Optional output schema of the action. It will be used instead the action schema in case it's provided. */
642
+ /** Action output schema. When specified, this replaces the action schema. */
597
643
  overrideOutputSchema?: Record<string, any> | null;
598
644
  }
599
645
  export interface ConditionAction {
600
646
  /**
601
- * The condition evaluates to `true` if either of the expression groups evaluate to `true`.
647
+ * Condition is `true` if one or more of the expression groups evaluates to `true`.
602
648
  * @minSize 1
603
649
  * @maxSize 10
604
650
  */
605
651
  orExpressionGroups?: ConditionExpressionGroup[];
606
652
  /**
607
- * List of IDs of actions to run when the entire condition is evaluated to `true`.
653
+ * IDs of actions to run when the condition evaluates to `true`.
608
654
  * @maxSize 20
609
655
  * @format GUID
610
656
  */
611
657
  truePostActionIds?: string[];
612
658
  /**
613
- * List of IDs of actions to run when the entire condition is evaluated to `false`.
659
+ * IDs of actions to run when the condition evaluates to `false`.
660
+ * @maxSize 20
661
+ * @format GUID
662
+ */
663
+ falsePostActionIds?: string[];
664
+ }
665
+ export interface CodeConditionAction {
666
+ /** 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. */
667
+ snippet?: CodeSnippet;
668
+ /**
669
+ * IDs of actions to run when the condition evaluates to `true`.
670
+ * @maxSize 20
671
+ * @format GUID
672
+ */
673
+ truePostActionIds?: string[];
674
+ /**
675
+ * IDs of actions to run when the condition evaluates to `false`.
614
676
  * @maxSize 20
615
677
  * @format GUID
616
678
  */
@@ -618,21 +680,23 @@ export interface ConditionAction {
618
680
  }
619
681
  export interface DelayAction {
620
682
  /**
621
- * Value expressing the amount of time to wait from a specific date or from the time the action is executed.
683
+ * Time to wait before running the action. The wait time starts from when the current action completes.
684
+ *
685
+ * > **Note**: To define the wait time from a specific moment in time, use `dueDateEpochExpression`.
622
686
  * @maxLength 1000
623
687
  */
624
688
  offsetExpression?: string | null;
625
- /** Time unit for delay offset. */
689
+ /** Unit in which to set the wait time to wait before the action runs. */
626
690
  offsetTimeUnit?: TimeUnit;
627
691
  /**
628
- * The action due date. If defined without an offset, the automation will wait until this date to execute the next step.
629
- * If an offset is defined, it's calculated from this date.
630
- * The date is expressed in the number of milliseconds since the Unix Epoch (1 January, 1970 UTC).
692
+ * Action run date in milliseconds elapsed since January 1, 1970 UTC.
693
+ *
694
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
631
695
  * @maxLength 1000
632
696
  */
633
697
  dueDateEpochExpression?: string | null;
634
698
  /**
635
- * List of IDs of actions to run in parallel after the delay.
699
+ * IDs of actions to run in parallel after the time delay.
636
700
  * @maxSize 20
637
701
  * @format GUID
638
702
  */
@@ -640,17 +704,18 @@ export interface DelayAction {
640
704
  }
641
705
  export interface RateLimitAction {
642
706
  /**
643
- * The maximum number of activations allowed for the action.
707
+ * Maximum number of times the action can run.
644
708
  * @maxLength 1000
645
709
  */
646
710
  maxActivationsExpression?: string;
647
711
  /**
648
- * Duration of the rate limiting window, expressed in selected time unit.
649
- * If no value is set, then there is no time limit on the rate limiter.
712
+ * Rate limit duration.
713
+ *
714
+ * When empty, the rate limit does not expire.
650
715
  * @maxLength 1000
651
716
  */
652
717
  rateLimitDurationExpression?: string | null;
653
- /** Time unit for the rate limit duration. */
718
+ /** Unit in which to set the duration of the rate limit. */
654
719
  rateLimitDurationTimeUnit?: TimeUnit;
655
720
  /**
656
721
  * Unique identifier of each activation by which rate limiter counts activations.
@@ -659,25 +724,23 @@ export interface RateLimitAction {
659
724
  */
660
725
  uniqueIdentifierExpression?: string | null;
661
726
  /**
662
- * List of IDs of actions to run in parallel once the action completes.
727
+ * IDs of actions to run in parallel after the action completes.
663
728
  * @maxSize 20
664
729
  * @format GUID
665
730
  */
666
731
  postActionIds?: string[];
667
732
  }
668
733
  export interface SetVariablesAction {
669
- /**
670
- * output mapping
671
- * for example: {"someField": "{{10}}", "someOtherField": "{{multiply( var('account.points.balance') ;2 )}}" }
672
- */
734
+ /** Output mapping. For example: `{"someField": "{{10}}", "someOtherField": "{{multiply( var('account.points.balance') ;2 )}}" }`. */
673
735
  outputMapping?: Record<string, any> | null;
674
736
  /**
675
- * output json schema representation
676
- * could be string instead of Struct (and introduce some compression to minimize the size of it)
737
+ * Output JSON schema representation.
738
+ *
739
+ * > **Note**: To minimize request size, you can also specify a string.
677
740
  */
678
741
  outputSchema?: Record<string, any> | null;
679
742
  /**
680
- * List of IDs of actions to run in parallel after variable initialization.
743
+ * IDs of actions to run in parallel after variable initialization.
681
744
  * @maxSize 20
682
745
  * @format GUID
683
746
  */
@@ -687,12 +750,20 @@ export interface OutputAction {
687
750
  /** Output action output mapping. */
688
751
  outputMapping?: Record<string, any> | null;
689
752
  }
753
+ export interface SplitAction {
754
+ /**
755
+ * List of paths to split execution into.
756
+ * @minSize 2
757
+ * @maxSize 10
758
+ */
759
+ paths?: Path[];
760
+ }
690
761
  export declare enum AutomationConfigurationStatus {
691
- /** unused */
762
+ /** Unknown. */
692
763
  UNKNOWN_STATUS = "UNKNOWN_STATUS",
693
- /** Automation will be triggered according to the trigger configuration */
764
+ /** Active. Active automations can be triggered. */
694
765
  ACTIVE = "ACTIVE",
695
- /** Automation will not be triggered */
766
+ /** Inactive. Inactive automations cannot be triggered. */
696
767
  INACTIVE = "INACTIVE"
697
768
  }
698
769
  export interface Trigger {
@@ -703,51 +774,54 @@ export interface Trigger {
703
774
  appId?: string;
704
775
  /**
705
776
  * Trigger key.
777
+ *
778
+ * 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).
706
779
  * @minLength 1
707
780
  * @maxLength 100
708
781
  */
709
782
  triggerKey?: string;
710
783
  /**
711
- * List of filters on schema fields.
712
- * In order for the automation to run, all filter expressions must evaluate to `true` for a given payload.
784
+ * Schema field filters. All filter conditions must be met for the automation to run.
785
+ *
786
+ * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#filters).
713
787
  * @maxSize 5
714
788
  */
715
789
  filters?: Filter[];
716
- /** Defines the time offset between the trigger date and when the automation runs. */
717
- scheduledEventOffset?: FutureDateActivationOffset;
718
- /** Limits the number of times an automation can be triggered. */
719
- rateLimit?: RateLimit;
720
790
  /**
721
- * An optional configuration, per automation, of a schema that is optionally offered by the trigger provider to affect the behavior of the trigger.
722
- * For example, a trigger provider may offer a schema that allows the user to configure the trigger to happen at a certain time of day,
723
- * He would define a schema with a field called "startDate" and using this parameter the user can define his preferred startDate, per automation.
791
+ * Automation offset. You can schedule automations to run before the trigger occurs.
792
+ *
793
+ * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).
724
794
  */
725
- automationConfigMapping?: Record<string, any> | null;
726
- /** Optional schema of the trigger. It will be used instead the trigger schema in case it's provided. */
795
+ scheduledEventOffset?: FutureDateActivationOffset;
796
+ /** Limit on the number of times an automation can be triggered. */
797
+ rateLimit?: RateLimit;
798
+ /** Trigger schema override. When specified, this replaces the trigger schema. */
727
799
  overrideSchema?: Record<string, any> | null;
728
800
  }
729
801
  export interface Action extends ActionInfoOneOf {
730
- /** Action defined by an app (via RPC, HTTP or Velo). */
802
+ /** Details of the action when its `type` is `APP_DEFINED`. */
731
803
  appDefinedInfo?: AppDefinedAction;
732
- /** Condition action. */
804
+ /** Details of the action when its `type` is `CONDITION`. */
733
805
  conditionInfo?: ConditionAction;
734
- /** Delay action. */
806
+ /** Details of the action when its `type` is `CODE_CONDITION`. */
807
+ codeConditionInfo?: CodeConditionAction;
808
+ /** Details of the action when its `type` is `DELAY`. */
735
809
  delayInfo?: DelayAction;
736
- /** Rate-limiting action. */
810
+ /** Details of the action when its `type` is `RATE_LIMIT`. */
737
811
  rateLimitInfo?: RateLimitAction;
738
812
  /**
739
- * Action ID. If not specified, a new ID is generated.
813
+ * Action ID.
814
+ *
815
+ * If not specified, automatically generated by Wix.
740
816
  * @format GUID
741
817
  */
742
818
  id?: string | null;
743
- /** Action type. */
819
+ /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#action-type). */
744
820
  type?: Type;
745
821
  /**
746
- * Human-readable name to differentiate the action from other actions of the same type.
747
- * The name can contain only alphanumeric characters and underscores. If not provided, a namespace in the form `actionkey-indexOfAction` is
748
- * generated automatically.
749
- * If the action has output, the output will be available in the payload under this name.
750
- * If the user has multiple actions with the same appId and actionKey, previous action output will be overwritten.
822
+ * [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#namespace). This differentiates it from other actions of the same type.
823
+ *
824
+ * 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.
751
825
  * @minLength 1
752
826
  * @maxLength 100
753
827
  */
@@ -755,18 +829,20 @@ export interface Action extends ActionInfoOneOf {
755
829
  }
756
830
  /** @oneof */
757
831
  export interface ActionInfoOneOf {
758
- /** Action defined by an app (via RPC, HTTP or Velo). */
832
+ /** Details of the action when its `type` is `APP_DEFINED`. */
759
833
  appDefinedInfo?: AppDefinedAction;
760
- /** Condition action. */
834
+ /** Details of the action when its `type` is `CONDITION`. */
761
835
  conditionInfo?: ConditionAction;
762
- /** Delay action. */
836
+ /** Details of the action when its `type` is `CODE_CONDITION`. */
837
+ codeConditionInfo?: CodeConditionAction;
838
+ /** Details of the action when its `type` is `DELAY`. */
763
839
  delayInfo?: DelayAction;
764
- /** Rate-limiting action. */
840
+ /** Details of the action when its `type` is `RATE_LIMIT`. */
765
841
  rateLimitInfo?: RateLimitAction;
766
842
  }
767
843
  export interface FilterableAppDefinedActions {
768
844
  /**
769
- * App defined action identifiers, each identifier in form `${appId}_${actionKey}`
845
+ * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.
770
846
  * @minSize 1
771
847
  * @maxSize 100
772
848
  * @minLength 1
@@ -775,48 +851,40 @@ export interface FilterableAppDefinedActions {
775
851
  actionIdentifiers?: string[];
776
852
  }
777
853
  export declare enum Origin {
778
- /** Default value. This is unused. */
854
+ /** Default value. */
779
855
  UNKNOWN_ORIGIN = "UNKNOWN_ORIGIN",
780
- /** User created automation. */
856
+ /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
781
857
  USER = "USER",
782
- /** Automation created by application (site specific). */
858
+ /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */
783
859
  APPLICATION = "APPLICATION",
784
- /** Preinstalled application automation. */
785
- PREINSTALLED = "PREINSTALLED",
786
- /** Automation created from a recipe. */
787
- RECIPE = "RECIPE"
860
+ /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */
861
+ PREINSTALLED = "PREINSTALLED"
788
862
  }
789
863
  export interface ApplicationOrigin {
790
864
  /**
791
- * Application ID.
865
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
866
+ *
867
+ * 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.
792
868
  * @format GUID
793
869
  */
794
870
  appId?: string;
795
- /**
796
- * External ID to correlate multiple sites to an automation
797
- * @format GUID
798
- */
799
- appDefinedExternalId?: string | null;
800
871
  }
801
872
  export interface PreinstalledOrigin {
802
873
  /**
803
- * ID of the app that defines the preinstalled automation.
874
+ * 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).
804
875
  * @format GUID
805
876
  */
806
877
  appId?: string;
807
878
  /**
808
- * Application component ID.
809
- * @format GUID
810
- */
811
- componentId?: string;
812
- /** Application component version. */
813
- componentVersion?: number;
814
- /**
815
- * Whether the automation is an override automation. If the user modifies the preinstalled automation installed on their site, a site-specific
816
- * automation is created that overrides the original one. If the user makes no modifications this boolean is set to `false` and the original
817
- * preinstalled automation is used.
879
+ * Whether the automation is an override.
818
880
  *
819
- * Default: `false`
881
+ * 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.
882
+ *
883
+ * > **Note**: An override automation can no longer be updated by the app that originally installed it.
884
+ * >
885
+ * > 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.
886
+ *
887
+ * Default: `false`.
820
888
  * @immutable
821
889
  * @readonly
822
890
  */
@@ -825,22 +893,26 @@ export interface PreinstalledOrigin {
825
893
  export interface AutomationSettings {
826
894
  /**
827
895
  * Whether the automation is hidden from users.
896
+ *
828
897
  * Default: `false`
829
898
  */
830
899
  hidden?: boolean;
831
900
  /**
832
901
  * Whether the automation is read-only.
902
+ *
833
903
  * Default: `false`
834
904
  */
835
905
  readonly?: boolean;
836
906
  /**
837
- * Whether the option to delete the automation from the site is disabled.
838
- * Default: `false`
907
+ * Whether to disable the option to delete the automation from the site.
908
+ *
909
+ * Default: `false`.
839
910
  */
840
911
  disableDelete?: boolean;
841
912
  /**
842
- * Whether the option to change the automation status (from active to inactive and vice versa) is disabled.
843
- * Default: `false`
913
+ * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.
914
+ *
915
+ * Default: `false`.
844
916
  */
845
917
  disableStatusChange?: boolean;
846
918
  /** Automation action settings. */
@@ -848,7 +920,7 @@ export interface AutomationSettings {
848
920
  }
849
921
  export interface DraftInfo {
850
922
  /**
851
- * Optional - automationId of the original automation.
923
+ * ID of the original automation.
852
924
  * @format GUID
853
925
  * @readonly
854
926
  */
@@ -918,7 +990,7 @@ export interface ListActivationLogsRequest extends ListActivationLogsRequestIden
918
990
  /** Should return payload in the response */
919
991
  includePayload?: boolean | null;
920
992
  /** identifier type for the activations to list */
921
- identifierType?: IdentifierType;
993
+ identifierType: IdentifierType;
922
994
  }
923
995
  /** @oneof */
924
996
  export interface ListActivationLogsRequestIdentifierOneOf {
@@ -1100,45 +1172,3 @@ export declare enum WebhookIdentityType {
1100
1172
  WIX_USER = "WIX_USER",
1101
1173
  APP = "APP"
1102
1174
  }
1103
- interface InitiatedStatusInfoNonNullableFields {
1104
- target: Target;
1105
- }
1106
- interface ScheduledStatusInfoNonNullableFields {
1107
- scheduleId: string;
1108
- }
1109
- interface CancelledStatusInfoNonNullableFields {
1110
- reason: CancellationReason;
1111
- }
1112
- interface FailedStatusInfoNonNullableFields {
1113
- errorDescription: string;
1114
- errorReason: ErrorReason;
1115
- }
1116
- interface SkippedStatusInfoNonNullableFields {
1117
- reason: SkipReason;
1118
- }
1119
- interface WarningNonNullableFields {
1120
- errorDescription: string;
1121
- reason: WarningReason;
1122
- }
1123
- interface ActivationLogNonNullableFields {
1124
- id: string;
1125
- automationId: string;
1126
- automationRevision: string;
1127
- status: Status;
1128
- initiatedInfo?: InitiatedStatusInfoNonNullableFields;
1129
- scheduledInfo?: ScheduledStatusInfoNonNullableFields;
1130
- cancelledInfo?: CancelledStatusInfoNonNullableFields;
1131
- failedInfo?: FailedStatusInfoNonNullableFields;
1132
- skippedInfo?: SkippedStatusInfoNonNullableFields;
1133
- warnings: WarningNonNullableFields[];
1134
- }
1135
- export interface GetActivationLogResponseNonNullableFields {
1136
- activationLog?: ActivationLogNonNullableFields;
1137
- }
1138
- export interface ListActivationLogsResponseNonNullableFields {
1139
- activationLogs: ActivationLogNonNullableFields[];
1140
- }
1141
- export interface SearchActivationLogsByPayloadPiiValueResponseNonNullableFields {
1142
- activationLogs: ActivationLogNonNullableFields[];
1143
- }
1144
- export {};