@wix/auto_sdk_automations_automations-v-2 1.0.88 → 1.0.90
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 +20 -12
- package/build/cjs/index.js +124 -61
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +51 -42
- package/build/cjs/index.typings.js +109 -53
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +27 -26
- package/build/cjs/meta.js +91 -40
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +20 -12
- package/build/es/index.mjs +123 -61
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +51 -42
- package/build/es/index.typings.mjs +108 -53
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +27 -26
- package/build/es/meta.mjs +90 -40
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +20 -12
- package/build/internal/cjs/index.js +124 -61
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +51 -42
- package/build/internal/cjs/index.typings.js +109 -53
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +27 -26
- package/build/internal/cjs/meta.js +91 -40
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +20 -12
- package/build/internal/es/index.mjs +123 -61
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +51 -42
- package/build/internal/es/index.typings.mjs +108 -53
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +27 -26
- package/build/internal/es/meta.mjs +90 -40
- 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, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse,
|
|
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,
|
|
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, GetActionsQuotaInfoResponse, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, 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, 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.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
|
+
}
|
|
5
13
|
declare function createAutomation$1(httpClient: HttpClient): CreateAutomationSignature;
|
|
6
14
|
interface CreateAutomationSignature {
|
|
7
15
|
/**
|
|
@@ -173,6 +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
|
}
|
|
184
|
+
declare function getActionsQuotaInfo$1(httpClient: HttpClient): GetActionsQuotaInfoSignature;
|
|
185
|
+
interface GetActionsQuotaInfoSignature {
|
|
186
|
+
/**
|
|
187
|
+
* Gets action quota information.
|
|
188
|
+
*/
|
|
189
|
+
(): Promise<NonNullablePaths<GetActionsQuotaInfoResponse, `actionProviderQuotaInfo` | `actionProviderQuotaInfo.${number}.appId` | `actionProviderQuotaInfo.${number}.actionKey` | `actionProviderQuotaInfo.${number}.actionQuotaInfo.enforced`, 5>>;
|
|
190
|
+
}
|
|
176
191
|
declare function generateActionInputMappingFromTemplate$1(httpClient: HttpClient): GenerateActionInputMappingFromTemplateSignature;
|
|
177
192
|
interface GenerateActionInputMappingFromTemplateSignature {
|
|
178
193
|
/**
|
|
@@ -181,14 +196,6 @@ interface GenerateActionInputMappingFromTemplateSignature {
|
|
|
181
196
|
*/
|
|
182
197
|
(appId: string, options: NonNullablePaths<GenerateActionInputMappingFromTemplateOptions, `actionInputMappingTemplate` | `actionKey`, 2>): Promise<GenerateActionInputMappingFromTemplateResponse>;
|
|
183
198
|
}
|
|
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
199
|
declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
|
|
193
200
|
declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
|
|
194
201
|
declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
|
|
@@ -197,6 +204,7 @@ declare function customQueryAutomations(httpClient: HttpClient): {
|
|
|
197
204
|
(query: AutomationQuery, options?: QueryAutomationsOptions): ReturnType<typeof typedQueryAutomations>;
|
|
198
205
|
(options?: QueryAutomationsOptions): AutomationsQueryBuilder;
|
|
199
206
|
};
|
|
207
|
+
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
200
208
|
declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
|
|
201
209
|
declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
|
|
202
210
|
declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
|
|
@@ -215,8 +223,8 @@ declare const deleteDraftAutomation: MaybeContext<BuildRESTFunction<typeof delet
|
|
|
215
223
|
declare const publishDraftAutomation: MaybeContext<BuildRESTFunction<typeof publishDraftAutomation$1> & typeof publishDraftAutomation$1>;
|
|
216
224
|
declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validateAutomation$1> & typeof validateAutomation$1>;
|
|
217
225
|
declare const validateAutomationById: MaybeContext<BuildRESTFunction<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
|
|
226
|
+
declare const getActionsQuotaInfo: MaybeContext<BuildRESTFunction<typeof getActionsQuotaInfo$1> & typeof getActionsQuotaInfo$1>;
|
|
218
227
|
declare const generateActionInputMappingFromTemplate: MaybeContext<BuildRESTFunction<typeof generateActionInputMappingFromTemplate$1> & typeof generateActionInputMappingFromTemplate$1>;
|
|
219
|
-
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
220
228
|
declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof customQueryAutomations> & typeof customQueryAutomations>;
|
|
221
229
|
/**
|
|
222
230
|
* Triggered when a new automation is created.
|
|
@@ -231,4 +239,4 @@ declare const onAutomationDeleted: BuildEventDefinition<typeof onAutomationDelet
|
|
|
231
239
|
*/
|
|
232
240
|
declare const onAutomationUpdated: BuildEventDefinition<typeof onAutomationUpdated$1> & typeof onAutomationUpdated$1;
|
|
233
241
|
|
|
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 };
|
|
242
|
+
export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationQuery, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetActionsQuotaInfoResponse, 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, getActionsQuotaInfo, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomationsForApp, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
@@ -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 resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
23
23
|
const domainToMappings = {
|
|
24
24
|
"manage._base_domain_": [
|
|
25
25
|
{
|
|
@@ -58,7 +58,7 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
|
58
58
|
};
|
|
59
59
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
62
62
|
const domainToMappings = {
|
|
63
63
|
"manage._base_domain_": [
|
|
64
64
|
{
|
|
@@ -98,6 +98,38 @@ function resolveWixAutomationsV2AutomationsServiceUrl(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
|
+
}
|
|
101
133
|
function createAutomation(payload) {
|
|
102
134
|
function __createAutomation({ host }) {
|
|
103
135
|
const serializedData = transformPaths(payload, [
|
|
@@ -714,58 +746,57 @@ function validateAutomationById(payload) {
|
|
|
714
746
|
}
|
|
715
747
|
return __validateAutomationById;
|
|
716
748
|
}
|
|
717
|
-
function
|
|
718
|
-
function
|
|
749
|
+
function getActionsQuotaInfo(payload) {
|
|
750
|
+
function __getActionsQuotaInfo({ host }) {
|
|
719
751
|
const metadata = {
|
|
720
752
|
entityFqdn: "wix.automations.v2.automation",
|
|
721
|
-
method: "
|
|
722
|
-
methodFqn: "wix.automations.v2.AutomationsService.
|
|
753
|
+
method: "GET",
|
|
754
|
+
methodFqn: "wix.automations.v2.AutomationsService.GetActionsQuotaInfo",
|
|
723
755
|
packageName: PACKAGE_NAME,
|
|
724
756
|
migrationOptions: {
|
|
725
757
|
optInTransformResponse: true
|
|
726
758
|
},
|
|
727
759
|
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
728
|
-
protoPath: "/v2/automations/actions/
|
|
760
|
+
protoPath: "/v2/automations/actions/quota",
|
|
729
761
|
data: payload,
|
|
730
762
|
host
|
|
731
763
|
}),
|
|
732
|
-
|
|
764
|
+
params: toURLSearchParams(payload),
|
|
765
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
766
|
+
{
|
|
767
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
768
|
+
paths: [
|
|
769
|
+
{
|
|
770
|
+
path: "actionProviderQuotaInfo.actionQuotaInfo.quotaInfo.quotas.renewalDate"
|
|
771
|
+
}
|
|
772
|
+
]
|
|
773
|
+
}
|
|
774
|
+
])
|
|
733
775
|
};
|
|
734
776
|
return metadata;
|
|
735
777
|
}
|
|
736
|
-
return
|
|
778
|
+
return __getActionsQuotaInfo;
|
|
737
779
|
}
|
|
738
|
-
function
|
|
739
|
-
function
|
|
780
|
+
function generateActionInputMappingFromTemplate(payload) {
|
|
781
|
+
function __generateActionInputMappingFromTemplate({ host }) {
|
|
740
782
|
const metadata = {
|
|
741
783
|
entityFqdn: "wix.automations.v2.automation",
|
|
742
|
-
method: "
|
|
743
|
-
methodFqn: "wix.automations.v2.
|
|
784
|
+
method: "POST",
|
|
785
|
+
methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
|
|
744
786
|
packageName: PACKAGE_NAME,
|
|
745
787
|
migrationOptions: {
|
|
746
788
|
optInTransformResponse: true
|
|
747
789
|
},
|
|
748
|
-
url:
|
|
749
|
-
protoPath: "/
|
|
790
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
791
|
+
protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
750
792
|
data: payload,
|
|
751
793
|
host
|
|
752
794
|
}),
|
|
753
|
-
|
|
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
|
-
])
|
|
795
|
+
data: payload
|
|
765
796
|
};
|
|
766
797
|
return metadata;
|
|
767
798
|
}
|
|
768
|
-
return
|
|
799
|
+
return __generateActionInputMappingFromTemplate;
|
|
769
800
|
}
|
|
770
801
|
|
|
771
802
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
@@ -961,6 +992,37 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
961
992
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
962
993
|
return AutomationErrorType2;
|
|
963
994
|
})(AutomationErrorType || {});
|
|
995
|
+
async function getAutomationRevision2(automationId, options) {
|
|
996
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
997
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
998
|
+
automationId,
|
|
999
|
+
revision: options?.revision,
|
|
1000
|
+
fields: options?.fields
|
|
1001
|
+
});
|
|
1002
|
+
const reqOpts = getAutomationRevision(payload);
|
|
1003
|
+
sideEffects?.onSiteCall?.();
|
|
1004
|
+
try {
|
|
1005
|
+
const result = await httpClient.request(reqOpts);
|
|
1006
|
+
sideEffects?.onSuccess?.(result);
|
|
1007
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1008
|
+
} catch (err) {
|
|
1009
|
+
const transformedError = sdkTransformError(
|
|
1010
|
+
err,
|
|
1011
|
+
{
|
|
1012
|
+
spreadPathsToArguments: {},
|
|
1013
|
+
explicitPathsToArguments: {
|
|
1014
|
+
automationId: "$[0]",
|
|
1015
|
+
revision: "$[1].revision",
|
|
1016
|
+
fields: "$[1].fields"
|
|
1017
|
+
},
|
|
1018
|
+
singleArgumentUnchanged: false
|
|
1019
|
+
},
|
|
1020
|
+
["automationId", "options"]
|
|
1021
|
+
);
|
|
1022
|
+
sideEffects?.onError?.(err);
|
|
1023
|
+
throw transformedError;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
964
1026
|
async function createAutomation2(automation) {
|
|
965
1027
|
const { httpClient, sideEffects } = arguments[1];
|
|
966
1028
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1503,16 +1565,10 @@ async function validateAutomationById2(automationId, options) {
|
|
|
1503
1565
|
throw transformedError;
|
|
1504
1566
|
}
|
|
1505
1567
|
}
|
|
1506
|
-
async function
|
|
1507
|
-
const { httpClient, sideEffects } = arguments[
|
|
1508
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1509
|
-
|
|
1510
|
-
actionKey: options?.actionKey,
|
|
1511
|
-
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1512
|
-
});
|
|
1513
|
-
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1514
|
-
payload
|
|
1515
|
-
);
|
|
1568
|
+
async function getActionsQuotaInfo2() {
|
|
1569
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
1570
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({});
|
|
1571
|
+
const reqOpts = getActionsQuotaInfo(payload);
|
|
1516
1572
|
sideEffects?.onSiteCall?.();
|
|
1517
1573
|
try {
|
|
1518
1574
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1523,27 +1579,25 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1523
1579
|
err,
|
|
1524
1580
|
{
|
|
1525
1581
|
spreadPathsToArguments: {},
|
|
1526
|
-
explicitPathsToArguments: {
|
|
1527
|
-
appId: "$[0]",
|
|
1528
|
-
actionKey: "$[1].actionKey",
|
|
1529
|
-
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1530
|
-
},
|
|
1582
|
+
explicitPathsToArguments: {},
|
|
1531
1583
|
singleArgumentUnchanged: false
|
|
1532
1584
|
},
|
|
1533
|
-
[
|
|
1585
|
+
[]
|
|
1534
1586
|
);
|
|
1535
1587
|
sideEffects?.onError?.(err);
|
|
1536
1588
|
throw transformedError;
|
|
1537
1589
|
}
|
|
1538
1590
|
}
|
|
1539
|
-
async function
|
|
1591
|
+
async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
1540
1592
|
const { httpClient, sideEffects } = arguments[2];
|
|
1541
1593
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1594
|
+
appId,
|
|
1595
|
+
actionKey: options?.actionKey,
|
|
1596
|
+
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1545
1597
|
});
|
|
1546
|
-
const reqOpts =
|
|
1598
|
+
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1599
|
+
payload
|
|
1600
|
+
);
|
|
1547
1601
|
sideEffects?.onSiteCall?.();
|
|
1548
1602
|
try {
|
|
1549
1603
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1555,13 +1609,13 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1555
1609
|
{
|
|
1556
1610
|
spreadPathsToArguments: {},
|
|
1557
1611
|
explicitPathsToArguments: {
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1612
|
+
appId: "$[0]",
|
|
1613
|
+
actionKey: "$[1].actionKey",
|
|
1614
|
+
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1561
1615
|
},
|
|
1562
1616
|
singleArgumentUnchanged: false
|
|
1563
1617
|
},
|
|
1564
|
-
["
|
|
1618
|
+
["appId", "options"]
|
|
1565
1619
|
);
|
|
1566
1620
|
sideEffects?.onError?.(err);
|
|
1567
1621
|
throw transformedError;
|
|
@@ -1569,6 +1623,14 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1569
1623
|
}
|
|
1570
1624
|
|
|
1571
1625
|
// src/automations-v2-automation-automations-v-2.public.ts
|
|
1626
|
+
function getAutomationRevision3(httpClient) {
|
|
1627
|
+
return (automationId, options) => getAutomationRevision2(
|
|
1628
|
+
automationId,
|
|
1629
|
+
options,
|
|
1630
|
+
// @ts-ignore
|
|
1631
|
+
{ httpClient }
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1572
1634
|
function createAutomation3(httpClient) {
|
|
1573
1635
|
return (automation) => createAutomation2(
|
|
1574
1636
|
automation,
|
|
@@ -1716,17 +1778,15 @@ function validateAutomationById3(httpClient) {
|
|
|
1716
1778
|
{ httpClient }
|
|
1717
1779
|
);
|
|
1718
1780
|
}
|
|
1719
|
-
function
|
|
1720
|
-
return (
|
|
1721
|
-
appId,
|
|
1722
|
-
options,
|
|
1781
|
+
function getActionsQuotaInfo3(httpClient) {
|
|
1782
|
+
return () => getActionsQuotaInfo2(
|
|
1723
1783
|
// @ts-ignore
|
|
1724
1784
|
{ httpClient }
|
|
1725
1785
|
);
|
|
1726
1786
|
}
|
|
1727
|
-
function
|
|
1728
|
-
return (
|
|
1729
|
-
|
|
1787
|
+
function generateActionInputMappingFromTemplate3(httpClient) {
|
|
1788
|
+
return (appId, options) => generateActionInputMappingFromTemplate2(
|
|
1789
|
+
appId,
|
|
1730
1790
|
options,
|
|
1731
1791
|
// @ts-ignore
|
|
1732
1792
|
{ httpClient }
|
|
@@ -1806,6 +1866,7 @@ function customQueryAutomations(httpClient) {
|
|
|
1806
1866
|
}
|
|
1807
1867
|
return overloadedQuery;
|
|
1808
1868
|
}
|
|
1869
|
+
var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
|
|
1809
1870
|
var createAutomation4 = /* @__PURE__ */ createRESTModule(createAutomation3);
|
|
1810
1871
|
var getAutomation4 = /* @__PURE__ */ createRESTModule(getAutomation3);
|
|
1811
1872
|
var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
|
|
@@ -1824,10 +1885,10 @@ var deleteDraftAutomation4 = /* @__PURE__ */ createRESTModule(deleteDraftAutomat
|
|
|
1824
1885
|
var publishDraftAutomation4 = /* @__PURE__ */ createRESTModule(publishDraftAutomation3);
|
|
1825
1886
|
var validateAutomation4 = /* @__PURE__ */ createRESTModule(validateAutomation3);
|
|
1826
1887
|
var validateAutomationById4 = /* @__PURE__ */ createRESTModule(validateAutomationById3);
|
|
1888
|
+
var getActionsQuotaInfo4 = /* @__PURE__ */ createRESTModule(getActionsQuotaInfo3);
|
|
1827
1889
|
var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ createRESTModule(
|
|
1828
1890
|
generateActionInputMappingFromTemplate3
|
|
1829
1891
|
);
|
|
1830
|
-
var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
|
|
1831
1892
|
var queryAutomations4 = /* @__PURE__ */ createRESTModule(customQueryAutomations);
|
|
1832
1893
|
var onAutomationCreated2 = createEventModule(
|
|
1833
1894
|
onAutomationCreated
|
|
@@ -1871,6 +1932,7 @@ export {
|
|
|
1871
1932
|
deleteDraftAutomation4 as deleteDraftAutomation,
|
|
1872
1933
|
generateActionInputMappingFromTemplate4 as generateActionInputMappingFromTemplate,
|
|
1873
1934
|
generatePreinstalledAutomation4 as generatePreinstalledAutomation,
|
|
1935
|
+
getActionsQuotaInfo4 as getActionsQuotaInfo,
|
|
1874
1936
|
getAggregatedUsageInfo4 as getAggregatedUsageInfo,
|
|
1875
1937
|
getAutomation4 as getAutomation,
|
|
1876
1938
|
getAutomationRevision4 as getAutomationRevision,
|