@wix/auto_sdk_automations_automations-v-2 1.0.8 → 1.0.10
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.
- package/build/cjs/index.d.ts +42 -19
- package/build/cjs/index.js +55 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{automations-v2-automation-automations-v-2.universal-BCyd22mR.d.ts → index.typings.d.ts} +351 -1
- package/build/cjs/index.typings.js +1436 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +27 -2
- package/build/cjs/meta.js +40 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +42 -19
- package/build/es/index.mjs +54 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/{automations-v2-automation-automations-v-2.universal-BCyd22mR.d.mts → index.typings.d.mts} +351 -1
- package/build/es/index.typings.mjs +1373 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +27 -2
- package/build/es/meta.mjs +39 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +42 -19
- package/build/internal/cjs/index.js +55 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{automations-v2-automation-automations-v-2.universal-BCyd22mR.d.ts → index.typings.d.ts} +351 -1
- package/build/internal/cjs/index.typings.js +1436 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +27 -2
- package/build/internal/cjs/meta.js +40 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +42 -19
- package/build/internal/es/index.mjs +54 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{automations-v2-automation-automations-v-2.universal-BCyd22mR.d.mts → index.typings.d.mts} +351 -1
- package/build/internal/es/index.typings.mjs +1373 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +27 -2
- package/build/internal/es/meta.mjs +39 -0
- package/build/internal/es/meta.mjs.map +1 -1
- 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.
|
|
@@ -2212,6 +2239,17 @@ interface MigrateVeloActionAutomationsRequest {
|
|
|
2212
2239
|
}
|
|
2213
2240
|
interface MigrateVeloActionAutomationsResponse {
|
|
2214
2241
|
}
|
|
2242
|
+
interface MergeOverridePreinstalledWithRuntimeVersionRequest {
|
|
2243
|
+
/**
|
|
2244
|
+
* ID of the override preinstalled automation to merge.
|
|
2245
|
+
* @format GUID
|
|
2246
|
+
*/
|
|
2247
|
+
automationId?: string;
|
|
2248
|
+
}
|
|
2249
|
+
interface MergeOverridePreinstalledWithRuntimeVersionResponse {
|
|
2250
|
+
/** The merged automation after applying the latest runtime version of the preinstalled automation. */
|
|
2251
|
+
automation?: Automation;
|
|
2252
|
+
}
|
|
2215
2253
|
interface GetAutomationRevisionRequest {
|
|
2216
2254
|
/**
|
|
2217
2255
|
* Automation ID.
|
|
@@ -2278,14 +2316,103 @@ interface AutomationCreatedEnvelope {
|
|
|
2278
2316
|
entity: Automation;
|
|
2279
2317
|
metadata: EventMetadata;
|
|
2280
2318
|
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Triggered when a new automation is created.
|
|
2321
|
+
* @permissionScope Manage Stores
|
|
2322
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2323
|
+
* @permissionScope Set Up Automations
|
|
2324
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
2325
|
+
* @permissionId AUTOMATIONS.AUTOMATION_READ
|
|
2326
|
+
* @webhook
|
|
2327
|
+
* @eventType wix.automations.v2.automation_created
|
|
2328
|
+
* @slug created
|
|
2329
|
+
* @documentationMaturity preview
|
|
2330
|
+
*/
|
|
2331
|
+
declare function onAutomationCreated(handler: (event: AutomationCreatedEnvelope) => void | Promise<void>): void;
|
|
2281
2332
|
interface AutomationDeletedEnvelope {
|
|
2282
2333
|
entity: Automation;
|
|
2283
2334
|
metadata: EventMetadata;
|
|
2284
2335
|
}
|
|
2336
|
+
/**
|
|
2337
|
+
* Triggered when an automation is deleted.
|
|
2338
|
+
* @permissionScope Manage Stores
|
|
2339
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2340
|
+
* @permissionScope Set Up Automations
|
|
2341
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
2342
|
+
* @permissionId AUTOMATIONS.AUTOMATION_READ
|
|
2343
|
+
* @webhook
|
|
2344
|
+
* @eventType wix.automations.v2.automation_deleted
|
|
2345
|
+
* @slug deleted
|
|
2346
|
+
* @documentationMaturity preview
|
|
2347
|
+
*/
|
|
2348
|
+
declare function onAutomationDeleted(handler: (event: AutomationDeletedEnvelope) => void | Promise<void>): void;
|
|
2285
2349
|
interface AutomationUpdatedEnvelope {
|
|
2286
2350
|
entity: Automation;
|
|
2287
2351
|
metadata: EventMetadata;
|
|
2288
2352
|
}
|
|
2353
|
+
/**
|
|
2354
|
+
* Triggered when an automation is updated.
|
|
2355
|
+
* @permissionScope Manage Stores
|
|
2356
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2357
|
+
* @permissionScope Set Up Automations
|
|
2358
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
2359
|
+
* @permissionId AUTOMATIONS.AUTOMATION_READ
|
|
2360
|
+
* @webhook
|
|
2361
|
+
* @eventType wix.automations.v2.automation_updated
|
|
2362
|
+
* @slug updated
|
|
2363
|
+
* @documentationMaturity preview
|
|
2364
|
+
*/
|
|
2365
|
+
declare function onAutomationUpdated(handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>): void;
|
|
2366
|
+
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`;
|
|
2367
|
+
/**
|
|
2368
|
+
* Creates an automation.
|
|
2369
|
+
* @param automation - Automation to create.
|
|
2370
|
+
* @public
|
|
2371
|
+
* @documentationMaturity preview
|
|
2372
|
+
* @requiredField automation
|
|
2373
|
+
* @requiredField automation.configuration
|
|
2374
|
+
* @requiredField automation.configuration.actions
|
|
2375
|
+
* @requiredField automation.configuration.rootActionIds
|
|
2376
|
+
* @requiredField automation.configuration.status
|
|
2377
|
+
* @requiredField automation.configuration.trigger
|
|
2378
|
+
* @requiredField automation.configuration.trigger.appId
|
|
2379
|
+
* @requiredField automation.configuration.trigger.triggerKey
|
|
2380
|
+
* @requiredField automation.name
|
|
2381
|
+
* @requiredField automation.origin
|
|
2382
|
+
* @permissionId AUTOMATIONS.AUTOMATION_CREATE
|
|
2383
|
+
* @applicableIdentity APP
|
|
2384
|
+
* @returns Details of the created automation.
|
|
2385
|
+
* @fqn wix.automations.v2.AutomationsService.CreateAutomation
|
|
2386
|
+
*/
|
|
2387
|
+
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>>;
|
|
2388
|
+
/**
|
|
2389
|
+
* Retrieves an automation by ID.
|
|
2390
|
+
* @param automationId - Automation ID.
|
|
2391
|
+
* @public
|
|
2392
|
+
* @documentationMaturity preview
|
|
2393
|
+
* @requiredField automationId
|
|
2394
|
+
* @permissionId AUTOMATIONS.AUTOMATION_READ
|
|
2395
|
+
* @applicableIdentity APP
|
|
2396
|
+
* @returns Retrieved automation.
|
|
2397
|
+
* @fqn wix.automations.v2.AutomationsService.GetAutomation
|
|
2398
|
+
*/
|
|
2399
|
+
declare function getAutomation(automationId: string): Promise<NonNullablePaths<Automation, AutomationNonNullablePaths>>;
|
|
2400
|
+
/**
|
|
2401
|
+
* Updates the specified automation.
|
|
2402
|
+
*
|
|
2403
|
+
* When an automation is updated, its `revision` property is incremented by 1. When updating an automation, you must specify the current revision number.
|
|
2404
|
+
* @param _id - Automation ID.
|
|
2405
|
+
* @public
|
|
2406
|
+
* @documentationMaturity preview
|
|
2407
|
+
* @requiredField _id
|
|
2408
|
+
* @requiredField automation
|
|
2409
|
+
* @requiredField automation.revision
|
|
2410
|
+
* @permissionId AUTOMATIONS.AUTOMATION_UPDATE
|
|
2411
|
+
* @applicableIdentity APP
|
|
2412
|
+
* @returns Updated automation.
|
|
2413
|
+
* @fqn wix.automations.v2.AutomationsService.UpdateAutomation
|
|
2414
|
+
*/
|
|
2415
|
+
declare function updateAutomation(_id: string, automation: NonNullablePaths<UpdateAutomation, `revision`>): Promise<NonNullablePaths<Automation, AutomationNonNullablePaths>>;
|
|
2289
2416
|
interface UpdateAutomation {
|
|
2290
2417
|
/** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
|
|
2291
2418
|
applicationInfo?: ApplicationOrigin;
|
|
@@ -2355,6 +2482,43 @@ interface UpdateAutomation {
|
|
|
2355
2482
|
*/
|
|
2356
2483
|
archived?: boolean;
|
|
2357
2484
|
}
|
|
2485
|
+
/**
|
|
2486
|
+
* Deletes the specified automation.
|
|
2487
|
+
* @param automationId - Automation ID.
|
|
2488
|
+
* @public
|
|
2489
|
+
* @documentationMaturity preview
|
|
2490
|
+
* @requiredField automationId
|
|
2491
|
+
* @permissionId AUTOMATIONS.AUTOMATION_DELETE
|
|
2492
|
+
* @applicableIdentity APP
|
|
2493
|
+
* @fqn wix.automations.v2.AutomationsService.DeleteAutomation
|
|
2494
|
+
*/
|
|
2495
|
+
declare function deleteAutomation(automationId: string): Promise<void>;
|
|
2496
|
+
/**
|
|
2497
|
+
* Deletes one or more automations.
|
|
2498
|
+
* @param automationIds - IDs of the automations to delete.
|
|
2499
|
+
* @public
|
|
2500
|
+
* @documentationMaturity preview
|
|
2501
|
+
* @requiredField automationIds
|
|
2502
|
+
* @permissionId AUTOMATIONS.AUTOMATION_DELETE
|
|
2503
|
+
* @applicableIdentity APP
|
|
2504
|
+
* @fqn wix.automations.v2.AutomationsService.BulkDeleteAutomations
|
|
2505
|
+
*/
|
|
2506
|
+
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`>>;
|
|
2507
|
+
/**
|
|
2508
|
+
* Generates a preinstalled automation from another automation.
|
|
2509
|
+
*
|
|
2510
|
+
* Calls the action providers for changes needed to make a preinstalled automation, such as changes made to email template.
|
|
2511
|
+
*
|
|
2512
|
+
* > **Note**: You must have an account permission to edit an app.
|
|
2513
|
+
* @param automation - Automation.
|
|
2514
|
+
* @public
|
|
2515
|
+
* @documentationMaturity preview
|
|
2516
|
+
* @requiredField automation
|
|
2517
|
+
* @fqn wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation
|
|
2518
|
+
*/
|
|
2519
|
+
declare function generatePreinstalledAutomation(automation: Automation, options?: GeneratePreinstalledAutomationOptions): Promise<NonNullablePaths<GeneratePreinstalledAutomationResponse, {
|
|
2520
|
+
[P in AutomationNonNullablePaths]: `automation.${P}`;
|
|
2521
|
+
}[AutomationNonNullablePaths]>>;
|
|
2358
2522
|
interface GeneratePreinstalledAutomationOptions {
|
|
2359
2523
|
/**
|
|
2360
2524
|
* ID of the app to which the automation belongs.
|
|
@@ -2362,6 +2526,19 @@ interface GeneratePreinstalledAutomationOptions {
|
|
|
2362
2526
|
*/
|
|
2363
2527
|
appId?: string;
|
|
2364
2528
|
}
|
|
2529
|
+
/**
|
|
2530
|
+
* 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.
|
|
2531
|
+
*
|
|
2532
|
+
* > **Note**: The method only returns automations by apps installed on the site.
|
|
2533
|
+
*
|
|
2534
|
+
* Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
2535
|
+
* @public
|
|
2536
|
+
* @documentationMaturity preview
|
|
2537
|
+
* @permissionId AUTOMATIONS.AUTOMATION_READ
|
|
2538
|
+
* @applicableIdentity APP
|
|
2539
|
+
* @fqn wix.automations.v2.AutomationsService.QueryAutomations
|
|
2540
|
+
*/
|
|
2541
|
+
declare function queryAutomations(): AutomationsQueryBuilder;
|
|
2365
2542
|
interface QueryCursorResult {
|
|
2366
2543
|
cursors: Cursors;
|
|
2367
2544
|
hasNext: () => boolean;
|
|
@@ -2444,6 +2621,15 @@ interface AutomationsQueryBuilder {
|
|
|
2444
2621
|
/** @documentationMaturity preview */
|
|
2445
2622
|
find: () => Promise<AutomationsQueryResult>;
|
|
2446
2623
|
}
|
|
2624
|
+
/**
|
|
2625
|
+
* Get aggregated info
|
|
2626
|
+
* @public
|
|
2627
|
+
* @documentationMaturity preview
|
|
2628
|
+
* @permissionId AUTOMATIONS.AUTOMATION_READ
|
|
2629
|
+
* @applicableIdentity APP
|
|
2630
|
+
* @fqn wix.automations.v2.AutomationsService.GetAggregatedUsageInfo
|
|
2631
|
+
*/
|
|
2632
|
+
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
2633
|
interface GetAggregatedUsageInfoOptions {
|
|
2448
2634
|
/**
|
|
2449
2635
|
* Filter in the following format:
|
|
@@ -2458,16 +2644,72 @@ interface GetAggregatedUsageInfoOptions {
|
|
|
2458
2644
|
*/
|
|
2459
2645
|
filter?: Record<string, any> | null;
|
|
2460
2646
|
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Creates a copy of an action with a new ID, and changes the action's input mapping if necessary.
|
|
2649
|
+
*
|
|
2650
|
+
* The action copy isn't saved automatically. To save it, the user must perform an action
|
|
2651
|
+
* such as clicking the **Save** button.
|
|
2652
|
+
* @param automationId - ID of the automation to copy.
|
|
2653
|
+
* @public
|
|
2654
|
+
* @documentationMaturity preview
|
|
2655
|
+
* @requiredField automationId
|
|
2656
|
+
* @permissionId AUTOMATIONS.AUTOMATION_COPY
|
|
2657
|
+
* @applicableIdentity APP
|
|
2658
|
+
* @fqn wix.automations.v2.AutomationsService.CopyAutomation
|
|
2659
|
+
*/
|
|
2660
|
+
declare function copyAutomation(automationId: string, options?: CopyAutomationOptions): Promise<NonNullablePaths<CopyAutomationResponse, {
|
|
2661
|
+
[P in AutomationNonNullablePaths]: `automation.${P}`;
|
|
2662
|
+
}[AutomationNonNullablePaths]>>;
|
|
2461
2663
|
interface CopyAutomationOptions {
|
|
2462
2664
|
/** Origin of the automation to copy. */
|
|
2463
2665
|
origin?: OriginWithLiterals;
|
|
2464
2666
|
/** Automation to copy. Skips fetching by ID. */
|
|
2465
2667
|
automation?: Automation;
|
|
2466
2668
|
}
|
|
2669
|
+
/**
|
|
2670
|
+
* Creates a draft automation.
|
|
2671
|
+
* @public
|
|
2672
|
+
* @documentationMaturity preview
|
|
2673
|
+
* @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE
|
|
2674
|
+
* @applicableIdentity APP
|
|
2675
|
+
* @fqn wix.automations.v2.AutomationsService.CreateDraftAutomation
|
|
2676
|
+
*/
|
|
2677
|
+
declare function createDraftAutomation(options?: CreateDraftAutomationOptions): Promise<NonNullablePaths<CreateDraftAutomationResponse, {
|
|
2678
|
+
[P in AutomationNonNullablePaths]: `automation.${P}`;
|
|
2679
|
+
}[AutomationNonNullablePaths]>>;
|
|
2467
2680
|
interface CreateDraftAutomationOptions {
|
|
2468
2681
|
/** Draft automation to create. */
|
|
2469
2682
|
automation?: Automation;
|
|
2470
2683
|
}
|
|
2684
|
+
/**
|
|
2685
|
+
* Retrieves the draft of the specified automation. If a draft doesn't exist, the method creates one.
|
|
2686
|
+
*
|
|
2687
|
+
* > **Note**: If the specified automation is a draft, the method returns it.
|
|
2688
|
+
* @param originalAutomationId - ID of the original automation on which the draft is based.
|
|
2689
|
+
* @public
|
|
2690
|
+
* @documentationMaturity preview
|
|
2691
|
+
* @requiredField originalAutomationId
|
|
2692
|
+
* @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE
|
|
2693
|
+
* @applicableIdentity APP
|
|
2694
|
+
* @fqn wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation
|
|
2695
|
+
*/
|
|
2696
|
+
declare function getOrCreateDraftAutomation(originalAutomationId: string): Promise<NonNullablePaths<GetOrCreateDraftAutomationResponse, {
|
|
2697
|
+
[P in AutomationNonNullablePaths]: `automation.${P}`;
|
|
2698
|
+
}[AutomationNonNullablePaths]>>;
|
|
2699
|
+
/**
|
|
2700
|
+
* Updates a draft automation.
|
|
2701
|
+
* @param _id - Automation ID.
|
|
2702
|
+
* @public
|
|
2703
|
+
* @documentationMaturity preview
|
|
2704
|
+
* @requiredField _id
|
|
2705
|
+
* @requiredField automation
|
|
2706
|
+
* @permissionId AUTOMATIONS.AUTOMATION_DRAFT_UPDATE
|
|
2707
|
+
* @applicableIdentity APP
|
|
2708
|
+
* @fqn wix.automations.v2.AutomationsService.UpdateDraftAutomation
|
|
2709
|
+
*/
|
|
2710
|
+
declare function updateDraftAutomation(_id: string, automation: UpdateDraftAutomation): Promise<NonNullablePaths<UpdateDraftAutomationResponse, {
|
|
2711
|
+
[P in AutomationNonNullablePaths]: `automation.${P}`;
|
|
2712
|
+
}[AutomationNonNullablePaths]>>;
|
|
2471
2713
|
interface UpdateDraftAutomation {
|
|
2472
2714
|
/** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
|
|
2473
2715
|
applicationInfo?: ApplicationOrigin;
|
|
@@ -2537,6 +2779,29 @@ interface UpdateDraftAutomation {
|
|
|
2537
2779
|
*/
|
|
2538
2780
|
archived?: boolean;
|
|
2539
2781
|
}
|
|
2782
|
+
/**
|
|
2783
|
+
* Retrieves a list of automations, including drafts. Max query filter depth is 3.
|
|
2784
|
+
*
|
|
2785
|
+
* Relevant automations for the query are returned. This includes automations created on the site and pre-installed automations.
|
|
2786
|
+
* If there's an existing override for a pre-installed automation, the override is returned in the query result.
|
|
2787
|
+
* The query only returns automations from apps that are installed on the site.
|
|
2788
|
+
*
|
|
2789
|
+
* - new drafts that are not related to existing automations will be returned in the list
|
|
2790
|
+
* - the response will contain a map of originalAutomationId => relatedDrafts
|
|
2791
|
+
*
|
|
2792
|
+
* To learn about working with _Query_ endpoints, see
|
|
2793
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
2794
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
|
|
2795
|
+
* and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
2796
|
+
* @public
|
|
2797
|
+
* @documentationMaturity preview
|
|
2798
|
+
* @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ
|
|
2799
|
+
* @applicableIdentity APP
|
|
2800
|
+
* @fqn wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts
|
|
2801
|
+
*/
|
|
2802
|
+
declare function queryAutomationsWithDrafts(options?: QueryAutomationsWithDraftsOptions): Promise<NonNullablePaths<QueryAutomationsWithDraftsResponse, {
|
|
2803
|
+
[P in AutomationNonNullablePaths]: `automations.${number}.${P}`;
|
|
2804
|
+
}[AutomationNonNullablePaths]>>;
|
|
2540
2805
|
interface QueryAutomationsWithDraftsOptions {
|
|
2541
2806
|
/**
|
|
2542
2807
|
* Query.
|
|
@@ -2545,14 +2810,99 @@ interface QueryAutomationsWithDraftsOptions {
|
|
|
2545
2810
|
*/
|
|
2546
2811
|
query?: CursorQuery;
|
|
2547
2812
|
}
|
|
2813
|
+
/** @public
|
|
2814
|
+
* @documentationMaturity preview
|
|
2815
|
+
* @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ
|
|
2816
|
+
* @applicableIdentity APP
|
|
2817
|
+
* @fqn wix.automations.v2.AutomationsService.BulkCountAutomationsWithDrafts
|
|
2818
|
+
*/
|
|
2819
|
+
declare function bulkCountAutomationsWithDrafts(options?: BulkCountAutomationsWithDraftsOptions): Promise<NonNullablePaths<BulkCountAutomationsWithDraftsResponse, `counts`>>;
|
|
2820
|
+
interface BulkCountAutomationsWithDraftsOptions {
|
|
2821
|
+
/**
|
|
2822
|
+
* Array of filters in the following format:
|
|
2823
|
+
*
|
|
2824
|
+
* `"filter" :
|
|
2825
|
+
* [{
|
|
2826
|
+
* "fieldName1": "value1",
|
|
2827
|
+
* "fieldName2":{"$operator":"value2"}
|
|
2828
|
+
* }, {
|
|
2829
|
+
* "fieldName3": "value3",
|
|
2830
|
+
* "fieldName4":{"$operator":"value4"}
|
|
2831
|
+
* }]`
|
|
2832
|
+
*
|
|
2833
|
+
* Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).
|
|
2834
|
+
* @minSize 1
|
|
2835
|
+
* @maxSize 3
|
|
2836
|
+
*/
|
|
2837
|
+
filters?: Record<string, any>[] | null;
|
|
2838
|
+
}
|
|
2839
|
+
/**
|
|
2840
|
+
* Deletes a draft automation.
|
|
2841
|
+
* @param automationId - ID of the draft automation to delete.
|
|
2842
|
+
* @public
|
|
2843
|
+
* @documentationMaturity preview
|
|
2844
|
+
* @requiredField automationId
|
|
2845
|
+
* @permissionId AUTOMATIONS.AUTOMATION_DRAFT_DELETE
|
|
2846
|
+
* @applicableIdentity APP
|
|
2847
|
+
* @fqn wix.automations.v2.AutomationsService.DeleteDraftAutomation
|
|
2848
|
+
*/
|
|
2849
|
+
declare function deleteDraftAutomation(automationId: string): Promise<void>;
|
|
2850
|
+
/**
|
|
2851
|
+
* Publishes a draft automation. This applies any changes to the live automation.
|
|
2852
|
+
* @param automationId - ID of the draft automation to publish.
|
|
2853
|
+
* @public
|
|
2854
|
+
* @documentationMaturity preview
|
|
2855
|
+
* @requiredField automationId
|
|
2856
|
+
* @permissionId AUTOMATIONS.AUTOMATION_UPDATE
|
|
2857
|
+
* @applicableIdentity APP
|
|
2858
|
+
* @fqn wix.automations.v2.AutomationsService.PublishDraftAutomation
|
|
2859
|
+
*/
|
|
2860
|
+
declare function publishDraftAutomation(automationId: string): Promise<NonNullablePaths<PublishDraftAutomationResponse, {
|
|
2861
|
+
[P in AutomationNonNullablePaths]: `automation.${P}`;
|
|
2862
|
+
}[AutomationNonNullablePaths]>>;
|
|
2863
|
+
/**
|
|
2864
|
+
* Validates the specified automation.
|
|
2865
|
+
* @param automation - Automation to validate.
|
|
2866
|
+
* @public
|
|
2867
|
+
* @documentationMaturity preview
|
|
2868
|
+
* @requiredField automation
|
|
2869
|
+
* @permissionId AUTOMATIONS.AUTOMATION_VALIDATE
|
|
2870
|
+
* @applicableIdentity APP
|
|
2871
|
+
* @fqn wix.automations.v2.AutomationsService.ValidateAutomation
|
|
2872
|
+
*/
|
|
2873
|
+
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
2874
|
interface ValidateAutomationOptions {
|
|
2549
2875
|
/** Automation validation settings. */
|
|
2550
2876
|
validationSettings?: ValidationSettings;
|
|
2551
2877
|
}
|
|
2878
|
+
/**
|
|
2879
|
+
* Validates the automation specified by ID.
|
|
2880
|
+
* @param automationId - Automation ID.
|
|
2881
|
+
* @public
|
|
2882
|
+
* @documentationMaturity preview
|
|
2883
|
+
* @requiredField automationId
|
|
2884
|
+
* @permissionId AUTOMATIONS.AUTOMATION_VALIDATE
|
|
2885
|
+
* @applicableIdentity APP
|
|
2886
|
+
* @fqn wix.automations.v2.AutomationsService.ValidateAutomationById
|
|
2887
|
+
*/
|
|
2888
|
+
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
2889
|
interface ValidateAutomationByIdOptions {
|
|
2553
2890
|
/** Validation settings. */
|
|
2554
2891
|
validationSettings?: ValidationSettings;
|
|
2555
2892
|
}
|
|
2893
|
+
/**
|
|
2894
|
+
* Gets the specified automation revision.
|
|
2895
|
+
* @param automationId - Automation ID.
|
|
2896
|
+
* @public
|
|
2897
|
+
* @documentationMaturity preview
|
|
2898
|
+
* @requiredField automationId
|
|
2899
|
+
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
2900
|
+
* @applicableIdentity APP
|
|
2901
|
+
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
2902
|
+
*/
|
|
2903
|
+
declare function getAutomationRevision(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, {
|
|
2904
|
+
[P in AutomationNonNullablePaths]: `automation.${P}`;
|
|
2905
|
+
}[AutomationNonNullablePaths]>>;
|
|
2556
2906
|
interface GetAutomationRevisionOptions {
|
|
2557
2907
|
/** Revision number. */
|
|
2558
2908
|
revision?: string | null;
|
|
@@ -2563,4 +2913,4 @@ interface GetAutomationRevisionOptions {
|
|
|
2563
2913
|
fields?: RequestedFieldsWithLiterals[];
|
|
2564
2914
|
}
|
|
2565
2915
|
|
|
2566
|
-
export { type
|
|
2916
|
+
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 MergeOverridePreinstalledWithRuntimeVersionRequest, type MergeOverridePreinstalledWithRuntimeVersionResponse, 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 };
|