@wix/auto_sdk_automations_automations-v-2 1.0.82 → 1.0.84
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 +18 -9
- package/build/cjs/index.js +101 -34
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +77 -34
- package/build/cjs/index.typings.js +86 -30
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +46 -26
- package/build/cjs/meta.js +70 -27
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +18 -9
- package/build/es/index.mjs +100 -34
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +77 -34
- package/build/es/index.typings.mjs +85 -30
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +46 -26
- package/build/es/meta.mjs +69 -27
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -9
- package/build/internal/cjs/index.js +101 -34
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +77 -34
- package/build/internal/cjs/index.typings.js +86 -30
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +46 -26
- package/build/internal/cjs/meta.js +70 -27
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -9
- package/build/internal/es/index.mjs +100 -34
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +77 -34
- package/build/internal/es/index.typings.mjs +85 -30
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +46 -26
- package/build/internal/es/meta.mjs +69 -27
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
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,
|
|
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, 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.js';
|
|
2
|
+
import { GetAutomationRevisionOptions, GetAutomationRevisionResponse, 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, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.js';
|
|
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.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
|
+
}
|
|
5
13
|
declare function createAutomation$1(httpClient: HttpClient): CreateAutomationSignature;
|
|
6
14
|
interface CreateAutomationSignature {
|
|
7
15
|
/**
|
|
@@ -173,13 +181,13 @@ interface ValidateAutomationByIdSignature {
|
|
|
173
181
|
*/
|
|
174
182
|
(automationId: string, options?: ValidateAutomationByIdOptions): Promise<NonNullablePaths<ValidateAutomationByIdResponse, `status` | `triggerValidationErrors` | `triggerValidationErrors.${number}.configurationError.errorType` | `triggerValidationErrors.${number}.providerConfigurationError.message` | `triggerValidationErrors.${number}.providerConfigurationError.title` | `triggerValidationErrors.${number}.errorType` | `triggerValidationErrors.${number}.errorSeverity` | `actionValidationErrors` | `actionValidationErrors.${number}.configurationError.errorType` | `actionValidationErrors.${number}.providerConfigurationError.message` | `actionValidationErrors.${number}.providerConfigurationError.title` | `actionValidationErrors.${number}.actionId` | `actionValidationErrors.${number}.appId` | `actionValidationErrors.${number}.actionKey` | `actionValidationErrors.${number}.errorType` | `actionValidationErrors.${number}.errorSeverity`, 5>>;
|
|
175
183
|
}
|
|
176
|
-
declare function
|
|
177
|
-
interface
|
|
184
|
+
declare function generateActionInputMappingFromTemplate$1(httpClient: HttpClient): GenerateActionInputMappingFromTemplateSignature;
|
|
185
|
+
interface GenerateActionInputMappingFromTemplateSignature {
|
|
178
186
|
/**
|
|
179
|
-
*
|
|
180
|
-
* @param -
|
|
187
|
+
* Generates action input mapping from a template.
|
|
188
|
+
* @param - Action app ID.
|
|
181
189
|
*/
|
|
182
|
-
(
|
|
190
|
+
(appId: string, options: NonNullablePaths<GenerateActionInputMappingFromTemplateOptions, `actionInputMappingTemplate` | `actionKey`, 2>): Promise<GenerateActionInputMappingFromTemplateResponse>;
|
|
183
191
|
}
|
|
184
192
|
declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
|
|
185
193
|
declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
|
|
@@ -189,6 +197,7 @@ declare function customQueryAutomations(httpClient: HttpClient): {
|
|
|
189
197
|
(query: AutomationQuery, options?: QueryAutomationsOptions): ReturnType<typeof typedQueryAutomations>;
|
|
190
198
|
(options?: QueryAutomationsOptions): AutomationsQueryBuilder;
|
|
191
199
|
};
|
|
200
|
+
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
192
201
|
declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
|
|
193
202
|
declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
|
|
194
203
|
declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
|
|
@@ -207,7 +216,7 @@ declare const deleteDraftAutomation: MaybeContext<BuildRESTFunction<typeof delet
|
|
|
207
216
|
declare const publishDraftAutomation: MaybeContext<BuildRESTFunction<typeof publishDraftAutomation$1> & typeof publishDraftAutomation$1>;
|
|
208
217
|
declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validateAutomation$1> & typeof validateAutomation$1>;
|
|
209
218
|
declare const validateAutomationById: MaybeContext<BuildRESTFunction<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
|
|
210
|
-
declare const
|
|
219
|
+
declare const generateActionInputMappingFromTemplate: MaybeContext<BuildRESTFunction<typeof generateActionInputMappingFromTemplate$1> & typeof generateActionInputMappingFromTemplate$1>;
|
|
211
220
|
declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof customQueryAutomations> & typeof customQueryAutomations>;
|
|
212
221
|
/**
|
|
213
222
|
* Triggered when a new automation is created.
|
|
@@ -222,4 +231,4 @@ declare const onAutomationDeleted: BuildEventDefinition<typeof onAutomationDelet
|
|
|
222
231
|
*/
|
|
223
232
|
declare const onAutomationUpdated: BuildEventDefinition<typeof onAutomationUpdated$1> & typeof onAutomationUpdated$1;
|
|
224
233
|
|
|
225
|
-
export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationQuery, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, QueryAutomationsOptions, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, 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, queryPreinstalledAutomationsForApp, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
234
|
+
export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationQuery, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, QueryAutomationsOptions, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, UpdateAutomation, UpdateDraftAutomation, UpdateDraftAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, ValidateAutomationOptions, ValidateAutomationResponse, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generateActionInputMappingFromTemplate, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomationsForApp, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
@@ -50,6 +50,7 @@ __export(index_exports, {
|
|
|
50
50
|
createDraftAutomation: () => createDraftAutomation4,
|
|
51
51
|
deleteAutomation: () => deleteAutomation4,
|
|
52
52
|
deleteDraftAutomation: () => deleteDraftAutomation4,
|
|
53
|
+
generateActionInputMappingFromTemplate: () => generateActionInputMappingFromTemplate4,
|
|
53
54
|
generatePreinstalledAutomation: () => generatePreinstalledAutomation4,
|
|
54
55
|
getAggregatedUsageInfo: () => getAggregatedUsageInfo4,
|
|
55
56
|
getAutomation: () => getAutomation4,
|
|
@@ -87,7 +88,7 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
87
88
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
88
89
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
89
90
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
90
|
-
function
|
|
91
|
+
function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
91
92
|
const domainToMappings = {
|
|
92
93
|
"manage._base_domain_": [
|
|
93
94
|
{
|
|
@@ -126,7 +127,7 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
|
126
127
|
};
|
|
127
128
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
+
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
130
131
|
const domainToMappings = {
|
|
131
132
|
"manage._base_domain_": [
|
|
132
133
|
{
|
|
@@ -166,6 +167,38 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
|
166
167
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
167
168
|
}
|
|
168
169
|
var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
|
|
170
|
+
function getAutomationRevision(payload) {
|
|
171
|
+
function __getAutomationRevision({ host }) {
|
|
172
|
+
const metadata = {
|
|
173
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
174
|
+
method: "GET",
|
|
175
|
+
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
176
|
+
packageName: PACKAGE_NAME,
|
|
177
|
+
migrationOptions: {
|
|
178
|
+
optInTransformResponse: true
|
|
179
|
+
},
|
|
180
|
+
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
181
|
+
protoPath: "/v1/automation-revisions/{automationId}",
|
|
182
|
+
data: payload,
|
|
183
|
+
host
|
|
184
|
+
}),
|
|
185
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
186
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
187
|
+
{
|
|
188
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
189
|
+
paths: [
|
|
190
|
+
{ path: "automation.createdDate" },
|
|
191
|
+
{ path: "automation.updatedDate" },
|
|
192
|
+
{ path: "automation.draftUpdatedDate" },
|
|
193
|
+
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
])
|
|
197
|
+
};
|
|
198
|
+
return metadata;
|
|
199
|
+
}
|
|
200
|
+
return __getAutomationRevision;
|
|
201
|
+
}
|
|
169
202
|
function createAutomation(payload) {
|
|
170
203
|
function __createAutomation({ host }) {
|
|
171
204
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -782,37 +815,26 @@ function validateAutomationById(payload) {
|
|
|
782
815
|
}
|
|
783
816
|
return __validateAutomationById;
|
|
784
817
|
}
|
|
785
|
-
function
|
|
786
|
-
function
|
|
818
|
+
function generateActionInputMappingFromTemplate(payload) {
|
|
819
|
+
function __generateActionInputMappingFromTemplate({ host }) {
|
|
787
820
|
const metadata = {
|
|
788
821
|
entityFqdn: "wix.automations.v2.automation",
|
|
789
|
-
method: "
|
|
790
|
-
methodFqn: "wix.automations.v2.
|
|
822
|
+
method: "POST",
|
|
823
|
+
methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
|
|
791
824
|
packageName: PACKAGE_NAME,
|
|
792
825
|
migrationOptions: {
|
|
793
826
|
optInTransformResponse: true
|
|
794
827
|
},
|
|
795
|
-
url:
|
|
796
|
-
protoPath: "/
|
|
828
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
829
|
+
protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
797
830
|
data: payload,
|
|
798
831
|
host
|
|
799
832
|
}),
|
|
800
|
-
|
|
801
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
802
|
-
{
|
|
803
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
804
|
-
paths: [
|
|
805
|
-
{ path: "automation.createdDate" },
|
|
806
|
-
{ path: "automation.updatedDate" },
|
|
807
|
-
{ path: "automation.draftUpdatedDate" },
|
|
808
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
809
|
-
]
|
|
810
|
-
}
|
|
811
|
-
])
|
|
833
|
+
data: payload
|
|
812
834
|
};
|
|
813
835
|
return metadata;
|
|
814
836
|
}
|
|
815
|
-
return
|
|
837
|
+
return __generateActionInputMappingFromTemplate;
|
|
816
838
|
}
|
|
817
839
|
|
|
818
840
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
@@ -1007,6 +1029,37 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
1007
1029
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
1008
1030
|
return AutomationErrorType2;
|
|
1009
1031
|
})(AutomationErrorType || {});
|
|
1032
|
+
async function getAutomationRevision2(automationId, options) {
|
|
1033
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1034
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1035
|
+
automationId,
|
|
1036
|
+
revision: options?.revision,
|
|
1037
|
+
fields: options?.fields
|
|
1038
|
+
});
|
|
1039
|
+
const reqOpts = getAutomationRevision(payload);
|
|
1040
|
+
sideEffects?.onSiteCall?.();
|
|
1041
|
+
try {
|
|
1042
|
+
const result = await httpClient.request(reqOpts);
|
|
1043
|
+
sideEffects?.onSuccess?.(result);
|
|
1044
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1045
|
+
} catch (err) {
|
|
1046
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1047
|
+
err,
|
|
1048
|
+
{
|
|
1049
|
+
spreadPathsToArguments: {},
|
|
1050
|
+
explicitPathsToArguments: {
|
|
1051
|
+
automationId: "$[0]",
|
|
1052
|
+
revision: "$[1].revision",
|
|
1053
|
+
fields: "$[1].fields"
|
|
1054
|
+
},
|
|
1055
|
+
singleArgumentUnchanged: false
|
|
1056
|
+
},
|
|
1057
|
+
["automationId", "options"]
|
|
1058
|
+
);
|
|
1059
|
+
sideEffects?.onError?.(err);
|
|
1060
|
+
throw transformedError;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1010
1063
|
async function createAutomation2(automation) {
|
|
1011
1064
|
const { httpClient, sideEffects } = arguments[1];
|
|
1012
1065
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1549,14 +1602,16 @@ async function validateAutomationById2(automationId, options) {
|
|
|
1549
1602
|
throw transformedError;
|
|
1550
1603
|
}
|
|
1551
1604
|
}
|
|
1552
|
-
async function
|
|
1605
|
+
async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
1553
1606
|
const { httpClient, sideEffects } = arguments[2];
|
|
1554
1607
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1608
|
+
appId,
|
|
1609
|
+
actionKey: options?.actionKey,
|
|
1610
|
+
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1558
1611
|
});
|
|
1559
|
-
const reqOpts =
|
|
1612
|
+
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1613
|
+
payload
|
|
1614
|
+
);
|
|
1560
1615
|
sideEffects?.onSiteCall?.();
|
|
1561
1616
|
try {
|
|
1562
1617
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1568,13 +1623,13 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1568
1623
|
{
|
|
1569
1624
|
spreadPathsToArguments: {},
|
|
1570
1625
|
explicitPathsToArguments: {
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1626
|
+
appId: "$[0]",
|
|
1627
|
+
actionKey: "$[1].actionKey",
|
|
1628
|
+
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1574
1629
|
},
|
|
1575
1630
|
singleArgumentUnchanged: false
|
|
1576
1631
|
},
|
|
1577
|
-
["
|
|
1632
|
+
["appId", "options"]
|
|
1578
1633
|
);
|
|
1579
1634
|
sideEffects?.onError?.(err);
|
|
1580
1635
|
throw transformedError;
|
|
@@ -1582,6 +1637,14 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1582
1637
|
}
|
|
1583
1638
|
|
|
1584
1639
|
// src/automations-v2-automation-automations-v-2.public.ts
|
|
1640
|
+
function getAutomationRevision3(httpClient) {
|
|
1641
|
+
return (automationId, options) => getAutomationRevision2(
|
|
1642
|
+
automationId,
|
|
1643
|
+
options,
|
|
1644
|
+
// @ts-ignore
|
|
1645
|
+
{ httpClient }
|
|
1646
|
+
);
|
|
1647
|
+
}
|
|
1585
1648
|
function createAutomation3(httpClient) {
|
|
1586
1649
|
return (automation) => createAutomation2(
|
|
1587
1650
|
automation,
|
|
@@ -1729,9 +1792,9 @@ function validateAutomationById3(httpClient) {
|
|
|
1729
1792
|
{ httpClient }
|
|
1730
1793
|
);
|
|
1731
1794
|
}
|
|
1732
|
-
function
|
|
1733
|
-
return (
|
|
1734
|
-
|
|
1795
|
+
function generateActionInputMappingFromTemplate3(httpClient) {
|
|
1796
|
+
return (appId, options) => generateActionInputMappingFromTemplate2(
|
|
1797
|
+
appId,
|
|
1735
1798
|
options,
|
|
1736
1799
|
// @ts-ignore
|
|
1737
1800
|
{ httpClient }
|
|
@@ -1811,6 +1874,7 @@ function customQueryAutomations(httpClient) {
|
|
|
1811
1874
|
}
|
|
1812
1875
|
return overloadedQuery;
|
|
1813
1876
|
}
|
|
1877
|
+
var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
|
|
1814
1878
|
var createAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createAutomation3);
|
|
1815
1879
|
var getAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomation3);
|
|
1816
1880
|
var updateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateAutomation3);
|
|
@@ -1829,7 +1893,9 @@ var deleteDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createREST
|
|
|
1829
1893
|
var publishDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishDraftAutomation3);
|
|
1830
1894
|
var validateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateAutomation3);
|
|
1831
1895
|
var validateAutomationById4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateAutomationById3);
|
|
1832
|
-
var
|
|
1896
|
+
var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
|
|
1897
|
+
generateActionInputMappingFromTemplate3
|
|
1898
|
+
);
|
|
1833
1899
|
var queryAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryAutomations);
|
|
1834
1900
|
var onAutomationCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
1835
1901
|
onAutomationCreated
|
|
@@ -1872,6 +1938,7 @@ var onAutomationUpdated2 = (0, import_event_definition_modules.createEventModule
|
|
|
1872
1938
|
createDraftAutomation,
|
|
1873
1939
|
deleteAutomation,
|
|
1874
1940
|
deleteDraftAutomation,
|
|
1941
|
+
generateActionInputMappingFromTemplate,
|
|
1875
1942
|
generatePreinstalledAutomation,
|
|
1876
1943
|
getAggregatedUsageInfo,
|
|
1877
1944
|
getAutomation,
|