@wix/auto_sdk_automations_automations-v-2 1.0.112 → 1.0.114

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 +4 -4
@@ -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.js';
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.js';
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.js';
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.
@@ -94,7 +94,7 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
94
94
  var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
95
95
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
96
96
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
97
- function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
97
+ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
98
98
  const domainToMappings = {
99
99
  "manage._base_domain_": [
100
100
  {
@@ -133,7 +133,7 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
133
133
  };
134
134
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
135
135
  }
136
- function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
136
+ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
137
137
  const domainToMappings = {
138
138
  "manage._base_domain_": [
139
139
  {
@@ -173,38 +173,6 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
173
173
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
174
174
  }
175
175
  var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
176
- function getAutomationRevision(payload) {
177
- function __getAutomationRevision({ host }) {
178
- const metadata = {
179
- entityFqdn: "wix.automations.v2.automation",
180
- method: "GET",
181
- methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
182
- packageName: PACKAGE_NAME,
183
- migrationOptions: {
184
- optInTransformResponse: true
185
- },
186
- url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
187
- protoPath: "/v1/automation-revisions/{automationId}",
188
- data: payload,
189
- host
190
- }),
191
- params: (0, import_rest_modules.toURLSearchParams)(payload),
192
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
193
- {
194
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
195
- paths: [
196
- { path: "automation.createdDate" },
197
- { path: "automation.updatedDate" },
198
- { path: "automation.draftUpdatedDate" },
199
- { path: "automation.autoArchivePolicy.archiveDate" }
200
- ]
201
- }
202
- ])
203
- };
204
- return metadata;
205
- }
206
- return __getAutomationRevision;
207
- }
208
176
  function createAutomation(payload) {
209
177
  function __createAutomation({ host }) {
210
178
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1012,6 +980,38 @@ function generateActionInputMappingFromTemplate(payload) {
1012
980
  }
1013
981
  return __generateActionInputMappingFromTemplate;
1014
982
  }
983
+ function getAutomationRevision(payload) {
984
+ function __getAutomationRevision({ host }) {
985
+ const metadata = {
986
+ entityFqdn: "wix.automations.v2.automation",
987
+ method: "GET",
988
+ methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
989
+ packageName: PACKAGE_NAME,
990
+ migrationOptions: {
991
+ optInTransformResponse: true
992
+ },
993
+ url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
994
+ protoPath: "/v1/automation-revisions/{automationId}",
995
+ data: payload,
996
+ host
997
+ }),
998
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
999
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1000
+ {
1001
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1002
+ paths: [
1003
+ { path: "automation.createdDate" },
1004
+ { path: "automation.updatedDate" },
1005
+ { path: "automation.draftUpdatedDate" },
1006
+ { path: "automation.autoArchivePolicy.archiveDate" }
1007
+ ]
1008
+ }
1009
+ ])
1010
+ };
1011
+ return metadata;
1012
+ }
1013
+ return __getAutomationRevision;
1014
+ }
1015
1015
 
1016
1016
  // src/automations-v2-automation-automations-v-2.universal.ts
1017
1017
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
@@ -1023,7 +1023,6 @@ var Domain = /* @__PURE__ */ ((Domain2) => {
1023
1023
  return Domain2;
1024
1024
  })(Domain || {});
1025
1025
  var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
1026
- TimeUnit2["UNKNOWN_TIME_UNIT"] = "UNKNOWN_TIME_UNIT";
1027
1026
  TimeUnit2["MINUTES"] = "MINUTES";
1028
1027
  TimeUnit2["HOURS"] = "HOURS";
1029
1028
  TimeUnit2["DAYS"] = "DAYS";
@@ -1032,18 +1031,15 @@ var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
1032
1031
  return TimeUnit2;
1033
1032
  })(TimeUnit || {});
1034
1033
  var Operator = /* @__PURE__ */ ((Operator2) => {
1035
- Operator2["UNKNOWN_OPERATOR"] = "UNKNOWN_OPERATOR";
1036
1034
  Operator2["OR"] = "OR";
1037
1035
  Operator2["AND"] = "AND";
1038
1036
  return Operator2;
1039
1037
  })(Operator || {});
1040
1038
  var Language = /* @__PURE__ */ ((Language2) => {
1041
- Language2["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
1042
1039
  Language2["JAVASCRIPT"] = "JAVASCRIPT";
1043
1040
  return Language2;
1044
1041
  })(Language || {});
1045
1042
  var Type = /* @__PURE__ */ ((Type2) => {
1046
- Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
1047
1043
  Type2["APP_DEFINED"] = "APP_DEFINED";
1048
1044
  Type2["CONDITION"] = "CONDITION";
1049
1045
  Type2["CODE_CONDITION"] = "CODE_CONDITION";
@@ -1052,13 +1048,11 @@ var Type = /* @__PURE__ */ ((Type2) => {
1052
1048
  return Type2;
1053
1049
  })(Type || {});
1054
1050
  var Status = /* @__PURE__ */ ((Status2) => {
1055
- Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
1056
1051
  Status2["ACTIVE"] = "ACTIVE";
1057
1052
  Status2["INACTIVE"] = "INACTIVE";
1058
1053
  return Status2;
1059
1054
  })(Status || {});
1060
1055
  var Origin = /* @__PURE__ */ ((Origin2) => {
1061
- Origin2["UNKNOWN_ORIGIN"] = "UNKNOWN_ORIGIN";
1062
1056
  Origin2["USER"] = "USER";
1063
1057
  Origin2["APPLICATION"] = "APPLICATION";
1064
1058
  Origin2["PREINSTALLED"] = "PREINSTALLED";
@@ -1073,7 +1067,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1073
1067
  return WebhookIdentityType2;
1074
1068
  })(WebhookIdentityType || {});
1075
1069
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
1076
- RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
1077
1070
  RequestedFields2["OVERRIDE_SCHEMA"] = "OVERRIDE_SCHEMA";
1078
1071
  return RequestedFields2;
1079
1072
  })(RequestedFields || {});
@@ -1145,7 +1138,6 @@ var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
1145
1138
  return DeleteStatus2;
1146
1139
  })(DeleteStatus || {});
