@wix/auto_sdk_automations_automations-v-2 1.0.90 → 1.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +11 -11
  2. package/build/cjs/index.js +74 -74
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +54 -37
  5. package/build/cjs/index.typings.js +65 -65
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +38 -21
  8. package/build/cjs/meta.js +52 -52
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +11 -11
  11. package/build/es/index.mjs +74 -74
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +54 -37
  14. package/build/es/index.typings.mjs +65 -65
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +38 -21
  17. package/build/es/meta.mjs +52 -52
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +11 -11
  20. package/build/internal/cjs/index.js +74 -74
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +54 -37
  23. package/build/internal/cjs/index.typings.js +65 -65
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +38 -21
  26. package/build/internal/cjs/meta.js +52 -52
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +11 -11
  29. package/build/internal/es/index.mjs +74 -74
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +54 -37
  32. package/build/internal/es/index.typings.mjs +65 -65
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +38 -21
  35. package/build/internal/es/meta.mjs +52 -52
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,15 +1,7 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { GetAutomationRevisionOptions, GetAutomationRevisionResponse, Automation, UpdateAutomation, BulkDeleteAutomationsResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetActionsQuotaInfoResponse, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.mjs';
3
- export { AIMetadata, Action, ActionConfigurationError, ActionErrorType, ActionErrorTypeWithLiterals, ActionEvent, ActionInfoOneOf, ActionProviderQuotaInfo, ActionQuotaInfo, ActionSettings, ActionUsageSummary, ActionValidationError, ActionValidationErrorErrorOneOf, ActionValidationInfo, AdditionalInfo, AppDefinedAction, ApplicationError, ApplicationOrigin, Asset, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, AutomationConfiguration, AutomationConfigurationError, AutomationErrorType, AutomationErrorTypeWithLiterals, AutomationOriginInfoOneOf, AutomationQuerySpec, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, CommonQueryWithEntityContext, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GenerateActionInputMappingFromTemplateRequest, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeOverridePreinstalledWithRuntimeVersionRequest, MergeOverridePreinstalledWithRuntimeVersionResponse, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigrateVeloActionAutomationsRequest, MigrateVeloActionAutomationsResponse, Namespace, NamespaceChanged, NamespaceWithLiterals, Note, Notes, OdeditorAssigned, OdeditorUnassigned, Offset, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, Position, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryDraftAutomationsRequest, QueryDraftAutomationsResponse, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsRequest, QueryPreinstalledAutomationsResponse, Quota, QuotaInfo, RateLimit, RateLimitAction, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, ServiceProvisioned, ServiceRemoved, SetVariablesAction, Severity, SeverityWithLiterals, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SplitAction, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpdatePreinstalledAutomationResponse, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.mjs';
2
+ import { Automation, UpdateAutomation, BulkDeleteAutomationsResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetActionsQuotaInfoResponse, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.mjs';
3
+ export { AIMetadata, AccountDetails, Action, ActionConfigurationError, ActionErrorType, ActionErrorTypeWithLiterals, ActionEvent, ActionInfoOneOf, ActionProviderQuotaInfo, ActionQuotaInfo, ActionSettings, ActionUsageSummary, ActionValidationError, ActionValidationErrorErrorOneOf, ActionValidationInfo, AdditionalInfo, AppDefinedAction, ApplicationError, ApplicationOrigin, Asset, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, AutomationConfiguration, AutomationConfigurationError, AutomationErrorType, AutomationErrorTypeWithLiterals, AutomationOriginInfoOneOf, AutomationQuerySpec, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, CommonQueryWithEntityContext, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GenerateActionInputMappingFromTemplateRequest, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeOverridePreinstalledWithRuntimeVersionRequest, MergeOverridePreinstalledWithRuntimeVersionResponse, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigrateVeloActionAutomationsRequest, MigrateVeloActionAutomationsResponse, Namespace, NamespaceChanged, NamespaceWithLiterals, Note, Notes, OdeditorAssigned, OdeditorUnassigned, Offset, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, Position, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryDraftAutomationsRequest, QueryDraftAutomationsResponse, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsRequest, QueryPreinstalledAutomationsResponse, Quota, QuotaInfo, RateLimit, RateLimitAction, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, ServiceProvisioned, ServiceRemoved, SetVariablesAction, Severity, SeverityWithLiterals, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SplitAction, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpdatePreinstalledAutomationResponse, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.mjs';
4
4
 
5
- declare function getAutomationRevision$1(httpClient: HttpClient): GetAutomationRevisionSignature;
6
- interface GetAutomationRevisionSignature {
7
- /**
8
- * Gets the specified automation revision.
9
- * @param - Automation ID.
10
- */
11
- (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>>;
12
- }
13
5
  declare function createAutomation$1(httpClient: HttpClient): CreateAutomationSignature;
14
6
  interface CreateAutomationSignature {
15
7
  /**
@@ -196,6 +188,14 @@ interface GenerateActionInputMappingFromTemplateSignature {
196
188
  */
197
189
  (appId: string, options: NonNullablePaths<GenerateActionInputMappingFromTemplateOptions, `actionInputMappingTemplate` | `actionKey`, 2>): Promise<GenerateActionInputMappingFromTemplateResponse>;
198
190
  }
191
+ declare function getAutomationRevision$1(httpClient: HttpClient): GetAutomationRevisionSignature;
192
+ interface GetAutomationRevisionSignature {
193
+ /**
194
+ * Gets the specified automation revision.
195
+ * @param - Automation ID.
196
+ */
197
+ (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>>;
198
+ }
199
199
  declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
200
200
  declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
201
201
  declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
@@ -204,7 +204,6 @@ declare function customQueryAutomations(httpClient: HttpClient): {
204
204
  (query: AutomationQuery, options?: QueryAutomationsOptions): ReturnType<typeof typedQueryAutomations>;
205
205
  (options?: QueryAutomationsOptions): AutomationsQueryBuilder;
206
206
  };
207
- declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
208
207
  declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
209
208
  declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
210
209
  declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
@@ -225,6 +224,7 @@ declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validate
225
224
  declare const validateAutomationById: MaybeContext<BuildRESTFunction<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
226
225
  declare const getActionsQuotaInfo: MaybeContext<BuildRESTFunction<typeof getActionsQuotaInfo$1> & typeof getActionsQuotaInfo$1>;
227
226
  declare const generateActionInputMappingFromTemplate: MaybeContext<BuildRESTFunction<typeof generateActionInputMappingFromTemplate$1> & typeof generateActionInputMappingFromTemplate$1>;
227
+ declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
228
228
  declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof customQueryAutomations> & typeof customQueryAutomations>;
229
229
  /**
230
230
  * Triggered when a new automation is created.
@@ -19,7 +19,7 @@ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transform
19
19
  import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
20
20
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
21
21
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
22
- function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
22
+ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
23
23
  const domainToMappings = {
24
24
  "manage._base_domain_": [
25
25
  {
@@ -58,7 +58,7 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
58
58
  };
59
59
  return resolveUrl(Object.assign(opts, { domainToMappings }));
60
60
  }
61
- function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
61
+ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
62
62
  const domainToMappings = {
63
63
  "manage._base_domain_": [
64
64
  {
@@ -98,38 +98,6 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
98
98
  return resolveUrl(Object.assign(opts, { domainToMappings }));
99
99
  }
100
100
  var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
101
- function getAutomationRevision(payload) {
102
- function __getAutomationRevision({ host }) {
103
- const metadata = {
104
- entityFqdn: "wix.automations.v2.automation",
105
- method: "GET",
106
- methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
107
- packageName: PACKAGE_NAME,
108
- migrationOptions: {
109
- optInTransformResponse: true
110
- },
111
- url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
112
- protoPath: "/v1/automation-revisions/{automationId}",
113
- data: payload,
114
- host
115
- }),
116
- params: toURLSearchParams(payload),
117
- transformResponse: (payload2) => transformPaths(payload2, [
118
- {
119
- transformFn: transformRESTTimestampToSDKTimestamp,
120
- paths: [
121
- { path: "automation.createdDate" },
122
- { path: "automation.updatedDate" },
123
- { path: "automation.draftUpdatedDate" },
124
- { path: "automation.autoArchivePolicy.archiveDate" }
125
- ]
126
- }
127
- ])
128
- };
129
- return metadata;
130
- }
131
- return __getAutomationRevision;
132
- }
133
101
  function createAutomation(payload) {
134
102
  function __createAutomation({ host }) {
135
103
  const serializedData = transformPaths(payload, [
@@ -798,6 +766,38 @@ function generateActionInputMappingFromTemplate(payload) {
798
766
  }
799
767
  return __generateActionInputMappingFromTemplate;
800
768
  }
769
+ function getAutomationRevision(payload) {
770
+ function __getAutomationRevision({ host }) {
771
+ const metadata = {
772
+ entityFqdn: "wix.automations.v2.automation",
773
+ method: "GET",
774
+ methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
775
+ packageName: PACKAGE_NAME,
776
+ migrationOptions: {
777
+ optInTransformResponse: true
778
+ },
779
+ url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
780
+ protoPath: "/v1/automation-revisions/{automationId}",
781
+ data: payload,
782
+ host
783
+ }),
784
+ params: toURLSearchParams(payload),
785
+ transformResponse: (payload2) => transformPaths(payload2, [
786
+ {
787
+ transformFn: transformRESTTimestampToSDKTimestamp,
788
+ paths: [
789
+ { path: "automation.createdDate" },
790
+ { path: "automation.updatedDate" },
791
+ { path: "automation.draftUpdatedDate" },
792
+ { path: "automation.autoArchivePolicy.archiveDate" }
793
+ ]
794
+ }
795
+ ])
796
+ };
797
+ return metadata;
798
+ }
799
+ return __getAutomationRevision;
800
+ }
801
801
 
802
802
  // src/automations-v2-automation-automations-v-2.universal.ts
803
803
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
@@ -992,37 +992,6 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
992
992
  AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
993
993
  return AutomationErrorType2;
994
994
  })(AutomationErrorType || {});
995
- async function getAutomationRevision2(automationId, options) {
996
- const { httpClient, sideEffects } = arguments[2];
997
- const payload = renameKeysFromSDKRequestToRESTRequest({
998
- automationId,
999
- revision: options?.revision,
1000
- fields: options?.fields
1001
- });
1002
- const reqOpts = getAutomationRevision(payload);
1003
- sideEffects?.onSiteCall?.();
1004
- try {
1005
- const result = await httpClient.request(reqOpts);
1006
- sideEffects?.onSuccess?.(result);
1007
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1008
- } catch (err) {
1009
- const transformedError = sdkTransformError(
1010
- err,
1011
- {
1012
- spreadPathsToArguments: {},
1013
- explicitPathsToArguments: {
1014
- automationId: "$[0]",
1015
- revision: "$[1].revision",
1016
- fields: "$[1].fields"
1017
- },
1018
- singleArgumentUnchanged: false
1019
- },
1020
- ["automationId", "options"]
1021
- );
1022
- sideEffects?.onError?.(err);
1023
- throw transformedError;
1024
- }
1025
- }
1026
995
  async function createAutomation2(automation) {
1027
996
  const { httpClient, sideEffects } = arguments[1];
1028
997
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1621,16 +1590,39 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
1621
1590
  throw transformedError;
1622
1591
  }
1623
1592
  }
1624
-
1625
- // src/automations-v2-automation-automations-v-2.public.ts
1626
- function getAutomationRevision3(httpClient) {
1627
- return (automationId, options) => getAutomationRevision2(
1593
+ async function getAutomationRevision2(automationId, options) {
1594
+ const { httpClient, sideEffects } = arguments[2];
1595
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1628
1596
  automationId,
1629
- options,
1630
- // @ts-ignore
1631
- { httpClient }
1632
- );
1597
+ revision: options?.revision,
1598
+ fields: options?.fields
1599
+ });
1600
+ const reqOpts = getAutomationRevision(payload);
1601
+ sideEffects?.onSiteCall?.();
1602
+ try {
1603
+ const result = await httpClient.request(reqOpts);
1604
+ sideEffects?.onSuccess?.(result);
1605
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1606
+ } catch (err) {
1607
+ const transformedError = sdkTransformError(
1608
+ err,
1609
+ {
1610
+ spreadPathsToArguments: {},
1611
+ explicitPathsToArguments: {
1612
+ automationId: "$[0]",
1613
+ revision: "$[1].revision",
1614
+ fields: "$[1].fields"
1615
+ },
1616
+ singleArgumentUnchanged: false
1617
+ },
1618
+ ["automationId", "options"]
1619
+ );
1620
+ sideEffects?.onError?.(err);
1621
+ throw transformedError;
1622
+ }
1633
1623
  }
1624
+
1625
+ // src/automations-v2-automation-automations-v-2.public.ts
1634
1626
  function createAutomation3(httpClient) {
1635
1627
  return (automation) => createAutomation2(
1636
1628
  automation,
@@ -1792,6 +1784,14 @@ function generateActionInputMappingFromTemplate3(httpClient) {
1792
1784
  { httpClient }
1793
1785
  );
1794
1786
  }
1787
+ function getAutomationRevision3(httpClient) {
1788
+ return (automationId, options) => getAutomationRevision2(
1789
+ automationId,
1790
+ options,
1791
+ // @ts-ignore
1792
+ { httpClient }
1793
+ );
1794
+ }
1795
1795
  var onAutomationCreated = EventDefinition(
1796
1796
  "wix.automations.v2.automation_created",
1797
1797
  true,
@@ -1866,7 +1866,6 @@ function customQueryAutomations(httpClient) {
1866
1866
  }
1867
1867
  return overloadedQuery;
1868
1868
  }
1869
- var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
1870
1869
  var createAutomation4 = /* @__PURE__ */ createRESTModule(createAutomation3);
1871
1870
  var getAutomation4 = /* @__PURE__ */ createRESTModule(getAutomation3);
1872
1871
  var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
@@ -1889,6 +1888,7 @@ var getActionsQuotaInfo4 = /* @__PURE__ */ createRESTModule(getActionsQuotaInfo3
1889
1888
  var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ createRESTModule(
1890
1889
  generateActionInputMappingFromTemplate3
1891
1890
  );
1891
+ var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
1892
1892
  var queryAutomations4 = /* @__PURE__ */ createRESTModule(customQueryAutomations);
1893
1893
  var onAutomationCreated2 = createEventModule(
1894
1894
  onAutomationCreated