@wix/auto_sdk_automations_automations-v-2 1.0.84 → 1.0.86
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 +10 -10
- package/build/cjs/index.js +75 -74
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +82 -65
- package/build/cjs/index.typings.js +66 -65
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +66 -49
- package/build/cjs/meta.js +53 -52
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -10
- package/build/es/index.mjs +75 -74
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +82 -65
- package/build/es/index.typings.mjs +66 -65
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +66 -49
- package/build/es/meta.mjs +53 -52
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -10
- package/build/internal/cjs/index.js +75 -74
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +82 -65
- package/build/internal/cjs/index.typings.js +66 -65
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +66 -49
- package/build/internal/cjs/meta.js +53 -52
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -10
- package/build/internal/es/index.mjs +75 -74
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +82 -65
- package/build/internal/es/index.typings.mjs +66 -65
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +66 -49
- package/build/internal/es/meta.mjs +53 -52
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -88,17 +88,19 @@ interface AIMetadata {
|
|
|
88
88
|
}
|
|
89
89
|
interface ActionSettings {
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* IDs of actions whose `skipActionExpression` can't be modified.
|
|
92
92
|
*
|
|
93
|
-
*
|
|
93
|
+
* An action's `skipActionExpression` determines whether the action is skipped. Including an action's ID in this array makes its `skipActionExpression` permanent, so it can't be changed.
|
|
94
|
+
*
|
|
95
|
+
* When empty, the `skipActionExpression` of all actions can be edited.
|
|
94
96
|
* @maxSize 30
|
|
95
97
|
* @format GUID
|
|
96
98
|
*/
|
|
97
99
|
permanentActionIds?: string[];
|
|
98
100
|
/**
|
|
99
|
-
*
|
|
101
|
+
* IDs of read-only actions. Read-only actions cannot be modified.
|
|
100
102
|
*
|
|
101
|
-
* When empty
|
|
103
|
+
* When empty and the automation's `settings.readonly` is `false`, all actions are modifiable.
|
|
102
104
|
* @maxSize 30
|
|
103
105
|
* @format GUID
|
|
104
106
|
*/
|
|
@@ -308,15 +310,29 @@ declare enum Type {
|
|
|
308
310
|
UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
|
|
309
311
|
/** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#app-defined-action). This action type is available in the site dashboard. */
|
|
310
312
|
APP_DEFINED = "APP_DEFINED",
|
|
311
|
-
/**
|
|
313
|
+
/**
|
|
314
|
+
* Condition action. Evaluates a condition to determine which action runs next.
|
|
315
|
+
*
|
|
316
|
+
* Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.
|
|
317
|
+
*
|
|
318
|
+
* > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `conditionInfo.truePostActionIds` run and those in `conditionInfo.falsePostActionIds` are skipped.
|
|
319
|
+
*/
|
|
312
320
|
CONDITION = "CONDITION",
|
|
321
|
+
/**
|
|
322
|
+
* Code condition action. Evaluates custom code to determine which action runs next.
|
|
323
|
+
*
|
|
324
|
+
* Learn more about [adding and setting up conditions](https://support.wix.com/en/article/the-new-automation-builder-understanding-conditions-operators) in Wix Automations.
|
|
325
|
+
*
|
|
326
|
+
* > **Note**: When `skipActionExpression` evaluates to `true`, the actions in `codeConditionInfo.truePostActionIds` run and those in `codeConditionInfo.falsePostActionIds` are skipped.
|
|
327
|
+
*/
|
|
328
|
+
CODE_CONDITION = "CODE_CONDITION",
|
|
313
329
|
/** Delay. The automation must wait before executing the next step. */
|
|
314
330
|
DELAY = "DELAY",
|
|
315
331
|
/** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
|
|
316
332
|
RATE_LIMIT = "RATE_LIMIT"
|
|
317
333
|
}
|
|
318
334
|
/** @enumType */
|
|
319
|
-
type TypeWithLiterals = Type | 'UNKNOWN_ACTION_TYPE' | 'APP_DEFINED' | 'CONDITION' | 'DELAY' | 'RATE_LIMIT';
|
|
335
|
+
type TypeWithLiterals = Type | 'UNKNOWN_ACTION_TYPE' | 'APP_DEFINED' | 'CONDITION' | 'CODE_CONDITION' | 'DELAY' | 'RATE_LIMIT';
|
|
320
336
|
interface AppDefinedAction {
|
|
321
337
|
/**
|
|
322
338
|
* ID of the app that defines the action.
|
|
@@ -534,15 +550,15 @@ interface Trigger {
|
|
|
534
550
|
overrideSchema?: Record<string, any> | null;
|
|
535
551
|
}
|
|
536
552
|
interface Action extends ActionInfoOneOf {
|
|
537
|
-
/** Details of the action
|
|
553
|
+
/** Details of the action whose `type` is `APP_DEFINED`. */
|
|
538
554
|
appDefinedInfo?: AppDefinedAction;
|
|
539
|
-
/** Details of the action
|
|
555
|
+
/** Details of the action whose `type` is `CONDITION`. */
|
|
540
556
|
conditionInfo?: ConditionAction;
|
|
541
|
-
/** Details of the action
|
|
557
|
+
/** Details of the action whose `type` is `CODE_CONDITION`. */
|
|
542
558
|
codeConditionInfo?: CodeConditionAction;
|
|
543
|
-
/** Details of the action
|
|
559
|
+
/** Details of the action whose `type` is `DELAY`. */
|
|
544
560
|
delayInfo?: DelayAction;
|
|
545
|
-
/** Details of the action
|
|
561
|
+
/** Details of the action whose `type` is `RATE_LIMIT`. */
|
|
546
562
|
rateLimitInfo?: RateLimitAction;
|
|
547
563
|
/**
|
|
548
564
|
* Action ID.
|
|
@@ -570,24 +586,24 @@ interface Action extends ActionInfoOneOf {
|
|
|
570
586
|
*/
|
|
571
587
|
namespace?: string | null;
|
|
572
588
|
/**
|
|
573
|
-
* Evaluated to
|
|
574
|
-
*
|
|
575
|
-
*
|
|
589
|
+
* Evaluated to determine whether the action is skipped. When evaluated to `true`, the action is skipped. Otherwise, the action runs.
|
|
590
|
+
*
|
|
591
|
+
* When empty, the action runs.
|
|
576
592
|
* @maxLength 1000
|
|
577
593
|
*/
|
|
578
594
|
skipActionExpression?: string | null;
|
|
579
595
|
}
|
|
580
596
|
/** @oneof */
|
|
581
597
|
interface ActionInfoOneOf {
|
|
582
|
-
/** Details of the action
|
|
598
|
+
/** Details of the action whose `type` is `APP_DEFINED`. */
|
|
583
599
|
appDefinedInfo?: AppDefinedAction;
|
|
584
|
-
/** Details of the action
|
|
600
|
+
/** Details of the action whose `type` is `CONDITION`. */
|
|
585
601
|
conditionInfo?: ConditionAction;
|
|
586
|
-
/** Details of the action
|
|
602
|
+
/** Details of the action whose `type` is `CODE_CONDITION`. */
|
|
587
603
|
codeConditionInfo?: CodeConditionAction;
|
|
588
|
-
/** Details of the action
|
|
604
|
+
/** Details of the action whose `type` is `DELAY`. */
|
|
589
605
|
delayInfo?: DelayAction;
|
|
590
|
-
/** Details of the action
|
|
606
|
+
/** Details of the action whose `type` is `RATE_LIMIT`. */
|
|
591
607
|
rateLimitInfo?: RateLimitAction;
|
|
592
608
|
}
|
|
593
609
|
interface FilterableAppDefinedActions {
|
|
@@ -651,11 +667,12 @@ interface AutomationSettings {
|
|
|
651
667
|
hidden?: boolean;
|
|
652
668
|
/**
|
|
653
669
|
* Whether the automation is read-only.
|
|
654
|
-
* If true - modifications to the automation trigger or action/s are disabled.
|
|
655
|
-
* **Note**: this setting takes precedent over triggerSettings/actionSettings.
|
|
656
|
-
* If false - allows selective read-only settings via those fields.
|
|
657
670
|
*
|
|
658
|
-
*
|
|
671
|
+
* When `true`, site owners can't modify the automation or any of its actions. When `false`, users can configure specific actions as skippable or read-only using `settings.actionSettings`.
|
|
672
|
+
*
|
|
673
|
+
* Default: `false`.
|
|
674
|
+
*
|
|
675
|
+
* > **Note**: Setting `readOnly` to `true` overrides `settings.actionSettings`.
|
|
659
676
|
*/
|
|
660
677
|
readonly?: boolean;
|
|
661
678
|
/**
|
|
@@ -665,7 +682,7 @@ interface AutomationSettings {
|
|
|
665
682
|
*/
|
|
666
683
|
disableDelete?: boolean;
|
|
667
684
|
/**
|
|
668
|
-
* Whether to disable the option to change the automation's `configuration.status
|
|
685
|
+
* Whether to disable the option to change the automation's `configuration.status`.
|
|
669
686
|
*
|
|
670
687
|
* Default: `false`.
|
|
671
688
|
*/
|
|
@@ -864,19 +881,9 @@ declare enum WebhookIdentityType {
|
|
|
864
881
|
}
|
|
865
882
|
/** @enumType */
|
|
866
883
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
867
|
-
interface
|
|
868
|
-
/**
|
|
869
|
-
|
|
870
|
-
* @format GUID
|
|
871
|
-
*/
|
|
872
|
-
automationId: string;
|
|
873
|
-
/** Revision number. */
|
|
874
|
-
revision?: string | null;
|
|
875
|
-
/**
|
|
876
|
-
* Requested fields.
|
|
877
|
-
* @maxSize 20
|
|
878
|
-
*/
|
|
879
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
884
|
+
interface CreateAutomationRequest {
|
|
885
|
+
/** Automation to create. */
|
|
886
|
+
automation: Automation;
|
|
880
887
|
}
|
|
881
888
|
declare enum RequestedFields {
|
|
882
889
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
@@ -885,14 +892,6 @@ declare enum RequestedFields {
|
|
|
885
892
|
}
|
|
886
893
|
/** @enumType */
|
|
887
894
|
type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'OVERRIDE_SCHEMA';
|
|
888
|
-
interface GetAutomationRevisionResponse {
|
|
889
|
-
/** Automation revision. */
|
|
890
|
-
automation?: Automation;
|
|
891
|
-
}
|
|
892
|
-
interface CreateAutomationRequest {
|
|
893
|
-
/** Automation to create. */
|
|
894
|
-
automation: Automation;
|
|
895
|
-
}
|
|
896
895
|
interface CreateAutomationResponse {
|
|
897
896
|
/** Details of the created automation. */
|
|
898
897
|
automation?: Automation;
|
|
@@ -2416,6 +2415,24 @@ interface MergeOverridePreinstalledWithRuntimeVersionResponse {
|
|
|
2416
2415
|
/** The merged automation after applying the latest runtime version of the preinstalled automation. */
|
|
2417
2416
|
automation?: Automation;
|
|
2418
2417
|
}
|
|
2418
|
+
interface GetAutomationRevisionRequest {
|
|
2419
|
+
/**
|
|
2420
|
+
* Automation ID.
|
|
2421
|
+
* @format GUID
|
|
2422
|
+
*/
|
|
2423
|
+
automationId: string;
|
|
2424
|
+
/** Revision number. */
|
|
2425
|
+
revision?: string | null;
|
|
2426
|
+
/**
|
|
2427
|
+
* Requested fields.
|
|
2428
|
+
* @maxSize 20
|
|
2429
|
+
*/
|
|
2430
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
2431
|
+
}
|
|
2432
|
+
interface GetAutomationRevisionResponse {
|
|
2433
|
+
/** Automation revision. */
|
|
2434
|
+
automation?: Automation;
|
|
2435
|
+
}
|
|
2419
2436
|
interface BaseEventMetadata {
|
|
2420
2437
|
/**
|
|
2421
2438
|
* App instance ID.
|
|
@@ -2519,26 +2536,6 @@ interface AutomationUpdatedEnvelope {
|
|
|
2519
2536
|
* @documentationMaturity preview
|
|
2520
2537
|
*/
|
|
2521
2538
|
declare function onAutomationUpdated(handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>): void;
|
|
2522
|
-
/**
|
|
2523
|
-
* Gets the specified automation revision.
|
|
2524
|
-
* @param automationId - Automation ID.
|
|
2525
|
-
* @public
|
|
2526
|
-
* @documentationMaturity preview
|
|
2527
|
-
* @requiredField automationId
|
|
2528
|
-
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
2529
|
-
* @applicableIdentity APP
|
|
2530
|
-
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
2531
|
-
*/
|
|
2532
|
-
declare function getAutomationRevision(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, `automation.applicationInfo.appId` | `automation.preinstalledInfo.appId` | `automation.createdBy.userId` | `automation.createdBy.appId` | `automation.name` | `automation.configuration.status` | `automation.configuration.trigger.appId` | `automation.configuration.trigger.triggerKey` | `automation.configuration.trigger.filters` | `automation.configuration.trigger.filters.${number}._id` | `automation.configuration.trigger.filters.${number}.fieldKey` | `automation.configuration.trigger.filters.${number}.filterExpression` | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `automation.configuration.trigger.rateLimit.maxActivationsExpression` | `automation.configuration.trigger.rateLimit.durationTimeUnit` | `automation.configuration.rootActionIds` | `automation.origin` | `automation.settings.hidden` | `automation.settings.readonly` | `automation.settings.disableDelete` | `automation.settings.disableStatusChange` | `automation.settings.actionSettings.permanentActionIds` | `automation.settings.actionSettings.readonlyActionIds` | `automation.archived`, 7>>;
|
|
2533
|
-
interface GetAutomationRevisionOptions {
|
|
2534
|
-
/** Revision number. */
|
|
2535
|
-
revision?: string | null;
|
|
2536
|
-
/**
|
|
2537
|
-
* Requested fields.
|
|
2538
|
-
* @maxSize 20
|
|
2539
|
-
*/
|
|
2540
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
2541
|
-
}
|
|
2542
2539
|
/**
|
|
2543
2540
|
* Creates an automation.
|
|
2544
2541
|
* @param automation - Automation to create.
|
|
@@ -3214,5 +3211,25 @@ interface GenerateActionInputMappingFromTemplateOptions {
|
|
|
3214
3211
|
/** Action input mapping template the action SPI provider will generate input mapping from. */
|
|
3215
3212
|
actionInputMappingTemplate: Record<string, any> | null;
|
|
3216
3213
|
}
|
|
3214
|
+
/**
|
|
3215
|
+
* Gets the specified automation revision.
|
|
3216
|
+
* @param automationId - Automation ID.
|
|
3217
|
+
* @public
|
|
3218
|
+
* @documentationMaturity preview
|
|
3219
|
+
* @requiredField automationId
|
|
3220
|
+
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
3221
|
+
* @applicableIdentity APP
|
|
3222
|
+
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
3223
|
+
*/
|
|
3224
|
+
declare function getAutomationRevision(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, `automation.applicationInfo.appId` | `automation.preinstalledInfo.appId` | `automation.createdBy.userId` | `automation.createdBy.appId` | `automation.name` | `automation.configuration.status` | `automation.configuration.trigger.appId` | `automation.configuration.trigger.triggerKey` | `automation.configuration.trigger.filters` | `automation.configuration.trigger.filters.${number}._id` | `automation.configuration.trigger.filters.${number}.fieldKey` | `automation.configuration.trigger.filters.${number}.filterExpression` | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `automation.configuration.trigger.rateLimit.maxActivationsExpression` | `automation.configuration.trigger.rateLimit.durationTimeUnit` | `automation.configuration.rootActionIds` | `automation.origin` | `automation.settings.hidden` | `automation.settings.readonly` | `automation.settings.disableDelete` | `automation.settings.disableStatusChange` | `automation.settings.actionSettings.permanentActionIds` | `automation.settings.actionSettings.readonlyActionIds` | `automation.archived`, 7>>;
|
|
3225
|
+
interface GetAutomationRevisionOptions {
|
|
3226
|
+
/** Revision number. */
|
|
3227
|
+
revision?: string | null;
|
|
3228
|
+
/**
|
|
3229
|
+
* Requested fields.
|
|
3230
|
+
* @maxSize 20
|
|
3231
|
+
*/
|
|
3232
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
3233
|
+
}
|
|
3217
3234
|
|
|
3218
3235
|
export { type AIMetadata, 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 AutoArchivePolicy, type Automation, type AutomationConfiguration, type AutomationConfigurationError, type AutomationCreatedEnvelope, type AutomationDeletedEnvelope, AutomationErrorType, type AutomationErrorTypeWithLiterals, type AutomationOriginInfoOneOf, type AutomationQuery, type AutomationQuerySpec, 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 CommonQueryWithEntityContext, 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 CreatedByAppIdUsageSummary, 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 Dimensions, 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 GenerateActionInputMappingFromTemplateOptions, type GenerateActionInputMappingFromTemplateRequest, type GenerateActionInputMappingFromTemplateResponse, 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 Note, type Notes, type OdeditorAssigned, type OdeditorUnassigned, type Offset, Operator, type OperatorWithLiterals, Origin, type OriginAutomationInfo, type OriginWithLiterals, type OutputAction, type Path, type PicassoAssigned, type PicassoUnassigned, type Plan, type Position, type PreinstalledAutomationSpecInfo, type PreinstalledOrigin, type ProviderConfigurationError, type PublishDraftAutomationRequest, type PublishDraftAutomationResponse, type QueryAutomationsOptions, type QueryAutomationsRequest, type QueryAutomationsResponse, type QueryAutomationsWithDraftsOptions, type QueryAutomationsWithDraftsRequest, type QueryAutomationsWithDraftsResponse, type QueryDraftAutomationsRequest, type QueryDraftAutomationsResponse, type QueryPreinstalledAutomationsForAppOptions, 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, Severity, type SeverityWithLiterals, 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 StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, TimeUnit, type TimeUnitWithLiterals, type Trigger, type TriggerConfigurationError, TriggerErrorType, type TriggerErrorTypeWithLiterals, type TriggerSettings, type TriggerUsageSummary, type TriggerValidationError, type TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, type TriggerValidationErrorValidationErrorTypeWithLiterals, Type, type TypeWithLiterals, type UpdateAutomation, type UpdateAutomationRequest, type UpdateAutomationResponse, type UpdateDraftAutomation, type UpdateDraftAutomationRequest, type UpdateDraftAutomationResponse, type UpdatePreinstalledAutomationRequest, type UpdatePreinstalledAutomationResponse, type UpgradeCTA, type ValidateAutomationByIdOptions, type ValidateAutomationByIdRequest, type ValidateAutomationByIdResponse, type ValidateAutomationOptions, type ValidateAutomationRequest, type ValidateAutomationResponse, ValidationErrorSeverity, type ValidationErrorSeverityWithLiterals, ValidationErrorType, type ValidationErrorTypeWithLiterals, ValidationResultStatus, type ValidationResultStatusWithLiterals, type ValidationSettings, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generateActionInputMappingFromTemplate, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomationsForApp, typedQueryAutomations, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
@@ -80,7 +80,7 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
80
80
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
81
81
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
82
82
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
83
|
-
function
|
|
83
|
+
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
84
84
|
const domainToMappings = {
|
|
85
85
|
"manage._base_domain_": [
|
|
86
86
|
{
|
|
@@ -119,7 +119,7 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
|
119
119
|
};
|
|
120
120
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
123
123
|
const domainToMappings = {
|
|
124
124
|
"manage._base_domain_": [
|
|
125
125
|
{
|
|
@@ -159,38 +159,6 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
|
159
159
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
160
160
|
}
|
|
161
161
|
var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
|
|
162
|
-
function getAutomationRevision(payload) {
|
|
163
|
-
function __getAutomationRevision({ host }) {
|
|
164
|
-
const metadata = {
|
|
165
|
-
entityFqdn: "wix.automations.v2.automation",
|
|
166
|
-
method: "GET",
|
|
167
|
-
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
168
|
-
packageName: PACKAGE_NAME,
|
|
169
|
-
migrationOptions: {
|
|
170
|
-
optInTransformResponse: true
|
|
171
|
-
},
|
|
172
|
-
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
173
|
-
protoPath: "/v1/automation-revisions/{automationId}",
|
|
174
|
-
data: payload,
|
|
175
|
-
host
|
|
176
|
-
}),
|
|
177
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
178
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
179
|
-
{
|
|
180
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
181
|
-
paths: [
|
|
182
|
-
{ path: "automation.createdDate" },
|
|
183
|
-
{ path: "automation.updatedDate" },
|
|
184
|
-
{ path: "automation.draftUpdatedDate" },
|
|
185
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
])
|
|
189
|
-
};
|
|
190
|
-
return metadata;
|
|
191
|
-
}
|
|
192
|
-
return __getAutomationRevision;
|
|
193
|
-
}
|
|
194
162
|
function createAutomation(payload) {
|
|
195
163
|
function __createAutomation({ host }) {
|
|
196
164
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -828,6 +796,38 @@ function generateActionInputMappingFromTemplate(payload) {
|
|
|
828
796
|
}
|
|
829
797
|
return __generateActionInputMappingFromTemplate;
|
|
830
798
|
}
|
|
799
|
+
function getAutomationRevision(payload) {
|
|
800
|
+
function __getAutomationRevision({ host }) {
|
|
801
|
+
const metadata = {
|
|
802
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
803
|
+
method: "GET",
|
|
804
|
+
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
805
|
+
packageName: PACKAGE_NAME,
|
|
806
|
+
migrationOptions: {
|
|
807
|
+
optInTransformResponse: true
|
|
808
|
+
},
|
|
809
|
+
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
810
|
+
protoPath: "/v1/automation-revisions/{automationId}",
|
|
811
|
+
data: payload,
|
|
812
|
+
host
|
|
813
|
+
}),
|
|
814
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
815
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
816
|
+
{
|
|
817
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
818
|
+
paths: [
|
|
819
|
+
{ path: "automation.createdDate" },
|
|
820
|
+
{ path: "automation.updatedDate" },
|
|
821
|
+
{ path: "automation.draftUpdatedDate" },
|
|
822
|
+
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
823
|
+
]
|
|
824
|
+
}
|
|
825
|
+
])
|
|
826
|
+
};
|
|
827
|
+
return metadata;
|
|
828
|
+
}
|
|
829
|
+
return __getAutomationRevision;
|
|
830
|
+
}
|
|
831
831
|
|
|
832
832
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
833
833
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -861,6 +861,7 @@ var Type = /* @__PURE__ */ ((Type2) => {
|
|
|
861
861
|
Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
|
|
862
862
|
Type2["APP_DEFINED"] = "APP_DEFINED";
|
|
863
863
|
Type2["CONDITION"] = "CONDITION";
|
|
864
|
+
Type2["CODE_CONDITION"] = "CODE_CONDITION";
|
|
864
865
|
Type2["DELAY"] = "DELAY";
|
|
865
866
|
Type2["RATE_LIMIT"] = "RATE_LIMIT";
|
|
866
867
|
return Type2;
|
|
@@ -1021,37 +1022,6 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
1021
1022
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
1022
1023
|
return AutomationErrorType2;
|
|
1023
1024
|
})(AutomationErrorType || {});
|
|
1024
|
-
async function getAutomationRevision2(automationId, options) {
|
|
1025
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1026
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1027
|
-
automationId,
|
|
1028
|
-
revision: options?.revision,
|
|
1029
|
-
fields: options?.fields
|
|
1030
|
-
});
|
|
1031
|
-
const reqOpts = getAutomationRevision(payload);
|
|
1032
|
-
sideEffects?.onSiteCall?.();
|
|
1033
|
-
try {
|
|
1034
|
-
const result = await httpClient.request(reqOpts);
|
|
1035
|
-
sideEffects?.onSuccess?.(result);
|
|
1036
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1037
|
-
} catch (err) {
|
|
1038
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1039
|
-
err,
|
|
1040
|
-
{
|
|
1041
|
-
spreadPathsToArguments: {},
|
|
1042
|
-
explicitPathsToArguments: {
|
|
1043
|
-
automationId: "$[0]",
|
|
1044
|
-
revision: "$[1].revision",
|
|
1045
|
-
fields: "$[1].fields"
|
|
1046
|
-
},
|
|
1047
|
-
singleArgumentUnchanged: false
|
|
1048
|
-
},
|
|
1049
|
-
["automationId", "options"]
|
|
1050
|
-
);
|
|
1051
|
-
sideEffects?.onError?.(err);
|
|
1052
|
-
throw transformedError;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
1025
|
async function createAutomation2(automation) {
|
|
1056
1026
|
const { httpClient, sideEffects } = arguments[1];
|
|
1057
1027
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1627,6 +1597,37 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1627
1597
|
throw transformedError;
|
|
1628
1598
|
}
|
|
1629
1599
|
}
|
|
1600
|
+
async function getAutomationRevision2(automationId, options) {
|
|
1601
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1602
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1603
|
+
automationId,
|
|
1604
|
+
revision: options?.revision,
|
|
1605
|
+
fields: options?.fields
|
|
1606
|
+
});
|
|
1607
|
+
const reqOpts = getAutomationRevision(payload);
|
|
1608
|
+
sideEffects?.onSiteCall?.();
|
|
1609
|
+
try {
|
|
1610
|
+
const result = await httpClient.request(reqOpts);
|
|
1611
|
+
sideEffects?.onSuccess?.(result);
|
|
1612
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1613
|
+
} catch (err) {
|
|
1614
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1615
|
+
err,
|
|
1616
|
+
{
|
|
1617
|
+
spreadPathsToArguments: {},
|
|
1618
|
+
explicitPathsToArguments: {
|
|
1619
|
+
automationId: "$[0]",
|
|
1620
|
+
revision: "$[1].revision",
|
|
1621
|
+
fields: "$[1].fields"
|
|
1622
|
+
},
|
|
1623
|
+
singleArgumentUnchanged: false
|
|
1624
|
+
},
|
|
1625
|
+
["automationId", "options"]
|
|
1626
|
+
);
|
|
1627
|
+
sideEffects?.onError?.(err);
|
|
1628
|
+
throw transformedError;
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1630
1631
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1631
1632
|
0 && (module.exports = {
|
|
1632
1633
|
ActionErrorType,
|