@wix/auto_sdk_automations_automations-v-2 1.0.93 → 1.0.94
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 -74
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +58 -58
- package/build/cjs/index.typings.js +65 -65
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +42 -42
- package/build/cjs/meta.js +52 -52
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -10
- package/build/es/index.mjs +74 -74
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +58 -58
- package/build/es/index.typings.mjs +65 -65
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +42 -42
- package/build/es/meta.mjs +52 -52
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -10
- package/build/internal/cjs/index.js +74 -74
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +58 -58
- package/build/internal/cjs/index.typings.js +65 -65
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +42 -42
- package/build/internal/cjs/meta.js +52 -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 +74 -74
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +58 -58
- package/build/internal/es/index.typings.mjs +65 -65
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +42 -42
- package/build/internal/es/meta.mjs +52 -52
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -898,9 +898,19 @@ interface AccountDetails {
|
|
|
898
898
|
*/
|
|
899
899
|
siteId?: string | null;
|
|
900
900
|
}
|
|
901
|
-
interface
|
|
902
|
-
/**
|
|
903
|
-
|
|
901
|
+
interface GetAutomationRevisionRequest {
|
|
902
|
+
/**
|
|
903
|
+
* Automation ID.
|
|
904
|
+
* @format GUID
|
|
905
|
+
*/
|
|
906
|
+
automationId: string;
|
|
907
|
+
/** Revision number. */
|
|
908
|
+
revision?: string | null;
|
|
909
|
+
/**
|
|
910
|
+
* Requested fields.
|
|
911
|
+
* @maxSize 20
|
|
912
|
+
*/
|
|
913
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
904
914
|
}
|
|
905
915
|
declare enum RequestedFields {
|
|
906
916
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
@@ -909,6 +919,31 @@ declare enum RequestedFields {
|
|
|
909
919
|
}
|
|
910
920
|
/** @enumType */
|
|
911
921
|
type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'OVERRIDE_SCHEMA';
|
|
922
|
+
interface GetAutomationRevisionResponse {
|
|
923
|
+
/** Automation revision. */
|
|
924
|
+
automation?: Automation;
|
|
925
|
+
}
|
|
926
|
+
interface AccountInfo {
|
|
927
|
+
/**
|
|
928
|
+
* ID of the Wix account associated with the event.
|
|
929
|
+
* @format GUID
|
|
930
|
+
*/
|
|
931
|
+
accountId?: string | null;
|
|
932
|
+
/**
|
|
933
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
934
|
+
* @format GUID
|
|
935
|
+
*/
|
|
936
|
+
parentAccountId?: string | null;
|
|
937
|
+
/**
|
|
938
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
939
|
+
* @format GUID
|
|
940
|
+
*/
|
|
941
|
+
siteId?: string | null;
|
|
942
|
+
}
|
|
943
|
+
interface CreateAutomationRequest {
|
|
944
|
+
/** Automation to create. */
|
|
945
|
+
automation: Automation;
|
|
946
|
+
}
|
|
912
947
|
interface CreateAutomationResponse {
|
|
913
948
|
/** Details of the created automation. */
|
|
914
949
|
automation?: Automation;
|
|
@@ -2432,41 +2467,6 @@ interface MergeOverridePreinstalledWithRuntimeVersionResponse {
|
|
|
2432
2467
|
/** The merged automation after applying the latest runtime version of the preinstalled automation. */
|
|
2433
2468
|
automation?: Automation;
|
|
2434
2469
|
}
|
|
2435
|
-
interface AccountInfo {
|
|
2436
|
-
/**
|
|
2437
|
-
* ID of the Wix account associated with the event.
|
|
2438
|
-
* @format GUID
|
|
2439
|
-
*/
|
|
2440
|
-
accountId?: string | null;
|
|
2441
|
-
/**
|
|
2442
|
-
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
2443
|
-
* @format GUID
|
|
2444
|
-
*/
|
|
2445
|
-
parentAccountId?: string | null;
|
|
2446
|
-
/**
|
|
2447
|
-
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
2448
|
-
* @format GUID
|
|
2449
|
-
*/
|
|
2450
|
-
siteId?: string | null;
|
|
2451
|
-
}
|
|
2452
|
-
interface GetAutomationRevisionRequest {
|
|
2453
|
-
/**
|
|
2454
|
-
* Automation ID.
|
|
2455
|
-
* @format GUID
|
|
2456
|
-
*/
|
|
2457
|
-
automationId: string;
|
|
2458
|
-
/** Revision number. */
|
|
2459
|
-
revision?: string | null;
|
|
2460
|
-
/**
|
|
2461
|
-
* Requested fields.
|
|
2462
|
-
* @maxSize 20
|
|
2463
|
-
*/
|
|
2464
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
2465
|
-
}
|
|
2466
|
-
interface GetAutomationRevisionResponse {
|
|
2467
|
-
/** Automation revision. */
|
|
2468
|
-
automation?: Automation;
|
|
2469
|
-
}
|
|
2470
2470
|
interface BaseEventMetadata {
|
|
2471
2471
|
/**
|
|
2472
2472
|
* App instance ID.
|
|
@@ -2570,6 +2570,26 @@ interface AutomationUpdatedEnvelope {
|
|
|
2570
2570
|
* @documentationMaturity preview
|
|
2571
2571
|
*/
|
|
2572
2572
|
declare function onAutomationUpdated(handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>): void;
|
|
2573
|
+
/**
|
|
2574
|
+
* Gets the specified automation revision.
|
|
2575
|
+
* @param automationId - Automation ID.
|
|
2576
|
+
* @public
|
|
2577
|
+
* @documentationMaturity preview
|
|
2578
|
+
* @requiredField automationId
|
|
2579
|
+
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
2580
|
+
* @applicableIdentity APP
|
|
2581
|
+
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
2582
|
+
*/
|
|
2583
|
+
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>>;
|
|
2584
|
+
interface GetAutomationRevisionOptions {
|
|
2585
|
+
/** Revision number. */
|
|
2586
|
+
revision?: string | null;
|
|
2587
|
+
/**
|
|
2588
|
+
* Requested fields.
|
|
2589
|
+
* @maxSize 20
|
|
2590
|
+
*/
|
|
2591
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
2592
|
+
}
|
|
2573
2593
|
/**
|
|
2574
2594
|
* Creates an automation.
|
|
2575
2595
|
* @param automation - Automation to create.
|
|
@@ -3254,25 +3274,5 @@ interface GenerateActionInputMappingFromTemplateOptions {
|
|
|
3254
3274
|
/** Action input mapping template the action SPI provider will generate input mapping from. */
|
|
3255
3275
|
actionInputMappingTemplate: Record<string, any> | null;
|
|
3256
3276
|
}
|
|
3257
|
-
/**
|
|
3258
|
-
* Gets the specified automation revision.
|
|
3259
|
-
* @param automationId - Automation ID.
|
|
3260
|
-
* @public
|
|
3261
|
-
* @documentationMaturity preview
|
|
3262
|
-
* @requiredField automationId
|
|
3263
|
-
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
3264
|
-
* @applicableIdentity APP
|
|
3265
|
-
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
3266
|
-
*/
|
|
3267
|
-
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>>;
|
|
3268
|
-
interface GetAutomationRevisionOptions {
|
|
3269
|
-
/** Revision number. */
|
|
3270
|
-
revision?: string | null;
|
|
3271
|
-
/**
|
|
3272
|
-
* Requested fields.
|
|
3273
|
-
* @maxSize 20
|
|
3274
|
-
*/
|
|
3275
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
3276
|
-
}
|
|
3277
3277
|
|
|
3278
3278
|
export { type AIMetadata, type AccountDetails, type AccountInfo, 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, getActionsQuotaInfo, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomationsForApp, typedQueryAutomations, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
@@ -81,7 +81,7 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
81
81
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
82
82
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
83
83
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
84
|
-
function
|
|
84
|
+
function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
85
85
|
const domainToMappings = {
|
|
86
86
|
"manage._base_domain_": [
|
|
87
87
|
{
|
|
@@ -120,7 +120,7 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
|
120
120
|
};
|
|
121
121
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
124
124
|
const domainToMappings = {
|
|
125
125
|
"manage._base_domain_": [
|
|
126
126
|
{
|
|
@@ -160,6 +160,38 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
|
160
160
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
161
161
|
}
|
|
162
162
|
var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
|
|
163
|
+
function getAutomationRevision(payload) {
|
|
164
|
+
function __getAutomationRevision({ host }) {
|
|
165
|
+
const metadata = {
|
|
166
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
167
|
+
method: "GET",
|
|
168
|
+
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
169
|
+
packageName: PACKAGE_NAME,
|
|
170
|
+
migrationOptions: {
|
|
171
|
+
optInTransformResponse: true
|
|
172
|
+
},
|
|
173
|
+
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
174
|
+
protoPath: "/v1/automation-revisions/{automationId}",
|
|
175
|
+
data: payload,
|
|
176
|
+
host
|
|
177
|
+
}),
|
|
178
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
179
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
180
|
+
{
|
|
181
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
182
|
+
paths: [
|
|
183
|
+
{ path: "automation.createdDate" },
|
|
184
|
+
{ path: "automation.updatedDate" },
|
|
185
|
+
{ path: "automation.draftUpdatedDate" },
|
|
186
|
+
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
])
|
|
190
|
+
};
|
|
191
|
+
return metadata;
|
|
192
|
+
}
|
|
193
|
+
return __getAutomationRevision;
|
|
194
|
+
}
|
|
163
195
|
function createAutomation(payload) {
|
|
164
196
|
function __createAutomation({ host }) {
|
|
165
197
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -828,38 +860,6 @@ function generateActionInputMappingFromTemplate(payload) {
|
|
|
828
860
|
}
|
|
829
861
|
return __generateActionInputMappingFromTemplate;
|
|
830
862
|
}
|
|
831
|
-
function getAutomationRevision(payload) {
|
|
832
|
-
function __getAutomationRevision({ host }) {
|
|
833
|
-
const metadata = {
|
|
834
|
-
entityFqdn: "wix.automations.v2.automation",
|
|
835
|
-
method: "GET",
|
|
836
|
-
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
837
|
-
packageName: PACKAGE_NAME,
|
|
838
|
-
migrationOptions: {
|
|
839
|
-
optInTransformResponse: true
|
|
840
|
-
},
|
|
841
|
-
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
842
|
-
protoPath: "/v1/automation-revisions/{automationId}",
|
|
843
|
-
data: payload,
|
|
844
|
-
host
|
|
845
|
-
}),
|
|
846
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
847
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
848
|
-
{
|
|
849
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
850
|
-
paths: [
|
|
851
|
-
{ path: "automation.createdDate" },
|
|
852
|
-
{ path: "automation.updatedDate" },
|
|
853
|
-
{ path: "automation.draftUpdatedDate" },
|
|
854
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
855
|
-
]
|
|
856
|
-
}
|
|
857
|
-
])
|
|
858
|
-
};
|
|
859
|
-
return metadata;
|
|
860
|
-
}
|
|
861
|
-
return __getAutomationRevision;
|
|
862
|
-
}
|
|
863
863
|
|
|
864
864
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
865
865
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -1054,6 +1054,37 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
1054
1054
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
1055
1055
|
return AutomationErrorType2;
|
|
1056
1056
|
})(AutomationErrorType || {});
|
|
1057
|
+
async function getAutomationRevision2(automationId, options) {
|
|
1058
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1059
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1060
|
+
automationId,
|
|
1061
|
+
revision: options?.revision,
|
|
1062
|
+
fields: options?.fields
|
|
1063
|
+
});
|
|
1064
|
+
const reqOpts = getAutomationRevision(payload);
|
|
1065
|
+
sideEffects?.onSiteCall?.();
|
|
1066
|
+
try {
|
|
1067
|
+
const result = await httpClient.request(reqOpts);
|
|
1068
|
+
sideEffects?.onSuccess?.(result);
|
|
1069
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1070
|
+
} catch (err) {
|
|
1071
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1072
|
+
err,
|
|
1073
|
+
{
|
|
1074
|
+
spreadPathsToArguments: {},
|
|
1075
|
+
explicitPathsToArguments: {
|
|
1076
|
+
automationId: "$[0]",
|
|
1077
|
+
revision: "$[1].revision",
|
|
1078
|
+
fields: "$[1].fields"
|
|
1079
|
+
},
|
|
1080
|
+
singleArgumentUnchanged: false
|
|
1081
|
+
},
|
|
1082
|
+
["automationId", "options"]
|
|
1083
|
+
);
|
|
1084
|
+
sideEffects?.onError?.(err);
|
|
1085
|
+
throw transformedError;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1057
1088
|
async function createAutomation2(automation) {
|
|
1058
1089
|
const { httpClient, sideEffects } = arguments[1];
|
|
1059
1090
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1652,37 +1683,6 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1652
1683
|
throw transformedError;
|
|
1653
1684
|
}
|
|
1654
1685
|
}
|
|
1655
|
-
async function getAutomationRevision2(automationId, options) {
|
|
1656
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1657
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1658
|
-
automationId,
|
|
1659
|
-
revision: options?.revision,
|
|
1660
|
-
fields: options?.fields
|
|
1661
|
-
});
|
|
1662
|
-
const reqOpts = getAutomationRevision(payload);
|
|
1663
|
-
sideEffects?.onSiteCall?.();
|
|
1664
|
-
try {
|
|
1665
|
-
const result = await httpClient.request(reqOpts);
|
|
1666
|
-
sideEffects?.onSuccess?.(result);
|
|
1667
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1668
|
-
} catch (err) {
|
|
1669
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1670
|
-
err,
|
|
1671
|
-
{
|
|
1672
|
-
spreadPathsToArguments: {},
|
|
1673
|
-
explicitPathsToArguments: {
|
|
1674
|
-
automationId: "$[0]",
|
|
1675
|
-
revision: "$[1].revision",
|
|
1676
|
-
fields: "$[1].fields"
|
|
1677
|
-
},
|
|
1678
|
-
singleArgumentUnchanged: false
|
|
1679
|
-
},
|
|
1680
|
-
["automationId", "options"]
|
|
1681
|
-
);
|
|
1682
|
-
sideEffects?.onError?.(err);
|
|
1683
|
-
throw transformedError;
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
1686
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1687
1687
|
0 && (module.exports = {
|
|
1688
1688
|
ActionErrorType,
|