@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/cjs/index.d.ts
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.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, 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.js';
|
|
3
|
+
export { AIMetadata, Action, ActionConfigurationError, ActionErrorType, ActionErrorTypeWithLiterals, ActionEvent, ActionInfoOneOf, ActionProviderQuotaInfo, ActionQuotaInfo, ActionSettings, ActionUsageSummary, ActionValidationError, ActionValidationErrorErrorOneOf, ActionValidationInfo, AdditionalInfo, AppDefinedAction, ApplicationError, ApplicationOrigin, Asset, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, AutomationConfiguration, AutomationConfigurationError, AutomationErrorType, AutomationErrorTypeWithLiterals, AutomationOriginInfoOneOf, AutomationQuerySpec, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, CommonQueryWithEntityContext, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GenerateActionInputMappingFromTemplateRequest, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetActionsQuotaInfoResponse, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeOverridePreinstalledWithRuntimeVersionRequest, MergeOverridePreinstalledWithRuntimeVersionResponse, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigrateVeloActionAutomationsRequest, MigrateVeloActionAutomationsResponse, Namespace, NamespaceChanged, NamespaceWithLiterals, Note, Notes, OdeditorAssigned, OdeditorUnassigned, Offset, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, Position, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryDraftAutomationsRequest, QueryDraftAutomationsResponse, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsRequest, QueryPreinstalledAutomationsResponse, Quota, QuotaInfo, RateLimit, RateLimitAction, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, ServiceProvisioned, ServiceRemoved, SetVariablesAction, Severity, SeverityWithLiterals, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SplitAction, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpdatePreinstalledAutomationResponse, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.js';
|
|
4
4
|
|
|
5
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/cjs/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __export(index_exports, {
|
|
|
50
50
|
createDraftAutomation: () => createDraftAutomation4,
|
|
51
51
|
deleteAutomation: () => deleteAutomation4,
|
|
52
52
|
deleteDraftAutomation: () => deleteDraftAutomation4,
|
|
53
|
+
generateActionInputMappingFromTemplate: () => generateActionInputMappingFromTemplate4,
|
|
53
54
|
generatePreinstalledAutomation: () => generatePreinstalledAutomation4,
|
|
54
55
|
getAggregatedUsageInfo: () => getAggregatedUsageInfo4,
|
|
55
56
|
getAutomation: () => getAutomation4,
|
|
@@ -61,6 +62,7 @@ __export(index_exports, {
|
|
|
61
62
|
publishDraftAutomation: () => publishDraftAutomation4,
|
|
62
63
|
queryAutomations: () => queryAutomations4,
|
|
63
64
|
queryAutomationsWithDrafts: () => queryAutomationsWithDrafts4,
|
|
65
|
+
queryPreinstalledAutomationsForApp: () => queryPreinstalledAutomationsForApp4,
|
|
64
66
|
updateAutomation: () => updateAutomation4,
|
|
65
67
|
updateDraftAutomation: () => updateDraftAutomation4,
|
|
66
68
|
validateAutomation: () => validateAutomation4,
|
|
@@ -372,6 +374,38 @@ function generatePreinstalledAutomation(payload) {
|
|
|
372
374
|
}
|
|
373
375
|
return __generatePreinstalledAutomation;
|
|
374
376
|
}
|
|
377
|
+
function queryPreinstalledAutomationsForApp(payload) {
|
|
378
|
+
function __queryPreinstalledAutomationsForApp({ host }) {
|
|
379
|
+
const metadata = {
|
|
380
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
381
|
+
method: "POST",
|
|
382
|
+
methodFqn: "wix.automations.v2.AutomationsService.QueryPreinstalledAutomationsForApp",
|
|
383
|
+
packageName: PACKAGE_NAME,
|
|
384
|
+
migrationOptions: {
|
|
385
|
+
optInTransformResponse: true
|
|
386
|
+
},
|
|
387
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
388
|
+
protoPath: "/v2/preinstalled-automations/query",
|
|
389
|
+
data: payload,
|
|
390
|
+
host
|
|
391
|
+
}),
|
|
392
|
+
data: payload,
|
|
393
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
394
|
+
{
|
|
395
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
396
|
+
paths: [
|
|
397
|
+
{ path: "automations.createdDate" },
|
|
398
|
+
{ path: "automations.updatedDate" },
|
|
399
|
+
{ path: "automations.draftUpdatedDate" },
|
|
400
|
+
{ path: "automations.autoArchivePolicy.archiveDate" }
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
])
|
|
404
|
+
};
|
|
405
|
+
return metadata;
|
|
406
|
+
}
|
|
407
|
+
return __queryPreinstalledAutomationsForApp;
|
|
408
|
+
}
|
|
375
409
|
function queryAutomations(payload) {
|
|
376
410
|
function __queryAutomations({ host }) {
|
|
377
411
|
const metadata = {
|
|
@@ -749,6 +783,27 @@ function validateAutomationById(payload) {
|
|
|
749
783
|
}
|
|
750
784
|
return __validateAutomationById;
|
|
751
785
|
}
|
|
786
|
+
function generateActionInputMappingFromTemplate(payload) {
|
|
787
|
+
function __generateActionInputMappingFromTemplate({ host }) {
|
|
788
|
+
const metadata = {
|
|
789
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
790
|
+
method: "POST",
|
|
791
|
+
methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
|
|
792
|
+
packageName: PACKAGE_NAME,
|
|
793
|
+
migrationOptions: {
|
|
794
|
+
optInTransformResponse: true
|
|
795
|
+
},
|
|
796
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
797
|
+
protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
798
|
+
data: payload,
|
|
799
|
+
host
|
|
800
|
+
}),
|
|
801
|
+
data: payload
|
|
802
|
+
};
|
|
803
|
+
return metadata;
|
|
804
|
+
}
|
|
805
|
+
return __generateActionInputMappingFromTemplate;
|
|
806
|
+
}
|
|
752
807
|
function getAutomationRevision(payload) {
|
|
753
808
|
function __getAutomationRevision({ host }) {
|
|
754
809
|
const metadata = {
|
|
@@ -1126,6 +1181,34 @@ async function generatePreinstalledAutomation2(automation, options) {
|
|
|
1126
1181
|
throw transformedError;
|
|
1127
1182
|
}
|
|
1128
1183
|
}
|
|
1184
|
+
async function queryPreinstalledAutomationsForApp2(options) {
|
|
1185
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1186
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1187
|
+
query: options?.query,
|
|
1188
|
+
appId: options?.appId
|
|
1189
|
+
});
|
|
1190
|
+
const reqOpts = queryPreinstalledAutomationsForApp(
|
|
1191
|
+
payload
|
|
1192
|
+
);
|
|
1193
|
+
sideEffects?.onSiteCall?.();
|
|
1194
|
+
try {
|
|
1195
|
+
const result = await httpClient.request(reqOpts);
|
|
1196
|
+
sideEffects?.onSuccess?.(result);
|
|
1197
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1198
|
+
} catch (err) {
|
|
1199
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1200
|
+
err,
|
|
1201
|
+
{
|
|
1202
|
+
spreadPathsToArguments: {},
|
|
1203
|
+
explicitPathsToArguments: { query: "$[0].query", appId: "$[0].appId" },
|
|
1204
|
+
singleArgumentUnchanged: false
|
|
1205
|
+
},
|
|
1206
|
+
["options"]
|
|
1207
|
+
);
|
|
1208
|
+
sideEffects?.onError?.(err);
|
|
1209
|
+
throw transformedError;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1129
1212
|
function queryAutomations2(options) {
|
|
1130
1213
|
const { httpClient, sideEffects } = arguments[1];
|
|
1131
1214
|
return (0, import_query_builder.queryBuilder)({
|
|
@@ -1488,6 +1571,39 @@ async function validateAutomationById2(automationId, options) {
|
|
|
1488
1571
|
throw transformedError;
|
|
1489
1572
|
}
|
|
1490
1573
|
}
|
|
1574
|
+
async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
1575
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1576
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1577
|
+
appId,
|
|
1578
|
+
actionKey: options?.actionKey,
|
|
1579
|
+
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1580
|
+
});
|
|
1581
|
+
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1582
|
+
payload
|
|
1583
|
+
);
|
|
1584
|
+
sideEffects?.onSiteCall?.();
|
|
1585
|
+
try {
|
|
1586
|
+
const result = await httpClient.request(reqOpts);
|
|
1587
|
+
sideEffects?.onSuccess?.(result);
|
|
1588
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1589
|
+
} catch (err) {
|
|
1590
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1591
|
+
err,
|
|
1592
|
+
{
|
|
1593
|
+
spreadPathsToArguments: {},
|
|
1594
|
+
explicitPathsToArguments: {
|
|
1595
|
+
appId: "$[0]",
|
|
1596
|
+
actionKey: "$[1].actionKey",
|
|
1597
|
+
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1598
|
+
},
|
|
1599
|
+
singleArgumentUnchanged: false
|
|
1600
|
+
},
|
|
1601
|
+
["appId", "options"]
|
|
1602
|
+
);
|
|
1603
|
+
sideEffects?.onError?.(err);
|
|
1604
|
+
throw transformedError;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1491
1607
|
async function getAutomationRevision2(automationId, options) {
|
|
1492
1608
|
const { httpClient, sideEffects } = arguments[2];
|
|
1493
1609
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1565,6 +1681,13 @@ function generatePreinstalledAutomation3(httpClient) {
|
|
|
1565
1681
|
{ httpClient }
|
|
1566
1682
|
);
|
|
1567
1683
|
}
|
|
1684
|
+
function queryPreinstalledAutomationsForApp3(httpClient) {
|
|
1685
|
+
return (options) => queryPreinstalledAutomationsForApp2(
|
|
1686
|
+
options,
|
|
1687
|
+
// @ts-ignore
|
|
1688
|
+
{ httpClient }
|
|
1689
|
+
);
|
|
1690
|
+
}
|
|
1568
1691
|
function queryAutomations3(httpClient) {
|
|
1569
1692
|
return (options) => queryAutomations2(
|
|
1570
1693
|
options,
|
|
@@ -1661,6 +1784,14 @@ function validateAutomationById3(httpClient) {
|
|
|
1661
1784
|
{ httpClient }
|
|
1662
1785
|
);
|
|
1663
1786
|
}
|
|
1787
|
+
function generateActionInputMappingFromTemplate3(httpClient) {
|
|
1788
|
+
return (appId, options) => generateActionInputMappingFromTemplate2(
|
|
1789
|
+
appId,
|
|
1790
|
+
options,
|
|
1791
|
+
// @ts-ignore
|
|
1792
|
+
{ httpClient }
|
|
1793
|
+
);
|
|
1794
|
+
}
|
|
1664
1795
|
function getAutomationRevision3(httpClient) {
|
|
1665
1796
|
return (automationId, options) => getAutomationRevision2(
|
|
1666
1797
|
automationId,
|
|
@@ -1749,6 +1880,7 @@ var updateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModul
|
|
|
1749
1880
|
var deleteAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteAutomation3);
|
|
1750
1881
|
var bulkDeleteAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteAutomations3);
|
|
1751
1882
|
var generatePreinstalledAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(generatePreinstalledAutomation3);
|
|
1883
|
+
var queryPreinstalledAutomationsForApp4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryPreinstalledAutomationsForApp3);
|
|
1752
1884
|
var getAggregatedUsageInfo4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAggregatedUsageInfo3);
|
|
1753
1885
|
var copyAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(copyAutomation3);
|
|
1754
1886
|
var createDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDraftAutomation3);
|
|
@@ -1760,6 +1892,9 @@ var deleteDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createREST
|
|
|
1760
1892
|
var publishDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishDraftAutomation3);
|
|
1761
1893
|
var validateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateAutomation3);
|
|
1762
1894
|
var validateAutomationById4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateAutomationById3);
|
|
1895
|
+
var generateActionInputMappingFromTemplate4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
|
|
1896
|
+
generateActionInputMappingFromTemplate3
|
|
1897
|
+
);
|
|
1763
1898
|
var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
|
|
1764
1899
|
var queryAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryAutomations);
|
|
1765
1900
|
var onAutomationCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
@@ -1803,6 +1938,7 @@ var onAutomationUpdated2 = (0, import_event_definition_modules.createEventModule
|
|
|
1803
1938
|
createDraftAutomation,
|
|
1804
1939
|
deleteAutomation,
|
|
1805
1940
|
deleteDraftAutomation,
|
|
1941
|
+
generateActionInputMappingFromTemplate,
|
|
1806
1942
|
generatePreinstalledAutomation,
|
|
1807
1943
|
getAggregatedUsageInfo,
|
|
1808
1944
|
getAutomation,
|
|
@@ -1814,6 +1950,7 @@ var onAutomationUpdated2 = (0, import_event_definition_modules.createEventModule
|
|
|
1814
1950
|
publishDraftAutomation,
|
|
1815
1951
|
queryAutomations,
|
|
1816
1952
|
queryAutomationsWithDrafts,
|
|
1953
|
+
queryPreinstalledAutomationsForApp,
|
|
1817
1954
|
updateAutomation,
|
|
1818
1955
|
updateDraftAutomation,
|
|
1819
1956
|
validateAutomation,
|