@wix/auto_sdk_automations_automations-v-2 1.0.81 → 1.0.83
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 +23 -6
- package/build/cjs/index.js +137 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +72 -8
- package/build/cjs/index.typings.js +118 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +26 -5
- package/build/cjs/meta.js +97 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +23 -6
- package/build/es/index.mjs +135 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +72 -8
- package/build/es/index.typings.mjs +116 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +26 -5
- package/build/es/meta.mjs +95 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +23 -6
- package/build/internal/cjs/index.js +137 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +72 -8
- package/build/internal/cjs/index.typings.js +118 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +26 -5
- package/build/internal/cjs/meta.js +97 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +23 -6
- package/build/internal/es/index.mjs +135 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +72 -8
- package/build/internal/es/index.typings.mjs +116 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +26 -5
- package/build/internal/es/meta.mjs +95 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Automation, UpdateAutomation, BulkDeleteAutomationsResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, 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, 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,
|
|
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, GetAutomationRevisionOptions, GetAutomationRevisionResponse, 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
5
|
declare function createAutomation$1(httpClient: HttpClient): CreateAutomationSignature;
|
|
6
6
|
interface CreateAutomationSignature {
|
|
@@ -59,6 +59,15 @@ interface GeneratePreinstalledAutomationSignature {
|
|
|
59
59
|
*/
|
|
60
60
|
(automation: Automation, options?: GeneratePreinstalledAutomationOptions): Promise<NonNullablePaths<GeneratePreinstalledAutomationResponse, `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>>;
|
|
61
61
|
}
|
|
62
|
+
declare function queryPreinstalledAutomationsForApp$1(httpClient: HttpClient): QueryPreinstalledAutomationsForAppSignature;
|
|
63
|
+
interface QueryPreinstalledAutomationsForAppSignature {
|
|
64
|
+
/**
|
|
65
|
+
* Allows an app to query its preinstalled automations.
|
|
66
|
+
*
|
|
67
|
+
* > **Note**: You must have an account permission to edit an app.
|
|
68
|
+
*/
|
|
69
|
+
(options?: QueryPreinstalledAutomationsForAppOptions): Promise<NonNullablePaths<QueryPreinstalledAutomationsForAppResponse, `automations` | `automations.${number}.applicationInfo.appId` | `automations.${number}.preinstalledInfo.appId` | `automations.${number}.createdBy.userId` | `automations.${number}.createdBy.appId` | `automations.${number}.name` | `automations.${number}.configuration.status` | `automations.${number}.configuration.trigger.appId` | `automations.${number}.configuration.trigger.triggerKey` | `automations.${number}.origin` | `automations.${number}.settings.hidden` | `automations.${number}.settings.readonly` | `automations.${number}.settings.disableDelete` | `automations.${number}.settings.disableStatusChange` | `automations.${number}.archived`, 6>>;
|
|
70
|
+
}
|
|
62
71
|
declare function getAggregatedUsageInfo$1(httpClient: HttpClient): GetAggregatedUsageInfoSignature;
|
|
63
72
|
interface GetAggregatedUsageInfoSignature {
|
|
64
73
|
/**
|
|
@@ -151,9 +160,7 @@ interface ValidateAutomationSignature {
|
|
|
151
160
|
*
|
|
152
161
|
* - Validates that the [trigger is properly configured](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/configure-your-automation#configuring-the-trigger).
|
|
153
162
|
* - Validates that all [actions are properly configured](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/configure-your-automation#configuring-actions) with correct [input](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions#understanding-input-mapping) and other mappings.
|
|
154
|
-
* - Validates custom logic added by [trigger](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action providers](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration).
|
|
155
|
-
*
|
|
156
|
-
* > **Note**: This method identifies configuration errors but doesn't fix them. It does not modify the automation.
|
|
163
|
+
* - Validates custom logic added by [trigger providers](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action providers](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration).
|
|
157
164
|
* @param - Automation to validate.
|
|
158
165
|
*/
|
|
159
166
|
(automation: Automation, options?: ValidateAutomationOptions): Promise<NonNullablePaths<ValidateAutomationResponse, `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>>;
|
|
@@ -166,6 +173,14 @@ interface ValidateAutomationByIdSignature {
|
|
|
166
173
|
*/
|
|
167
174
|
(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>>;
|
|
168
175
|
}
|
|
176
|
+
declare function generateActionInputMappingFromTemplate$1(httpClient: HttpClient): GenerateActionInputMappingFromTemplateSignature;
|
|
177
|
+
interface GenerateActionInputMappingFromTemplateSignature {
|
|
178
|
+
/**
|
|
179
|
+
* Generates action input mapping from a template.
|
|
180
|
+
* @param - Action app ID.
|
|
181
|
+
*/
|
|
182
|
+
(appId: string, options: NonNullablePaths<GenerateActionInputMappingFromTemplateOptions, `actionInputMappingTemplate` | `actionKey`, 2>): Promise<GenerateActionInputMappingFromTemplateResponse>;
|
|
183
|
+
}
|
|
169
184
|
declare function getAutomationRevision$1(httpClient: HttpClient): GetAutomationRevisionSignature;
|
|
170
185
|
interface GetAutomationRevisionSignature {
|
|
171
186
|
/**
|
|
@@ -188,6 +203,7 @@ declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAuto
|
|
|
188
203
|
declare const deleteAutomation: MaybeContext<BuildRESTFunction<typeof deleteAutomation$1> & typeof deleteAutomation$1>;
|
|
189
204
|
declare const bulkDeleteAutomations: MaybeContext<BuildRESTFunction<typeof bulkDeleteAutomations$1> & typeof bulkDeleteAutomations$1>;
|
|
190
205
|
declare const generatePreinstalledAutomation: MaybeContext<BuildRESTFunction<typeof generatePreinstalledAutomation$1> & typeof generatePreinstalledAutomation$1>;
|
|
206
|
+
declare const queryPreinstalledAutomationsForApp: MaybeContext<BuildRESTFunction<typeof queryPreinstalledAutomationsForApp$1> & typeof queryPreinstalledAutomationsForApp$1>;
|
|
191
207
|
declare const getAggregatedUsageInfo: MaybeContext<BuildRESTFunction<typeof getAggregatedUsageInfo$1> & typeof getAggregatedUsageInfo$1>;
|
|
192
208
|
declare const copyAutomation: MaybeContext<BuildRESTFunction<typeof copyAutomation$1> & typeof copyAutomation$1>;
|
|
193
209
|
declare const createDraftAutomation: MaybeContext<BuildRESTFunction<typeof createDraftAutomation$1> & typeof createDraftAutomation$1>;
|
|
@@ -199,6 +215,7 @@ declare const deleteDraftAutomation: MaybeContext<BuildRESTFunction<typeof delet
|
|
|
199
215
|
declare const publishDraftAutomation: MaybeContext<BuildRESTFunction<typeof publishDraftAutomation$1> & typeof publishDraftAutomation$1>;
|
|
200
216
|
declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validateAutomation$1> & typeof validateAutomation$1>;
|
|
201
217
|
declare const validateAutomationById: MaybeContext<BuildRESTFunction<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
|
|
218
|
+
declare const generateActionInputMappingFromTemplate: MaybeContext<BuildRESTFunction<typeof generateActionInputMappingFromTemplate$1> & typeof generateActionInputMappingFromTemplate$1>;
|
|
202
219
|
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
203
220
|
declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof customQueryAutomations> & typeof customQueryAutomations>;
|
|
204
221
|
/**
|
|
@@ -214,4 +231,4 @@ declare const onAutomationDeleted: BuildEventDefinition<typeof onAutomationDelet
|
|
|
214
231
|
*/
|
|
215
232
|
declare const onAutomationUpdated: BuildEventDefinition<typeof onAutomationUpdated$1> & typeof onAutomationUpdated$1;
|
|
216
233
|
|
|
217
|
-
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, 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, 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
|
@@ -305,6 +305,38 @@ function generatePreinstalledAutomation(payload) {
|
|
|
305
305
|
}
|
|
306
306
|
return __generatePreinstalledAutomation;
|
|
307
307
|
}
|
|
308
|
+
function queryPreinstalledAutomationsForApp(payload) {
|
|
309
|
+
function __queryPreinstalledAutomationsForApp({ host }) {
|
|
310
|
+
const metadata = {
|
|
311
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
312
|
+
method: "POST",
|
|
313
|
+
methodFqn: "wix.automations.v2.AutomationsService.QueryPreinstalledAutomationsForApp",
|
|
314
|
+
packageName: PACKAGE_NAME,
|
|
315
|
+
migrationOptions: {
|
|
316
|
+
optInTransformResponse: true
|
|
317
|
+
},
|
|
318
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
319
|
+
protoPath: "/v2/preinstalled-automations/query",
|
|
320
|
+
data: payload,
|
|
321
|
+
host
|
|
322
|
+
}),
|
|
323
|
+
data: payload,
|
|
324
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
325
|
+
{
|
|
326
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
327
|
+
paths: [
|
|
328
|
+
{ path: "automations.createdDate" },
|
|
329
|
+
{ path: "automations.updatedDate" },
|
|
330
|
+
{ path: "automations.draftUpdatedDate" },
|
|
331
|
+
{ path: "automations.autoArchivePolicy.archiveDate" }
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
])
|
|
335
|
+
};
|
|
336
|
+
return metadata;
|
|
337
|
+
}
|
|
338
|
+
return __queryPreinstalledAutomationsForApp;
|
|
339
|
+
}
|
|
308
340
|
function queryAutomations(payload) {
|
|
309
341
|
function __queryAutomations({ host }) {
|
|
310
342
|
const metadata = {
|
|
@@ -682,6 +714,27 @@ function validateAutomationById(payload) {
|
|
|
682
714
|
}
|
|
683
715
|
return __validateAutomationById;
|
|
684
716
|
}
|
|
717
|
+
function generateActionInputMappingFromTemplate(payload) {
|
|
718
|
+
function __generateActionInputMappingFromTemplate({ host }) {
|
|
719
|
+
const metadata = {
|
|
720
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
721
|
+
method: "POST",
|
|
722
|
+
methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
|
|
723
|
+
packageName: PACKAGE_NAME,
|
|
724
|
+
migrationOptions: {
|
|
725
|
+
optInTransformResponse: true
|
|
726
|
+
},
|
|
727
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
728
|
+
protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
729
|
+
data: payload,
|
|
730
|
+
host
|
|
731
|
+
}),
|
|
732
|
+
data: payload
|
|
733
|
+
};
|
|
734
|
+
return metadata;
|
|
735
|
+
}
|
|
736
|
+
return __generateActionInputMappingFromTemplate;
|
|
737
|
+
}
|
|
685
738
|
function getAutomationRevision(payload) {
|
|
686
739
|
function __getAutomationRevision({ host }) {
|
|
687
740
|
const metadata = {
|
|
@@ -1059,6 +1112,34 @@ async function generatePreinstalledAutomation2(automation, options) {
|
|
|
1059
1112
|
throw transformedError;
|
|
1060
1113
|
}
|
|
1061
1114
|
}
|
|
1115
|
+
async function queryPreinstalledAutomationsForApp2(options) {
|
|
1116
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1117
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1118
|
+
query: options?.query,
|
|
1119
|
+
appId: options?.appId
|
|
1120
|
+
});
|
|
1121
|
+
const reqOpts = queryPreinstalledAutomationsForApp(
|
|
1122
|
+
payload
|
|
1123
|
+
);
|
|
1124
|
+
sideEffects?.onSiteCall?.();
|
|
1125
|
+
try {
|
|
1126
|
+
const result = await httpClient.request(reqOpts);
|
|
1127
|
+
sideEffects?.onSuccess?.(result);
|
|
1128
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1129
|
+
} catch (err) {
|
|
1130
|
+
const transformedError = sdkTransformError(
|
|
1131
|
+
err,
|
|
1132
|
+
{
|
|
1133
|
+
spreadPathsToArguments: {},
|
|
1134
|
+
explicitPathsToArguments: { query: "$[0].query", appId: "$[0].appId" },
|
|
1135
|
+
singleArgumentUnchanged: false
|
|
1136
|
+
},
|
|
1137
|
+
["options"]
|
|
1138
|
+
);
|
|
1139
|
+
sideEffects?.onError?.(err);
|
|
1140
|
+
throw transformedError;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1062
1143
|
function queryAutomations2(options) {
|
|
1063
1144
|
const { httpClient, sideEffects } = arguments[1];
|
|
1064
1145
|
return queryBuilder({
|
|
@@ -1421,6 +1502,39 @@ async function validateAutomationById2(automationId, options) {
|
|
|
1421
1502
|
throw transformedError;
|
|
1422
1503
|
}
|
|
1423
1504
|
}
|
|
1505
|
+
async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
1506
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1507
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1508
|
+
appId,
|
|
1509
|
+
actionKey: options?.actionKey,
|
|
1510
|
+
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1511
|
+
});
|
|
1512
|
+
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1513
|
+
payload
|
|
1514
|
+
);
|
|
1515
|
+
sideEffects?.onSiteCall?.();
|
|
1516
|
+
try {
|
|
1517
|
+
const result = await httpClient.request(reqOpts);
|
|
1518
|
+
sideEffects?.onSuccess?.(result);
|
|
1519
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1520
|
+
} catch (err) {
|
|
1521
|
+
const transformedError = sdkTransformError(
|
|
1522
|
+
err,
|
|
1523
|
+
{
|
|
1524
|
+
spreadPathsToArguments: {},
|
|
1525
|
+
explicitPathsToArguments: {
|
|
1526
|
+
appId: "$[0]",
|
|
1527
|
+
actionKey: "$[1].actionKey",
|
|
1528
|
+
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1529
|
+
},
|
|
1530
|
+
singleArgumentUnchanged: false
|
|
1531
|
+
},
|
|
1532
|
+
["appId", "options"]
|
|
1533
|
+
);
|
|
1534
|
+
sideEffects?.onError?.(err);
|
|
1535
|
+
throw transformedError;
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1424
1538
|
async function getAutomationRevision2(automationId, options) {
|
|
1425
1539
|
const { httpClient, sideEffects } = arguments[2];
|
|
1426
1540
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1498,6 +1612,13 @@ function generatePreinstalledAutomation3(httpClient) {
|
|
|
1498
1612
|
{ httpClient }
|
|
1499
1613
|
);
|
|
1500
1614
|
}
|
|
1615
|
+
function queryPreinstalledAutomationsForApp3(httpClient) {
|
|
1616
|
+
return (options) => queryPreinstalledAutomationsForApp2(
|
|
1617
|
+
options,
|
|
1618
|
+
// @ts-ignore
|
|
1619
|
+
{ httpClient }
|
|
1620
|
+
);
|
|
1621
|
+
}
|
|
1501
1622
|
function queryAutomations3(httpClient) {
|
|
1502
1623
|
return (options) => queryAutomations2(
|
|
1503
1624
|
options,
|
|
@@ -1594,6 +1715,14 @@ function validateAutomationById3(httpClient) {
|
|
|
1594
1715
|
{ httpClient }
|
|
1595
1716
|
);
|
|
1596
1717
|
}
|
|
1718
|
+
function generateActionInputMappingFromTemplate3(httpClient) {
|
|
1719
|
+
return (appId, options) => generateActionInputMappingFromTemplate2(
|
|
1720
|
+
appId,
|
|
1721
|
+
options,
|
|
1722
|
+
// @ts-ignore
|
|
1723
|
+
{ httpClient }
|
|
1724
|
+
);
|
|
1725
|
+
}
|
|
1597
1726
|
function getAutomationRevision3(httpClient) {
|
|
1598
1727
|
return (automationId, options) => getAutomationRevision2(
|
|
1599
1728
|
automationId,
|
|
@@ -1682,6 +1811,7 @@ var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
|
|
|
1682
1811
|
var deleteAutomation4 = /* @__PURE__ */ createRESTModule(deleteAutomation3);
|
|
1683
1812
|
var bulkDeleteAutomations4 = /* @__PURE__ */ createRESTModule(bulkDeleteAutomations3);
|
|
1684
1813
|
var generatePreinstalledAutomation4 = /* @__PURE__ */ createRESTModule(generatePreinstalledAutomation3);
|
|
1814
|
+
var queryPreinstalledAutomationsForApp4 = /* @__PURE__ */ createRESTModule(queryPreinstalledAutomationsForApp3);
|
|
1685
1815
|
var getAggregatedUsageInfo4 = /* @__PURE__ */ createRESTModule(getAggregatedUsageInfo3);
|
|
1686
1816
|
var copyAutomation4 = /* @__PURE__ */ createRESTModule(copyAutomation3);
|
|
1687
1817
|
var createDraftAutomation4 = /* @__PURE__ */ createRESTModule(createDraftAutomation3);
|
|
@@ -1693,6 +1823,9 @@ var deleteDraftAutomation4 = /* @__PURE__ */ createRESTModule(deleteDraftAutomat
|
|
|
1693
1823
|
var publishDraftAutomation4 = /* @__PURE__ */ createRESTModule(publishDraftAutomation3);
|
|
1694
1824
|
var validateAutomation4 = /* @__PURE__ */ createRESTModule(validateAutomation3);
|
|
1695
1825
|
var validateAutomationById4 = /* @__PURE__ */ createRESTModule(validateAutomationById3);
|
|
1826
|
+
var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ createRESTModule(
|
|
1827
|
+
generateActionInputMappingFromTemplate3
|
|
1828
|
+
);
|
|
1696
1829
|
var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
|
|
1697
1830
|
var queryAutomations4 = /* @__PURE__ */ createRESTModule(customQueryAutomations);
|
|
1698
1831
|
var onAutomationCreated2 = createEventModule(
|
|
@@ -1735,6 +1868,7 @@ export {
|
|
|
1735
1868
|
createDraftAutomation4 as createDraftAutomation,
|
|
1736
1869
|
deleteAutomation4 as deleteAutomation,
|
|
1737
1870
|
deleteDraftAutomation4 as deleteDraftAutomation,
|
|
1871
|
+
generateActionInputMappingFromTemplate4 as generateActionInputMappingFromTemplate,
|
|
1738
1872
|
generatePreinstalledAutomation4 as generatePreinstalledAutomation,
|
|
1739
1873
|
getAggregatedUsageInfo4 as getAggregatedUsageInfo,
|
|
1740
1874
|
getAutomation4 as getAutomation,
|
|
@@ -1746,6 +1880,7 @@ export {
|
|
|
1746
1880
|
publishDraftAutomation4 as publishDraftAutomation,
|
|
1747
1881
|
queryAutomations4 as queryAutomations,
|
|
1748
1882
|
queryAutomationsWithDrafts4 as queryAutomationsWithDrafts,
|
|
1883
|
+
queryPreinstalledAutomationsForApp4 as queryPreinstalledAutomationsForApp,
|
|
1749
1884
|
updateAutomation4 as updateAutomation,
|
|
1750
1885
|
updateDraftAutomation4 as updateDraftAutomation,
|
|
1751
1886
|
validateAutomation4 as validateAutomation,
|