@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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +10 -10
  2. package/build/cjs/index.js +74 -83
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +50 -64
  5. package/build/cjs/index.typings.js +65 -74
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +34 -48
  8. package/build/cjs/meta.js +52 -61
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +10 -10
  11. package/build/es/index.mjs +74 -83
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +50 -64
  14. package/build/es/index.typings.mjs +65 -74
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +34 -48
  17. package/build/es/meta.mjs +52 -61
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +10 -10
  20. package/build/internal/cjs/index.js +74 -83
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +50 -64
  23. package/build/internal/cjs/index.typings.js +65 -74
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +34 -48
  26. package/build/internal/cjs/meta.js +52 -61
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +10 -10
  29. package/build/internal/es/index.mjs +74 -83
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +50 -64
  32. package/build/internal/es/index.typings.mjs +65 -74
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +34 -48
  35. package/build/internal/es/meta.mjs +52 -61
  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, CreatePreinstalledAutomationOptions, CreatePreinstalledAutomationResponse, UpdatePreinstalledAutomationOptions, UpdatePreinstalledAutomationResponse, DeletePreinstalledAutomationOptions, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, CursorQuery, QueryPreinstalledAutomationsResponse, 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';
2
+ import { Automation, UpdateAutomation, BulkDeleteAutomationsResponse, CreatePreinstalledAutomationOptions, CreatePreinstalledAutomationResponse, UpdatePreinstalledAutomationOptions, UpdatePreinstalledAutomationResponse, DeletePreinstalledAutomationOptions, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, CursorQuery, QueryPreinstalledAutomationsResponse, 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
3
  export { AIMetadata, AccountInfo, AccountInfoMetadata, 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, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStalePreinstalledAutomationRequest, DeleteStalePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, EditorlessAssigned, EditorlessUnassigned, 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, 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, UpgradeCTA, UserDomainMediaDisabled, UserDomainMediaEnabled, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned, utils } 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
  /**
@@ -235,6 +227,14 @@ interface GenerateActionInputMappingFromTemplateSignature {
235
227
  */
236
228
  (appId: string, options: NonNullablePaths<GenerateActionInputMappingFromTemplateOptions, `actionInputMappingTemplate` | `actionKey`, 2>): Promise<GenerateActionInputMappingFromTemplateResponse>;
237
229
  }
230
+ declare function getAutomationRevision$1(httpClient: HttpClient): GetAutomationRevisionSignature;
231
+ interface GetAutomationRevisionSignature {
232
+ /**
233
+ * Gets the specified automation revision.
234
+ * @param - Automation ID.
235
+ */
236
+ (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>>;
237
+ }
238
238
  declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
239
239
  declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
240
240
  declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
@@ -243,7 +243,6 @@ declare function customQueryAutomations(httpClient: HttpClient): {
243
243
  (query: AutomationQuery, options?: QueryAutomationsOptions): ReturnType<typeof typedQueryAutomations>;
244
244
  (options?: QueryAutomationsOptions): AutomationsQueryBuilder;
245
245
  };
246
- declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
247
246
  declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
248
247
  declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
249
248
  declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
@@ -268,6 +267,7 @@ declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validate
268
267
  declare const validateAutomationById: MaybeContext<BuildRESTFunction<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
269
268
  declare const getActionsQuotaInfo: MaybeContext<BuildRESTFunction<typeof getActionsQuotaInfo$1> & typeof getActionsQuotaInfo$1>;
270
269
  declare const generateActionInputMappingFromTemplate: MaybeContext<BuildRESTFunction<typeof generateActionInputMappingFromTemplate$1> & typeof generateActionInputMappingFromTemplate$1>;
270
+ declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
271
271
  declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof customQueryAutomations> & typeof customQueryAutomations>;
272
272
  /**
273
273
  * 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, [
@@ -937,6 +905,38 @@ function generateActionInputMappingFromTemplate(payload) {
937
905
  }
938
906
  return __generateActionInputMappingFromTemplate;
939
907
  }
908
+ function getAutomationRevision(payload) {
909
+ function __getAutomationRevision({ host }) {
910
+ const metadata = {
911
+ entityFqdn: "wix.automations.v2.automation",
912
+ method: "GET",
913
+ methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
914
+ packageName: PACKAGE_NAME,
915
+ migrationOptions: {
916
+ optInTransformResponse: true
917
+ },
918
+ url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
919
+ protoPath: "/v1/automation-revisions/{automationId}",
920
+ data: payload,
921
+ host
922
+ }),
923
+ params: toURLSearchParams(payload),
924
+ transformResponse: (payload2) => transformPaths(payload2, [
925
+ {
926
+ transformFn: transformRESTTimestampToSDKTimestamp,
927
+ paths: [
928
+ { path: "automation.createdDate" },
929
+ { path: "automation.updatedDate" },
930
+ { path: "automation.draftUpdatedDate" },
931
+ { path: "automation.autoArchivePolicy.archiveDate" }
932
+ ]
933
+ }
934
+ ])
935
+ };
936
+ return metadata;
937
+ }
938
+ return __getAutomationRevision;
939
+ }
940
940
 
941
941
  // src/automations-v2-automation-automations-v-2.universal.ts
942
942
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
@@ -948,7 +948,6 @@ var Domain = /* @__PURE__ */ ((Domain2) => {
948
948
  return Domain2;
949
949
  })(Domain || {});
950
950
  var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
951
- TimeUnit2["UNKNOWN_TIME_UNIT"] = "UNKNOWN_TIME_UNIT";
952
951
  TimeUnit2["MINUTES"] = "MINUTES";
953
952
  TimeUnit2["HOURS"] = "HOURS";
954
953
  TimeUnit2["DAYS"] = "DAYS";
@@ -957,18 +956,15 @@ var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
957
956
  return TimeUnit2;
958
957
  })(TimeUnit || {});