1147
1140
  var ValidationResultStatus = /* @__PURE__ */ ((ValidationResultStatus2) => {
1148
- ValidationResultStatus2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
1149
1141
  ValidationResultStatus2["VALID"] = "VALID";
1150
1142
  ValidationResultStatus2["VALID_WITH_WARNINGS"] = "VALID_WITH_WARNINGS";
1151
1143
  ValidationResultStatus2["INVALID"] = "INVALID";
@@ -1205,40 +1197,8 @@ var AutomationValidationErrorValidationErrorType = /* @__PURE__ */ ((AutomationV
1205
1197
  return AutomationValidationErrorValidationErrorType2;
1206
1198
  })(AutomationValidationErrorValidationErrorType || {});
1207
1199
  var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
1208
- AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
1209
1200
  return AutomationErrorType2;
1210
1201
  })(AutomationErrorType || {});
1211
- async function getAutomationRevision2(automationId, options) {
1212
- const { httpClient, sideEffects } = arguments[2];
1213
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1214
- automationId,
1215
- revision: options?.revision,
1216
- fields: options?.fields
1217
- });
1218
- const reqOpts = getAutomationRevision(payload);
1219
- sideEffects?.onSiteCall?.();
1220
- try {
1221
- const result = await httpClient.request(reqOpts);
1222
- sideEffects?.onSuccess?.(result);
1223
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1224
- } catch (err) {
1225
- const transformedError = (0, import_transform_error.transformError)(
1226
- err,
1227
- {
1228
- spreadPathsToArguments: {},
1229
- explicitPathsToArguments: {
1230
- automationId: "$[0]",
1231
- revision: "$[1].revision",
1232
- fields: "$[1].fields"
1233
- },
1234
- singleArgumentUnchanged: false
1235
- },
1236
- ["automationId", "options"]
1237
- );
1238
- sideEffects?.onError?.(err);
1239
- throw transformedError;
1240
- }
1241
- }
1242
1202
  async function createAutomation2(automation) {
1243
1203
  const { httpClient, sideEffects } = arguments[1];
1244
1204
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1959,16 +1919,39 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
1959
1919
  throw transformedError;
1960
1920
  }
1961
1921
  }
1962
-
1963
- // src/automations-v2-automation-automations-v-2.public.ts
1964
- function getAutomationRevision3(httpClient) {
1965
- return (automationId, options) => getAutomationRevision2(
1922
+ async function getAutomationRevision2(automationId, options) {
1923
+ const { httpClient, sideEffects } = arguments[2];
1924
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1966
1925
  automationId,
1967
- options,
1968
- // @ts-ignore
1969
- { httpClient }
1970
- );
1926
+ revision: options?.revision,
1927
+ fields: options?.fields
1928
+ });
1929
+ const reqOpts = getAutomationRevision(payload);
1930
+ sideEffects?.onSiteCall?.();
1931
+ try {
1932
+ const result = await httpClient.request(reqOpts);
1933
+ sideEffects?.onSuccess?.(result);
1934
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1935
+ } catch (err) {
1936
+ const transformedError = (0, import_transform_error.transformError)(
1937
+ err,
1938
+ {
1939
+ spreadPathsToArguments: {},
1940
+ explicitPathsToArguments: {
1941
+ automationId: "$[0]",
1942
+ revision: "$[1].revision",
1943
+ fields: "$[1].fields"
1944
+ },
1945
+ singleArgumentUnchanged: false
1946
+ },
1947
+ ["automationId", "options"]
1948
+ );
1949
+ sideEffects?.onError?.(err);
1950
+ throw transformedError;
1951
+ }
1971
1952
  }
1953
+
1954
+ // src/automations-v2-automation-automations-v-2.public.ts
1972
1955
  function createAutomation3(httpClient) {
1973
1956
  return (automation) => createAutomation2(
1974
1957
  automation,
@@ -2161,6 +2144,14 @@ function generateActionInputMappingFromTemplate3(httpClient) {
2161
2144
  { httpClient }
2162
2145
  );
2163
2146
  }
2147
+ function getAutomationRevision3(httpClient) {
2148
+ return (automationId, options) => getAutomationRevision2(
2149
+ automationId,
2150
+ options,
2151
+ // @ts-ignore
2152
+ { httpClient }
2153
+ );
2154
+ }
2164
2155
  var onAutomationCreated = (0, import_sdk_types.EventDefinition)(
2165
2156
  "wix.automations.v2.automation_created",
2166
2157
  true,
@@ -2235,7 +2226,6 @@ function customQueryAutomations(httpClient) {
2235
2226
  }
2236
2227
  return overloadedQuery;
2237
2228
  }
2238
- var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
2239
2229
  var createAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createAutomation3);
2240
2230
  var getAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomation3);
2241
2231
  var updateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateAutomation3);
@@ -2262,6 +2252,7 @@ var getActionsQuotaInfo4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTMo
2262
2252
  var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
2263
2253
  generateActionInputMappingFromTemplate3
2264
2254
  );
2255
+ var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
2265
2256
  var queryAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryAutomations);
2266
2257
  var onAutomationCreated2 = (0, import_event_definition_modules.createEventModule)(
2267
2258
  onAutomationCreated