@wix/automations 1.0.68 → 1.0.70

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,13 +1891,13 @@ interface AutomationCreatedEnvelope$1 {
1891
1891
  entity: Automation$2;
1892
1892
  metadata: EventMetadata$2;
1893
1893
  }
1894
- interface AutomationDeletedEnvelope$1 {
1895
- metadata: EventMetadata$2;
1896
- }
1897
1894
  interface AutomationUpdatedEnvelope$1 {
1898
1895
  entity: Automation$2;
1899
1896
  metadata: EventMetadata$2;
1900
1897
  }
1898
+ interface AutomationDeletedEnvelope$1 {
1899
+ metadata: EventMetadata$2;
1900
+ }
1901
1901
  interface AutomationDeletedWithEntityEnvelope$1 {
1902
1902
  data: DeletedWithEntity$1;
1903
1903
  metadata: EventMetadata$2;
@@ -2212,8 +2212,8 @@ 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 onAutomationDeleted$3: EventDefinition<AutomationDeletedEnvelope$1, "wix.automations.v1.automation_deleted">;
2216
2215
  declare const onAutomationUpdated$3: EventDefinition<AutomationUpdatedEnvelope$1, "wix.automations.v1.automation_updated">;
2216
+ declare const onAutomationDeleted$3: EventDefinition<AutomationDeletedEnvelope$1, "wix.automations.v1.automation_deleted">;
2217
2217
  declare const onAutomationDeletedWithEntity$3: EventDefinition<AutomationDeletedWithEntityEnvelope$1, "wix.automations.v1.automation_deleted_with_entity">;
2218
2218
  declare const onAutomationUpdatedWithPreviousEntity$3: EventDefinition<AutomationUpdatedWithPreviousEntityEnvelope$1, "wix.automations.v1.automation_updated_with_previous_entity">;
2219
2219
 
@@ -2236,14 +2236,14 @@ type _publicOnAutomationCreatedType$1 = typeof onAutomationCreated$3;
2236
2236
  /** */
2237
2237
  declare const onAutomationCreated$2: ReturnType<typeof createEventModule$2<_publicOnAutomationCreatedType>>;
2238
2238
 
2239
- type _publicOnAutomationDeletedType$1 = typeof onAutomationDeleted$3;
2240
- /** */
2241
- declare const onAutomationDeleted$2: ReturnType<typeof createEventModule$2<_publicOnAutomationDeletedType>>;
2242
-
2243
2239
  type _publicOnAutomationUpdatedType$1 = typeof onAutomationUpdated$3;
2244
2240
  /** */
2245
2241
  declare const onAutomationUpdated$2: ReturnType<typeof createEventModule$2<_publicOnAutomationUpdatedType>>;
2246
2242
 
2243
+ type _publicOnAutomationDeletedType$1 = typeof onAutomationDeleted$3;
2244
+ /** */
2245
+ declare const onAutomationDeleted$2: ReturnType<typeof createEventModule$2<_publicOnAutomationDeletedType>>;
2246
+
2247
2247
  type _publicOnAutomationDeletedWithEntityType$1 = typeof onAutomationDeletedWithEntity$3;
2248
2248
  /** */
2249
2249
  declare const onAutomationDeletedWithEntity$2: ReturnType<typeof createEventModule$2<_publicOnAutomationDeletedWithEntityType>>;
@@ -2635,7 +2635,9 @@ declare enum Origin$1 {
2635
2635
  /** Automation created by application (site specific). */
2636
2636
  APPLICATION = "APPLICATION",
2637
2637
  /** Preinstalled application automation. */
2638
- PREINSTALLED = "PREINSTALLED"
2638
+ PREINSTALLED = "PREINSTALLED",
2639
+ /** Automation created from a recipe. */
2640
+ RECIPE = "RECIPE"
2639
2641
  }
2640
2642
  interface ApplicationOrigin$1 {
2641
2643
  /** Application ID. */
@@ -3022,10 +3024,6 @@ declare enum WebhookIdentityType$1 {
3022
3024
  WIX_USER = "WIX_USER",
3023
3025
  APP = "APP"
3024
3026
  }
3025
- interface BatchActivationRequest {
3026
- /** List of Activation-Request. */
3027
- activationRequests?: ActivationRequest[];
3028
- }
3029
3027
  interface ActivationRequest {
3030
3028
  /** Activation's ID. */
3031
3029
  activationId?: string;
@@ -3253,6 +3251,219 @@ interface ActionsData {
3253
3251
  /** Map of action id to action data. */
3254
3252
  actions?: Record<string, Action$1>;
3255
3253
  }
3254
+ interface ActionStatus {
3255
+ /** Action's status. */
3256
+ _id?: string;
3257
+ /** Activation's ID. */
3258
+ activationId?: string;
3259
+ /** Action's name. */
3260
+ actionName?: string | null;
3261
+ /** Action's status. */
3262
+ status?: Status$1;
3263
+ /** Action's error reason (if there is one). */
3264
+ errorReason?: string | null;
3265
+ /** Activation external id. */
3266
+ activationExternalId?: string;
3267
+ /** Trigger app id. */
3268
+ triggerAppId?: string | null;
3269
+ /** Trigger key. */
3270
+ triggerKey?: string | null;
3271
+ /** The configuration correlation id */
3272
+ configurationCorrelationId?: string | null;
3273
+ }
3274
+ interface BatchActivationRequest {
3275
+ /** List of Activation-Request. */
3276
+ activationRequests?: ActivationRequest[];
3277
+ }
3278
+ interface Empty$1 {
3279
+ }
3280
+ interface ActivationActionStatusChanged extends ActivationActionStatusChangedStatusInfoOneOf {
3281
+ /** Started status information */
3282
+ startedInfo?: StartedStatusInfo;
3283
+ /** Ended status information */
3284
+ endedInfo?: EndedStatusInfo;
3285
+ /** Failed status information */
3286
+ failedInfo?: FailedStatusInfo;
3287
+ /** Action ID */
3288
+ _id?: string;
3289
+ /** Activation ID */
3290
+ activationId?: string;
3291
+ /** Automation info */
3292
+ automationInfo?: AutomationInfo;
3293
+ /** Action type */
3294
+ type?: Type$1;
3295
+ /** Event date */
3296
+ statusChangedDate?: Date | null;
3297
+ /** Action activation status */
3298
+ status?: ActivationActionStatusChangedStatus;
3299
+ }
3300
+ /** @oneof */
3301
+ interface ActivationActionStatusChangedStatusInfoOneOf {
3302
+ /** Started status information */
3303
+ startedInfo?: StartedStatusInfo;
3304
+ /** Ended status information */
3305
+ endedInfo?: EndedStatusInfo;
3306
+ /** Failed status information */
3307
+ failedInfo?: FailedStatusInfo;
3308
+ }
3309
+ interface StartedStatusInfoAppDefinedActionInfo {
3310
+ /** Action input */
3311
+ input?: Record<string, any> | null;
3312
+ }
3313
+ interface DelayActionInfo {
3314
+ /** Indicates when this action becomes completed and the activation will move to the post actions */
3315
+ date?: Date | null;
3316
+ }
3317
+ interface ExpressionEvaluationResult {
3318
+ /** Indicates if the expression was evaluated to true or false */
3319
+ passed?: boolean;
3320
+ /** Indicates if there was an error in the evaluation process */
3321
+ error?: boolean;
3322
+ }
3323
+ interface AppDefinedActionInfo {
3324
+ /** Output returned by the action implementer. */
3325
+ output?: Record<string, any> | null;
3326
+ }
3327
+ interface ConditionActionInfo {
3328
+ /** Indicates that the condition `if` clause evaluated to `true`. */
3329
+ passed?: boolean;
3330
+ /** Collects results per each expression evaluation that took place */
3331
+ expressionResults?: Record<string, ExpressionEvaluationResult>;
3332
+ }
3333
+ interface RateLimitActionInfo {
3334
+ /** Indicates if the rate limiter passed (not reached the quota) */
3335
+ passed?: boolean;
3336
+ }
3337
+ interface AutomationInfo extends AutomationInfoOriginInfoOneOf {
3338
+ /** Application info */
3339
+ applicationInfo?: ApplicationOrigin$1;
3340
+ /** Preinstalled info */
3341
+ preinstalledInfo?: PreinstalledOrigin$1;
3342
+ /** Automation ID */
3343
+ _id?: string;
3344
+ /** Origin type */
3345
+ origin?: Origin$1;
3346
+ }
3347
+ /** @oneof */
3348
+ interface AutomationInfoOriginInfoOneOf {
3349
+ /** Application info */
3350
+ applicationInfo?: ApplicationOrigin$1;
3351
+ /** Preinstalled info */
3352
+ preinstalledInfo?: PreinstalledOrigin$1;
3353
+ }
3354
+ declare enum ActivationActionStatusChangedStatus {
3355
+ UNKNOWN_ACTION_ACTIVATION_STATUS = "UNKNOWN_ACTION_ACTIVATION_STATUS",
3356
+ /**
3357
+ * Indicates that action activation has started and is in progress.
3358
+ * Relevant to action types: APP_DEFINED, DELAY.
3359
+ */
3360
+ STARTED = "STARTED",
3361
+ /**
3362
+ * Indicates that the action activation was completed without errors.
3363
+ * Relevant to action types: APP_DEFINED, DELAY, CONDITION, RATE_LIMIT.
3364
+ */
3365
+ ENDED = "ENDED",
3366
+ /**
3367
+ * Indicates that the action was skipped and post actions won't start.
3368
+ * Relevant to action types: APP_DEFINED.
3369
+ */
3370
+ SKIPPED = "SKIPPED",
3371
+ /**
3372
+ * Indicates that the action failed.
3373
+ * Relevant to action types: APP_DEFINED, DELAY, RATE_LIMIT.
3374
+ */
3375
+ FAILED = "FAILED"
3376
+ }
3377
+ interface StartedStatusInfo extends StartedStatusInfoTypeInfoOneOf {
3378
+ /** APP DEFINED action additional info */
3379
+ appDefinedActionInfo?: StartedStatusInfoAppDefinedActionInfo;
3380
+ /** Delay action additional info */
3381
+ delayActionInfo?: DelayActionInfo;
3382
+ }
3383
+ /** @oneof */
3384
+ interface StartedStatusInfoTypeInfoOneOf {
3385
+ /** APP DEFINED action additional info */
3386
+ appDefinedActionInfo?: StartedStatusInfoAppDefinedActionInfo;
3387
+ /** Delay action additional info */
3388
+ delayActionInfo?: DelayActionInfo;
3389
+ }
3390
+ interface EndedStatusInfo extends EndedStatusInfoTypeInfoOneOf {
3391
+ /** APP DEFINED action additional info */
3392
+ appDefinedActionInfo?: AppDefinedActionInfo;
3393
+ /** Condition action additional info */
3394
+ conditionActionInfo?: ConditionActionInfo;
3395
+ /** Rate limit action additional info */
3396
+ rateLimitActionInfo?: RateLimitActionInfo;
3397
+ }
3398
+ /** @oneof */
3399
+ interface EndedStatusInfoTypeInfoOneOf {
3400
+ /** APP DEFINED action additional info */
3401
+ appDefinedActionInfo?: AppDefinedActionInfo;
3402
+ /** Condition action additional info */
3403
+ conditionActionInfo?: ConditionActionInfo;
3404
+ /** Rate limit action additional info */
3405
+ rateLimitActionInfo?: RateLimitActionInfo;
3406
+ }
3407
+ interface FailedStatusInfo {
3408
+ /** Error description */
3409
+ errorDescription?: string;
3410
+ /** Error code */
3411
+ errorCode?: string | null;
3412
+ }
3413
+ interface ActivationResumeAfterDelay {
3414
+ /** Activation identifier */
3415
+ _id?: string;
3416
+ /** Activation schedule identifier */
3417
+ scheduleId?: string;
3418
+ /** Activation schedule due date */
3419
+ scheduleDate?: Date | null;
3420
+ /** Activation payload */
3421
+ payload?: Record<string, any> | null;
3422
+ /** Activation Automation */
3423
+ automation?: Automation$1;
3424
+ /** Scheduled action identifier - with the intent to execute that action's post actions */
3425
+ scheduledActionId?: string;
3426
+ /** Optional - external entity id that this activation is related to */
3427
+ externalEntityId?: string | null;
3428
+ }
3429
+ interface ActionCompletedRequest {
3430
+ /** The execution identifier that was given to the spi provider when we invoked the action */
3431
+ executionIdentifier?: string;
3432
+ /** The result of invoking the action. Must conform to the output schema configured by the action provider. */
3433
+ result?: Record<string, any> | null;
3434
+ }
3435
+ interface RefreshPayloadRequest {
3436
+ /** Application definition ID. */
3437
+ appDefId?: string;
3438
+ /** Trigger key. */
3439
+ triggerKey?: string;
3440
+ /** Payload to refresh. */
3441
+ payload?: Record<string, any> | null;
3442
+ /** External entity ID. */
3443
+ externalEntityId?: string | null;
3444
+ }
3445
+ interface RefreshPayloadResponse {
3446
+ /** Updated payload. */
3447
+ payload?: Record<string, any> | null;
3448
+ /** If the automation activation should be canceled (default is false) */
3449
+ cancelActivation?: boolean | null;
3450
+ }
3451
+ interface RunAutomationRequest {
3452
+ /** App of the automation trigger */
3453
+ appId?: string;
3454
+ /** Trigger key of the action */
3455
+ triggerKey?: string;
3456
+ /** Payload of the triggered event */
3457
+ triggerPayload?: Record<string, any> | null;
3458
+ /** Specific automation id to run */
3459
+ automationId?: string;
3460
+ /** Schema of the trigger */
3461
+ triggerSchema?: Record<string, any> | null;
3462
+ }
3463
+ interface RunAutomationResponse {
3464
+ /** Automation activation output payload */
3465
+ output?: Record<string, any> | null;
3466
+ }
3256
3467
  interface ActivationScheduleRequested {
3257
3468
  /** Activation identifier */
3258
3469
  _id?: string;
@@ -3521,8 +3732,6 @@ interface ExecuteFromActionRequest {
3521
3732
  }
3522
3733
  interface ExecuteFromActionResponse {
3523
3734
  }
3524
- interface Empty$1 {
3525
- }
3526
3735
  interface ActivationScheduleCompleted {
3527
3736
  /** Activation identifier */
3528
3737
  _id?: string;
@@ -3537,213 +3746,6 @@ interface ActivationScheduleCompleted {
3537
3746
  /** Optional - external entity id that this activation is related to */
3538
3747
  externalEntityId?: string | null;
3539
3748
  }
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
3749
  interface ReportEventResponseNonNullableFields {
3748
3750
  activationIds: string[];
3749
3751
  }
@@ -3949,7 +3951,9 @@ declare const bulkCancelEvent: MaybeContext<BuildRESTFunction<typeof bulkCancelE
3949
3951
  declare const cancelEvent: MaybeContext<BuildRESTFunction<typeof cancelEvent$1> & typeof cancelEvent$1>;
3950
3952
 
3951
3953
  type _publicOnActivationStatusChangedType = typeof onActivationStatusChanged$1;
3952
- /** */
3954
+ /**
3955
+ * activation status changed message
3956
+ */
3953
3957
  declare const onActivationStatusChanged: ReturnType<typeof createEventModule$1<_publicOnActivationStatusChangedType>>;
3954
3958
 
3955
3959
  type context$1_ActionActionOneOf = ActionActionOneOf;
@@ -4468,6 +4472,126 @@ interface DraftPublished {
4468
4472
  /** Updated automation after publishing the draft. */
4469
4473
  updatedAutomation?: Automation;
4470
4474
  }
4475
+ interface GetAutomationRevisionRequest {
4476
+ /** Automation ID. */
4477
+ automationId?: string;
4478
+ /** Automation revision. */
4479
+ revision?: string | null;
4480
+ }
4481
+ interface GetAutomationRevisionResponse {
4482
+ /** Automation with the relevant revision. */
4483
+ automation?: Automation;
4484
+ }
4485
+ interface DomainEvent extends DomainEventBodyOneOf {
4486
+ createdEvent?: EntityCreatedEvent;
4487
+ updatedEvent?: EntityUpdatedEvent;
4488
+ deletedEvent?: EntityDeletedEvent;
4489
+ actionEvent?: ActionEvent;
4490
+ /**
4491
+ * Unique event ID.
4492
+ * Allows clients to ignore duplicate webhooks.
4493
+ */
4494
+ _id?: string;
4495
+ /**
4496
+ * Assumes actions are also always typed to an entity_type
4497
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
4498
+ */
4499
+ entityFqdn?: string;
4500
+ /**
4501
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
4502
+ * This is although the created/updated/deleted notion is duplication of the oneof types
4503
+ * Example: created/updated/deleted/started/completed/email_opened
4504
+ */
4505
+ slug?: string;
4506
+ /** ID of the entity associated with the event. */
4507
+ entityId?: string;
4508
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
4509
+ eventTime?: Date | null;
4510
+ /**
4511
+ * Whether the event was triggered as a result of a privacy regulation application
4512
+ * (for example, GDPR).
4513
+ */
4514
+ triggeredByAnonymizeRequest?: boolean | null;
4515
+ /** If present, indicates the action that triggered the event. */
4516
+ originatedFrom?: string | null;
4517
+ /**
4518
+ * A sequence number defining the order of updates to the underlying entity.
4519
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
4520
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
4521
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
4522
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
4523
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
4524
+ */
4525
+ entityEventSequence?: string | null;
4526
+ }
4527
+ /** @oneof */
4528
+ interface DomainEventBodyOneOf {
4529
+ createdEvent?: EntityCreatedEvent;
4530
+ updatedEvent?: EntityUpdatedEvent;
4531
+ deletedEvent?: EntityDeletedEvent;
4532
+ actionEvent?: ActionEvent;
4533
+ }
4534
+ interface EntityCreatedEvent {
4535
+ entity?: string;
4536
+ }
4537
+ interface RestoreInfo {
4538
+ deletedDate?: Date | null;
4539
+ }
4540
+ interface EntityUpdatedEvent {
4541
+ /**
4542
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4543
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4544
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4545
+ */
4546
+ currentEntity?: string;
4547
+ }
4548
+ interface EntityDeletedEvent {
4549
+ /** Entity that was deleted */
4550
+ deletedEntity?: string | null;
4551
+ }
4552
+ interface ActionEvent {
4553
+ body?: string;
4554
+ }
4555
+ interface MessageEnvelope {
4556
+ /** App instance ID. */
4557
+ instanceId?: string | null;
4558
+ /** Event type. */
4559
+ eventType?: string;
4560
+ /** The identification type and identity data. */
4561
+ identity?: IdentificationData;
4562
+ /** Stringify payload. */
4563
+ data?: string;
4564
+ }
4565
+ interface IdentificationData extends IdentificationDataIdOneOf {
4566
+ /** ID of a site visitor that has not logged in to the site. */
4567
+ anonymousVisitorId?: string;
4568
+ /** ID of a site visitor that has logged in to the site. */
4569
+ memberId?: string;
4570
+ /** ID of a Wix user (site owner, contributor, etc.). */
4571
+ wixUserId?: string;
4572
+ /** ID of an app. */
4573
+ appId?: string;
4574
+ /** @readonly */
4575
+ identityType?: WebhookIdentityType;
4576
+ }
4577
+ /** @oneof */
4578
+ interface IdentificationDataIdOneOf {
4579
+ /** ID of a site visitor that has not logged in to the site. */
4580
+ anonymousVisitorId?: string;
4581
+ /** ID of a site visitor that has logged in to the site. */
4582
+ memberId?: string;
4583
+ /** ID of a Wix user (site owner, contributor, etc.). */
4584
+ wixUserId?: string;
4585
+ /** ID of an app. */
4586
+ appId?: string;
4587
+ }
4588
+ declare enum WebhookIdentityType {
4589
+ UNKNOWN = "UNKNOWN",
4590
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4591
+ MEMBER = "MEMBER",
4592
+ WIX_USER = "WIX_USER",
4593
+ APP = "APP"
4594
+ }
4471
4595
  interface CreateAutomationRequest {
4472
4596
  /** Automation to be created. */
4473
4597
  automation: Automation;
@@ -4748,76 +4872,6 @@ interface Cursors {
4748
4872
  /** Cursor pointing to the previous page in the list of results. */
4749
4873
  prev?: string | null;
4750
4874
  }
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
- }
4821
4875
  interface Empty {
4822
4876
  }
4823
4877
  interface CopyAutomationRequest {
@@ -5431,56 +5485,6 @@ interface UpgradeCTA {
5431
5485
  /** CTA button label. */
5432
5486
  label?: string;
5433
5487
  }
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
5488
  interface ApplicationOriginNonNullableFields {
5485
5489
  appId: string;
5486
5490
  }