959
958
  var Operator = /* @__PURE__ */ ((Operator2) => {
960
- Operator2["UNKNOWN_OPERATOR"] = "UNKNOWN_OPERATOR";
961
959
  Operator2["OR"] = "OR";
962
960
  Operator2["AND"] = "AND";
963
961
  return Operator2;
964
962
  })(Operator || {});
965
963
  var Language = /* @__PURE__ */ ((Language2) => {
966
- Language2["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
967
964
  Language2["JAVASCRIPT"] = "JAVASCRIPT";
968
965
  return Language2;
969
966
  })(Language || {});
970
967
  var Type = /* @__PURE__ */ ((Type2) => {
971
- Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
972
968
  Type2["APP_DEFINED"] = "APP_DEFINED";
973
969
  Type2["CONDITION"] = "CONDITION";
974
970
  Type2["CODE_CONDITION"] = "CODE_CONDITION";
@@ -977,13 +973,11 @@ var Type = /* @__PURE__ */ ((Type2) => {
977
973
  return Type2;
978
974
  })(Type || {});
979
975
  var Status = /* @__PURE__ */ ((Status2) => {
980
- Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
981
976
  Status2["ACTIVE"] = "ACTIVE";
982
977
  Status2["INACTIVE"] = "INACTIVE";
983
978
  return Status2;
984
979
  })(Status || {});
985
980
  var Origin = /* @__PURE__ */ ((Origin2) => {
986
- Origin2["UNKNOWN_ORIGIN"] = "UNKNOWN_ORIGIN";
987
981
  Origin2["USER"] = "USER";
988
982
  Origin2["APPLICATION"] = "APPLICATION";
989
983
  Origin2["PREINSTALLED"] = "PREINSTALLED";
@@ -998,7 +992,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
998
992
  return WebhookIdentityType2;
999
993
  })(WebhookIdentityType || {});
1000
994
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
1001
- RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
1002
995
  RequestedFields2["OVERRIDE_SCHEMA"] = "OVERRIDE_SCHEMA";
1003
996
  return RequestedFields2;
1004
997
  })(RequestedFields || {});
@@ -1070,7 +1063,6 @@ var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
1070
1063
  return DeleteStatus2;
1071
1064
  })(DeleteStatus || {});
1072
1065
  var ValidationResultStatus = /* @__PURE__ */ ((ValidationResultStatus2) => {
1073
- ValidationResultStatus2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
1074
1066
  ValidationResultStatus2["VALID"] = "VALID";
1075
1067
  ValidationResultStatus2["VALID_WITH_WARNINGS"] = "VALID_WITH_WARNINGS";
1076
1068
  ValidationResultStatus2["INVALID"] = "INVALID";
@@ -1130,40 +1122,8 @@ var AutomationValidationErrorValidationErrorType = /* @__PURE__ */ ((AutomationV
1130
1122
  return AutomationValidationErrorValidationErrorType2;
1131
1123
  })(AutomationValidationErrorValidationErrorType || {});
1132
1124
  var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
1133
- AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
1134
1125
  return AutomationErrorType2;
1135
1126
  })(AutomationErrorType || {});
