@wix/automations 1.0.66 → 1.0.68

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.
@@ -1891,21 +1891,21 @@ interface AutomationCreatedEnvelope$1 {
1891
1891
  entity: Automation$2;
1892
1892
  metadata: EventMetadata$2;
1893
1893
  }
1894
+ interface AutomationDeletedEnvelope$1 {
1895
+ metadata: EventMetadata$2;
1896
+ }
1894
1897
  interface AutomationUpdatedEnvelope$1 {
1895
1898
  entity: Automation$2;
1896
1899
  metadata: EventMetadata$2;
1897
1900
  }
1898
- interface AutomationDeletedEnvelope$1 {
1901
+ interface AutomationDeletedWithEntityEnvelope$1 {
1902
+ data: DeletedWithEntity$1;
1899
1903
  metadata: EventMetadata$2;
1900
1904
  }
1901
1905
  interface AutomationUpdatedWithPreviousEntityEnvelope$1 {
1902
1906
  data: UpdatedWithPreviousEntity$1;
1903
1907
  metadata: EventMetadata$2;
1904
1908
  }
1905
- interface AutomationDeletedWithEntityEnvelope$1 {
1906
- data: DeletedWithEntity$1;
1907
- metadata: EventMetadata$2;
1908
- }
1909
1909
  interface GetAutomationOptions$1 {
1910
1910
  /** Automation type */
1911
1911
  automationType?: Type$2;
@@ -2212,10 +2212,10 @@ interface GenerateActionInputMappingFromTemplateSignature {
2212
2212
  (appId: string, options: GenerateActionInputMappingFromTemplateOptions): Promise<GenerateActionInputMappingFromTemplateResponse>;
2213
2213
  }
2214
2214
  declare const onAutomationCreated$3: EventDefinition<AutomationCreatedEnvelope$1, "wix.automations.v1.automation_created">;
2215
- declare const onAutomationUpdated$3: EventDefinition<AutomationUpdatedEnvelope$1, "wix.automations.v1.automation_updated">;
2216
2215
  declare const onAutomationDeleted$3: EventDefinition<AutomationDeletedEnvelope$1, "wix.automations.v1.automation_deleted">;
2217
- declare const onAutomationUpdatedWithPreviousEntity$3: EventDefinition<AutomationUpdatedWithPreviousEntityEnvelope$1, "wix.automations.v1.automation_updated_with_previous_entity">;
2216
+ declare const onAutomationUpdated$3: EventDefinition<AutomationUpdatedEnvelope$1, "wix.automations.v1.automation_updated">;
2218
2217
  declare const onAutomationDeletedWithEntity$3: EventDefinition<AutomationDeletedWithEntityEnvelope$1, "wix.automations.v1.automation_deleted_with_entity">;
2218
+ declare const onAutomationUpdatedWithPreviousEntity$3: EventDefinition<AutomationUpdatedWithPreviousEntityEnvelope$1, "wix.automations.v1.automation_updated_with_previous_entity">;
2219
2219
 
2220
2220
  declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
2221
2221
 
@@ -2236,22 +2236,22 @@ type _publicOnAutomationCreatedType$1 = typeof onAutomationCreated$3;
2236
2236
  /** */
2237
2237
  declare const onAutomationCreated$2: ReturnType<typeof createEventModule$2<_publicOnAutomationCreatedType>>;
2238
2238
 
2239
- type _publicOnAutomationUpdatedType$1 = typeof onAutomationUpdated$3;
2240
- /** */
2241
- declare const onAutomationUpdated$2: ReturnType<typeof createEventModule$2<_publicOnAutomationUpdatedType>>;
2242
-
2243
2239
  type _publicOnAutomationDeletedType$1 = typeof onAutomationDeleted$3;
2244
2240
  /** */
2245
2241
  declare const onAutomationDeleted$2: ReturnType<typeof createEventModule$2<_publicOnAutomationDeletedType>>;
2246
2242
 
2247
- type _publicOnAutomationUpdatedWithPreviousEntityType$1 = typeof onAutomationUpdatedWithPreviousEntity$3;
2243
+ type _publicOnAutomationUpdatedType$1 = typeof onAutomationUpdated$3;
2248
2244
  /** */
2249
- declare const onAutomationUpdatedWithPreviousEntity$2: ReturnType<typeof createEventModule$2<_publicOnAutomationUpdatedWithPreviousEntityType>>;
2245
+ declare const onAutomationUpdated$2: ReturnType<typeof createEventModule$2<_publicOnAutomationUpdatedType>>;
2250
2246
 
2251
2247
  type _publicOnAutomationDeletedWithEntityType$1 = typeof onAutomationDeletedWithEntity$3;
2252
2248
  /** */
2253
2249
  declare const onAutomationDeletedWithEntity$2: ReturnType<typeof createEventModule$2<_publicOnAutomationDeletedWithEntityType>>;
2254
2250
 
2251
+ type _publicOnAutomationUpdatedWithPreviousEntityType$1 = typeof onAutomationUpdatedWithPreviousEntity$3;
2252
+ /** */
2253
+ declare const onAutomationUpdatedWithPreviousEntity$2: ReturnType<typeof createEventModule$2<_publicOnAutomationUpdatedWithPreviousEntityType>>;
2254
+
2255
2255
  type index_d$2_ActivationReport = ActivationReport;
2256
2256
  type index_d$2_AutomationMetadata = AutomationMetadata;
2257
2257
  type index_d$2_BulkCreateApplicationAutomationRequest = BulkCreateApplicationAutomationRequest;
@@ -3022,6 +3022,10 @@ declare enum WebhookIdentityType$1 {
3022
3022
  WIX_USER = "WIX_USER",
3023
3023
  APP = "APP"
3024
3024
  }
3025
+ interface BatchActivationRequest {
3026
+ /** List of Activation-Request. */
3027
+ activationRequests?: ActivationRequest[];
3028
+ }
3025
3029
  interface ActivationRequest {
3026
3030
  /** Activation's ID. */
3027
3031
  activationId?: string;
@@ -3249,219 +3253,6 @@ interface ActionsData {
3249
3253
  /** Map of action id to action data. */
3250
3254
  actions?: Record<string, Action$1>;
3251
3255
  }
3252
- interface ActionStatus {
3253
- /** Action's status. */
3254
- _id?: string;
3255
- /** Activation's ID. */
3256
- activationId?: string;
3257
- /** Action's name. */
3258
- actionName?: string | null;
3259
- /** Action's status. */
3260
- status?: Status$1;
3261
- /** Action's error reason (if there is one). */
3262
- errorReason?: string | null;
3263
- /** Activation external id. */
3264
- activationExternalId?: string;
3265
- /** Trigger app id. */
3266
- triggerAppId?: string | null;
3267
- /** Trigger key. */
3268
- triggerKey?: string | null;
3269
- /** The configuration correlation id */
3270
- configurationCorrelationId?: string | null;
3271
- }
3272
- interface BatchActivationRequest {
3273
- /** List of Activation-Request. */
3274
- activationRequests?: ActivationRequest[];
3275
- }
3276
- interface Empty$1 {
3277
- }
3278
- interface ActivationActionStatusChanged extends ActivationActionStatusChangedStatusInfoOneOf {
3279
- /** Started status information */
3280
- startedInfo?: StartedStatusInfo;
3281
- /** Ended status information */
3282
- endedInfo?: EndedStatusInfo;
3283
- /** Failed status information */
3284
- failedInfo?: FailedStatusInfo;
3285
- /** Action ID */
3286
- _id?: string;
3287
- /** Activation ID */
3288
- activationId?: string;
3289
- /** Automation info */
3290
- automationInfo?: AutomationInfo;
3291
- /** Action type */
3292
- type?: Type$1;
3293
- /** Event date */
3294
- statusChangedDate?: Date | null;
3295
- /** Action activation status */
3296
- status?: ActivationActionStatusChangedStatus;
3297
- }
3298
- /** @oneof */
3299
- interface ActivationActionStatusChangedStatusInfoOneOf {
3300
- /** Started status information */
3301
- startedInfo?: StartedStatusInfo;
3302
- /** Ended status information */
3303
- endedInfo?: EndedStatusInfo;
3304
- /** Failed status information */
3305
- failedInfo?: FailedStatusInfo;
3306
- }
3307
- interface StartedStatusInfoAppDefinedActionInfo {
3308
- /** Action input */
3309
- input?: Record<string, any> | null;
3310
- }
3311
- interface DelayActionInfo {
3312
- /** Indicates when this action becomes completed and the activation will move to the post actions */
3313
- date?: Date | null;
3314
- }
3315
- interface ExpressionEvaluationResult {
3316
- /** Indicates if the expression was evaluated to true or false */
3317
- passed?: boolean;
3318
- /** Indicates if there was an error in the evaluation process */
3319
- error?: boolean;
3320
- }
3321
- interface AppDefinedActionInfo {
3322
- /** Output returned by the action implementer. */
3323
- output?: Record<string, any> | null;
3324
- }
3325
- interface ConditionActionInfo {
3326
- /** Indicates that the condition `if` clause evaluated to `true`. */
3327
- passed?: boolean;
3328
- /** Collects results per each expression evaluation that took place */
3329
- expressionResults?: Record<string, ExpressionEvaluationResult>;
3330
- }
3331
- interface RateLimitActionInfo {
3332
- /** Indicates if the rate limiter passed (not reached the quota) */
3333
- passed?: boolean;
3334
- }
3335
- interface AutomationInfo extends AutomationInfoOriginInfoOneOf {
3336
- /** Application info */
3337
- applicationInfo?: ApplicationOrigin$1;
3338
- /** Preinstalled info */
3339
- preinstalledInfo?: PreinstalledOrigin$1;
3340
- /** Automation ID */
3341
- _id?: string;
3342
- /** Origin type */
3343
- origin?: Origin$1;
3344
- }
3345
- /** @oneof */
3346
- interface AutomationInfoOriginInfoOneOf {
3347
- /** Application info */
3348
- applicationInfo?: ApplicationOrigin$1;
3349
- /** Preinstalled info */
3350
- preinstalledInfo?: PreinstalledOrigin$1;
3351
- }
3352
- declare enum ActivationActionStatusChangedStatus {
3353
- UNKNOWN_ACTION_ACTIVATION_STATUS = "UNKNOWN_ACTION_ACTIVATION_STATUS",
3354
- /**
3355
- * Indicates that action activation has started and is in progress.
3356
- * Relevant to action types: APP_DEFINED, DELAY.
3357
- */
3358
- STARTED = "STARTED",
3359
- /**
3360
- * Indicates that the action activation was completed without errors.
3361
- * Relevant to action types: APP_DEFINED, DELAY, CONDITION, RATE_LIMIT.
3362
- */
3363
- ENDED = "ENDED",
3364
- /**
3365
- * Indicates that the action was skipped and post actions won't start.
3366
- * Relevant to action types: APP_DEFINED.
3367
- */
3368
- SKIPPED = "SKIPPED",
3369
- /**
3370
- * Indicates that the action failed.
3371
- * Relevant to action types: APP_DEFINED, DELAY, RATE_LIMIT.
3372
- */
3373
- FAILED = "FAILED"
3374
- }
3375
- interface StartedStatusInfo extends StartedStatusInfoTypeInfoOneOf {
3376
- /** APP DEFINED action additional info */
3377
- appDefinedActionInfo?: StartedStatusInfoAppDefinedActionInfo;
3378
- /** Delay action additional info */
3379
- delayActionInfo?: DelayActionInfo;
3380
- }
3381
- /** @oneof */
3382
- interface StartedStatusInfoTypeInfoOneOf {
3383
- /** APP DEFINED action additional info */
3384
- appDefinedActionInfo?: StartedStatusInfoAppDefinedActionInfo;
3385
- /** Delay action additional info */
3386
- delayActionInfo?: DelayActionInfo;
3387
- }
3388
- interface EndedStatusInfo extends EndedStatusInfoTypeInfoOneOf {
3389
- /** APP DEFINED action additional info */
3390
- appDefinedActionInfo?: AppDefinedActionInfo;
3391
- /** Condition action additional info */
3392
- conditionActionInfo?: ConditionActionInfo;
3393
- /** Rate limit action additional info */
3394
- rateLimitActionInfo?: RateLimitActionInfo;
3395
- }
3396
- /** @oneof */
3397
- interface EndedStatusInfoTypeInfoOneOf {
3398
- /** APP DEFINED action additional info */
3399
- appDefinedActionInfo?: AppDefinedActionInfo;
3400
- /** Condition action additional info */
3401
- conditionActionInfo?: ConditionActionInfo;
3402
- /** Rate limit action additional info */
3403
- rateLimitActionInfo?: RateLimitActionInfo;
3404
- }
3405
- interface FailedStatusInfo {
3406
- /** Error description */
3407
- errorDescription?: string;
3408
- /** Error code */
3409
- errorCode?: string | null;
3410
- }
3411
- interface ActivationResumeAfterDelay {
3412
- /** Activation identifier */
3413
- _id?: string;
3414
- /** Activation schedule identifier */
3415
- scheduleId?: string;
3416
- /** Activation schedule due date */
3417
- scheduleDate?: Date | null;
3418
- /** Activation payload */
3419
- payload?: Record<string, any> | null;
3420
- /** Activation Automation */
3421
- automation?: Automation$1;
3422
- /** Scheduled action identifier - with the intent to execute that action's post actions */
3423
- scheduledActionId?: string;
3424
- /** Optional - external entity id that this activation is related to */
3425
- externalEntityId?: string | null;
3426
- }
3427
- interface ActionCompletedRequest {
3428
- /** The execution identifier that was given to the spi provider when we invoked the action */
3429
- executionIdentifier?: string;
3430
- /** The result of invoking the action. Must conform to the output schema configured by the action provider. */
3431
- result?: Record<string, any> | null;
3432
- }
3433
- interface RefreshPayloadRequest {
3434
- /** Application definition ID. */
3435
- appDefId?: string;
3436
- /** Trigger key. */
3437
- triggerKey?: string;
3438
- /** Payload to refresh. */
3439
- payload?: Record<string, any> | null;
3440
- /** External entity ID. */
3441
- externalEntityId?: string | null;
3442
- }
3443
- interface RefreshPayloadResponse {
3444
- /** Updated payload. */
3445
- payload?: Record<string, any> | null;
3446
- /** If the automation activation should be canceled (default is false) */
3447
- cancelActivation?: boolean | null;
3448
- }
3449
- interface RunAutomationRequest {
3450
- /** App of the automation trigger */
3451
- appId?: string;
3452
- /** Trigger key of the action */
3453
- triggerKey?: string;
3454
- /** Payload of the triggered event */
3455
- triggerPayload?: Record<string, any> | null;
3456
- /** Specific automation id to run */
3457
- automationId?: string;
3458
- /** Schema of the trigger */
3459
- triggerSchema?: Record<string, any> | null;
3460
- }
3461
- interface RunAutomationResponse {
3462
- /** Automation activation output payload */
3463
- output?: Record<string, any> | null;
3464
- }
3465
3256
  interface ActivationScheduleRequested {
3466
3257
  /** Activation identifier */
3467
3258
  _id?: string;
@@ -3730,6 +3521,8 @@ interface ExecuteFromActionRequest {
3730
3521
  }
3731
3522
  interface ExecuteFromActionResponse {
3732
3523
  }
3524
+ interface Empty$1 {
3525
+ }
3733
3526
  interface ActivationScheduleCompleted {
3734
3527
  /** Activation identifier */
3735
3528
  _id?: string;
@@ -3744,17 +3537,224 @@ interface ActivationScheduleCompleted {
3744
3537
  /** Optional - external entity id that this activation is related to */
3745
3538
  externalEntityId?: string | null;
3746
3539
  }
3747
- interface ReportEventResponseNonNullableFields {
3748
- activationIds: string[];
3749
- }
3750
- interface ApplicationErrorNonNullableFields$1 {
3751
- code: string;
3752
- description: string;
3753
- }
3754
- interface ItemMetadataNonNullableFields$1 {
3755
- originalIndex: number;
3756
- success: boolean;
3757
- error?: ApplicationErrorNonNullableFields$1;
3540
+ interface ActionStatus {
3541
+ /** Action's status. */
3542
+ _id?: string;
3543
+ /** Activation's ID. */
3544
+ activationId?: string;
3545
+ /** Action's name. */
3546
+ actionName?: string | null;
3547
+ /** Action's status. */
3548
+ status?: Status$1;
3549
+ /** Action's error reason (if there is one). */
3550
+ errorReason?: string | null;
3551
+ /** Activation external id. */
3552
+ activationExternalId?: string;
3553
+ /** Trigger app id. */
3554
+ triggerAppId?: string | null;
3555
+ /** Trigger key. */
3556
+ triggerKey?: string | null;
3557
+ /** The configuration correlation id */
3558
+ configurationCorrelationId?: string | null;
3559
+ }
3560
+ interface ActivationActionStatusChanged extends ActivationActionStatusChangedStatusInfoOneOf {
3561
+ /** Started status information */
3562
+ startedInfo?: StartedStatusInfo;
3563
+ /** Ended status information */
3564
+ endedInfo?: EndedStatusInfo;
3565
+ /** Failed status information */
3566
+ failedInfo?: FailedStatusInfo;
3567
+ /** Action ID */
3568
+ _id?: string;
3569
+ /** Activation ID */
3570
+ activationId?: string;
3571
+ /** Automation info */
3572
+ automationInfo?: AutomationInfo;
3573
+ /** Action type */
3574
+ type?: Type$1;
3575
+ /** Event date */
3576
+ statusChangedDate?: Date | null;
3577
+ /** Action activation status */
3578
+ status?: ActivationActionStatusChangedStatus;
3579
+ }
3580
+ /** @oneof */
3581
+ interface ActivationActionStatusChangedStatusInfoOneOf {
3582
+ /** Started status information */
3583
+ startedInfo?: StartedStatusInfo;
3584
+ /** Ended status information */
3585
+ endedInfo?: EndedStatusInfo;
3586
+ /** Failed status information */
3587
+ failedInfo?: FailedStatusInfo;
3588
+ }
3589
+ interface StartedStatusInfoAppDefinedActionInfo {
3590
+ /** Action input */
3591
+ input?: Record<string, any> | null;
3592
+ }
3593
+ interface DelayActionInfo {
3594
+ /** Indicates when this action becomes completed and the activation will move to the post actions */
3595
+ date?: Date | null;
3596
+ }
3597
+ interface ExpressionEvaluationResult {
3598
+ /** Indicates if the expression was evaluated to true or false */
3599
+ passed?: boolean;
3600
+ /** Indicates if there was an error in the evaluation process */
3601
+ error?: boolean;
3602
+ }
3603
+ interface AppDefinedActionInfo {
3604
+ /** Output returned by the action implementer. */
3605
+ output?: Record<string, any> | null;
3606
+ }
3607
+ interface ConditionActionInfo {
3608
+ /** Indicates that the condition `if` clause evaluated to `true`. */
3609
+ passed?: boolean;
3610
+ /** Collects results per each expression evaluation that took place */
3611
+ expressionResults?: Record<string, ExpressionEvaluationResult>;
3612
+ }
3613
+ interface RateLimitActionInfo {
3614
+ /** Indicates if the rate limiter passed (not reached the quota) */
3615
+ passed?: boolean;
3616
+ }
3617
+ interface AutomationInfo extends AutomationInfoOriginInfoOneOf {
3618
+ /** Application info */
3619
+ applicationInfo?: ApplicationOrigin$1;
3620
+ /** Preinstalled info */
3621
+ preinstalledInfo?: PreinstalledOrigin$1;
3622
+ /** Automation ID */
3623
+ _id?: string;
3624
+ /** Origin type */
3625
+ origin?: Origin$1;
3626
+ }
3627
+ /** @oneof */
3628
+ interface AutomationInfoOriginInfoOneOf {
3629
+ /** Application info */
3630
+ applicationInfo?: ApplicationOrigin$1;
3631
+ /** Preinstalled info */
3632
+ preinstalledInfo?: PreinstalledOrigin$1;
3633
+ }
3634
+ declare enum ActivationActionStatusChangedStatus {
3635
+ UNKNOWN_ACTION_ACTIVATION_STATUS = "UNKNOWN_ACTION_ACTIVATION_STATUS",
3636
+ /**
3637
+ * Indicates that action activation has started and is in progress.
3638
+ * Relevant to action types: APP_DEFINED, DELAY.
3639
+ */
3640
+ STARTED = "STARTED",
3641
+ /**
3642
+ * Indicates that the action activation was completed without errors.
3643
+ * Relevant to action types: APP_DEFINED, DELAY, CONDITION, RATE_LIMIT.
3644
+ */
3645
+ ENDED = "ENDED",
3646
+ /**
3647
+ * Indicates that the action was skipped and post actions won't start.
3648
+ * Relevant to action types: APP_DEFINED.
3649
+ */
3650
+ SKIPPED = "SKIPPED",
3651
+ /**
3652
+ * Indicates that the action failed.
3653
+ * Relevant to action types: APP_DEFINED, DELAY, RATE_LIMIT.
3654
+ */
3655
+ FAILED = "FAILED"
3656
+ }
3657
+ interface StartedStatusInfo extends StartedStatusInfoTypeInfoOneOf {
3658
+ /** APP DEFINED action additional info */
3659
+ appDefinedActionInfo?: StartedStatusInfoAppDefinedActionInfo;
3660
+ /** Delay action additional info */
3661
+ delayActionInfo?: DelayActionInfo;
3662
+ }
3663
+ /** @oneof */
3664
+ interface StartedStatusInfoTypeInfoOneOf {
3665
+ /** APP DEFINED action additional info */
3666
+ appDefinedActionInfo?: StartedStatusInfoAppDefinedActionInfo;
3667
+ /** Delay action additional info */
3668
+ delayActionInfo?: DelayActionInfo;
3669
+ }
3670
+ interface EndedStatusInfo extends EndedStatusInfoTypeInfoOneOf {
3671
+ /** APP DEFINED action additional info */
3672
+ appDefinedActionInfo?: AppDefinedActionInfo;
3673
+ /** Condition action additional info */
3674
+ conditionActionInfo?: ConditionActionInfo;
3675
+ /** Rate limit action additional info */
3676
+ rateLimitActionInfo?: RateLimitActionInfo;
3677
+ }
3678
+ /** @oneof */
3679
+ interface EndedStatusInfoTypeInfoOneOf {
3680
+ /** APP DEFINED action additional info */
3681
+ appDefinedActionInfo?: AppDefinedActionInfo;
3682
+ /** Condition action additional info */
3683
+ conditionActionInfo?: ConditionActionInfo;
3684
+ /** Rate limit action additional info */
3685
+ rateLimitActionInfo?: RateLimitActionInfo;
3686
+ }
3687
+ interface FailedStatusInfo {
3688
+ /** Error description */
3689
+ errorDescription?: string;
3690
+ /** Error code */
3691
+ errorCode?: string | null;
3692
+ }
3693
+ interface ActivationResumeAfterDelay {
3694
+ /** Activation identifier */
3695
+ _id?: string;
3696
+ /** Activation schedule identifier */
3697
+ scheduleId?: string;
3698
+ /** Activation schedule due date */
3699
+ scheduleDate?: Date | null;
3700
+ /** Activation payload */
3701
+ payload?: Record<string, any> | null;
3702
+ /** Activation Automation */
3703
+ automation?: Automation$1;
3704
+ /** Scheduled action identifier - with the intent to execute that action's post actions */
3705
+ scheduledActionId?: string;
3706
+ /** Optional - external entity id that this activation is related to */
3707
+ externalEntityId?: string | null;
3708
+ }
3709
+ interface ActionCompletedRequest {
3710
+ /** The execution identifier that was given to the spi provider when we invoked the action */
3711
+ executionIdentifier?: string;
3712
+ /** The result of invoking the action. Must conform to the output schema configured by the action provider. */
3713
+ result?: Record<string, any> | null;
3714
+ }
3715
+ interface RefreshPayloadRequest {
3716
+ /** Application definition ID. */
3717
+ appDefId?: string;
3718
+ /** Trigger key. */
3719
+ triggerKey?: string;
3720
+ /** Payload to refresh. */
3721
+ payload?: Record<string, any> | null;
3722
+ /** External entity ID. */
3723
+ externalEntityId?: string | null;
3724
+ }
3725
+ interface RefreshPayloadResponse {
3726
+ /** Updated payload. */
3727
+ payload?: Record<string, any> | null;
3728
+ /** If the automation activation should be canceled (default is false) */
3729
+ cancelActivation?: boolean | null;
3730
+ }
3731
+ interface RunAutomationRequest {
3732
+ /** App of the automation trigger */
3733
+ appId?: string;
3734
+ /** Trigger key of the action */
3735
+ triggerKey?: string;
3736
+ /** Payload of the triggered event */
3737
+ triggerPayload?: Record<string, any> | null;
3738
+ /** Specific automation id to run */
3739
+ automationId?: string;
3740
+ /** Schema of the trigger */
3741
+ triggerSchema?: Record<string, any> | null;
3742
+ }
3743
+ interface RunAutomationResponse {
3744
+ /** Automation activation output payload */
3745
+ output?: Record<string, any> | null;
3746
+ }
3747
+ interface ReportEventResponseNonNullableFields {
3748
+ activationIds: string[];
3749
+ }
3750
+ interface ApplicationErrorNonNullableFields$1 {
3751
+ code: string;
3752
+ description: string;
3753
+ }
3754
+ interface ItemMetadataNonNullableFields$1 {
3755
+ originalIndex: number;
3756
+ success: boolean;
3757
+ error?: ApplicationErrorNonNullableFields$1;
3758
3758
  }
3759
3759
  interface IdempotencyNonNullableFields {
3760
3760
  key: string;
@@ -3949,9 +3949,7 @@ declare const bulkCancelEvent: MaybeContext<BuildRESTFunction<typeof bulkCancelE
3949
3949
  declare const cancelEvent: MaybeContext<BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1>;
3950
3950
 
3951
3951
  type _publicOnActivationStatusChangedType = typeof onActivationStatusChanged$1;
3952
- /**
3953
- * activation status changed message
3954
- */
3952
+ /** */
3955
3953
  declare const onActivationStatusChanged: ReturnType<typeof createEventModule$1<_publicOnActivationStatusChangedType>>;
3956
3954
 
3957
3955
  type index_d$1_ActionActionOneOf = ActionActionOneOf;
@@ -4163,9 +4161,9 @@ interface ActionSettings {
4163
4161
  disableConditionAddition?: boolean;
4164
4162
  }
4165
4163
  declare enum Domain {
4166
- /** User domain (default) */
4164
+ /** User domain (default). */
4167
4165
  USER = "USER",
4168
- /** Wix domain */
4166
+ /** Wix domain. */
4169
4167
  WIX = "WIX"
4170
4168
  }
4171
4169
  interface AuditInfo extends AuditInfoIdOneOf {
@@ -4242,19 +4240,19 @@ declare enum Operator {
4242
4240
  AND = "AND"
4243
4241
  }
4244
4242
  declare enum Type {
4245
- /** Automation will be triggered according to the trigger configuration */
4243
+ /** Automation will be triggered according to the trigger configuration. */
4246
4244
  UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
4247
- /** App defined Action */
4245
+ /** App defined Action. */
4248
4246
  APP_DEFINED = "APP_DEFINED",
4249
- /** Condition Action */
4247
+ /** Condition Action. */
4250
4248
  CONDITION = "CONDITION",
4251
- /** Delay Action */
4249
+ /** Delay Action. */
4252
4250
  DELAY = "DELAY",
4253
- /** RateLimit Action */
4251
+ /** RateLimit Action. */
4254
4252
  RATE_LIMIT = "RATE_LIMIT",
4255
- /** Set Variables Action */
4253
+ /** Set Variables Action. */
4256
4254
  SET_VARIABLES = "SET_VARIABLES",
4257
- /** Output Action */
4255
+ /** Output Action. */
4258
4256
  OUTPUT = "OUTPUT"
4259
4257
  }
4260
4258
  interface AppDefinedAction {
@@ -4386,14 +4384,16 @@ interface ActionInfoOneOf {
4386
4384
  rateLimitInfo?: RateLimitAction;
4387
4385
  }
4388
4386
  declare enum Origin {
4389
- /** default value. this is unused */
4387
+ /** Default value. This is unused. */
4390
4388
  UNKNOWN_ORIGIN = "UNKNOWN_ORIGIN",
4391
- /** user created automation */
4389
+ /** User created automation. */
4392
4390
  USER = "USER",
4393
- /** automation created by application (site specific) */
4391
+ /** Automation created by application (site specific). */
4394
4392
  APPLICATION = "APPLICATION",
4395
- /** preinstalled application automation */
4396
- PREINSTALLED = "PREINSTALLED"
4393
+ /** Preinstalled application automation. */
4394
+ PREINSTALLED = "PREINSTALLED",
4395
+ /** Automation created from a recipe. */
4396
+ RECIPE = "RECIPE"
4397
4397
  }
4398
4398
  interface ApplicationOrigin {
4399
4399
  /** Application ID. */
@@ -4428,165 +4428,45 @@ interface AutomationSettings {
4428
4428
  */
4429
4429
  readonly?: boolean;
4430
4430
  /**
4431
- * Whether the option to delete the automation from the site is disabled.
4432
- * Default: `false`
4433
- */
4434
- disableDelete?: boolean;
4435
- /**
4436
- * Whether the option to change the automation status (from active to inactive and vice versa) is disabled.
4437
- * Default: `false`
4438
- */
4439
- disableStatusChange?: boolean;
4440
- /** Automation action settings. */
4441
- actionSettings?: ActionSettings;
4442
- }
4443
- interface DraftInfo {
4444
- /**
4445
- * optional - automationId of the original automation
4446
- * @readonly
4447
- */
4448
- originalAutomationId?: string | null;
4449
- }
4450
- interface UpdatedWithPreviousEntity {
4451
- /** previous automation */
4452
- previousAutomation?: Automation;
4453
- /** updated automation */
4454
- currentAutomation?: Automation;
4455
- }
4456
- interface DeletedWithEntity {
4457
- /** Deleted automation */
4458
- automation?: Automation;
4459
- }
4460
- interface DraftPublished {
4461
- /** Draft automation ID */
4462
- draftAutomationId?: string;
4463
- /**
4464
- * Draft original automation.
4465
- * if it's not a draft of an existing automation, the draft original automation would be the draft itself
4466
- */
4467
- draftOriginalAutomation?: Automation;
4468
- /** Updated automation after publishing the draft. */
4469
- updatedAutomation?: Automation;
4470
- }
4471
- interface GetAutomationRevisionRequest {
4472
- /** Automation ID. */
4473
- automationId?: string;
4474
- /** Automation revision. */
4475
- revision?: string | null;
4476
- }
4477
- interface GetAutomationRevisionResponse {
4478
- /** Automation with the relevant revision. */
4479
- automation?: Automation;
4480
- }
4481
- interface DomainEvent extends DomainEventBodyOneOf {
4482
- createdEvent?: EntityCreatedEvent;
4483
- updatedEvent?: EntityUpdatedEvent;
4484
- deletedEvent?: EntityDeletedEvent;
4485
- actionEvent?: ActionEvent;
4486
- /**
4487
- * Unique event ID.
4488
- * Allows clients to ignore duplicate webhooks.
4489
- */
4490
- _id?: string;
4491
- /**
4492
- * Assumes actions are also always typed to an entity_type
4493
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
4494
- */
4495
- entityFqdn?: string;
4496
- /**
4497
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
4498
- * This is although the created/updated/deleted notion is duplication of the oneof types
4499
- * Example: created/updated/deleted/started/completed/email_opened
4500
- */
4501
- slug?: string;
4502
- /** ID of the entity associated with the event. */
4503
- entityId?: string;
4504
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
4505
- eventTime?: Date | null;
4506
- /**
4507
- * Whether the event was triggered as a result of a privacy regulation application
4508
- * (for example, GDPR).
4431
+ * Whether the option to delete the automation from the site is disabled.
4432
+ * Default: `false`
4509
4433
  */
4510
- triggeredByAnonymizeRequest?: boolean | null;
4511
- /** If present, indicates the action that triggered the event. */
4512
- originatedFrom?: string | null;
4434
+ disableDelete?: boolean;
4513
4435
  /**
4514
- * A sequence number defining the order of updates to the underlying entity.
4515
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
4516
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
4517
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
4518
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
4519
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
4436
+ * Whether the option to change the automation status (from active to inactive and vice versa) is disabled.
4437
+ * Default: `false`
4520
4438
  */
4521
- entityEventSequence?: string | null;
4522
- }
4523
- /** @oneof */
4524
- interface DomainEventBodyOneOf {
4525
- createdEvent?: EntityCreatedEvent;
4526
- updatedEvent?: EntityUpdatedEvent;
4527
- deletedEvent?: EntityDeletedEvent;
4528
- actionEvent?: ActionEvent;
4529
- }
4530
- interface EntityCreatedEvent {
4531
- entity?: string;
4532
- }
4533
- interface RestoreInfo {
4534
- deletedDate?: Date | null;
4439
+ disableStatusChange?: boolean;
4440
+ /** Automation action settings. */
4441
+ actionSettings?: ActionSettings;
4535
4442
  }
4536
- interface EntityUpdatedEvent {
4443
+ interface DraftInfo {
4537
4444
  /**
4538
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4539
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4540
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4445
+ * Optional - automationId of the original automation.
4446
+ * @readonly
4541
4447
  */
4542
- currentEntity?: string;
4543
- }
4544
- interface EntityDeletedEvent {
4545
- /** Entity that was deleted */
4546
- deletedEntity?: string | null;
4547
- }
4548
- interface ActionEvent {
4549
- body?: string;
4550
- }
4551
- interface MessageEnvelope {
4552
- /** App instance ID. */
4553
- instanceId?: string | null;
4554
- /** Event type. */
4555
- eventType?: string;
4556
- /** The identification type and identity data. */
4557
- identity?: IdentificationData;
4558
- /** Stringify payload. */
4559
- data?: string;
4448
+ originalAutomationId?: string | null;
4560
4449
  }
4561
- interface IdentificationData extends IdentificationDataIdOneOf {
4562
- /** ID of a site visitor that has not logged in to the site. */
4563
- anonymousVisitorId?: string;
4564
- /** ID of a site visitor that has logged in to the site. */
4565
- memberId?: string;
4566
- /** ID of a Wix user (site owner, contributor, etc.). */
4567
- wixUserId?: string;
4568
- /** ID of an app. */
4569
- appId?: string;
4570
- /** @readonly */
4571
- identityType?: WebhookIdentityType;
4450
+ interface UpdatedWithPreviousEntity {
4451
+ /** previous automation */
4452
+ previousAutomation?: Automation;
4453
+ /** updated automation */
4454
+ currentAutomation?: Automation;
4572
4455
  }
4573
- /** @oneof */
4574
- interface IdentificationDataIdOneOf {
4575
- /** ID of a site visitor that has not logged in to the site. */
4576
- anonymousVisitorId?: string;
4577
- /** ID of a site visitor that has logged in to the site. */
4578
- memberId?: string;
4579
- /** ID of a Wix user (site owner, contributor, etc.). */
4580
- wixUserId?: string;
4581
- /** ID of an app. */
4582
- appId?: string;
4456
+ interface DeletedWithEntity {
4457
+ /** Deleted automation */
4458
+ automation?: Automation;
4583
4459
  }
4584
- declare enum WebhookIdentityType {
4585
- UNKNOWN = "UNKNOWN",
4586
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4587
- MEMBER = "MEMBER",
4588
- WIX_USER = "WIX_USER",
4589
- APP = "APP"
4460
+ interface DraftPublished {
4461
+ /** Draft automation ID */
4462
+ draftAutomationId?: string;
4463
+ /**
4464
+ * Draft original automation.
4465
+ * if it's not a draft of an existing automation, the draft original automation would be the draft itself
4466
+ */
4467
+ draftOriginalAutomation?: Automation;
4468
+ /** Updated automation after publishing the draft. */
4469
+ updatedAutomation?: Automation;
4590
4470
  }
4591
4471
  interface CreateAutomationRequest {
4592
4472
  /** Automation to be created. */
@@ -4868,6 +4748,76 @@ interface Cursors {
4868
4748
  /** Cursor pointing to the previous page in the list of results. */
4869
4749
  prev?: string | null;
4870
4750
  }
4751
+ interface DomainEvent extends DomainEventBodyOneOf {
4752
+ createdEvent?: EntityCreatedEvent;
4753
+ updatedEvent?: EntityUpdatedEvent;
4754
+ deletedEvent?: EntityDeletedEvent;
4755
+ actionEvent?: ActionEvent;
4756
+ /**
4757
+ * Unique event ID.
4758
+ * Allows clients to ignore duplicate webhooks.
4759
+ */
4760
+ _id?: string;
4761
+ /**
4762
+ * Assumes actions are also always typed to an entity_type
4763
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
4764
+ */
4765
+ entityFqdn?: string;
4766
+ /**
4767
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
4768
+ * This is although the created/updated/deleted notion is duplication of the oneof types
4769
+ * Example: created/updated/deleted/started/completed/email_opened
4770
+ */
4771
+ slug?: string;
4772
+ /** ID of the entity associated with the event. */
4773
+ entityId?: string;
4774
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
4775
+ eventTime?: Date | null;
4776
+ /**
4777
+ * Whether the event was triggered as a result of a privacy regulation application
4778
+ * (for example, GDPR).
4779
+ */
4780
+ triggeredByAnonymizeRequest?: boolean | null;
4781
+ /** If present, indicates the action that triggered the event. */
4782
+ originatedFrom?: string | null;
4783
+ /**
4784
+ * A sequence number defining the order of updates to the underlying entity.
4785
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
4786
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
4787
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
4788
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
4789
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
4790
+ */
4791
+ entityEventSequence?: string | null;
4792
+ }
4793
+ /** @oneof */
4794
+ interface DomainEventBodyOneOf {
4795
+ createdEvent?: EntityCreatedEvent;
4796
+ updatedEvent?: EntityUpdatedEvent;
4797
+ deletedEvent?: EntityDeletedEvent;
4798
+ actionEvent?: ActionEvent;
4799
+ }
4800
+ interface EntityCreatedEvent {
4801
+ entity?: string;
4802
+ }
4803
+ interface RestoreInfo {
4804
+ deletedDate?: Date | null;
4805
+ }
4806
+ interface EntityUpdatedEvent {
4807
+ /**
4808
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4809
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4810
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4811
+ */
4812
+ currentEntity?: string;
4813
+ }
4814
+ interface EntityDeletedEvent {
4815
+ /** Entity that was deleted */
4816
+ deletedEntity?: string | null;
4817
+ }
4818
+ interface ActionEvent {
4819
+ body?: string;
4820
+ }
4871
4821
  interface Empty {
4872
4822
  }
4873
4823
  interface CopyAutomationRequest {
@@ -5481,6 +5431,56 @@ interface UpgradeCTA {
5481
5431
  /** CTA button label. */
5482
5432
  label?: string;
5483
5433
  }
5434
+ interface MessageEnvelope {
5435
+ /** App instance ID. */
5436
+ instanceId?: string | null;
5437
+ /** Event type. */
5438
+ eventType?: string;
5439
+ /** The identification type and identity data. */
5440
+ identity?: IdentificationData;
5441
+ /** Stringify payload. */
5442
+ data?: string;
5443
+ }
5444
+ interface IdentificationData extends IdentificationDataIdOneOf {
5445
+ /** ID of a site visitor that has not logged in to the site. */
5446
+ anonymousVisitorId?: string;
5447
+ /** ID of a site visitor that has logged in to the site. */
5448
+ memberId?: string;
5449
+ /** ID of a Wix user (site owner, contributor, etc.). */
5450
+ wixUserId?: string;
5451
+ /** ID of an app. */
5452
+ appId?: string;
5453
+ /** @readonly */
5454
+ identityType?: WebhookIdentityType;
5455
+ }
5456
+ /** @oneof */
5457
+ interface IdentificationDataIdOneOf {
5458
+ /** ID of a site visitor that has not logged in to the site. */
5459
+ anonymousVisitorId?: string;
5460
+ /** ID of a site visitor that has logged in to the site. */
5461
+ memberId?: string;
5462
+ /** ID of a Wix user (site owner, contributor, etc.). */
5463
+ wixUserId?: string;
5464
+ /** ID of an app. */
5465
+ appId?: string;
5466
+ }
5467
+ declare enum WebhookIdentityType {
5468
+ UNKNOWN = "UNKNOWN",
5469
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
5470
+ MEMBER = "MEMBER",
5471
+ WIX_USER = "WIX_USER",
5472
+ APP = "APP"
5473
+ }
5474
+ interface GetAutomationRevisionRequest {
5475
+ /** Automation ID. */
5476
+ automationId?: string;
5477
+ /** Automation revision. */
5478
+ revision?: string | null;
5479
+ }
5480
+ interface GetAutomationRevisionResponse {
5481
+ /** Automation with the relevant revision. */
5482
+ automation?: Automation;
5483
+ }
5484
5484
  interface ApplicationOriginNonNullableFields {
5485
5485
  appId: string;
5486
5486
  }
@@ -5732,19 +5732,19 @@ interface AutomationCreatedEnvelope {
5732
5732
  entity: Automation;
5733
5733
  metadata: EventMetadata;
5734
5734
  }
5735
- interface AutomationUpdatedEnvelope {
5736
- entity: Automation;
5735
+ interface AutomationDeletedEnvelope {
5737
5736
  metadata: EventMetadata;
5738
5737
  }
5739
- interface AutomationDeletedEnvelope {
5738
+ interface AutomationDeletedWithEntityEnvelope {
5739
+ data: DeletedWithEntity;
5740
5740
  metadata: EventMetadata;
5741
5741
  }
5742
- interface AutomationUpdatedWithPreviousEntityEnvelope {
5743
- data: UpdatedWithPreviousEntity;
5742
+ interface AutomationUpdatedEnvelope {
5743
+ entity: Automation;
5744
5744
  metadata: EventMetadata;
5745
5745
  }
5746
- interface AutomationDeletedWithEntityEnvelope {
5747
- data: DeletedWithEntity;
5746
+ interface AutomationUpdatedWithPreviousEntityEnvelope {
5747
+ data: UpdatedWithPreviousEntity;
5748
5748
  metadata: EventMetadata;
5749
5749
  }
5750
5750
  interface GetAutomationOptions {
@@ -6164,10 +6164,10 @@ interface GetActionsQuotaInfoSignature {
6164
6164
  (): Promise<GetActionsQuotaInfoResponse & GetActionsQuotaInfoResponseNonNullableFields>;
6165
6165
  }
6166
6166
  declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
6167
- declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
6168
6167
  declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
6169
- declare const onAutomationUpdatedWithPreviousEntity$1: EventDefinition<AutomationUpdatedWithPreviousEntityEnvelope, "wix.automations.v2.automation_updated_with_previous_entity">;
6170
6168
  declare const onAutomationDeletedWithEntity$1: EventDefinition<AutomationDeletedWithEntityEnvelope, "wix.automations.v2.automation_deleted_with_entity">;
6169
+ declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
6170
+ declare const onAutomationUpdatedWithPreviousEntity$1: EventDefinition<AutomationUpdatedWithPreviousEntityEnvelope, "wix.automations.v2.automation_updated_with_previous_entity">;
6171
6171
 
6172
6172
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
6173
6173
 
@@ -6196,22 +6196,22 @@ type _publicOnAutomationCreatedType = typeof onAutomationCreated$1;
6196
6196
  /** */
6197
6197
  declare const onAutomationCreated: ReturnType<typeof createEventModule<_publicOnAutomationCreatedType>>;
6198
6198
 
6199
- type _publicOnAutomationUpdatedType = typeof onAutomationUpdated$1;
6200
- /** */
6201
- declare const onAutomationUpdated: ReturnType<typeof createEventModule<_publicOnAutomationUpdatedType>>;
6202
-
6203
6199
  type _publicOnAutomationDeletedType = typeof onAutomationDeleted$1;
6204
6200
  /** */
6205
6201
  declare const onAutomationDeleted: ReturnType<typeof createEventModule<_publicOnAutomationDeletedType>>;
6206
6202
 
6207
- type _publicOnAutomationUpdatedWithPreviousEntityType = typeof onAutomationUpdatedWithPreviousEntity$1;
6208
- /** */
6209
- declare const onAutomationUpdatedWithPreviousEntity: ReturnType<typeof createEventModule<_publicOnAutomationUpdatedWithPreviousEntityType>>;
6210
-
6211
6203
  type _publicOnAutomationDeletedWithEntityType = typeof onAutomationDeletedWithEntity$1;
6212
6204
  /** */
6213
6205
  declare const onAutomationDeletedWithEntity: ReturnType<typeof createEventModule<_publicOnAutomationDeletedWithEntityType>>;
6214
6206
 
6207
+ type _publicOnAutomationUpdatedType = typeof onAutomationUpdated$1;
6208
+ /** */
6209
+ declare const onAutomationUpdated: ReturnType<typeof createEventModule<_publicOnAutomationUpdatedType>>;
6210
+
6211
+ type _publicOnAutomationUpdatedWithPreviousEntityType = typeof onAutomationUpdatedWithPreviousEntity$1;
6212
+ /** */
6213
+ declare const onAutomationUpdatedWithPreviousEntity: ReturnType<typeof createEventModule<_publicOnAutomationUpdatedWithPreviousEntityType>>;
6214
+
6215
6215
  type index_d_Action = Action;
6216
6216
  type index_d_ActionConfigurationError = ActionConfigurationError;
6217
6217
  type index_d_ActionErrorType = ActionErrorType;