@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.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, 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,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 };
|
|
@@ -52,6 +52,7 @@ __export(index_exports, {
|
|
|
52
52
|
deleteDraftAutomation: () => deleteDraftAutomation4,
|
|
53
53
|
generateActionInputMappingFromTemplate: () => generateActionInputMappingFromTemplate4,
|
|
54
54
|
generatePreinstalledAutomation: () => generatePreinstalledAutomation4,
|
|
55
|
+
getActionsQuotaInfo: () => getActionsQuotaInfo4,
|
|
55
56
|
getAggregatedUsageInfo: () => getAggregatedUsageInfo4,
|
|
56
57
|
getAutomation: () => getAutomation4,
|
|
57
58
|
getAutomationRevision: () => getAutomationRevision4,
|
|
@@ -88,7 +89,7 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
88
89
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
89
90
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
90
91
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
91
|
-
function
|
|
92
|
+
function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
92
93
|
const domainToMappings = {
|
|
93
94
|
"manage._base_domain_": [
|
|
94
95
|
{
|
|
@@ -127,7 +128,7 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
|
127
128
|
};
|
|
128
129
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
131
132
|
const domainToMappings = {
|
|
132
133
|
"manage._base_domain_": [
|
|
133
134
|
{
|
|
@@ -167,6 +168,38 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
|
167
168
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
168
169
|
}
|
|
169
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
|
+
}
|
|
170
203
|
function createAutomation(payload) {
|
|
171
204
|
function __createAutomation({ host }) {
|
|
172
205
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -783,58 +816,57 @@ function validateAutomationById(payload) {
|
|
|
783
816
|
}
|
|
784
817
|
return __validateAutomationById;
|
|
785
818
|
}
|
|
786
|
-
function
|
|
787
|
-
function
|
|
819
|
+
function getActionsQuotaInfo(payload) {
|
|
820
|
+
function __getActionsQuotaInfo({ host }) {
|
|
788
821
|
const metadata = {
|
|
789
822
|
entityFqdn: "wix.automations.v2.automation",
|
|
790
|
-
method: "
|
|
791
|
-
methodFqn: "wix.automations.v2.AutomationsService.
|
|
823
|
+
method: "GET",
|
|
824
|
+
methodFqn: "wix.automations.v2.AutomationsService.GetActionsQuotaInfo",
|
|
792
825
|
packageName: PACKAGE_NAME,
|
|
793
826
|
migrationOptions: {
|
|
794
827
|
optInTransformResponse: true
|
|
795
828
|
},
|
|
796
829
|
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
797
|
-
protoPath: "/v2/automations/actions/
|
|
830
|
+
protoPath: "/v2/automations/actions/quota",
|
|
798
831
|
data: payload,
|
|
799
832
|
host
|
|
800
833
|
}),
|
|
801
|
-
|
|
834
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
835
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
836
|
+
{
|
|
837
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
838
|
+
paths: [
|
|
839
|
+
{
|
|
840
|
+
path: "actionProviderQuotaInfo.actionQuotaInfo.quotaInfo.quotas.renewalDate"
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
}
|
|
844
|
+
])
|
|
802
845
|
};
|
|
803
846
|
return metadata;
|
|
804
847
|
}
|
|
805
|
-
return
|
|
848
|
+
return __getActionsQuotaInfo;
|
|
806
849
|
}
|
|
807
|
-
function
|
|
808
|
-
function
|
|
850
|
+
function generateActionInputMappingFromTemplate(payload) {
|
|
851
|
+
function __generateActionInputMappingFromTemplate({ host }) {
|
|
809
852
|
const metadata = {
|
|
810
853
|
entityFqdn: "wix.automations.v2.automation",
|
|
811
|
-
method: "
|
|
812
|
-
methodFqn: "wix.automations.v2.
|
|
854
|
+
method: "POST",
|
|
855
|
+
methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
|
|
813
856
|
packageName: PACKAGE_NAME,
|
|
814
857
|
migrationOptions: {
|
|
815
858
|
optInTransformResponse: true
|
|
816
859
|
},
|
|
817
|
-
url:
|
|
818
|
-
protoPath: "/
|
|
860
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
861
|
+
protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
819
862
|
data: payload,
|
|
820
863
|
host
|
|
821
864
|
}),
|
|
822
|
-
|
|
823
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
824
|
-
{
|
|
825
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
826
|
-
paths: [
|
|
827
|
-
{ path: "automation.createdDate" },
|
|
828
|
-
{ path: "automation.updatedDate" },
|
|
829
|
-
{ path: "automation.draftUpdatedDate" },
|
|
830
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
831
|
-
]
|
|
832
|
-
}
|
|
833
|
-
])
|
|
865
|
+
data: payload
|
|
834
866
|
};
|
|
835
867
|
return metadata;
|
|
836
868
|
}
|
|
837
|
-
return
|
|
869
|
+
return __generateActionInputMappingFromTemplate;
|
|
838
870
|
}
|
|
839
871
|
|
|
840
872
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
@@ -1030,6 +1062,37 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
1030
1062
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
1031
1063
|
return AutomationErrorType2;
|
|
1032
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
|
+
}
|
|
1033
1096
|
async function createAutomation2(automation) {
|
|
1034
1097
|
const { httpClient, sideEffects } = arguments[1];
|
|
1035
1098
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1572,16 +1635,10 @@ async function validateAutomationById2(automationId, options) {
|
|
|
1572
1635
|
throw transformedError;
|
|
1573
1636
|
}
|
|
1574
1637
|
}
|
|
1575
|
-
async function
|
|
1576
|
-
const { httpClient, sideEffects } = arguments[
|
|
1577
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1578
|
-
|
|
1579
|
-
actionKey: options?.actionKey,
|
|
1580
|
-
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1581
|
-
});
|
|
1582
|
-
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1583
|
-
payload
|
|
1584
|
-
);
|
|
1638
|
+
async function getActionsQuotaInfo2() {
|
|
1639
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
1640
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
1641
|
+
const reqOpts = getActionsQuotaInfo(payload);
|
|
1585
1642
|
sideEffects?.onSiteCall?.();
|
|
1586
1643
|
try {
|
|
1587
1644
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1592,27 +1649,25 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1592
1649
|
err,
|
|
1593
1650
|
{
|
|
1594
1651
|
spreadPathsToArguments: {},
|
|
1595
|
-
explicitPathsToArguments: {
|
|
1596
|
-
appId: "$[0]",
|
|
1597
|
-
actionKey: "$[1].actionKey",
|
|
1598
|
-
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1599
|
-
},
|
|
1652
|
+
explicitPathsToArguments: {},
|
|
1600
1653
|
singleArgumentUnchanged: false
|
|
1601
1654
|
},
|
|
1602
|
-
[
|
|
1655
|
+
[]
|
|
1603
1656
|
);
|
|
1604
1657
|
sideEffects?.onError?.(err);
|
|
1605
1658
|
throw transformedError;
|
|
1606
1659
|
}
|
|
1607
1660
|
}
|
|
1608
|
-
async function
|
|
1661
|
+
async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
1609
1662
|
const { httpClient, sideEffects } = arguments[2];
|
|
1610
1663
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1664
|
+
appId,
|
|
1665
|
+
actionKey: options?.actionKey,
|
|
1666
|
+
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1614
1667
|
});
|
|
1615
|
-
const reqOpts =
|
|
1668
|
+
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1669
|
+
payload
|
|
1670
|
+
);
|
|
1616
1671
|
sideEffects?.onSiteCall?.();
|
|
1617
1672
|
try {
|
|
1618
1673
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1624,13 +1679,13 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1624
1679
|
{
|
|
1625
1680
|
spreadPathsToArguments: {},
|
|
1626
1681
|
explicitPathsToArguments: {
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1682
|
+
appId: "$[0]",
|
|
1683
|
+
actionKey: "$[1].actionKey",
|
|
1684
|
+
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1630
1685
|
},
|
|
1631
1686
|
singleArgumentUnchanged: false
|
|
1632
1687
|
},
|
|
1633
|
-
["
|
|
1688
|
+
["appId", "options"]
|
|
1634
1689
|
);
|
|
1635
1690
|
sideEffects?.onError?.(err);
|
|
1636
1691
|
throw transformedError;
|
|
@@ -1638,6 +1693,14 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1638
1693
|
}
|
|
1639
1694
|
|
|
1640
1695
|
// src/automations-v2-automation-automations-v-2.public.ts
|
|
1696
|
+
function getAutomationRevision3(httpClient) {
|
|
1697
|
+
return (automationId, options) => getAutomationRevision2(
|
|
1698
|
+
automationId,
|
|
1699
|
+
options,
|
|
1700
|
+
// @ts-ignore
|
|
1701
|
+
{ httpClient }
|
|
1702
|
+
);
|
|
1703
|
+
}
|
|
1641
1704
|
function createAutomation3(httpClient) {
|
|
1642
1705
|
return (automation) => createAutomation2(
|
|
1643
1706
|
automation,
|
|
@@ -1785,17 +1848,15 @@ function validateAutomationById3(httpClient) {
|
|
|
1785
1848
|
{ httpClient }
|
|
1786
1849
|
);
|
|
1787
1850
|
}
|
|
1788
|
-
function
|
|
1789
|
-
return (
|
|
1790
|
-
appId,
|
|
1791
|
-
options,
|
|
1851
|
+
function getActionsQuotaInfo3(httpClient) {
|
|
1852
|
+
return () => getActionsQuotaInfo2(
|
|
1792
1853
|
// @ts-ignore
|
|
1793
1854
|
{ httpClient }
|
|
1794
1855
|
);
|
|
1795
1856
|
}
|
|
1796
|
-
function
|
|
1797
|
-
return (
|
|
1798
|
-
|
|
1857
|
+
function generateActionInputMappingFromTemplate3(httpClient) {
|
|
1858
|
+
return (appId, options) => generateActionInputMappingFromTemplate2(
|
|
1859
|
+
appId,
|
|
1799
1860
|
options,
|
|
1800
1861
|
// @ts-ignore
|
|
1801
1862
|
{ httpClient }
|
|
@@ -1875,6 +1936,7 @@ function customQueryAutomations(httpClient) {
|
|
|
1875
1936
|
}
|
|
1876
1937
|
return overloadedQuery;
|
|
1877
1938
|
}
|
|
1939
|
+
var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
|
|
1878
1940
|
var createAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createAutomation3);
|
|
1879
1941
|
var getAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomation3);
|
|
1880
1942
|
var updateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateAutomation3);
|
|
@@ -1893,10 +1955,10 @@ var deleteDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createREST
|
|
|
1893
1955
|
var publishDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishDraftAutomation3);
|
|
1894
1956
|
var validateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateAutomation3);
|
|
1895
1957
|
var validateAutomationById4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateAutomationById3);
|
|
1958
|
+
var getActionsQuotaInfo4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getActionsQuotaInfo3);
|
|
1896
1959
|
var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
|
|
1897
1960
|
generateActionInputMappingFromTemplate3
|
|
1898
1961
|
);
|
|
1899
|
-
var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
|
|
1900
1962
|
var queryAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryAutomations);
|
|
1901
1963
|
var onAutomationCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
1902
1964
|
onAutomationCreated
|
|
@@ -1941,6 +2003,7 @@ var onAutomationUpdated2 = (0, import_event_definition_modules.createEventModule
|
|
|
1941
2003
|
deleteDraftAutomation,
|
|
1942
2004
|
generateActionInputMappingFromTemplate,
|
|
1943
2005
|
generatePreinstalledAutomation,
|
|
2006
|
+
getActionsQuotaInfo,
|
|
1944
2007
|
getAggregatedUsageInfo,
|
|
1945
2008
|
getAutomation,
|
|
1946
2009
|
getAutomationRevision,
|