@wix/auto_sdk_automations_automations-v-2 1.0.112 → 1.0.113
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 +74 -83
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +50 -64
- package/build/cjs/index.typings.js +65 -74
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +34 -48
- package/build/cjs/meta.js +52 -61
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -10
- package/build/es/index.mjs +74 -83
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +50 -64
- package/build/es/index.typings.mjs +65 -74
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +34 -48
- package/build/es/meta.mjs +52 -61
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -10
- package/build/internal/cjs/index.js +74 -83
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +50 -64
- package/build/internal/cjs/index.typings.js +65 -74
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +34 -48
- package/build/internal/cjs/meta.js +52 -61
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -10
- package/build/internal/es/index.mjs +74 -83
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +50 -64
- package/build/internal/es/index.typings.mjs +65 -74
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +34 -48
- package/build/internal/es/meta.mjs +52 -61
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -172,7 +172,6 @@ interface AutomationConfiguration {
|
|
|
172
172
|
actions?: Record<string, Action>;
|
|
173
173
|
}
|
|
174
174
|
declare enum TimeUnit {
|
|
175
|
-
UNKNOWN_TIME_UNIT = "UNKNOWN_TIME_UNIT",
|
|
176
175
|
/** Minutes. */
|
|
177
176
|
MINUTES = "MINUTES",
|
|
178
177
|
/** Hours. */
|
|
@@ -185,7 +184,7 @@ declare enum TimeUnit {
|
|
|
185
184
|
MONTHS = "MONTHS"
|
|
186
185
|
}
|
|
187
186
|
/** @enumType */
|
|
188
|
-
type TimeUnitWithLiterals = TimeUnit | '
|
|
187
|
+
type TimeUnitWithLiterals = TimeUnit | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS';
|
|
189
188
|
interface Filter {
|
|
190
189
|
/**
|
|
191
190
|
* Filter ID.
|
|
@@ -261,15 +260,13 @@ interface ConditionExpressionGroup {
|
|
|
261
260
|
booleanExpressions?: string[];
|
|
262
261
|
}
|
|
263
262
|
declare enum Operator {
|
|
264
|
-
/** Unknown. */
|
|
265
|
-
UNKNOWN_OPERATOR = "UNKNOWN_OPERATOR",
|
|
266
263
|
/** `OR` operator. */
|
|
267
264
|
OR = "OR",
|
|
268
265
|
/** `AND` operator. */
|
|
269
266
|
AND = "AND"
|
|
270
267
|
}
|
|
271
268
|
/** @enumType */
|
|
272
|
-
type OperatorWithLiterals = Operator | '
|
|
269
|
+
type OperatorWithLiterals = Operator | 'OR' | 'AND';
|
|
273
270
|
interface CodeSnippet {
|
|
274
271
|
/** Logical operator used to evaluate the condition expressions. */
|
|
275
272
|
language?: LanguageWithLiterals;
|
|
@@ -280,13 +277,11 @@ interface CodeSnippet {
|
|
|
280
277
|
code?: string;
|
|
281
278
|
}
|
|
282
279
|
declare enum Language {
|
|
283
|
-
/** Unknown. */
|
|
284
|
-
UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
|
|
285
280
|
/** JavaScript. */
|
|
286
281
|
JAVASCRIPT = "JAVASCRIPT"
|
|
287
282
|
}
|
|
288
283
|
/** @enumType */
|
|
289
|
-
type LanguageWithLiterals = Language | '
|
|
284
|
+
type LanguageWithLiterals = Language | 'JAVASCRIPT';
|
|
290
285
|
/** Path definition */
|
|
291
286
|
interface Path {
|
|
292
287
|
/**
|
|
@@ -307,8 +302,6 @@ interface Path {
|
|
|
307
302
|
postActionId?: string | null;
|
|
308
303
|
}
|
|
309
304
|
declare enum Type {
|
|
310
|
-
/** Based on the trigger. */
|
|
311
|
-
UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
|
|
312
305
|
/** 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. */
|
|
313
306
|
APP_DEFINED = "APP_DEFINED",
|
|
314
307
|
/**
|
|
@@ -333,7 +326,7 @@ declare enum Type {
|
|
|
333
326
|
RATE_LIMIT = "RATE_LIMIT"
|
|
334
327
|
}
|
|
335
328
|
/** @enumType */
|
|
336
|
-
type TypeWithLiterals = Type | '
|
|
329
|
+
type TypeWithLiterals = Type | 'APP_DEFINED' | 'CONDITION' | 'CODE_CONDITION' | 'DELAY' | 'RATE_LIMIT';
|
|
337
330
|
interface AppDefinedAction {
|
|
338
331
|
/**
|
|
339
332
|
* ID of the app that defines the action.
|
|
@@ -509,15 +502,13 @@ interface SplitAction {
|
|
|
509
502
|
paths?: Path[];
|
|
510
503
|
}
|
|
511
504
|
declare enum Status {
|
|
512
|
-
/** Unknown. */
|
|
513
|
-
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
514
505
|
/** Active. Active automations can be triggered. */
|
|
515
506
|
ACTIVE = "ACTIVE",
|
|
516
507
|
/** Inactive. Inactive automations cannot be triggered. */
|
|
517
508
|
INACTIVE = "INACTIVE"
|
|
518
509
|
}
|
|
519
510
|
/** @enumType */
|
|
520
|
-
type StatusWithLiterals = Status | '
|
|
511
|
+
type StatusWithLiterals = Status | 'ACTIVE' | 'INACTIVE';
|
|
521
512
|
interface Trigger {
|
|
522
513
|
/**
|
|
523
514
|
* ID of the app that defines the trigger.
|
|
@@ -618,8 +609,6 @@ interface FilterableAppDefinedActions {
|
|
|
618
609
|
actionIdentifiers?: string[];
|
|
619
610
|
}
|
|
620
611
|
declare enum Origin {
|
|
621
|
-
/** Default value. */
|
|
622
|
-
UNKNOWN_ORIGIN = "UNKNOWN_ORIGIN",
|
|
623
612
|
/** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
|
|
624
613
|
USER = "USER",
|
|
625
614
|
/** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */
|
|
@@ -628,7 +617,7 @@ declare enum Origin {
|
|
|
628
617
|
PREINSTALLED = "PREINSTALLED"
|
|
629
618
|
}
|
|
630
619
|
/** @enumType */
|
|
631
|
-
type OriginWithLiterals = Origin | '
|
|
620
|
+
type OriginWithLiterals = Origin | 'USER' | 'APPLICATION' | 'PREINSTALLED';
|
|
632
621
|
interface ApplicationOrigin {
|
|
633
622
|
/**
|
|
634
623
|
* [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
|
|
@@ -901,35 +890,16 @@ interface AccountInfo {
|
|
|
901
890
|
*/
|
|
902
891
|
siteId?: string | null;
|
|
903
892
|
}
|
|
904
|
-
interface
|
|
905
|
-
/**
|
|
906
|
-
|
|
907
|
-
* @format GUID
|
|
908
|
-
*/
|
|
909
|
-
automationId: string;
|
|
910
|
-
/** Revision number. */
|
|
911
|
-
revision?: string | null;
|
|
912
|
-
/**
|
|
913
|
-
* Requested fields.
|
|
914
|
-
* @maxSize 20
|
|
915
|
-
*/
|
|
916
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
893
|
+
interface CreateAutomationRequest {
|
|
894
|
+
/** Automation to create. */
|
|
895
|
+
automation: Automation;
|
|
917
896
|
}
|
|
918
897
|
declare enum RequestedFields {
|
|
919
|
-
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
920
898
|
/** whether to return in response `configuration.trigger.override_output_schema` field and in `configuration.actions` the `override_output_schema` field */
|
|
921
899
|
OVERRIDE_SCHEMA = "OVERRIDE_SCHEMA"
|
|
922
900
|
}
|
|
923
901
|
/** @enumType */
|
|
924
|
-
type RequestedFieldsWithLiterals = RequestedFields | '
|
|
925
|
-
interface GetAutomationRevisionResponse {
|
|
926
|
-
/** Automation revision. */
|
|
927
|
-
automation?: Automation;
|
|
928
|
-
}
|
|
929
|
-
interface CreateAutomationRequest {
|
|
930
|
-
/** Automation to create. */
|
|
931
|
-
automation: Automation;
|
|
932
|
-
}
|
|
902
|
+
type RequestedFieldsWithLiterals = RequestedFields | 'OVERRIDE_SCHEMA';
|
|
933
903
|
interface CreateAutomationResponse {
|
|
934
904
|
/** Details of the created automation. */
|
|
935
905
|
automation?: Automation;
|
|
@@ -2036,7 +2006,6 @@ interface ValidateAutomationResponse {
|
|
|
2036
2006
|
actionValidationErrors?: ActionValidationError[];
|
|
2037
2007
|
}
|
|
2038
2008
|
declare enum ValidationResultStatus {
|
|
2039
|
-
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
2040
2009
|
/**
|
|
2041
2010
|
* Automation is valid. No errors found.
|
|
2042
2011
|
*
|
|
@@ -2057,7 +2026,7 @@ declare enum ValidationResultStatus {
|
|
|
2057
2026
|
INVALID = "INVALID"
|
|
2058
2027
|
}
|
|
2059
2028
|
/** @enumType */
|
|
2060
|
-
type ValidationResultStatusWithLiterals = ValidationResultStatus | '
|
|
2029
|
+
type ValidationResultStatusWithLiterals = ValidationResultStatus | 'VALID' | 'VALID_WITH_WARNINGS' | 'INVALID';
|
|
2061
2030
|
interface TriggerValidationError extends TriggerValidationErrorErrorOneOf {
|
|
2062
2031
|
/** Error in the automation's [trigger configuration](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/configure-your-automation#configuring-the-trigger). */
|
|
2063
2032
|
configurationError?: TriggerConfigurationError;
|
|
@@ -2302,10 +2271,9 @@ interface AutomationConfigurationError {
|
|
|
2302
2271
|
errorType?: AutomationErrorTypeWithLiterals;
|
|
2303
2272
|
}
|
|
2304
2273
|
declare enum AutomationErrorType {
|
|
2305
|
-
UNKNOWN_AUTOMATION_ERROR_TYPE = "UNKNOWN_AUTOMATION_ERROR_TYPE"
|
|
2306
2274
|
}
|
|
2307
2275
|
/** @enumType */
|
|
2308
|
-
type AutomationErrorTypeWithLiterals = AutomationErrorType
|
|
2276
|
+
type AutomationErrorTypeWithLiterals = AutomationErrorType;
|
|
2309
2277
|
interface ValidateAutomationByIdRequest {
|
|
2310
2278
|
/**
|
|
2311
2279
|
* Automation ID.
|
|
@@ -2497,6 +2465,24 @@ interface MergeOverridePreinstalledWithRuntimeVersionResponse {
|
|
|
2497
2465
|
/** The merged automation after applying the latest runtime version of the preinstalled automation. */
|
|
2498
2466
|
automation?: Automation;
|
|
2499
2467
|
}
|
|
2468
|
+
interface GetAutomationRevisionRequest {
|
|
2469
|
+
/**
|
|
2470
|
+
* Automation ID.
|
|
2471
|
+
* @format GUID
|
|
2472
|
+
*/
|
|
2473
|
+
automationId: string;
|
|
2474
|
+
/** Revision number. */
|
|
2475
|
+
revision?: string | null;
|
|
2476
|
+
/**
|
|
2477
|
+
* Requested fields.
|
|
2478
|
+
* @maxSize 20
|
|
2479
|
+
*/
|
|
2480
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
2481
|
+
}
|
|
2482
|
+
interface GetAutomationRevisionResponse {
|
|
2483
|
+
/** Automation revision. */
|
|
2484
|
+
automation?: Automation;
|
|
2485
|
+
}
|
|
2500
2486
|
interface BaseEventMetadata {
|
|
2501
2487
|
/**
|
|
2502
2488
|
* App instance ID.
|
|
@@ -2617,26 +2603,6 @@ interface AutomationUpdatedEnvelope {
|
|
|
2617
2603
|
* @documentationMaturity preview
|
|
2618
2604
|
*/
|
|
2619
2605
|
declare function onAutomationUpdated(handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>): void;
|
|
2620
|
-
/**
|
|
2621
|
-
* Gets the specified automation revision.
|
|
2622
|
-
* @param automationId - Automation ID.
|
|
2623
|
-
* @public
|
|
2624
|
-
* @documentationMaturity preview
|
|
2625
|
-
* @requiredField automationId
|
|
2626
|
-
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
2627
|
-
* @applicableIdentity APP
|
|
2628
|
-
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
2629
|
-
*/
|
|
2630
|
-
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>>;
|
|
2631
|
-
interface GetAutomationRevisionOptions {
|
|
2632
|
-
/** Revision number. */
|
|
2633
|
-
revision?: string | null;
|
|
2634
|
-
/**
|
|
2635
|
-
* Requested fields.
|
|
2636
|
-
* @maxSize 20
|
|
2637
|
-
*/
|
|
2638
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
2639
|
-
}
|
|
2640
2606
|
/**
|
|
2641
2607
|
* Creates an automation.
|
|
2642
2608
|
* @param automation - Automation to create.
|
|
@@ -3430,5 +3396,25 @@ interface GenerateActionInputMappingFromTemplateOptions {
|
|
|
3430
3396
|
/** Action input mapping template the action SPI provider will generate input mapping from. */
|
|
3431
3397
|
actionInputMappingTemplate: Record<string, any> | null;
|
|
3432
3398
|
}
|
|
3399
|
+
/**
|
|
3400
|
+
* Gets the specified automation revision.
|
|
3401
|
+
* @param automationId - Automation ID.
|
|
3402
|
+
* @public
|
|
3403
|
+
* @documentationMaturity preview
|
|
3404
|
+
* @requiredField automationId
|
|
3405
|
+
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
3406
|
+
* @applicableIdentity APP
|
|
3407
|
+
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
3408
|
+
*/
|
|
3409
|
+
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>>;
|
|
3410
|
+
interface GetAutomationRevisionOptions {
|
|
3411
|
+
/** Revision number. */
|
|
3412
|
+
revision?: string | null;
|
|
3413
|
+
/**
|
|
3414
|
+
* Requested fields.
|
|
3415
|
+
* @maxSize 20
|
|
3416
|
+
*/
|
|
3417
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
3418
|
+
}
|
|
3433
3419
|
|
|
3434
3420
|
export { type AIMetadata, type AccountInfo, type AccountInfoMetadata, 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 CreatePreinstalledAutomationOptions, 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 DeletePreinstalledAutomationOptions, type DeletePreinstalledAutomationRequest, type DeletePreinstalledAutomationResponse, type DeleteStalePreinstalledAutomationRequest, type DeleteStalePreinstalledAutomationResponse, DeleteStatus, type DeleteStatusWithLiterals, type Dimensions, Domain, type DomainEvent, type DomainEventBodyOneOf, type DomainWithLiterals, type DraftInfo, type DraftPublished, type DraftsInfo, type EditorlessAssigned, type EditorlessUnassigned, 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 UpdatePreinstalledAutomationOptions, type UpdatePreinstalledAutomationRequest, type UpdatePreinstalledAutomationResponse, type UpgradeCTA, type UserDomainMediaDisabled, type UserDomainMediaEnabled, 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, createPreinstalledAutomation, deleteAutomation, deleteDraftAutomation, deletePreinstalledAutomation, generateActionInputMappingFromTemplate, generatePreinstalledAutomation, getActionsQuotaInfo, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomations, queryPreinstalledAutomationsForApp, typedQueryAutomations, updateAutomation, updateDraftAutomation, updatePreinstalledAutomation, utils, validateAutomation, validateAutomationById };
|
|
@@ -86,7 +86,7 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
86
86
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
87
87
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
88
88
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
89
|
-
function
|
|
89
|
+
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
90
90
|
const domainToMappings = {
|
|
91
91
|
"manage._base_domain_": [
|
|
92
92
|
{
|
|
@@ -125,7 +125,7 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
|
125
125
|
};
|
|
126
126
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
129
129
|
const domainToMappings = {
|
|
130
130
|
"manage._base_domain_": [
|
|
131
131
|
{
|
|
@@ -165,38 +165,6 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
|
165
165
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
166
166
|
}
|
|
167
167
|
var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
|
|
168
|
-
function getAutomationRevision(payload) {
|
|
169
|
-
function __getAutomationRevision({ host }) {
|
|
170
|
-
const metadata = {
|
|
171
|
-
entityFqdn: "wix.automations.v2.automation",
|
|
172
|
-
method: "GET",
|
|
173
|
-
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
174
|
-
packageName: PACKAGE_NAME,
|
|
175
|
-
migrationOptions: {
|
|
176
|
-
optInTransformResponse: true
|
|
177
|
-
},
|
|
178
|
-
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
179
|
-
protoPath: "/v1/automation-revisions/{automationId}",
|
|
180
|
-
data: payload,
|
|
181
|
-
host
|
|
182
|
-
}),
|
|
183
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
184
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
185
|
-
{
|
|
186
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
187
|
-
paths: [
|
|
188
|
-
{ path: "automation.createdDate" },
|
|
189
|
-
{ path: "automation.updatedDate" },
|
|
190
|
-
{ path: "automation.draftUpdatedDate" },
|
|
191
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
])
|
|
195
|
-
};
|
|
196
|
-
return metadata;
|
|
197
|
-
}
|
|
198
|
-
return __getAutomationRevision;
|
|
199
|
-
}
|
|
200
168
|
function createAutomation(payload) {
|
|
201
169
|
function __createAutomation({ host }) {
|
|
202
170
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1004,6 +972,38 @@ function generateActionInputMappingFromTemplate(payload) {
|
|
|
1004
972
|
}
|
|
1005
973
|
return __generateActionInputMappingFromTemplate;
|
|
1006
974
|
}
|
|
975
|
+
function getAutomationRevision(payload) {
|
|
976
|
+
function __getAutomationRevision({ host }) {
|
|
977
|
+
const metadata = {
|
|
978
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
979
|
+
method: "GET",
|
|
980
|
+
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
981
|
+
packageName: PACKAGE_NAME,
|
|
982
|
+
migrationOptions: {
|
|
983
|
+
optInTransformResponse: true
|
|
984
|
+
},
|
|
985
|
+
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
986
|
+
protoPath: "/v1/automation-revisions/{automationId}",
|
|
987
|
+
data: payload,
|
|
988
|
+
host
|
|
989
|
+
}),
|
|
990
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
991
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
992
|
+
{
|
|
993
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
994
|
+
paths: [
|
|
995
|
+
{ path: "automation.createdDate" },
|
|
996
|
+
{ path: "automation.updatedDate" },
|
|
997
|
+
{ path: "automation.draftUpdatedDate" },
|
|
998
|
+
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
999
|
+
]
|
|
1000
|
+
}
|
|
1001
|
+
])
|
|
1002
|
+
};
|
|
1003
|
+
return metadata;
|
|
1004
|
+
}
|
|
1005
|
+
return __getAutomationRevision;
|
|
1006
|
+
}
|
|
1007
1007
|
|
|
1008
1008
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
1009
1009
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -1015,7 +1015,6 @@ var Domain = /* @__PURE__ */ ((Domain2) => {
|
|
|
1015
1015
|
return Domain2;
|
|
1016
1016
|
})(Domain || {});
|
|
1017
1017
|
var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
|
|
1018
|
-
TimeUnit2["UNKNOWN_TIME_UNIT"] = "UNKNOWN_TIME_UNIT";
|
|
1019
1018
|
TimeUnit2["MINUTES"] = "MINUTES";
|
|
1020
1019
|
TimeUnit2["HOURS"] = "HOURS";
|
|
1021
1020
|
TimeUnit2["DAYS"] = "DAYS";
|
|
@@ -1024,18 +1023,15 @@ var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
|
|
|
1024
1023
|
return TimeUnit2;
|
|
1025
1024
|
})(TimeUnit || {});
|
|
1026
1025
|
var Operator = /* @__PURE__ */ ((Operator2) => {
|
|
1027
|
-
Operator2["UNKNOWN_OPERATOR"] = "UNKNOWN_OPERATOR";
|
|
1028
1026
|
Operator2["OR"] = "OR";
|
|
1029
1027
|
Operator2["AND"] = "AND";
|
|
1030
1028
|
return Operator2;
|
|
1031
1029
|
})(Operator || {});
|
|
1032
1030
|
var Language = /* @__PURE__ */ ((Language2) => {
|
|
1033
|
-
Language2["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
|
|
1034
1031
|
Language2["JAVASCRIPT"] = "JAVASCRIPT";
|
|
1035
1032
|
return Language2;
|
|
1036
1033
|
})(Language || {});
|
|
1037
1034
|
var Type = /* @__PURE__ */ ((Type2) => {
|
|
1038
|
-
Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
|
|
1039
1035
|
Type2["APP_DEFINED"] = "APP_DEFINED";
|
|
1040
1036
|
Type2["CONDITION"] = "CONDITION";
|
|
1041
1037
|
Type2["CODE_CONDITION"] = "CODE_CONDITION";
|
|
@@ -1044,13 +1040,11 @@ var Type = /* @__PURE__ */ ((Type2) => {
|
|
|
1044
1040
|
return Type2;
|
|
1045
1041
|
})(Type || {});
|
|
1046
1042
|
var Status = /* @__PURE__ */ ((Status2) => {
|
|
1047
|
-
Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
1048
1043
|
Status2["ACTIVE"] = "ACTIVE";
|
|
1049
1044
|
Status2["INACTIVE"] = "INACTIVE";
|
|
1050
1045
|
return Status2;
|
|
1051
1046
|
})(Status || {});
|
|
1052
1047
|
var Origin = /* @__PURE__ */ ((Origin2) => {
|
|
1053
|
-
Origin2["UNKNOWN_ORIGIN"] = "UNKNOWN_ORIGIN";
|
|
1054
1048
|
Origin2["USER"] = "USER";
|
|
1055
1049
|
Origin2["APPLICATION"] = "APPLICATION";
|
|
1056
1050
|
Origin2["PREINSTALLED"] = "PREINSTALLED";
|
|
@@ -1065,7 +1059,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
1065
1059
|
return WebhookIdentityType2;
|
|
1066
1060
|
})(WebhookIdentityType || {});
|
|
1067
1061
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
1068
|
-
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
1069
1062
|
RequestedFields2["OVERRIDE_SCHEMA"] = "OVERRIDE_SCHEMA";
|
|
1070
1063
|
return RequestedFields2;
|
|
1071
1064
|
})(RequestedFields || {});
|
|
@@ -1137,7 +1130,6 @@ var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
|
1137
1130
|
return DeleteStatus2;
|
|
1138
1131
|
})(DeleteStatus || {});
|
|
1139
1132
|
var ValidationResultStatus = /* @__PURE__ */ ((ValidationResultStatus2) => {
|
|
1140
|
-
ValidationResultStatus2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
1141
1133
|
ValidationResultStatus2["VALID"] = "VALID";
|
|
1142
1134
|
ValidationResultStatus2["VALID_WITH_WARNINGS"] = "VALID_WITH_WARNINGS";
|
|
1143
1135
|
ValidationResultStatus2["INVALID"] = "INVALID";
|
|
@@ -1197,40 +1189,8 @@ var AutomationValidationErrorValidationErrorType = /* @__PURE__ */ ((AutomationV
|
|
|
1197
1189
|
return AutomationValidationErrorValidationErrorType2;
|
|
1198
1190
|
})(AutomationValidationErrorValidationErrorType || {});
|
|
1199
1191
|
var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
1200
|
-
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
1201
1192
|
return AutomationErrorType2;
|
|
1202
1193
|
})(AutomationErrorType || {});
|
|
1203
|
-
async function getAutomationRevision2(automationId, options) {
|
|
1204
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1205
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1206
|
-
automationId,
|
|
1207
|
-
revision: options?.revision,
|
|
1208
|
-
fields: options?.fields
|
|
1209
|
-
});
|
|
1210
|
-
const reqOpts = getAutomationRevision(payload);
|
|
1211
|
-
sideEffects?.onSiteCall?.();
|
|
1212
|
-
try {
|
|
1213
|
-
const result = await httpClient.request(reqOpts);
|
|
1214
|
-
sideEffects?.onSuccess?.(result);
|
|
1215
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1216
|
-
} catch (err) {
|
|
1217
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1218
|
-
err,
|
|
1219
|
-
{
|
|
1220
|
-
spreadPathsToArguments: {},
|
|
1221
|
-
explicitPathsToArguments: {
|
|
1222
|
-
automationId: "$[0]",
|
|
1223
|
-
revision: "$[1].revision",
|
|
1224
|
-
fields: "$[1].fields"
|
|
1225
|
-
},
|
|
1226
|
-
singleArgumentUnchanged: false
|
|
1227
|
-
},
|
|
1228
|
-
["automationId", "options"]
|
|
1229
|
-
);
|
|
1230
|
-
sideEffects?.onError?.(err);
|
|
1231
|
-
throw transformedError;
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
1194
|
async function createAutomation2(automation) {
|
|
1235
1195
|
const { httpClient, sideEffects } = arguments[1];
|
|
1236
1196
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1951,6 +1911,37 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1951
1911
|
throw transformedError;
|
|
1952
1912
|
}
|
|
1953
1913
|
}
|
|
1914
|
+
async function getAutomationRevision2(automationId, options) {
|
|
1915
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1916
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1917
|
+
automationId,
|
|
1918
|
+
revision: options?.revision,
|
|
1919
|
+
fields: options?.fields
|
|
1920
|
+
});
|
|
1921
|
+
const reqOpts = getAutomationRevision(payload);
|
|
1922
|
+
sideEffects?.onSiteCall?.();
|
|
1923
|
+
try {
|
|
1924
|
+
const result = await httpClient.request(reqOpts);
|
|
1925
|
+
sideEffects?.onSuccess?.(result);
|
|
1926
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1927
|
+
} catch (err) {
|
|
1928
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1929
|
+
err,
|
|
1930
|
+
{
|
|
1931
|
+
spreadPathsToArguments: {},
|
|
1932
|
+
explicitPathsToArguments: {
|
|
1933
|
+
automationId: "$[0]",
|
|
1934
|
+
revision: "$[1].revision",
|
|
1935
|
+
fields: "$[1].fields"
|
|
1936
|
+
},
|
|
1937
|
+
singleArgumentUnchanged: false
|
|
1938
|
+
},
|
|
1939
|
+
["automationId", "options"]
|
|
1940
|
+
);
|
|
1941
|
+
sideEffects?.onError?.(err);
|
|
1942
|
+
throw transformedError;
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1954
1945
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1955
1946
|
0 && (module.exports = {
|
|
1956
1947
|
ActionErrorType,
|