@wix/auto_sdk_automations_automations-v-2 1.0.55 → 1.0.57

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.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { Automation, UpdateAutomation, BulkDeleteAutomationsResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, AutomationsQueryBuilder, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope } 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, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, DeletedWithEntity, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetActionsQuotaInfoResponse, 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, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsForAppResponse, 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, UpdatedWithPreviousEntity, 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, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, CursorQuery, typedQueryAutomations, QueryAutomationsOptions, 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, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, DeletedWithEntity, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetActionsQuotaInfoResponse, 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, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsForAppResponse, 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, UpdatedWithPreviousEntity, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.mjs';
4
4
 
5
5
  declare function createAutomation$1(httpClient: HttpClient): CreateAutomationSignature;
6
6
  interface CreateAutomationSignature {
@@ -59,17 +59,6 @@ interface GeneratePreinstalledAutomationSignature {
59
59
  */
60
60
  (automation: Automation, options?: GeneratePreinstalledAutomationOptions): Promise<NonNullablePaths<GeneratePreinstalledAutomationResponse, `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>>;
61
61
  }
62
- declare function queryAutomations$1(httpClient: HttpClient): QueryAutomationsSignature;
63
- interface QueryAutomationsSignature {
64
- /**
65
- * Retrieves a list of automations. This includes both automations overridden on a site and preinstalled automations. If a preinstalled automation has been overridden on the site, the method returns the override automation.
66
- *
67
- * > **Note**: The method only returns automations by apps installed on the site.
68
- *
69
- * Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
70
- */
71
- (): AutomationsQueryBuilder;
72
- }
73
62
  declare function getAggregatedUsageInfo$1(httpClient: HttpClient): GetAggregatedUsageInfoSignature;
74
63
  interface GetAggregatedUsageInfoSignature {
75
64
  /**
@@ -181,13 +170,18 @@ declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope,
181
170
  declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
182
171
  declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
183
172
 
173
+ declare function customQueryAutomations(httpClient: HttpClient): {
174
+ (query: CursorQuery): ReturnType<typeof typedQueryAutomations>;
175
+ (query: CursorQuery, options: QueryAutomationsOptions): ReturnType<typeof typedQueryAutomations>;
176
+ (): AutomationsQueryBuilder;
177
+ (options: QueryAutomationsOptions): AutomationsQueryBuilder;
178
+ };
184
179
  declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
185
180
  declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
186
181
  declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
187
182
  declare const deleteAutomation: MaybeContext<BuildRESTFunction<typeof deleteAutomation$1> & typeof deleteAutomation$1>;
188
183
  declare const bulkDeleteAutomations: MaybeContext<BuildRESTFunction<typeof bulkDeleteAutomations$1> & typeof bulkDeleteAutomations$1>;
189
184
  declare const generatePreinstalledAutomation: MaybeContext<BuildRESTFunction<typeof generatePreinstalledAutomation$1> & typeof generatePreinstalledAutomation$1>;
190
- declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof queryAutomations$1> & typeof queryAutomations$1>;
191
185
  declare const getAggregatedUsageInfo: MaybeContext<BuildRESTFunction<typeof getAggregatedUsageInfo$1> & typeof getAggregatedUsageInfo$1>;
192
186
  declare const copyAutomation: MaybeContext<BuildRESTFunction<typeof copyAutomation$1> & typeof copyAutomation$1>;
193
187
  declare const createDraftAutomation: MaybeContext<BuildRESTFunction<typeof createDraftAutomation$1> & typeof createDraftAutomation$1>;
@@ -200,6 +194,7 @@ declare const publishDraftAutomation: MaybeContext<BuildRESTFunction<typeof publ
200
194
  declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validateAutomation$1> & typeof validateAutomation$1>;
201
195
  declare const validateAutomationById: MaybeContext<BuildRESTFunction<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
202
196
  declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
197
+ declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof customQueryAutomations> & typeof customQueryAutomations>;
203
198
  /**
204
199
  * Triggered when a new automation is created.
205
200
  */
@@ -213,4 +208,4 @@ declare const onAutomationDeleted: BuildEventDefinition<typeof onAutomationDelet
213
208
  */
214
209
  declare const onAutomationUpdated: BuildEventDefinition<typeof onAutomationUpdated$1> & typeof onAutomationUpdated$1;
215
210
 
216
- export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, UpdateAutomation, UpdateDraftAutomation, UpdateDraftAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, ValidateAutomationOptions, ValidateAutomationResponse, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
211
+ export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, CursorQuery, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, QueryAutomationsOptions, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, UpdateAutomation, UpdateDraftAutomation, UpdateDraftAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, ValidateAutomationOptions, ValidateAutomationResponse, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
@@ -1058,11 +1058,14 @@ async function generatePreinstalledAutomation2(automation, options) {
1058
1058
  throw transformedError;
1059
1059
  }
1060
1060
  }
1061
- function queryAutomations2() {
1062
- const { httpClient, sideEffects } = arguments[0];
1061
+ function queryAutomations2(options) {
1062
+ const { httpClient, sideEffects } = arguments[1];
1063
1063
  return queryBuilder({
1064
1064
  func: async (payload) => {
1065
- const reqOpts = queryAutomations(payload);
1065
+ const reqOpts = queryAutomations({
1066
+ ...payload,
1067
+ ...options ?? {}
1068
+ });
1066
1069
  sideEffects?.onSiteCall?.();
1067
1070
  try {
1068
1071
  const result = await httpClient.request(reqOpts);
@@ -1074,7 +1077,7 @@ function queryAutomations2() {
1074
1077
  }
1075
1078
  },
1076
1079
  requestTransformer: (query) => {
1077
- const args = [query, {}];
1080
+ const args = [query, options];
1078
1081
  return renameKeysFromSDKRequestToRESTRequest({
1079
1082
  ...args?.[1],
1080
1083
  query: args?.[0]
@@ -1101,6 +1104,32 @@ function queryAutomations2() {
1101
1104
  transformationPaths: {}
1102
1105
  });
1103
1106
  }
1107
+ async function typedQueryAutomations(query, options) {
1108
+ const { httpClient, sideEffects } = arguments[2];
1109
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1110
+ query,
1111
+ ...options
1112
+ });
1113
+ const reqOpts = queryAutomations(payload);
1114
+ sideEffects?.onSiteCall?.();
1115
+ try {
1116
+ const result = await httpClient.request(reqOpts);
1117
+ sideEffects?.onSuccess?.(result);
1118
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1119
+ } catch (err) {
1120
+ const transformedError = sdkTransformError(
1121
+ err,
1122
+ {
1123
+ spreadPathsToArguments: {},
1124
+ explicitPathsToArguments: { query: "$[0]" },
1125
+ singleArgumentUnchanged: false
1126
+ },
1127
+ ["query", "options"]
1128
+ );
1129
+ sideEffects?.onError?.(err);
1130
+ throw transformedError;
1131
+ }
1132
+ }
1104
1133
  async function getAggregatedUsageInfo2(options) {
1105
1134
  const { httpClient, sideEffects } = arguments[1];
1106
1135
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1469,7 +1498,16 @@ function generatePreinstalledAutomation3(httpClient) {
1469
1498
  );
1470
1499
  }
1471
1500
  function queryAutomations3(httpClient) {
1472
- return () => queryAutomations2(
1501
+ return (options) => queryAutomations2(
1502
+ options,
1503
+ // @ts-ignore
1504
+ { httpClient }
1505
+ );
1506
+ }
1507
+ function typedQueryAutomations2(httpClient) {
1508
+ return (query, options) => typedQueryAutomations(
1509
+ query,
1510
+ options,
1473
1511
  // @ts-ignore
1474
1512
  { httpClient }
1475
1513
  );
@@ -1621,13 +1659,24 @@ var onAutomationUpdated = EventDefinition(
1621
1659
  // src/automations-v2-automation-automations-v-2.context.ts
1622
1660
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1623
1661
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1662
+ import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
1663
+ function customQueryAutomations(httpClient) {
1664
+ const router = createQueryOverloadRouter({
1665
+ builderQueryFunction: (options) => queryAutomations3(httpClient)(options),
1666
+ typedQueryFunction: (query, options) => typedQueryAutomations2(httpClient)(query, options),
1667
+ hasOptionsParameter: true
1668
+ });
1669
+ function overloadedQuery(queryOrOptions, options) {
1670
+ return router(...arguments);
1671
+ }
1672
+ return overloadedQuery;
1673
+ }
1624
1674
  var createAutomation4 = /* @__PURE__ */ createRESTModule(createAutomation3);
1625
1675
  var getAutomation4 = /* @__PURE__ */ createRESTModule(getAutomation3);
1626
1676
  var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
1627
1677
  var deleteAutomation4 = /* @__PURE__ */ createRESTModule(deleteAutomation3);
1628
1678
  var bulkDeleteAutomations4 = /* @__PURE__ */ createRESTModule(bulkDeleteAutomations3);
1629
1679
  var generatePreinstalledAutomation4 = /* @__PURE__ */ createRESTModule(generatePreinstalledAutomation3);
1630
- var queryAutomations4 = /* @__PURE__ */ createRESTModule(queryAutomations3);
1631
1680
  var getAggregatedUsageInfo4 = /* @__PURE__ */ createRESTModule(getAggregatedUsageInfo3);
1632
1681
  var copyAutomation4 = /* @__PURE__ */ createRESTModule(copyAutomation3);
1633
1682
  var createDraftAutomation4 = /* @__PURE__ */ createRESTModule(createDraftAutomation3);
@@ -1640,6 +1689,7 @@ var publishDraftAutomation4 = /* @__PURE__ */ createRESTModule(publishDraftAutom
1640
1689
  var validateAutomation4 = /* @__PURE__ */ createRESTModule(validateAutomation3);
1641
1690
  var validateAutomationById4 = /* @__PURE__ */ createRESTModule(validateAutomationById3);
1642
1691
  var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
1692
+ var queryAutomations4 = /* @__PURE__ */ createRESTModule(customQueryAutomations);
1643
1693
  var onAutomationCreated2 = createEventModule(
1644
1694
  onAutomationCreated
1645
1695
  );