@wix/auto_sdk_automations_automations-v-2 1.0.90 → 1.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +11 -11
- package/build/cjs/index.js +74 -74
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +54 -37
- package/build/cjs/index.typings.js +65 -65
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +38 -21
- package/build/cjs/meta.js +52 -52
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +11 -11
- package/build/es/index.mjs +74 -74
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +54 -37
- package/build/es/index.typings.mjs +65 -65
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +38 -21
- package/build/es/meta.mjs +52 -52
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -11
- 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 +54 -37
- 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 +38 -21
- package/build/internal/cjs/meta.js +52 -52
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -11
- 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 +54 -37
- 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 +38 -21
- package/build/internal/es/meta.mjs +52 -52
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export { AIMetadata, Action, ActionConfigurationError, ActionErrorType, ActionErrorTypeWithLiterals, ActionEvent, ActionInfoOneOf, ActionProviderQuotaInfo, ActionQuotaInfo, ActionSettings, ActionUsageSummary, ActionValidationError, ActionValidationErrorErrorOneOf, ActionValidationInfo, AdditionalInfo, AppDefinedAction, ApplicationError, ApplicationOrigin, Asset, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, AutomationConfiguration, AutomationConfigurationError, AutomationErrorType, AutomationErrorTypeWithLiterals, AutomationOriginInfoOneOf, AutomationQuerySpec, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, CommonQueryWithEntityContext, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GenerateActionInputMappingFromTemplateRequest, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeOverridePreinstalledWithRuntimeVersionRequest, MergeOverridePreinstalledWithRuntimeVersionResponse, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigrateVeloActionAutomationsRequest, MigrateVeloActionAutomationsResponse, Namespace, NamespaceChanged, NamespaceWithLiterals, Note, Notes, OdeditorAssigned, OdeditorUnassigned, Offset, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, Position, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryDraftAutomationsRequest, QueryDraftAutomationsResponse, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsRequest, QueryPreinstalledAutomationsResponse, Quota, QuotaInfo, RateLimit, RateLimitAction, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, ServiceProvisioned, ServiceRemoved, SetVariablesAction, Severity, SeverityWithLiterals, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SplitAction, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpdatePreinstalledAutomationResponse, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.js';
|
|
2
|
+
import { Automation, UpdateAutomation, BulkDeleteAutomationsResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetActionsQuotaInfoResponse, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.js';
|
|
3
|
+
export { AIMetadata, AccountDetails, Action, ActionConfigurationError, ActionErrorType, ActionErrorTypeWithLiterals, ActionEvent, ActionInfoOneOf, ActionProviderQuotaInfo, ActionQuotaInfo, ActionSettings, ActionUsageSummary, ActionValidationError, ActionValidationErrorErrorOneOf, ActionValidationInfo, AdditionalInfo, AppDefinedAction, ApplicationError, ApplicationOrigin, Asset, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, AutomationConfiguration, AutomationConfigurationError, AutomationErrorType, AutomationErrorTypeWithLiterals, AutomationOriginInfoOneOf, AutomationQuerySpec, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, CommonQueryWithEntityContext, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GenerateActionInputMappingFromTemplateRequest, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeOverridePreinstalledWithRuntimeVersionRequest, MergeOverridePreinstalledWithRuntimeVersionResponse, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigrateVeloActionAutomationsRequest, MigrateVeloActionAutomationsResponse, Namespace, NamespaceChanged, NamespaceWithLiterals, Note, Notes, OdeditorAssigned, OdeditorUnassigned, Offset, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, Position, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryDraftAutomationsRequest, QueryDraftAutomationsResponse, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsRequest, QueryPreinstalledAutomationsResponse, Quota, QuotaInfo, RateLimit, RateLimitAction, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, ServiceProvisioned, ServiceRemoved, SetVariablesAction, Severity, SeverityWithLiterals, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SplitAction, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpdatePreinstalledAutomationResponse, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.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
|
/**
|
|
@@ -196,6 +188,14 @@ interface GenerateActionInputMappingFromTemplateSignature {
|
|
|
196
188
|
*/
|
|
197
189
|
(appId: string, options: NonNullablePaths<GenerateActionInputMappingFromTemplateOptions, `actionInputMappingTemplate` | `actionKey`, 2>): Promise<GenerateActionInputMappingFromTemplateResponse>;
|
|
198
190
|
}
|
|
191
|
+
declare function getAutomationRevision$1(httpClient: HttpClient): GetAutomationRevisionSignature;
|
|
192
|
+
interface GetAutomationRevisionSignature {
|
|
193
|
+
/**
|
|
194
|
+
* Gets the specified automation revision.
|
|
195
|
+
* @param - Automation ID.
|
|
196
|
+
*/
|
|
197
|
+
(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, `automation.applicationInfo.appId` | `automation.preinstalledInfo.appId` | `automation.createdBy.userId` | `automation.createdBy.appId` | `automation.name` | `automation.configuration.status` | `automation.configuration.trigger.appId` | `automation.configuration.trigger.triggerKey` | `automation.configuration.trigger.filters` | `automation.configuration.trigger.filters.${number}._id` | `automation.configuration.trigger.filters.${number}.fieldKey` | `automation.configuration.trigger.filters.${number}.filterExpression` | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `automation.configuration.trigger.rateLimit.maxActivationsExpression` | `automation.configuration.trigger.rateLimit.durationTimeUnit` | `automation.configuration.rootActionIds` | `automation.origin` | `automation.settings.hidden` | `automation.settings.readonly` | `automation.settings.disableDelete` | `automation.settings.disableStatusChange` | `automation.settings.actionSettings.permanentActionIds` | `automation.settings.actionSettings.readonlyActionIds` | `automation.archived`, 7>>;
|
|
198
|
+
}
|
|
199
199
|
declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
|
|
200
200
|
declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
|
|
201
201
|
declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
|
|
@@ -204,7 +204,6 @@ declare function customQueryAutomations(httpClient: HttpClient): {
|
|
|
204
204
|
(query: AutomationQuery, options?: QueryAutomationsOptions): ReturnType<typeof typedQueryAutomations>;
|
|
205
205
|
(options?: QueryAutomationsOptions): AutomationsQueryBuilder;
|
|
206
206
|
};
|
|
207
|
-
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
208
207
|
declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
|
|
209
208
|
declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
|
|
210
209
|
declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
|
|
@@ -225,6 +224,7 @@ declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validate
|
|
|
225
224
|
declare const validateAutomationById: MaybeContext<BuildRESTFunction<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
|
|
226
225
|
declare const getActionsQuotaInfo: MaybeContext<BuildRESTFunction<typeof getActionsQuotaInfo$1> & typeof getActionsQuotaInfo$1>;
|
|
227
226
|
declare const generateActionInputMappingFromTemplate: MaybeContext<BuildRESTFunction<typeof generateActionInputMappingFromTemplate$1> & typeof generateActionInputMappingFromTemplate$1>;
|
|
227
|
+
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
228
228
|
declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof customQueryAutomations> & typeof customQueryAutomations>;
|
|
229
229
|
/**
|
|
230
230
|
* Triggered when a new automation is created.
|
package/build/cjs/index.js
CHANGED
|
@@ -89,7 +89,7 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
89
89
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
90
90
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
91
91
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
92
|
-
function
|
|
92
|
+
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
93
93
|
const domainToMappings = {
|
|
94
94
|
"manage._base_domain_": [
|
|
95
95
|
{
|
|
@@ -128,7 +128,7 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
|
128
128
|
};
|
|
129
129
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
132
132
|
const domainToMappings = {
|
|
133
133
|
"manage._base_domain_": [
|
|
134
134
|
{
|
|
@@ -168,38 +168,6 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
|
168
168
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
169
169
|
}
|
|
170
170
|
var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
|
|
171
|
-
function getAutomationRevision(payload) {
|
|
172
|
-
function __getAutomationRevision({ host }) {
|
|
173
|
-
const metadata = {
|
|
174
|
-
entityFqdn: "wix.automations.v2.automation",
|
|
175
|
-
method: "GET",
|
|
176
|
-
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
177
|
-
packageName: PACKAGE_NAME,
|
|
178
|
-
migrationOptions: {
|
|
179
|
-
optInTransformResponse: true
|
|
180
|
-
},
|
|
181
|
-
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
182
|
-
protoPath: "/v1/automation-revisions/{automationId}",
|
|
183
|
-
data: payload,
|
|
184
|
-
host
|
|
185
|
-
}),
|
|
186
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
187
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
188
|
-
{
|
|
189
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
190
|
-
paths: [
|
|
191
|
-
{ path: "automation.createdDate" },
|
|
192
|
-
{ path: "automation.updatedDate" },
|
|
193
|
-
{ path: "automation.draftUpdatedDate" },
|
|
194
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
])
|
|
198
|
-
};
|
|
199
|
-
return metadata;
|
|
200
|
-
}
|
|
201
|
-
return __getAutomationRevision;
|
|
202
|
-
}
|
|
203
171
|
function createAutomation(payload) {
|
|
204
172
|
function __createAutomation({ host }) {
|
|
205
173
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -868,6 +836,38 @@ function generateActionInputMappingFromTemplate(payload) {
|
|
|
868
836
|
}
|
|
869
837
|
return __generateActionInputMappingFromTemplate;
|
|
870
838
|
}
|
|
839
|
+
function getAutomationRevision(payload) {
|
|
840
|
+
function __getAutomationRevision({ host }) {
|
|
841
|
+
const metadata = {
|
|
842
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
843
|
+
method: "GET",
|
|
844
|
+
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
845
|
+
packageName: PACKAGE_NAME,
|
|
846
|
+
migrationOptions: {
|
|
847
|
+
optInTransformResponse: true
|
|
848
|
+
},
|
|
849
|
+
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
850
|
+
protoPath: "/v1/automation-revisions/{automationId}",
|
|
851
|
+
data: payload,
|
|
852
|
+
host
|
|
853
|
+
}),
|
|
854
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
855
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
856
|
+
{
|
|
857
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
858
|
+
paths: [
|
|
859
|
+
{ path: "automation.createdDate" },
|
|
860
|
+
{ path: "automation.updatedDate" },
|
|
861
|
+
{ path: "automation.draftUpdatedDate" },
|
|
862
|
+
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
863
|
+
]
|
|
864
|
+
}
|
|
865
|
+
])
|
|
866
|
+
};
|
|
867
|
+
return metadata;
|
|
868
|
+
}
|
|
869
|
+
return __getAutomationRevision;
|
|
870
|
+
}
|
|
871
871
|
|
|
872
872
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
873
873
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -1062,37 +1062,6 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
1062
1062
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
1063
1063
|
return AutomationErrorType2;
|
|
1064
1064
|
})(AutomationErrorType || {});
|
|
1065
|
-
async function getAutomationRevision2(automationId, options) {
|
|
1066
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1067
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1068
|
-
automationId,
|
|
1069
|
-
revision: options?.revision,
|
|
1070
|
-
fields: options?.fields
|
|
1071
|
-
});
|
|
1072
|
-
const reqOpts = getAutomationRevision(payload);
|
|
1073
|
-
sideEffects?.onSiteCall?.();
|
|
1074
|
-
try {
|
|
1075
|
-
const result = await httpClient.request(reqOpts);
|
|
1076
|
-
sideEffects?.onSuccess?.(result);
|
|
1077
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1078
|
-
} catch (err) {
|
|
1079
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1080
|
-
err,
|
|
1081
|
-
{
|
|
1082
|
-
spreadPathsToArguments: {},
|
|
1083
|
-
explicitPathsToArguments: {
|
|
1084
|
-
automationId: "$[0]",
|
|
1085
|
-
revision: "$[1].revision",
|
|
1086
|
-
fields: "$[1].fields"
|
|
1087
|
-
},
|
|
1088
|
-
singleArgumentUnchanged: false
|
|
1089
|
-
},
|
|
1090
|
-
["automationId", "options"]
|
|
1091
|
-
);
|
|
1092
|
-
sideEffects?.onError?.(err);
|
|
1093
|
-
throw transformedError;
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
1065
|
async function createAutomation2(automation) {
|
|
1097
1066
|
const { httpClient, sideEffects } = arguments[1];
|
|
1098
1067
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1691,16 +1660,39 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1691
1660
|
throw transformedError;
|
|
1692
1661
|
}
|
|
1693
1662
|
}
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
return (automationId, options) => getAutomationRevision2(
|
|
1663
|
+
async function getAutomationRevision2(automationId, options) {
|
|
1664
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1665
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1698
1666
|
automationId,
|
|
1699
|
-
options,
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
);
|
|
1667
|
+
revision: options?.revision,
|
|
1668
|
+
fields: options?.fields
|
|
1669
|
+
});
|
|
1670
|
+
const reqOpts = getAutomationRevision(payload);
|
|
1671
|
+
sideEffects?.onSiteCall?.();
|
|
1672
|
+
try {
|
|
1673
|
+
const result = await httpClient.request(reqOpts);
|
|
1674
|
+
sideEffects?.onSuccess?.(result);
|
|
1675
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1676
|
+
} catch (err) {
|
|
1677
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1678
|
+
err,
|
|
1679
|
+
{
|
|
1680
|
+
spreadPathsToArguments: {},
|
|
1681
|
+
explicitPathsToArguments: {
|
|
1682
|
+
automationId: "$[0]",
|
|
1683
|
+
revision: "$[1].revision",
|
|
1684
|
+
fields: "$[1].fields"
|
|
1685
|
+
},
|
|
1686
|
+
singleArgumentUnchanged: false
|
|
1687
|
+
},
|
|
1688
|
+
["automationId", "options"]
|
|
1689
|
+
);
|
|
1690
|
+
sideEffects?.onError?.(err);
|
|
1691
|
+
throw transformedError;
|
|
1692
|
+
}
|
|
1703
1693
|
}
|
|
1694
|
+
|
|
1695
|
+
// src/automations-v2-automation-automations-v-2.public.ts
|
|
1704
1696
|
function createAutomation3(httpClient) {
|
|
1705
1697
|
return (automation) => createAutomation2(
|
|
1706
1698
|
automation,
|
|
@@ -1862,6 +1854,14 @@ function generateActionInputMappingFromTemplate3(httpClient) {
|
|
|
1862
1854
|
{ httpClient }
|
|
1863
1855
|
);
|
|
1864
1856
|
}
|
|
1857
|
+
function getAutomationRevision3(httpClient) {
|
|
1858
|
+
return (automationId, options) => getAutomationRevision2(
|
|
1859
|
+
automationId,
|
|
1860
|
+
options,
|
|
1861
|
+
// @ts-ignore
|
|
1862
|
+
{ httpClient }
|
|
1863
|
+
);
|
|
1864
|
+
}
|
|
1865
1865
|
var onAutomationCreated = (0, import_sdk_types.EventDefinition)(
|
|
1866
1866
|
"wix.automations.v2.automation_created",
|
|
1867
1867
|
true,
|
|
@@ -1936,7 +1936,6 @@ function customQueryAutomations(httpClient) {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
return overloadedQuery;
|
|
1938
1938
|
}
|
|
1939
|
-
var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
|
|
1940
1939
|
var createAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createAutomation3);
|
|
1941
1940
|
var getAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomation3);
|
|
1942
1941
|
var updateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateAutomation3);
|
|
@@ -1959,6 +1958,7 @@ var getActionsQuotaInfo4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTMo
|
|
|
1959
1958
|
var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
|
|
1960
1959
|
generateActionInputMappingFromTemplate3
|
|
1961
1960
|
);
|
|
1961
|
+
var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
|
|
1962
1962
|
var queryAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryAutomations);
|
|
1963
1963
|
var onAutomationCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
1964
1964
|
onAutomationCreated
|