@wix/auto_sdk_automations_automations-v-2 1.0.87 → 1.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +10 -10
- package/build/cjs/index.js +74 -74
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +41 -41
- package/build/cjs/index.typings.js +65 -65
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +25 -25
- package/build/cjs/meta.js +52 -52
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -10
- package/build/es/index.mjs +74 -74
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +41 -41
- package/build/es/index.typings.mjs +65 -65
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +25 -25
- package/build/es/meta.mjs +52 -52
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -10
- package/build/internal/cjs/index.js +74 -74
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +41 -41
- package/build/internal/cjs/index.typings.js +65 -65
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +25 -25
- package/build/internal/cjs/meta.js +52 -52
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -10
- package/build/internal/es/index.mjs +74 -74
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +41 -41
- package/build/internal/es/index.typings.mjs +65 -65
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +25 -25
- package/build/internal/es/meta.mjs +52 -52
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
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, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.mjs';
|
|
3
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, 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, 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
|
/**
|
|
@@ -189,6 +181,14 @@ interface GenerateActionInputMappingFromTemplateSignature {
|
|
|
189
181
|
*/
|
|
190
182
|
(appId: string, options: NonNullablePaths<GenerateActionInputMappingFromTemplateOptions, `actionInputMappingTemplate` | `actionKey`, 2>): Promise<GenerateActionInputMappingFromTemplateResponse>;
|
|
191
183
|
}
|
|
184
|
+
declare function getAutomationRevision$1(httpClient: HttpClient): GetAutomationRevisionSignature;
|
|
185
|
+
interface GetAutomationRevisionSignature {
|
|
186
|
+
/**
|
|
187
|
+
* Gets the specified automation revision.
|
|
188
|
+
* @param - Automation ID.
|
|
189
|
+
*/
|
|
190
|
+
(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>>;
|
|
191
|
+
}
|
|
192
192
|
declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
|
|
193
193
|
declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
|
|
194
194
|
declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
|
|
@@ -197,7 +197,6 @@ declare function customQueryAutomations(httpClient: HttpClient): {
|
|
|
197
197
|
(query: AutomationQuery, options?: QueryAutomationsOptions): ReturnType<typeof typedQueryAutomations>;
|
|
198
198
|
(options?: QueryAutomationsOptions): AutomationsQueryBuilder;
|
|
199
199
|
};
|
|
200
|
-
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
201
200
|
declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
|
|
202
201
|
declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
|
|
203
202
|
declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
|
|
@@ -217,6 +216,7 @@ declare const publishDraftAutomation: MaybeContext<BuildRESTFunction<typeof publ
|
|
|
217
216
|
declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validateAutomation$1> & typeof validateAutomation$1>;
|
|
218
217
|
declare const validateAutomationById: MaybeContext<BuildRESTFunction<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
|
|
219
218
|
declare const generateActionInputMappingFromTemplate: MaybeContext<BuildRESTFunction<typeof generateActionInputMappingFromTemplate$1> & typeof generateActionInputMappingFromTemplate$1>;
|
|
219
|
+
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
220
220
|
declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof customQueryAutomations> & typeof customQueryAutomations>;
|
|
221
221
|
/**
|
|
222
222
|
* 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
|
|
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
|
|
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, [
|
|
@@ -767,6 +735,38 @@ function generateActionInputMappingFromTemplate(payload) {
|
|
|
767
735
|
}
|
|
768
736
|
return __generateActionInputMappingFromTemplate;
|
|
769
737
|
}
|
|
738
|
+
function getAutomationRevision(payload) {
|
|
739
|
+
function __getAutomationRevision({ host }) {
|
|
740
|
+
const metadata = {
|
|
741
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
742
|
+
method: "GET",
|
|
743
|
+
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
744
|
+
packageName: PACKAGE_NAME,
|
|
745
|
+
migrationOptions: {
|
|
746
|
+
optInTransformResponse: true
|
|
747
|
+
},
|
|
748
|
+
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
749
|
+
protoPath: "/v1/automation-revisions/{automationId}",
|
|
750
|
+
data: payload,
|
|
751
|
+
host
|
|
752
|
+
}),
|
|
753
|
+
params: toURLSearchParams(payload),
|
|
754
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
755
|
+
{
|
|
756
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
757
|
+
paths: [
|
|
758
|
+
{ path: "automation.createdDate" },
|
|
759
|
+
{ path: "automation.updatedDate" },
|
|
760
|
+
{ path: "automation.draftUpdatedDate" },
|
|
761
|
+
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
])
|
|
765
|
+
};
|
|
766
|
+
return metadata;
|
|
767
|
+
}
|
|
768
|
+
return __getAutomationRevision;
|
|
769
|
+
}
|
|
770
770
|
|
|
771
771
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
772
772
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
@@ -961,37 +961,6 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
961
961
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
962
962
|
return AutomationErrorType2;
|
|
963
963
|
})(AutomationErrorType || {});
|
|
964
|
-
async function getAutomationRevision2(automationId, options) {
|
|
965
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
966
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
967
|
-
automationId,
|
|
968
|
-
revision: options?.revision,
|
|
969
|
-
fields: options?.fields
|
|
970
|
-
});
|
|
971
|
-
const reqOpts = getAutomationRevision(payload);
|
|
972
|
-
sideEffects?.onSiteCall?.();
|
|
973
|
-
try {
|
|
974
|
-
const result = await httpClient.request(reqOpts);
|
|
975
|
-
sideEffects?.onSuccess?.(result);
|
|
976
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
977
|
-
} catch (err) {
|
|
978
|
-
const transformedError = sdkTransformError(
|
|
979
|
-
err,
|
|
980
|
-
{
|
|
981
|
-
spreadPathsToArguments: {},
|
|
982
|
-
explicitPathsToArguments: {
|
|
983
|
-
automationId: "$[0]",
|
|
984
|
-
revision: "$[1].revision",
|
|
985
|
-
fields: "$[1].fields"
|
|
986
|
-
},
|
|
987
|
-
singleArgumentUnchanged: false
|
|
988
|
-
},
|
|
989
|
-
["automationId", "options"]
|
|
990
|
-
);
|
|
991
|
-
sideEffects?.onError?.(err);
|
|
992
|
-
throw transformedError;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
964
|
async function createAutomation2(automation) {
|
|
996
965
|
const { httpClient, sideEffects } = arguments[1];
|
|
997
966
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1567,16 +1536,39 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1567
1536
|
throw transformedError;
|
|
1568
1537
|
}
|
|
1569
1538
|
}
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
return (automationId, options) => getAutomationRevision2(
|
|
1539
|
+
async function getAutomationRevision2(automationId, options) {
|
|
1540
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1541
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1574
1542
|
automationId,
|
|
1575
|
-
options,
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
);
|
|
1543
|
+
revision: options?.revision,
|
|
1544
|
+
fields: options?.fields
|
|
1545
|
+
});
|
|
1546
|
+
const reqOpts = getAutomationRevision(payload);
|
|
1547
|
+
sideEffects?.onSiteCall?.();
|
|
1548
|
+
try {
|
|
1549
|
+
const result = await httpClient.request(reqOpts);
|
|
1550
|
+
sideEffects?.onSuccess?.(result);
|
|
1551
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1552
|
+
} catch (err) {
|
|
1553
|
+
const transformedError = sdkTransformError(
|
|
1554
|
+
err,
|
|
1555
|
+
{
|
|
1556
|
+
spreadPathsToArguments: {},
|
|
1557
|
+
explicitPathsToArguments: {
|
|
1558
|
+
automationId: "$[0]",
|
|
1559
|
+
revision: "$[1].revision",
|
|
1560
|
+
fields: "$[1].fields"
|
|
1561
|
+
},
|
|
1562
|
+
singleArgumentUnchanged: false
|
|
1563
|
+
},
|
|
1564
|
+
["automationId", "options"]
|
|
1565
|
+
);
|
|
1566
|
+
sideEffects?.onError?.(err);
|
|
1567
|
+
throw transformedError;
|
|
1568
|
+
}
|
|
1579
1569
|
}
|
|
1570
|
+
|
|
1571
|
+
// src/automations-v2-automation-automations-v-2.public.ts
|
|
1580
1572
|
function createAutomation3(httpClient) {
|
|
1581
1573
|
return (automation) => createAutomation2(
|
|
1582
1574
|
automation,
|
|
@@ -1732,6 +1724,14 @@ function generateActionInputMappingFromTemplate3(httpClient) {
|
|
|
1732
1724
|
{ httpClient }
|
|
1733
1725
|
);
|
|
1734
1726
|
}
|
|
1727
|
+
function getAutomationRevision3(httpClient) {
|
|
1728
|
+
return (automationId, options) => getAutomationRevision2(
|
|
1729
|
+
automationId,
|
|
1730
|
+
options,
|
|
1731
|
+
// @ts-ignore
|
|
1732
|
+
{ httpClient }
|
|
1733
|
+
);
|
|
1734
|
+
}
|
|
1735
1735
|
var onAutomationCreated = EventDefinition(
|
|
1736
1736
|
"wix.automations.v2.automation_created",
|
|
1737
1737
|
true,
|
|
@@ -1806,7 +1806,6 @@ function customQueryAutomations(httpClient) {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
return overloadedQuery;
|
|
1808
1808
|
}
|
|
1809
|
-
var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
|
|
1810
1809
|
var createAutomation4 = /* @__PURE__ */ createRESTModule(createAutomation3);
|
|
1811
1810
|
var getAutomation4 = /* @__PURE__ */ createRESTModule(getAutomation3);
|
|
1812
1811
|
var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
|
|
@@ -1828,6 +1827,7 @@ var validateAutomationById4 = /* @__PURE__ */ createRESTModule(validateAutomatio
|
|
|
1828
1827
|
var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ createRESTModule(
|
|
1829
1828
|
generateActionInputMappingFromTemplate3
|
|
1830
1829
|
);
|
|
1830
|
+
var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
|
|
1831
1831
|
var queryAutomations4 = /* @__PURE__ */ createRESTModule(customQueryAutomations);
|
|
1832
1832
|
var onAutomationCreated2 = createEventModule(
|
|
1833
1833
|
onAutomationCreated
|