@wix/auto_sdk_automations_automations-v-2 1.0.8 → 1.0.9

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 (37) hide show
  1. package/build/cjs/index.d.ts +9 -3
  2. package/build/cjs/index.js +55 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/{automations-v2-automation-automations-v-2.universal-BCyd22mR.d.ts → index.typings.d.ts} +340 -1
  5. package/build/cjs/index.typings.js +1436 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +27 -2
  8. package/build/cjs/meta.js +40 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +9 -3
  11. package/build/es/index.mjs +54 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/{automations-v2-automation-automations-v-2.universal-BCyd22mR.d.mts → index.typings.d.mts} +340 -1
  14. package/build/es/index.typings.mjs +1373 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +27 -2
  17. package/build/es/meta.mjs +39 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +9 -3
  20. package/build/internal/cjs/index.js +55 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/{automations-v2-automation-automations-v-2.universal-BCyd22mR.d.ts → index.typings.d.ts} +340 -1
  23. package/build/internal/cjs/index.typings.js +1436 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -0
  25. package/build/internal/cjs/meta.d.ts +27 -2
  26. package/build/internal/cjs/meta.js +40 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +9 -3
  29. package/build/internal/es/index.mjs +54 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/{automations-v2-automation-automations-v-2.universal-BCyd22mR.d.mts → index.typings.d.mts} +340 -1
  32. package/build/internal/es/index.typings.mjs +1373 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -0
  34. package/build/internal/es/meta.d.mts +27 -2
  35. package/build/internal/es/meta.mjs +39 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  interface Automation extends AutomationOriginInfoOneOf {
2
4
  /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
3
5
  applicationInfo?: ApplicationOrigin;
@@ -112,6 +114,8 @@ declare enum Domain {
112
114
  /** Wix account-level domain. */
113
115
  WIX_ACCOUNT = "WIX_ACCOUNT"
114
116
  }
117
+ /** @enumType */
118
+ type DomainWithLiterals = Domain | 'USER' | 'WIX' | 'WIX_ACCOUNT';
115
119
  interface Enrichment {
116
120
  /**
117
121
  * Enrichment input mappings.
@@ -1803,6 +1807,29 @@ interface DraftsInfo {
1803
1807
  */
1804
1808
  draftAutomationIds?: string[];
1805
1809
  }
1810
+ interface BulkCountAutomationsWithDraftsRequest {
1811
+ /**
1812
+ * Array of filters in the following format:
1813
+ *
1814
+ * `"filter" :
1815
+ * [{
1816
+ * "fieldName1": "value1",
1817
+ * "fieldName2":{"$operator":"value2"}
1818
+ * }, {
1819
+ * "fieldName3": "value3",
1820
+ * "fieldName4":{"$operator":"value4"}
1821
+ * }]`
1822
+ *
1823
+ * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).
1824
+ * @minSize 1
1825
+ * @maxSize 3
1826
+ */
1827
+ filters?: Record<string, any>[] | null;
1828
+ }
1829
+ interface BulkCountAutomationsWithDraftsResponse {
1830
+ /** Total automations count */
1831
+ counts?: number[];
1832
+ }
1806
1833
  interface DeleteDraftAutomationRequest {
1807
1834
  /**
1808
1835
  * ID of the draft automation to delete.
@@ -2278,14 +2305,103 @@ interface AutomationCreatedEnvelope {
2278
2305
  entity: Automation;
2279
2306
  metadata: EventMetadata;
2280
2307
  }
2308
+ /**
2309
+ * Triggered when a new automation is created.
2310
+ * @permissionScope Manage Stores
2311
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2312
+ * @permissionScope Set Up Automations
2313
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2314
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2315
+ * @webhook
2316
+ * @eventType wix.automations.v2.automation_created
2317
+ * @slug created
2318
+ * @documentationMaturity preview
2319
+ */
2320
+ declare function onAutomationCreated(handler: (event: AutomationCreatedEnvelope) => void | Promise<void>): void;
2281
2321
  interface AutomationDeletedEnvelope {
2282
2322
  entity: Automation;
2283
2323
  metadata: EventMetadata;
2284
2324
  }
2325
+ /**
2326
+ * Triggered when an automation is deleted.
2327
+ * @permissionScope Manage Stores
2328
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2329
+ * @permissionScope Set Up Automations
2330
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2331
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2332
+ * @webhook
2333
+ * @eventType wix.automations.v2.automation_deleted
2334
+ * @slug deleted
2335
+ * @documentationMaturity preview
2336
+ */
2337
+ declare function onAutomationDeleted(handler: (event: AutomationDeletedEnvelope) => void | Promise<void>): void;
2285
2338
  interface AutomationUpdatedEnvelope {
2286
2339
  entity: Automation;
2287
2340
  metadata: EventMetadata;
2288
2341
  }
2342
+ /**
2343
+ * Triggered when an automation is updated.
2344
+ * @permissionScope Manage Stores
2345
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2346
+ * @permissionScope Set Up Automations
2347
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2348
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2349
+ * @webhook
2350
+ * @eventType wix.automations.v2.automation_updated
2351
+ * @slug updated
2352
+ * @documentationMaturity preview
2353
+ */
2354
+ declare function onAutomationUpdated(handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>): void;
2355
+ type AutomationNonNullablePaths = `applicationInfo.appId` | `preinstalledInfo.appId` | `createdBy.userId` | `createdBy.appId` | `updatedBy.userId` | `updatedBy.appId` | `name` | `configuration.status` | `configuration.trigger.appId` | `configuration.trigger.triggerKey` | `configuration.trigger.filters` | `configuration.trigger.filters.${number}._id` | `configuration.trigger.filters.${number}.fieldKey` | `configuration.trigger.filters.${number}.filterExpression` | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `configuration.trigger.rateLimit.maxActivationsExpression` | `configuration.trigger.rateLimit.durationTimeUnit` | `configuration.rootActionIds` | `origin` | `settings.hidden` | `settings.readonly` | `settings.disableDelete` | `settings.disableStatusChange` | `settings.actionSettings.permanentActionIds` | `settings.actionSettings.readonlyActionIds` | `settings.actionSettings.disableDelayAddition` | `settings.actionSettings.disableConditionAddition` | `archived`;
2356
+ /**
2357
+ * Creates an automation.
2358
+ * @param automation - Automation to create.
2359
+ * @public
2360
+ * @documentationMaturity preview
2361
+ * @requiredField automation
2362
+ * @requiredField automation.configuration
2363
+ * @requiredField automation.configuration.actions
2364
+ * @requiredField automation.configuration.rootActionIds
2365
+ * @requiredField automation.configuration.status
2366
+ * @requiredField automation.configuration.trigger
2367
+ * @requiredField automation.configuration.trigger.appId
2368
+ * @requiredField automation.configuration.trigger.triggerKey
2369
+ * @requiredField automation.name
2370
+ * @requiredField automation.origin
2371
+ * @permissionId AUTOMATIONS.AUTOMATION_CREATE
2372
+ * @applicableIdentity APP
2373
+ * @returns Details of the created automation.
2374
+ * @fqn wix.automations.v2.AutomationsService.CreateAutomation
2375
+ */
2376
+ declare function createAutomation(automation: NonNullablePaths<Automation, `configuration` | `configuration.actions` | `configuration.rootActionIds` | `configuration.status` | `configuration.trigger` | `configuration.trigger.appId` | `configuration.trigger.triggerKey` | `name` | `origin`>): Promise<NonNullablePaths<Automation, AutomationNonNullablePaths>>;
2377
+ /**
2378
+ * Retrieves an automation by ID.
2379
+ * @param automationId - Automation ID.
2380
+ * @public
2381
+ * @documentationMaturity preview
2382
+ * @requiredField automationId
2383
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2384
+ * @applicableIdentity APP
2385
+ * @returns Retrieved automation.
2386
+ * @fqn wix.automations.v2.AutomationsService.GetAutomation
2387
+ */
2388
+ declare function getAutomation(automationId: string): Promise<NonNullablePaths<Automation, AutomationNonNullablePaths>>;
2389
+ /**
2390
+ * Updates the specified automation.
2391
+ *
2392
+ * When an automation is updated, its `revision` property is incremented by 1. When updating an automation, you must specify the current revision number.
2393
+ * @param _id - Automation ID.
2394
+ * @public
2395
+ * @documentationMaturity preview
2396
+ * @requiredField _id
2397
+ * @requiredField automation
2398
+ * @requiredField automation.revision
2399
+ * @permissionId AUTOMATIONS.AUTOMATION_UPDATE
2400
+ * @applicableIdentity APP
2401
+ * @returns Updated automation.
2402
+ * @fqn wix.automations.v2.AutomationsService.UpdateAutomation
2403
+ */
2404
+ declare function updateAutomation(_id: string, automation: NonNullablePaths<UpdateAutomation, `revision`>): Promise<NonNullablePaths<Automation, AutomationNonNullablePaths>>;
2289
2405
  interface UpdateAutomation {
2290
2406
  /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
2291
2407
  applicationInfo?: ApplicationOrigin;
@@ -2355,6 +2471,43 @@ interface UpdateAutomation {
2355
2471
  */
2356
2472
  archived?: boolean;
2357
2473
  }
2474
+ /**
2475
+ * Deletes the specified automation.
2476
+ * @param automationId - Automation ID.
2477
+ * @public
2478
+ * @documentationMaturity preview
2479
+ * @requiredField automationId
2480
+ * @permissionId AUTOMATIONS.AUTOMATION_DELETE
2481
+ * @applicableIdentity APP
2482
+ * @fqn wix.automations.v2.AutomationsService.DeleteAutomation
2483
+ */
2484
+ declare function deleteAutomation(automationId: string): Promise<void>;
2485
+ /**
2486
+ * Deletes one or more automations.
2487
+ * @param automationIds - IDs of the automations to delete.
2488
+ * @public
2489
+ * @documentationMaturity preview
2490
+ * @requiredField automationIds
2491
+ * @permissionId AUTOMATIONS.AUTOMATION_DELETE
2492
+ * @applicableIdentity APP
2493
+ * @fqn wix.automations.v2.AutomationsService.BulkDeleteAutomations
2494
+ */
2495
+ declare function bulkDeleteAutomations(automationIds: string[]): Promise<NonNullablePaths<BulkDeleteAutomationsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
2496
+ /**
2497
+ * Generates a preinstalled automation from another automation.
2498
+ *
2499
+ * Calls the action providers for changes needed to make a preinstalled automation, such as changes made to email template.
2500
+ *
2501
+ * > **Note**: You must have an account permission to edit an app.
2502
+ * @param automation - Automation.
2503
+ * @public
2504
+ * @documentationMaturity preview
2505
+ * @requiredField automation
2506
+ * @fqn wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation
2507
+ */
2508
+ declare function generatePreinstalledAutomation(automation: Automation, options?: GeneratePreinstalledAutomationOptions): Promise<NonNullablePaths<GeneratePreinstalledAutomationResponse, {
2509
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2510
+ }[AutomationNonNullablePaths]>>;
2358
2511
  interface GeneratePreinstalledAutomationOptions {
2359
2512
  /**
2360
2513
  * ID of the app to which the automation belongs.
@@ -2362,6 +2515,19 @@ interface GeneratePreinstalledAutomationOptions {
2362
2515
  */
2363
2516
  appId?: string;
2364
2517
  }
2518
+ /**
2519
+ * Retrieves a list of automations. This includes both automations overridden on a site and preinstalled automations. If a preinstalled automation has been overridden on the site, the method returns the override automation.
2520
+ *
2521
+ * > **Note**: The method only returns automations by apps installed on the site.
2522
+ *
2523
+ * Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
2524
+ * @public
2525
+ * @documentationMaturity preview
2526
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2527
+ * @applicableIdentity APP
2528
+ * @fqn wix.automations.v2.AutomationsService.QueryAutomations
2529
+ */
2530
+ declare function queryAutomations(): AutomationsQueryBuilder;
2365
2531
  interface QueryCursorResult {
2366
2532
  cursors: Cursors;
2367
2533
  hasNext: () => boolean;
@@ -2444,6 +2610,15 @@ interface AutomationsQueryBuilder {
2444
2610
  /** @documentationMaturity preview */
2445
2611
  find: () => Promise<AutomationsQueryResult>;
2446
2612
  }
2613
+ /**
2614
+ * Get aggregated info
2615
+ * @public
2616
+ * @documentationMaturity preview
2617
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2618
+ * @applicableIdentity APP
2619
+ * @fqn wix.automations.v2.AutomationsService.GetAggregatedUsageInfo
2620
+ */
2621
+ declare function getAggregatedUsageInfo(options?: GetAggregatedUsageInfoOptions): Promise<NonNullablePaths<GetAggregatedUsageInfoResponse, `triggersUsageSummary` | `triggersUsageSummary.${number}.appId` | `triggersUsageSummary.${number}.triggerKey` | `triggersUsageSummary.${number}.automationsCount` | `actionsUsageSummary` | `actionsUsageSummary.${number}.appId` | `actionsUsageSummary.${number}.actionKey` | `actionsUsageSummary.${number}.automationsCount`>>;
2447
2622
  interface GetAggregatedUsageInfoOptions {
2448
2623
  /**
2449
2624
  * Filter in the following format:
@@ -2458,16 +2633,72 @@ interface GetAggregatedUsageInfoOptions {
2458
2633
  */
2459
2634
  filter?: Record<string, any> | null;
2460
2635
  }
2636
+ /**
2637
+ * Creates a copy of an action with a new ID, and changes the action's input mapping if necessary.
2638
+ *
2639
+ * The action copy isn't saved automatically. To save it, the user must perform an action
2640
+ * such as clicking the **Save** button.
2641
+ * @param automationId - ID of the automation to copy.
2642
+ * @public
2643
+ * @documentationMaturity preview
2644
+ * @requiredField automationId
2645
+ * @permissionId AUTOMATIONS.AUTOMATION_COPY
2646
+ * @applicableIdentity APP
2647
+ * @fqn wix.automations.v2.AutomationsService.CopyAutomation
2648
+ */
2649
+ declare function copyAutomation(automationId: string, options?: CopyAutomationOptions): Promise<NonNullablePaths<CopyAutomationResponse, {
2650
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2651
+ }[AutomationNonNullablePaths]>>;
2461
2652
  interface CopyAutomationOptions {
2462
2653
  /** Origin of the automation to copy. */
2463
2654
  origin?: OriginWithLiterals;
2464
2655
  /** Automation to copy. Skips fetching by ID. */
2465
2656
  automation?: Automation;
2466
2657
  }
2658
+ /**
2659
+ * Creates a draft automation.
2660
+ * @public
2661
+ * @documentationMaturity preview
2662
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE
2663
+ * @applicableIdentity APP
2664
+ * @fqn wix.automations.v2.AutomationsService.CreateDraftAutomation
2665
+ */
2666
+ declare function createDraftAutomation(options?: CreateDraftAutomationOptions): Promise<NonNullablePaths<CreateDraftAutomationResponse, {
2667
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2668
+ }[AutomationNonNullablePaths]>>;
2467
2669
  interface CreateDraftAutomationOptions {
2468
2670
  /** Draft automation to create. */
2469
2671
  automation?: Automation;
2470
2672
  }
2673
+ /**
2674
+ * Retrieves the draft of the specified automation. If a draft doesn't exist, the method creates one.
2675
+ *
2676
+ * > **Note**: If the specified automation is a draft, the method returns it.
2677
+ * @param originalAutomationId - ID of the original automation on which the draft is based.
2678
+ * @public
2679
+ * @documentationMaturity preview
2680
+ * @requiredField originalAutomationId
2681
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE
2682
+ * @applicableIdentity APP
2683
+ * @fqn wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation
2684
+ */
2685
+ declare function getOrCreateDraftAutomation(originalAutomationId: string): Promise<NonNullablePaths<GetOrCreateDraftAutomationResponse, {
2686
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2687
+ }[AutomationNonNullablePaths]>>;
2688
+ /**
2689
+ * Updates a draft automation.
2690
+ * @param _id - Automation ID.
2691
+ * @public
2692
+ * @documentationMaturity preview
2693
+ * @requiredField _id
2694
+ * @requiredField automation
2695
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_UPDATE
2696
+ * @applicableIdentity APP
2697
+ * @fqn wix.automations.v2.AutomationsService.UpdateDraftAutomation
2698
+ */
2699
+ declare function updateDraftAutomation(_id: string, automation: UpdateDraftAutomation): Promise<NonNullablePaths<UpdateDraftAutomationResponse, {
2700
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2701
+ }[AutomationNonNullablePaths]>>;
2471
2702
  interface UpdateDraftAutomation {
2472
2703
  /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
2473
2704
  applicationInfo?: ApplicationOrigin;
@@ -2537,6 +2768,29 @@ interface UpdateDraftAutomation {
2537
2768
  */
2538
2769
  archived?: boolean;
2539
2770
  }
2771
+ /**
2772
+ * Retrieves a list of automations, including drafts. Max query filter depth is 3.
2773
+ *
2774
+ * Relevant automations for the query are returned. This includes automations created on the site and pre-installed automations.
2775
+ * If there's an existing override for a pre-installed automation, the override is returned in the query result.
2776
+ * The query only returns automations from apps that are installed on the site.
2777
+ *
2778
+ * - new drafts that are not related to existing automations will be returned in the list
2779
+ * - the response will contain a map of originalAutomationId => relatedDrafts
2780
+ *
2781
+ * To learn about working with _Query_ endpoints, see
2782
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
2783
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
2784
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
2785
+ * @public
2786
+ * @documentationMaturity preview
2787
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ
2788
+ * @applicableIdentity APP
2789
+ * @fqn wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts
2790
+ */
2791
+ declare function queryAutomationsWithDrafts(options?: QueryAutomationsWithDraftsOptions): Promise<NonNullablePaths<QueryAutomationsWithDraftsResponse, {
2792
+ [P in AutomationNonNullablePaths]: `automations.${number}.${P}`;
2793
+ }[AutomationNonNullablePaths]>>;
2540
2794
  interface QueryAutomationsWithDraftsOptions {
2541
2795
  /**
2542
2796
  * Query.
@@ -2545,14 +2799,99 @@ interface QueryAutomationsWithDraftsOptions {
2545
2799
  */
2546
2800
  query?: CursorQuery;
2547
2801
  }
2802
+ /** @public
2803
+ * @documentationMaturity preview
2804
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ
2805
+ * @applicableIdentity APP
2806
+ * @fqn wix.automations.v2.AutomationsService.BulkCountAutomationsWithDrafts
2807
+ */
2808
+ declare function bulkCountAutomationsWithDrafts(options?: BulkCountAutomationsWithDraftsOptions): Promise<NonNullablePaths<BulkCountAutomationsWithDraftsResponse, `counts`>>;
2809
+ interface BulkCountAutomationsWithDraftsOptions {
2810
+ /**
2811
+ * Array of filters in the following format:
2812
+ *
2813
+ * `"filter" :
2814
+ * [{
2815
+ * "fieldName1": "value1",
2816
+ * "fieldName2":{"$operator":"value2"}
2817
+ * }, {
2818
+ * "fieldName3": "value3",
2819
+ * "fieldName4":{"$operator":"value4"}
2820
+ * }]`
2821
+ *
2822
+ * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).
2823
+ * @minSize 1
2824
+ * @maxSize 3
2825
+ */
2826
+ filters?: Record<string, any>[] | null;
2827
+ }
2828
+ /**
2829
+ * Deletes a draft automation.
2830
+ * @param automationId - ID of the draft automation to delete.
2831
+ * @public
2832
+ * @documentationMaturity preview
2833
+ * @requiredField automationId
2834
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_DELETE
2835
+ * @applicableIdentity APP
2836
+ * @fqn wix.automations.v2.AutomationsService.DeleteDraftAutomation
2837
+ */
2838
+ declare function deleteDraftAutomation(automationId: string): Promise<void>;
2839
+ /**
2840
+ * Publishes a draft automation. This applies any changes to the live automation.
2841
+ * @param automationId - ID of the draft automation to publish.
2842
+ * @public
2843
+ * @documentationMaturity preview
2844
+ * @requiredField automationId
2845
+ * @permissionId AUTOMATIONS.AUTOMATION_UPDATE
2846
+ * @applicableIdentity APP
2847
+ * @fqn wix.automations.v2.AutomationsService.PublishDraftAutomation
2848
+ */
2849
+ declare function publishDraftAutomation(automationId: string): Promise<NonNullablePaths<PublishDraftAutomationResponse, {
2850
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2851
+ }[AutomationNonNullablePaths]>>;
2852
+ /**
2853
+ * Validates the specified automation.
2854
+ * @param automation - Automation to validate.
2855
+ * @public
2856
+ * @documentationMaturity preview
2857
+ * @requiredField automation
2858
+ * @permissionId AUTOMATIONS.AUTOMATION_VALIDATE
2859
+ * @applicableIdentity APP
2860
+ * @fqn wix.automations.v2.AutomationsService.ValidateAutomation
2861
+ */
2862
+ declare function validateAutomation(automation: Automation, options?: ValidateAutomationOptions): Promise<NonNullablePaths<ValidateAutomationResponse, `valid` | `triggerValidationErrors` | `triggerValidationErrors.${number}.configurationError.errorType` | `triggerValidationErrors.${number}.providerConfigurationError.message` | `triggerValidationErrors.${number}.providerConfigurationError.title` | `triggerValidationErrors.${number}.errorType` | `triggerValidationErrors.${number}.severity` | `actionValidationInfo` | `actionValidationInfo.${number}.appId` | `actionValidationInfo.${number}.actionKey` | `automationValidationErrors` | `automationValidationErrors.${number}.configurationError.errorType` | `automationValidationErrors.${number}.providerConfigurationError.message` | `automationValidationErrors.${number}.providerConfigurationError.title` | `automationValidationErrors.${number}.errorType` | `automationValidationErrors.${number}.severity`>>;
2548
2863
  interface ValidateAutomationOptions {
2549
2864
  /** Automation validation settings. */
2550
2865
  validationSettings?: ValidationSettings;
2551
2866
  }
2867
+ /**
2868
+ * Validates the automation specified by ID.
2869
+ * @param automationId - Automation ID.
2870
+ * @public
2871
+ * @documentationMaturity preview
2872
+ * @requiredField automationId
2873
+ * @permissionId AUTOMATIONS.AUTOMATION_VALIDATE
2874
+ * @applicableIdentity APP
2875
+ * @fqn wix.automations.v2.AutomationsService.ValidateAutomationById
2876
+ */
2877
+ declare function validateAutomationById(automationId: string, options?: ValidateAutomationByIdOptions): Promise<NonNullablePaths<ValidateAutomationByIdResponse, `valid` | `triggerValidationErrors` | `triggerValidationErrors.${number}.configurationError.errorType` | `triggerValidationErrors.${number}.providerConfigurationError.message` | `triggerValidationErrors.${number}.providerConfigurationError.title` | `triggerValidationErrors.${number}.errorType` | `triggerValidationErrors.${number}.severity` | `actionValidationInfo` | `actionValidationInfo.${number}.appId` | `actionValidationInfo.${number}.actionKey` | `automationValidationErrors` | `automationValidationErrors.${number}.configurationError.errorType` | `automationValidationErrors.${number}.providerConfigurationError.message` | `automationValidationErrors.${number}.providerConfigurationError.title` | `automationValidationErrors.${number}.errorType` | `automationValidationErrors.${number}.severity`>>;
2552
2878
  interface ValidateAutomationByIdOptions {
2553
2879
  /** Validation settings. */
2554
2880
  validationSettings?: ValidationSettings;
2555
2881
  }
2882
+ /**
2883
+ * Gets the specified automation revision.
2884
+ * @param automationId - Automation ID.
2885
+ * @public
2886
+ * @documentationMaturity preview
2887
+ * @requiredField automationId
2888
+ * @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
2889
+ * @applicableIdentity APP
2890
+ * @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
2891
+ */
2892
+ declare function getAutomationRevision(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, {
2893
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2894
+ }[AutomationNonNullablePaths]>>;
2556
2895
  interface GetAutomationRevisionOptions {
2557
2896
  /** Revision number. */
2558
2897
  revision?: string | null;
@@ -2563,4 +2902,4 @@ interface GetAutomationRevisionOptions {
2563
2902
  fields?: RequestedFieldsWithLiterals[];
2564
2903
  }
2565
2904
 
2566
- export { type AutomationConfiguration as $, type Automation as A, type BulkDeleteAutomationsResponse as B, type CopyAutomationOptions as C, Domain as D, TriggerErrorType as E, ValidationErrorSeverity as F, type GeneratePreinstalledAutomationOptions as G, ValidationErrorType as H, ActionErrorType as I, AutomationValidationErrorValidationErrorType as J, AutomationErrorType as K, Language as L, type AutomationOriginInfoOneOf as M, Namespace as N, Operator as O, type PublishDraftAutomationResponse as P, type QueryAutomationsWithDraftsOptions as Q, RequestedFields as R, Status as S, TimeUnit as T, type UpdateAutomation as U, type ValidateAutomationOptions as V, WebhookIdentityType as W, type ActionSettings as X, type Enrichment as Y, type AuditInfo as Z, type AuditInfoIdOneOf as _, type GeneratePreinstalledAutomationResponse as a, type DeletePreinstalledAutomationRequest as a$, type Filter as a0, type FutureDateActivationOffset as a1, type RateLimit as a2, type FilterValueSelection as a3, type ConditionExpressionGroup as a4, type Path as a5, type AppDefinedAction as a6, type ConditionAction as a7, type DelayAction as a8, type RateLimitAction as a9, type UpdateApplicationAutomationsResponse as aA, type TestUpdateApplicationAutomationRequest as aB, type TestUpdateApplicationAutomationResponse as aC, type MessageEnvelope as aD, type IdentificationData as aE, type IdentificationDataIdOneOf as aF, type CodeSnippet as aG, type CodeConditionAction as aH, type CreateAutomationRequest as aI, type CreateAutomationResponse as aJ, type GetAutomationRequest as aK, type GetAutomationResponse as aL, type UpdateAutomationRequest as aM, type UpdateAutomationResponse as aN, type DeleteAutomationRequest as aO, type DeleteAutomationResponse as aP, type BulkDeleteAutomationsRequest as aQ, type BulkDeleteResult as aR, type ItemMetadata as aS, type ApplicationError as aT, type BulkActionMetadata as aU, type CreatePreinstalledAutomationRequest as aV, type PreinstalledAutomationSpecInfo as aW, type OriginAutomationInfo as aX, type CreatePreinstalledAutomationResponse as aY, type UpdatePreinstalledAutomationRequest as aZ, type UpdatePreinstalledAutomationResponse as a_, type SetVariablesAction as aa, type OutputAction as ab, type SplitAction as ac, type Trigger as ad, type Action as ae, type ActionInfoOneOf as af, type FilterableAppDefinedActions as ag, type ApplicationOrigin as ah, type PreinstalledOrigin as ai, type AutomationSettings as aj, type DraftInfo as ak, type Enrichments as al, type ExtendedFields as am, type AutomationMigrationRequest as an, type UpdatedWithPreviousEntity as ao, type DeletedWithEntity as ap, type DraftPublished as aq, type DomainEvent as ar, type DomainEventBodyOneOf as as, type EntityCreatedEvent as at, type RestoreInfo as au, type EntityUpdatedEvent as av, type EntityDeletedEvent as aw, type ActionEvent as ax, type Empty as ay, type UpdateApplicationAutomationsRequest as az, type AutomationsQueryBuilder as b, type AutomationConfigurationError as b$, type DeletePreinstalledAutomationResponse as b0, type GeneratePreinstalledAutomationRequest as b1, type QueryPreinstalledAutomationsForAppRequest as b2, type CursorQuery as b3, type CursorQueryPagingMethodOneOf as b4, type Sorting as b5, type CursorPaging as b6, type QueryPreinstalledAutomationsForAppResponse as b7, type CursorPagingMetadata as b8, type Cursors as b9, type StudioUnassigned as bA, type SiteUrlChanged as bB, type SitePurgedExternally as bC, type OdeditorAssigned as bD, type OdeditorUnassigned as bE, type PicassoAssigned as bF, type PicassoUnassigned as bG, type CreateDraftAutomationRequest as bH, type GetOrCreateDraftAutomationRequest as bI, type UpdateDraftAutomationRequest as bJ, type QueryAutomationsWithDraftsRequest as bK, type DraftsInfo as bL, type DeleteDraftAutomationRequest as bM, type DeleteDraftAutomationResponse as bN, type PublishDraftAutomationRequest as bO, type ValidateAutomationRequest as bP, type ValidationSettings as bQ, type TriggerValidationError as bR, type TriggerValidationErrorErrorOneOf as bS, type TriggerConfigurationError as bT, type ProviderConfigurationError as bU, type ActionValidationInfo as bV, type ActionValidationError as bW, type ActionValidationErrorErrorOneOf as bX, type ActionConfigurationError as bY, type AutomationValidationError as bZ, type AutomationValidationErrorErrorOneOf as b_, type QueryPreinstalledAutomationsRequest as ba, type QueryPreinstalledAutomationsResponse as bb, type QueryAutomationsRequest as bc, type QueryAutomationsResponse as bd, type GetAggregatedUsageInfoRequest as be, type TriggerUsageSummary as bf, type ActionUsageSummary as bg, type CopyAutomationRequest as bh, type MetaSiteSpecialEvent as bi, type MetaSiteSpecialEventPayloadOneOf as bj, type Asset as bk, type SiteCreated as bl, type SiteTransferred as bm, type SiteDeleted as bn, type DeleteContext as bo, type SiteUndeleted as bp, type SitePublished as bq, type SiteUnpublished as br, type SiteMarkedAsTemplate as bs, type SiteMarkedAsWixSite as bt, type ServiceProvisioned as bu, type ServiceRemoved as bv, type SiteRenamed as bw, type SiteHardDeleted as bx, type NamespaceChanged as by, type StudioAssigned as bz, type GetAggregatedUsageInfoOptions as c, type ValidateAutomationByIdRequest as c0, type GetAutomationActionSchemaRequest as c1, type GetAutomationActionSchemaResponse as c2, type GetActionsQuotaInfoRequest as c3, type GetActionsQuotaInfoResponse as c4, type ActionProviderQuotaInfo as c5, type ActionQuotaInfo as c6, type QuotaInfo as c7, type Plan as c8, type Quota as c9, type CTA as ca, type AdditionalInfo as cb, type UpgradeCTA as cc, type MigrateVeloActionAutomationsRequest as cd, type MigrateVeloActionAutomationsResponse as ce, type GetAutomationRevisionRequest as cf, type BaseEventMetadata as cg, type EventMetadata as ch, type AutomationsQueryResult as ci, type GetAggregatedUsageInfoResponse as d, type CopyAutomationResponse as e, type CreateDraftAutomationOptions as f, type CreateDraftAutomationResponse as g, type GetOrCreateDraftAutomationResponse as h, type UpdateDraftAutomation as i, type UpdateDraftAutomationResponse as j, type QueryAutomationsWithDraftsResponse as k, type ValidateAutomationResponse as l, type ValidateAutomationByIdOptions as m, type ValidateAutomationByIdResponse as n, type GetAutomationRevisionOptions as o, type GetAutomationRevisionResponse as p, type AutomationCreatedEnvelope as q, type AutomationDeletedEnvelope as r, type AutomationUpdatedEnvelope as s, Type as t, Origin as u, SortOrder as v, State as w, SiteCreatedContext as x, DeleteStatus as y, TriggerValidationErrorValidationErrorType as z };
2905
+ export { type Action, type ActionConfigurationError, ActionErrorType, type ActionErrorTypeWithLiterals, type ActionEvent, type ActionInfoOneOf, type ActionProviderQuotaInfo, type ActionQuotaInfo, type ActionSettings, type ActionUsageSummary, type ActionValidationError, type ActionValidationErrorErrorOneOf, type ActionValidationInfo, type AdditionalInfo, type AppDefinedAction, type ApplicationError, type ApplicationOrigin, type Asset, type AuditInfo, type AuditInfoIdOneOf, type Automation, type AutomationConfiguration, type AutomationConfigurationError, type AutomationCreatedEnvelope, type AutomationDeletedEnvelope, AutomationErrorType, type AutomationErrorTypeWithLiterals, type AutomationMigrationRequest, type AutomationOriginInfoOneOf, type AutomationSettings, type AutomationUpdatedEnvelope, type AutomationValidationError, type AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, type AutomationValidationErrorValidationErrorTypeWithLiterals, type AutomationsQueryBuilder, type AutomationsQueryResult, type BaseEventMetadata, type BulkActionMetadata, type BulkCountAutomationsWithDraftsOptions, type BulkCountAutomationsWithDraftsRequest, type BulkCountAutomationsWithDraftsResponse, type BulkDeleteAutomationsRequest, type BulkDeleteAutomationsResponse, type BulkDeleteResult, type CTA, type CodeConditionAction, type CodeSnippet, type ConditionAction, type ConditionExpressionGroup, type CopyAutomationOptions, type CopyAutomationRequest, type CopyAutomationResponse, type CreateAutomationRequest, type CreateAutomationResponse, type CreateDraftAutomationOptions, type CreateDraftAutomationRequest, type CreateDraftAutomationResponse, type CreatePreinstalledAutomationRequest, type CreatePreinstalledAutomationResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DelayAction, type DeleteAutomationRequest, type DeleteAutomationResponse, type DeleteContext, type DeleteDraftAutomationRequest, type DeleteDraftAutomationResponse, type DeletePreinstalledAutomationRequest, type DeletePreinstalledAutomationResponse, DeleteStatus, type DeleteStatusWithLiterals, type DeletedWithEntity, Domain, type DomainEvent, type DomainEventBodyOneOf, type DomainWithLiterals, type DraftInfo, type DraftPublished, type DraftsInfo, type Empty, type Enrichment, type Enrichments, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type Filter, type FilterValueSelection, type FilterableAppDefinedActions, type FutureDateActivationOffset, type GeneratePreinstalledAutomationOptions, type GeneratePreinstalledAutomationRequest, type GeneratePreinstalledAutomationResponse, type GetActionsQuotaInfoRequest, type GetActionsQuotaInfoResponse, type GetAggregatedUsageInfoOptions, type GetAggregatedUsageInfoRequest, type GetAggregatedUsageInfoResponse, type GetAutomationActionSchemaRequest, type GetAutomationActionSchemaResponse, type GetAutomationRequest, type GetAutomationResponse, type GetAutomationRevisionOptions, type GetAutomationRevisionRequest, type GetAutomationRevisionResponse, type GetOrCreateDraftAutomationRequest, type GetOrCreateDraftAutomationResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, Language, type LanguageWithLiterals, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, type MigrateVeloActionAutomationsRequest, type MigrateVeloActionAutomationsResponse, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, Operator, type OperatorWithLiterals, Origin, type OriginAutomationInfo, type OriginWithLiterals, type OutputAction, type Path, type PicassoAssigned, type PicassoUnassigned, type Plan, type PreinstalledAutomationSpecInfo, type PreinstalledOrigin, type ProviderConfigurationError, type PublishDraftAutomationRequest, type PublishDraftAutomationResponse, type QueryAutomationsRequest, type QueryAutomationsResponse, type QueryAutomationsWithDraftsOptions, type QueryAutomationsWithDraftsRequest, type QueryAutomationsWithDraftsResponse, type QueryPreinstalledAutomationsForAppRequest, type QueryPreinstalledAutomationsForAppResponse, type QueryPreinstalledAutomationsRequest, type QueryPreinstalledAutomationsResponse, type Quota, type QuotaInfo, type RateLimit, type RateLimitAction, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type ServiceProvisioned, type ServiceRemoved, type SetVariablesAction, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, type SplitAction, State, type StateWithLiterals, Status, type StatusWithLiterals, type StudioAssigned, type StudioUnassigned, type TestUpdateApplicationAutomationRequest, type TestUpdateApplicationAutomationResponse, TimeUnit, type TimeUnitWithLiterals, type Trigger, type TriggerConfigurationError, TriggerErrorType, type TriggerErrorTypeWithLiterals, type TriggerUsageSummary, type TriggerValidationError, type TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, type TriggerValidationErrorValidationErrorTypeWithLiterals, Type, type TypeWithLiterals, type UpdateApplicationAutomationsRequest, type UpdateApplicationAutomationsResponse, type UpdateAutomation, type UpdateAutomationRequest, type UpdateAutomationResponse, type UpdateDraftAutomation, type UpdateDraftAutomationRequest, type UpdateDraftAutomationResponse, type UpdatePreinstalledAutomationRequest, type UpdatePreinstalledAutomationResponse, type UpdatedWithPreviousEntity, type UpgradeCTA, type ValidateAutomationByIdOptions, type ValidateAutomationByIdRequest, type ValidateAutomationByIdResponse, type ValidateAutomationOptions, type ValidateAutomationRequest, type ValidateAutomationResponse, ValidationErrorSeverity, type ValidationErrorSeverityWithLiterals, ValidationErrorType, type ValidationErrorTypeWithLiterals, type ValidationSettings, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };