@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
package/build/es/index.d.mts
CHANGED
|
@@ -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.mjs';
|
|
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.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, GetActionsQuotaInfoResponse, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeOverridePreinstalledWithRuntimeVersionRequest, MergeOverridePreinstalledWithRuntimeVersionResponse, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigrateVeloActionAutomationsRequest, MigrateVeloActionAutomationsResponse, Namespace, NamespaceChanged, NamespaceWithLiterals, Note, Notes, OdeditorAssigned, OdeditorUnassigned, Offset, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, Position, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryDraftAutomationsRequest, QueryDraftAutomationsResponse, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsRequest, QueryPreinstalledAutomationsResponse, Quota, QuotaInfo, RateLimit, RateLimitAction, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, ServiceProvisioned, ServiceRemoved, SetVariablesAction, Severity, SeverityWithLiterals, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SplitAction, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpdatePreinstalledAutomationResponse, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.mjs';
|
|
4
4
|
|
|
5
|
+
declare function getAutomationRevision$1(httpClient: HttpClient): GetAutomationRevisionSignature;
|
|
6
|
+
interface GetAutomationRevisionSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Gets the specified automation revision.
|
|
9
|
+
* @param - Automation ID.
|
|
10
|
+
*/
|
|
11
|
+
(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, `automation.applicationInfo.appId` | `automation.preinstalledInfo.appId` | `automation.createdBy.userId` | `automation.createdBy.appId` | `automation.name` | `automation.configuration.status` | `automation.configuration.trigger.appId` | `automation.configuration.trigger.triggerKey` | `automation.configuration.trigger.filters` | `automation.configuration.trigger.filters.${number}._id` | `automation.configuration.trigger.filters.${number}.fieldKey` | `automation.configuration.trigger.filters.${number}.filterExpression` | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `automation.configuration.trigger.rateLimit.maxActivationsExpression` | `automation.configuration.trigger.rateLimit.durationTimeUnit` | `automation.configuration.rootActionIds` | `automation.origin` | `automation.settings.hidden` | `automation.settings.readonly` | `automation.settings.disableDelete` | `automation.settings.disableStatusChange` | `automation.settings.actionSettings.permanentActionIds` | `automation.settings.actionSettings.readonlyActionIds` | `automation.archived`, 7>>;
|
|
12
|
+
}
|
|
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 };
|
package/build/es/index.mjs
CHANGED
|
@@ -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,37 +746,26 @@ function validateAutomationById(payload) {
|
|
|
714
746
|
}
|
|
715
747
|
return __validateAutomationById;
|
|
716
748
|
}
|
|
717
|
-
function
|
|
718
|
-
function
|
|
749
|
+
function generateActionInputMappingFromTemplate(payload) {
|
|
750
|
+
function __generateActionInputMappingFromTemplate({ host }) {
|
|
719
751
|
const metadata = {
|
|
720
752
|
entityFqdn: "wix.automations.v2.automation",
|
|
721
|
-
method: "
|
|
722
|
-
methodFqn: "wix.automations.v2.
|
|
753
|
+
method: "POST",
|
|
754
|
+
methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
|
|
723
755
|
packageName: PACKAGE_NAME,
|
|
724
756
|
migrationOptions: {
|
|
725
757
|
optInTransformResponse: true
|
|
726
758
|
},
|
|
727
|
-
url:
|
|
728
|
-
protoPath: "/
|
|
759
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
760
|
+
protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
729
761
|
data: payload,
|
|
730
762
|
host
|
|
731
763
|
}),
|
|
732
|
-
|
|
733
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
734
|
-
{
|
|
735
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
736
|
-
paths: [
|
|
737
|
-
{ path: "automation.createdDate" },
|
|
738
|
-
{ path: "automation.updatedDate" },
|
|
739
|
-
{ path: "automation.draftUpdatedDate" },
|
|
740
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
741
|
-
]
|
|
742
|
-
}
|
|
743
|
-
])
|
|
764
|
+
data: payload
|
|
744
765
|
};
|
|
745
766
|
return metadata;
|
|
746
767
|
}
|
|
747
|
-
return
|
|
768
|
+
return __generateActionInputMappingFromTemplate;
|
|
748
769
|
}
|
|
749
770
|
|
|
750
771
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
@@ -939,6 +960,37 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
939
960
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
940
961
|
return AutomationErrorType2;
|
|
941
962
|
})(AutomationErrorType || {});
|
|
963
|
+
async function getAutomationRevision2(automationId, options) {
|
|
964
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
965
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
966
|
+
automationId,
|
|
967
|
+
revision: options?.revision,
|
|
968
|
+
fields: options?.fields
|
|
969
|
+
});
|
|
970
|
+
const reqOpts = getAutomationRevision(payload);
|
|
971
|
+
sideEffects?.onSiteCall?.();
|
|
972
|
+
try {
|
|
973
|
+
const result = await httpClient.request(reqOpts);
|
|
974
|
+
sideEffects?.onSuccess?.(result);
|
|
975
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
976
|
+
} catch (err) {
|
|
977
|
+
const transformedError = sdkTransformError(
|
|
978
|
+
err,
|
|
979
|
+
{
|
|
980
|
+
spreadPathsToArguments: {},
|
|
981
|
+
explicitPathsToArguments: {
|
|
982
|
+
automationId: "$[0]",
|
|
983
|
+
revision: "$[1].revision",
|
|
984
|
+
fields: "$[1].fields"
|
|
985
|
+
},
|
|
986
|
+
singleArgumentUnchanged: false
|
|
987
|
+
},
|
|
988
|
+
["automationId", "options"]
|
|
989
|
+
);
|
|
990
|
+
sideEffects?.onError?.(err);
|
|
991
|
+
throw transformedError;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
942
994
|
async function createAutomation2(automation) {
|
|
943
995
|
const { httpClient, sideEffects } = arguments[1];
|
|
944
996
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1481,14 +1533,16 @@ async function validateAutomationById2(automationId, options) {
|
|
|
1481
1533
|
throw transformedError;
|
|
1482
1534
|
}
|
|
1483
1535
|
}
|
|
1484
|
-
async function
|
|
1536
|
+
async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
1485
1537
|
const { httpClient, sideEffects } = arguments[2];
|
|
1486
1538
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1539
|
+
appId,
|
|
1540
|
+
actionKey: options?.actionKey,
|
|
1541
|
+
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1490
1542
|
});
|
|
1491
|
-
const reqOpts =
|
|
1543
|
+
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1544
|
+
payload
|
|
1545
|
+
);
|
|
1492
1546
|
sideEffects?.onSiteCall?.();
|
|
1493
1547
|
try {
|
|
1494
1548
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1500,13 +1554,13 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1500
1554
|
{
|
|
1501
1555
|
spreadPathsToArguments: {},
|
|
1502
1556
|
explicitPathsToArguments: {
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1557
|
+
appId: "$[0]",
|
|
1558
|
+
actionKey: "$[1].actionKey",
|
|
1559
|
+
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1506
1560
|
},
|
|
1507
1561
|
singleArgumentUnchanged: false
|
|
1508
1562
|
},
|
|
1509
|
-
["
|
|
1563
|
+
["appId", "options"]
|
|
1510
1564
|
);
|
|
1511
1565
|
sideEffects?.onError?.(err);
|
|
1512
1566
|
throw transformedError;
|
|
@@ -1514,6 +1568,14 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1514
1568
|
}
|
|
1515
1569
|
|
|
1516
1570
|
// src/automations-v2-automation-automations-v-2.public.ts
|
|
1571
|
+
function getAutomationRevision3(httpClient) {
|
|
1572
|
+
return (automationId, options) => getAutomationRevision2(
|
|
1573
|
+
automationId,
|
|
1574
|
+
options,
|
|
1575
|
+
// @ts-ignore
|
|
1576
|
+
{ httpClient }
|
|
1577
|
+
);
|
|
1578
|
+
}
|
|
1517
1579
|
function createAutomation3(httpClient) {
|
|
1518
1580
|
return (automation) => createAutomation2(
|
|
1519
1581
|
automation,
|
|
@@ -1661,9 +1723,9 @@ function validateAutomationById3(httpClient) {
|
|
|
1661
1723
|
{ httpClient }
|
|
1662
1724
|
);
|
|
1663
1725
|
}
|
|
1664
|
-
function
|
|
1665
|
-
return (
|
|
1666
|
-
|
|
1726
|
+
function generateActionInputMappingFromTemplate3(httpClient) {
|
|
1727
|
+
return (appId, options) => generateActionInputMappingFromTemplate2(
|
|
1728
|
+
appId,
|
|
1667
1729
|
options,
|
|
1668
1730
|
// @ts-ignore
|
|
1669
1731
|
{ httpClient }
|
|
@@ -1743,6 +1805,7 @@ function customQueryAutomations(httpClient) {
|
|
|
1743
1805
|
}
|
|
1744
1806
|
return overloadedQuery;
|
|
1745
1807
|
}
|
|
1808
|
+
var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
|
|
1746
1809
|
var createAutomation4 = /* @__PURE__ */ createRESTModule(createAutomation3);
|
|
1747
1810
|
var getAutomation4 = /* @__PURE__ */ createRESTModule(getAutomation3);
|
|
1748
1811
|
var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
|
|
@@ -1761,7 +1824,9 @@ var deleteDraftAutomation4 = /* @__PURE__ */ createRESTModule(deleteDraftAutomat
|
|
|
1761
1824
|
var publishDraftAutomation4 = /* @__PURE__ */ createRESTModule(publishDraftAutomation3);
|
|
1762
1825
|
var validateAutomation4 = /* @__PURE__ */ createRESTModule(validateAutomation3);
|
|
1763
1826
|
var validateAutomationById4 = /* @__PURE__ */ createRESTModule(validateAutomationById3);
|
|
1764
|
-
var
|
|
1827
|
+
var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ createRESTModule(
|
|
1828
|
+
generateActionInputMappingFromTemplate3
|
|
1829
|
+
);
|
|
1765
1830
|
var queryAutomations4 = /* @__PURE__ */ createRESTModule(customQueryAutomations);
|
|
1766
1831
|
var onAutomationCreated2 = createEventModule(
|
|
1767
1832
|
onAutomationCreated
|
|
@@ -1803,6 +1868,7 @@ export {
|
|
|
1803
1868
|
createDraftAutomation4 as createDraftAutomation,
|
|
1804
1869
|
deleteAutomation4 as deleteAutomation,
|
|
1805
1870
|
deleteDraftAutomation4 as deleteDraftAutomation,
|
|
1871
|
+
generateActionInputMappingFromTemplate4 as generateActionInputMappingFromTemplate,
|
|
1806
1872
|
generatePreinstalledAutomation4 as generatePreinstalledAutomation,
|
|
1807
1873
|
getAggregatedUsageInfo4 as getAggregatedUsageInfo,
|
|
1808
1874
|
getAutomation4 as getAutomation,
|