@wix/auto_sdk_automations_automations-v-2 1.0.128 → 1.0.129
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 +12 -3
- package/build/cjs/index.js +69 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +23 -1
- package/build/cjs/index.typings.js +61 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +16 -2
- package/build/cjs/meta.js +54 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +226 -1
- package/build/cjs/schemas.js +403 -0
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +12 -3
- package/build/es/index.mjs +68 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +23 -1
- package/build/es/index.typings.mjs +60 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +16 -2
- package/build/es/meta.mjs +53 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +226 -1
- package/build/es/schemas.mjs +401 -0
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +12 -3
- package/build/internal/cjs/index.js +69 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +23 -1
- package/build/internal/cjs/index.typings.js +61 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +16 -2
- package/build/internal/cjs/meta.js +54 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +226 -1
- package/build/internal/cjs/schemas.js +403 -0
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +12 -3
- package/build/internal/es/index.mjs +68 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +23 -1
- package/build/internal/es/index.typings.mjs +60 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +16 -2
- package/build/internal/es/meta.mjs +53 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +226 -1
- package/build/internal/es/schemas.mjs +401 -0
- package/build/internal/es/schemas.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 { GetAutomationRevisionOptions, GetAutomationRevisionResponse, Automation, UpdateAutomation, BulkDeleteAutomationsResponse, CreatePreinstalledAutomationOptions, CreatePreinstalledAutomationResponse, UpdatePreinstalledAutomationOptions, UpdatePreinstalledAutomationResponse, DeletePreinstalledAutomationOptions, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, CursorQuery, QueryPreinstalledAutomationsResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, CreateDraftAutomationFromTemplateIdResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetActionsQuotaInfoResponse, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.js';
|
|
3
|
-
export { AIMetadata, AccountInfo, AccountInfoMetadata, 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, CreateDraftAutomationFromTemplateIdRequest, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStalePreinstalledAutomationRequest, DeleteStalePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, DuplicateAutomationForMigrationRequest, DuplicateAutomationForMigrationResponse, EditorlessAssigned, EditorlessUnassigned, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GenerateActionInputMappingFromTemplateRequest, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeAction, 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, 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, TemplateOrigin, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpgradeCTA, UserDomainMediaDisabled, UserDomainMediaEnabled, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned, utils } from './index.typings.js';
|
|
2
|
+
import { GetAutomationRevisionOptions, GetAutomationRevisionResponse, Automation, CreateAutomationFromTemplateIdResponse, UpdateAutomation, BulkDeleteAutomationsResponse, CreatePreinstalledAutomationOptions, CreatePreinstalledAutomationResponse, UpdatePreinstalledAutomationOptions, UpdatePreinstalledAutomationResponse, DeletePreinstalledAutomationOptions, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, CursorQuery, QueryPreinstalledAutomationsResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, CreateDraftAutomationFromTemplateIdResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetActionsQuotaInfoResponse, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.js';
|
|
3
|
+
export { AIMetadata, AccountInfo, AccountInfoMetadata, 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, CreateAutomationFromTemplateIdRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationFromTemplateIdRequest, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStalePreinstalledAutomationRequest, DeleteStalePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, DuplicateAutomationForMigrationRequest, DuplicateAutomationForMigrationResponse, EditorlessAssigned, EditorlessUnassigned, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GenerateActionInputMappingFromTemplateRequest, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeAction, 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, 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, TemplateOrigin, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpgradeCTA, UserDomainMediaDisabled, UserDomainMediaEnabled, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function getAutomationRevision$1(httpClient: HttpClient): GetAutomationRevisionSignature;
|
|
6
6
|
interface GetAutomationRevisionSignature {
|
|
@@ -19,6 +19,14 @@ interface CreateAutomationSignature {
|
|
|
19
19
|
*/
|
|
20
20
|
(automation: NonNullablePaths<Automation, `configuration` | `configuration.actions` | `configuration.rootActionIds` | `configuration.status` | `configuration.trigger` | `configuration.trigger.appId` | `configuration.trigger.triggerKey` | `name` | `origin`, 4>): Promise<NonNullablePaths<Automation, `applicationInfo.appId` | `preinstalledInfo.appId` | `templateInfo.appId` | `createdBy.userId` | `createdBy.appId` | `name` | `configuration.status` | `configuration.trigger.appId` | `configuration.trigger.triggerKey` | `configuration.trigger.filters` | `configuration.trigger.filters.${number}._id` | `configuration.trigger.filters.${number}.fieldKey` | `configuration.trigger.filters.${number}.filterExpression` | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `configuration.trigger.rateLimit.maxActivationsExpression` | `configuration.trigger.rateLimit.durationTimeUnit` | `configuration.rootActionIds` | `origin` | `settings.hidden` | `settings.readonly` | `settings.disableDelete` | `settings.disableStatusChange` | `settings.actionSettings.permanentActionIds` | `settings.actionSettings.readonlyActionIds` | `archived`, 6>>;
|
|
21
21
|
}
|
|
22
|
+
declare function createAutomationFromTemplateId$1(httpClient: HttpClient): CreateAutomationFromTemplateIdSignature;
|
|
23
|
+
interface CreateAutomationFromTemplateIdSignature {
|
|
24
|
+
/**
|
|
25
|
+
* Creates an automation from an automation template ID.
|
|
26
|
+
* @param - ID of the automation template to create an automation from.
|
|
27
|
+
*/
|
|
28
|
+
(automationTemplateId: string): Promise<NonNullablePaths<CreateAutomationFromTemplateIdResponse, `automation.applicationInfo.appId` | `automation.preinstalledInfo.appId` | `automation.templateInfo.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>>;
|
|
29
|
+
}
|
|
22
30
|
declare function getAutomation$1(httpClient: HttpClient): GetAutomationSignature;
|
|
23
31
|
interface GetAutomationSignature {
|
|
24
32
|
/**
|
|
@@ -255,6 +263,7 @@ declare function customQueryAutomations(httpClient: HttpClient): {
|
|
|
255
263
|
};
|
|
256
264
|
declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAutomationRevision$1> & typeof getAutomationRevision$1>;
|
|
257
265
|
declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
|
|
266
|
+
declare const createAutomationFromTemplateId: MaybeContext<BuildRESTFunction<typeof createAutomationFromTemplateId$1> & typeof createAutomationFromTemplateId$1>;
|
|
258
267
|
declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
|
|
259
268
|
declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
|
|
260
269
|
declare const deleteAutomation: MaybeContext<BuildRESTFunction<typeof deleteAutomation$1> & typeof deleteAutomation$1>;
|
|
@@ -293,4 +302,4 @@ declare const onAutomationDeleted: BuildEventDefinition<typeof onAutomationDelet
|
|
|
293
302
|
*/
|
|
294
303
|
declare const onAutomationUpdated: BuildEventDefinition<typeof onAutomationUpdated$1> & typeof onAutomationUpdated$1;
|
|
295
304
|
|
|
296
|
-
export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationQuery, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationFromTemplateIdResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, CreatePreinstalledAutomationOptions, CreatePreinstalledAutomationResponse, CursorQuery, DeletePreinstalledAutomationOptions, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetActionsQuotaInfoResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, QueryAutomationsOptions, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, QueryPreinstalledAutomationsResponse, UpdateAutomation, UpdateDraftAutomation, UpdateDraftAutomationResponse, UpdatePreinstalledAutomationOptions, UpdatePreinstalledAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, ValidateAutomationOptions, ValidateAutomationResponse, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, createDraftAutomationFromTemplateId, createPreinstalledAutomation, deleteAutomation, deleteDraftAutomation, deletePreinstalledAutomation, generateActionInputMappingFromTemplate, generatePreinstalledAutomation, getActionsQuotaInfo, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomations, queryPreinstalledAutomationsForApp, updateAutomation, updateDraftAutomation, updatePreinstalledAutomation, validateAutomation, validateAutomationById };
|
|
305
|
+
export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationQuery, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateAutomationFromTemplateIdResponse, CreateDraftAutomationFromTemplateIdResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, CreatePreinstalledAutomationOptions, CreatePreinstalledAutomationResponse, CursorQuery, DeletePreinstalledAutomationOptions, GenerateActionInputMappingFromTemplateOptions, GenerateActionInputMappingFromTemplateResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetActionsQuotaInfoResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, QueryAutomationsOptions, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, QueryPreinstalledAutomationsResponse, UpdateAutomation, UpdateDraftAutomation, UpdateDraftAutomationResponse, UpdatePreinstalledAutomationOptions, UpdatePreinstalledAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, ValidateAutomationOptions, ValidateAutomationResponse, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createAutomationFromTemplateId, createDraftAutomation, createDraftAutomationFromTemplateId, createPreinstalledAutomation, deleteAutomation, deleteDraftAutomation, deletePreinstalledAutomation, generateActionInputMappingFromTemplate, generatePreinstalledAutomation, getActionsQuotaInfo, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomations, queryPreinstalledAutomationsForApp, updateAutomation, updateDraftAutomation, updatePreinstalledAutomation, validateAutomation, validateAutomationById };
|
package/build/cjs/index.js
CHANGED
|
@@ -47,6 +47,7 @@ __export(index_exports, {
|
|
|
47
47
|
bulkDeleteAutomations: () => bulkDeleteAutomations4,
|
|
48
48
|
copyAutomation: () => copyAutomation4,
|
|
49
49
|
createAutomation: () => createAutomation4,
|
|
50
|
+
createAutomationFromTemplateId: () => createAutomationFromTemplateId4,
|
|
50
51
|
createDraftAutomation: () => createDraftAutomation4,
|
|
51
52
|
createDraftAutomationFromTemplateId: () => createDraftAutomationFromTemplateId4,
|
|
52
53
|
createPreinstalledAutomation: () => createPreinstalledAutomation4,
|
|
@@ -269,6 +270,38 @@ function createAutomation(payload) {
|
|
|
269
270
|
}
|
|
270
271
|
return __createAutomation;
|
|
271
272
|
}
|
|
273
|
+
function createAutomationFromTemplateId(payload) {
|
|
274
|
+
function __createAutomationFromTemplateId({ host }) {
|
|
275
|
+
const metadata = {
|
|
276
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
277
|
+
method: "POST",
|
|
278
|
+
methodFqn: "wix.automations.v2.AutomationsService.CreateAutomationFromTemplateId",
|
|
279
|
+
packageName: PACKAGE_NAME,
|
|
280
|
+
migrationOptions: {
|
|
281
|
+
optInTransformResponse: true
|
|
282
|
+
},
|
|
283
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
284
|
+
protoPath: "/v2/automations/from-template/{automationTemplateId}",
|
|
285
|
+
data: payload,
|
|
286
|
+
host
|
|
287
|
+
}),
|
|
288
|
+
data: payload,
|
|
289
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
290
|
+
{
|
|
291
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
292
|
+
paths: [
|
|
293
|
+
{ path: "automation.createdDate" },
|
|
294
|
+
{ path: "automation.updatedDate" },
|
|
295
|
+
{ path: "automation.draftUpdatedDate" },
|
|
296
|
+
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
])
|
|
300
|
+
};
|
|
301
|
+
return metadata;
|
|
302
|
+
}
|
|
303
|
+
return __createAutomationFromTemplateId;
|
|
304
|
+
}
|
|
272
305
|
function getAutomation(payload) {
|
|
273
306
|
function __getAutomation({ host }) {
|
|
274
307
|
const metadata = {
|
|
@@ -1309,6 +1342,33 @@ async function createAutomation2(automation) {
|
|
|
1309
1342
|
throw transformedError;
|
|
1310
1343
|
}
|
|
1311
1344
|
}
|
|
1345
|
+
async function createAutomationFromTemplateId2(automationTemplateId) {
|
|
1346
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1347
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1348
|
+
automationTemplateId
|
|
1349
|
+
});
|
|
1350
|
+
const reqOpts = createAutomationFromTemplateId(
|
|
1351
|
+
payload
|
|
1352
|
+
);
|
|
1353
|
+
sideEffects?.onSiteCall?.();
|
|
1354
|
+
try {
|
|
1355
|
+
const result = await httpClient.request(reqOpts);
|
|
1356
|
+
sideEffects?.onSuccess?.(result);
|
|
1357
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1358
|
+
} catch (err) {
|
|
1359
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1360
|
+
err,
|
|
1361
|
+
{
|
|
1362
|
+
spreadPathsToArguments: {},
|
|
1363
|
+
explicitPathsToArguments: { automationTemplateId: "$[0]" },
|
|
1364
|
+
singleArgumentUnchanged: false
|
|
1365
|
+
},
|
|
1366
|
+
["automationTemplateId"]
|
|
1367
|
+
);
|
|
1368
|
+
sideEffects?.onError?.(err);
|
|
1369
|
+
throw transformedError;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1312
1372
|
async function getAutomation2(automationId) {
|
|
1313
1373
|
const { httpClient, sideEffects } = arguments[1];
|
|
1314
1374
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -2048,6 +2108,13 @@ function createAutomation3(httpClient) {
|
|
|
2048
2108
|
{ httpClient }
|
|
2049
2109
|
);
|
|
2050
2110
|
}
|
|
2111
|
+
function createAutomationFromTemplateId3(httpClient) {
|
|
2112
|
+
return (automationTemplateId) => createAutomationFromTemplateId2(
|
|
2113
|
+
automationTemplateId,
|
|
2114
|
+
// @ts-ignore
|
|
2115
|
+
{ httpClient }
|
|
2116
|
+
);
|
|
2117
|
+
}
|
|
2051
2118
|
function getAutomation3(httpClient) {
|
|
2052
2119
|
return (automationId) => getAutomation2(
|
|
2053
2120
|
automationId,
|
|
@@ -2316,6 +2383,7 @@ function customQueryAutomations(httpClient) {
|
|
|
2316
2383
|
}
|
|
2317
2384
|
var getAutomationRevision4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomationRevision3);
|
|
2318
2385
|
var createAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createAutomation3);
|
|
2386
|
+
var createAutomationFromTemplateId4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createAutomationFromTemplateId3);
|
|
2319
2387
|
var getAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAutomation3);
|
|
2320
2388
|
var updateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateAutomation3);
|
|
2321
2389
|
var deleteAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteAutomation3);
|
|
@@ -2381,6 +2449,7 @@ var onAutomationUpdated2 = (0, import_event_definition_modules.createEventModule
|
|
|
2381
2449
|
bulkDeleteAutomations,
|
|
2382
2450
|
copyAutomation,
|
|
2383
2451
|
createAutomation,
|
|
2452
|
+
createAutomationFromTemplateId,
|
|
2384
2453
|
createDraftAutomation,
|
|
2385
2454
|
createDraftAutomationFromTemplateId,
|
|
2386
2455
|
createPreinstalledAutomation,
|