1136
- async function getAutomationRevision2(automationId, options) {
1137
- const { httpClient, sideEffects } = arguments[2];
1138
- const payload = renameKeysFromSDKRequestToRESTRequest({
1139
- automationId,
1140
- revision: options?.revision,
1141
- fields: options?.fields
1142
- });
1143
- const reqOpts = getAutomationRevision(payload);
1144
- sideEffects?.onSiteCall?.();
1145
- try {
1146
- const result = await httpClient.request(reqOpts);
1147
- sideEffects?.onSuccess?.(result);
1148
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1149
- } catch (err) {
1150
- const transformedError = sdkTransformError(
1151
- err,
1152
- {
1153
- spreadPathsToArguments: {},
1154
- explicitPathsToArguments: {
1155
- automationId: "$[0]",
1156
- revision: "$[1].revision",
1157
- fields: "$[1].fields"
1158
- },
1159
- singleArgumentUnchanged: false
1160
- },
1161
- ["automationId", "options"]
1162
- );
1163
- sideEffects?.onError?.(err);
1164
- throw transformedError;
1165
- }
1166
- }
1167
1127
  async function createAutomation2(automation) {
1168
1128
  const { httpClient, sideEffects } = arguments[1];
1169
1129
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1884,16 +1844,39 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
1884
1844
  throw transformedError;
1885
1845
  }
1886
1846
  }
1887
-
1888
- // src/automations-v2-automation-automations-v-2.public.ts
1889
- function getAutomationRevision3(httpClient) {
1890
- return (automationId, options) => getAutomationRevision2(
1847
+ async function getAutomationRevision2(automationId, options) {
1848
+ const { httpClient, sideEffects } = arguments[2];
1849
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1891
1850
  automationId,
1892
- options,
1893
- // @ts-ignore
1894
- { httpClient }
1895
- );
1851
+ revision: options?.revision,
1852
+ fields: options?.fields
1853
+ });
1854
+ const reqOpts = getAutomationRevision(payload);
1855
+ sideEffects?.onSiteCall?.();
1856
+ try {
1857
+ const result = await httpClient.request(reqOpts);
1858
+ sideEffects?.onSuccess?.(result);
1859
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1860
+ } catch (err) {
1861
+ const transformedError = sdkTransformError(
1862
+ err,
1863
+ {
1864
+ spreadPathsToArguments: {},
1865
+ explicitPathsToArguments: {
1866
+ automationId: "$[0]",
1867
+ revision: "$[1].revision",
1868
+ fields: "$[1].fields"
1869
+ },
1870
+ singleArgumentUnchanged: false
1871
+ },
1872
+ ["automationId", "options"]
1873
+ );
1874
+ sideEffects?.onError?.(err);
1875
+ throw transformedError;
1876
+ }
1896
1877
  }
1878
+
1879
+ // src/automations-v2-automation-automations-v-2.public.ts
1897
1880
  function createAutomation3(httpClient) {
1898
1881
  return (automation) => createAutomation2(
1899
1882
  automation,
@@ -2086,6 +2069,14 @@ function generateActionInputMappingFromTemplate3(httpClient) {
2086
2069
  { httpClient }
2087
2070
  );
2088
2071
  }
2072
+ function getAutomationRevision3(httpClient) {
2073
+ return (automationId, options) => getAutomationRevision2(
2074
+ automationId,
2075
+ options,
2076
+ // @ts-ignore
2077
+ { httpClient }
2078
+ );
2079
+ }
2089
2080
  var onAutomationCreated = EventDefinition(
2090
2081
  "wix.automations.v2.automation_created",
2091
2082
  true,
@@ -2160,7 +2151,6 @@ function customQueryAutomations(httpClient) {
2160
2151
  }
2161
2152
  return overloadedQuery;
2162
2153
  }
2163
- var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
2164
2154
  var createAutomation4 = /* @__PURE__ */ createRESTModule(createAutomation3);
2165
2155
  var getAutomation4 = /* @__PURE__ */ createRESTModule(getAutomation3);
2166
2156
  var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
@@ -2187,6 +2177,7 @@ var getActionsQuotaInfo4 = /* @__PURE__ */ createRESTModule(getActionsQuotaInfo3
2187
2177
  var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ createRESTModule(
2188
2178
  generateActionInputMappingFromTemplate3
2189
2179
  );
2180
+ var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
2190
2181
  var queryAutomations4 = /* @__PURE__ */ createRESTModule(customQueryAutomations);
2191
2182
  var onAutomationCreated2 = createEventModule(
2192
2183
  onAutomationCreated