@wix/auto_sdk_automations_automations-v-2 1.0.88 → 1.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +20 -12
- package/build/cjs/index.js +124 -61
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +51 -42
- package/build/cjs/index.typings.js +109 -53
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +27 -26
- package/build/cjs/meta.js +91 -40
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +20 -12
- package/build/es/index.mjs +123 -61
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +51 -42
- package/build/es/index.typings.mjs +108 -53
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +27 -26
- package/build/es/meta.mjs +90 -40
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +20 -12
- package/build/internal/cjs/index.js +124 -61
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +51 -42
- package/build/internal/cjs/index.typings.js +109 -53
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +27 -26
- package/build/internal/cjs/meta.js +91 -40
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +20 -12
- package/build/internal/es/index.mjs +123 -61
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +51 -42
- package/build/internal/es/index.typings.mjs +108 -53
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +27 -26
- package/build/internal/es/meta.mjs +90 -40
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -881,9 +881,19 @@ declare enum WebhookIdentityType {
|
|
|
881
881
|
}
|
|
882
882
|
/** @enumType */
|
|
883
883
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
884
|
-
interface
|
|
885
|
-
/**
|
|
886
|
-
|
|
884
|
+
interface GetAutomationRevisionRequest {
|
|
885
|
+
/**
|
|
886
|
+
* Automation ID.
|
|
887
|
+
* @format GUID
|
|
888
|
+
*/
|
|
889
|
+
automationId: string;
|
|
890
|
+
/** Revision number. */
|
|
891
|
+
revision?: string | null;
|
|
892
|
+
/**
|
|
893
|
+
* Requested fields.
|
|
894
|
+
* @maxSize 20
|
|
895
|
+
*/
|
|
896
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
887
897
|
}
|
|
888
898
|
declare enum RequestedFields {
|
|
889
899
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
@@ -892,6 +902,14 @@ declare enum RequestedFields {
|
|
|
892
902
|
}
|
|
893
903
|
/** @enumType */
|
|
894
904
|
type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'OVERRIDE_SCHEMA';
|
|
905
|
+
interface GetAutomationRevisionResponse {
|
|
906
|
+
/** Automation revision. */
|
|
907
|
+
automation?: Automation;
|
|
908
|
+
}
|
|
909
|
+
interface CreateAutomationRequest {
|
|
910
|
+
/** Automation to create. */
|
|
911
|
+
automation: Automation;
|
|
912
|
+
}
|
|
895
913
|
interface CreateAutomationResponse {
|
|
896
914
|
/** Details of the created automation. */
|
|
897
915
|
automation?: Automation;
|
|
@@ -2415,24 +2433,6 @@ interface MergeOverridePreinstalledWithRuntimeVersionResponse {
|
|
|
2415
2433
|
/** The merged automation after applying the latest runtime version of the preinstalled automation. */
|
|
2416
2434
|
automation?: Automation;
|
|
2417
2435
|
}
|
|
2418
|
-
interface GetAutomationRevisionRequest {
|
|
2419
|
-
/**
|
|
2420
|
-
* Automation ID.
|
|
2421
|
-
* @format GUID
|
|
2422
|
-
*/
|
|
2423
|
-
automationId: string;
|
|
2424
|
-
/** Revision number. */
|
|
2425
|
-
revision?: string | null;
|
|
2426
|
-
/**
|
|
2427
|
-
* Requested fields.
|
|
2428
|
-
* @maxSize 20
|
|
2429
|
-
*/
|
|
2430
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
2431
|
-
}
|
|
2432
|
-
interface GetAutomationRevisionResponse {
|
|
2433
|
-
/** Automation revision. */
|
|
2434
|
-
automation?: Automation;
|
|
2435
|
-
}
|
|
2436
2436
|
interface BaseEventMetadata {
|
|
2437
2437
|
/**
|
|
2438
2438
|
* App instance ID.
|
|
@@ -2536,6 +2536,26 @@ interface AutomationUpdatedEnvelope {
|
|
|
2536
2536
|
* @documentationMaturity preview
|
|
2537
2537
|
*/
|
|
2538
2538
|
declare function onAutomationUpdated(handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>): void;
|
|
2539
|
+
/**
|
|
2540
|
+
* Gets the specified automation revision.
|
|
2541
|
+
* @param automationId - Automation ID.
|
|
2542
|
+
* @public
|
|
2543
|
+
* @documentationMaturity preview
|
|
2544
|
+
* @requiredField automationId
|
|
2545
|
+
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
2546
|
+
* @applicableIdentity APP
|
|
2547
|
+
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
2548
|
+
*/
|
|
2549
|
+
declare function getAutomationRevision(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, `automation.applicationInfo.appId` | `automation.preinstalledInfo.appId` | `automation.createdBy.userId` | `automation.createdBy.appId` | `automation.name` | `automation.configuration.status` | `automation.configuration.trigger.appId` | `automation.configuration.trigger.triggerKey` | `automation.configuration.trigger.filters` | `automation.configuration.trigger.filters.${number}._id` | `automation.configuration.trigger.filters.${number}.fieldKey` | `automation.configuration.trigger.filters.${number}.filterExpression` | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `automation.configuration.trigger.rateLimit.maxActivationsExpression` | `automation.configuration.trigger.rateLimit.durationTimeUnit` | `automation.configuration.rootActionIds` | `automation.origin` | `automation.settings.hidden` | `automation.settings.readonly` | `automation.settings.disableDelete` | `automation.settings.disableStatusChange` | `automation.settings.actionSettings.permanentActionIds` | `automation.settings.actionSettings.readonlyActionIds` | `automation.archived`, 7>>;
|
|
2550
|
+
interface GetAutomationRevisionOptions {
|
|
2551
|
+
/** Revision number. */
|
|
2552
|
+
revision?: string | null;
|
|
2553
|
+
/**
|
|
2554
|
+
* Requested fields.
|
|
2555
|
+
* @maxSize 20
|
|
2556
|
+
*/
|
|
2557
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
2558
|
+
}
|
|
2539
2559
|
/**
|
|
2540
2560
|
* Creates an automation.
|
|
2541
2561
|
* @param automation - Automation to create.
|
|
@@ -3187,6 +3207,15 @@ interface ValidateAutomationByIdOptions {
|
|
|
3187
3207
|
/** Validation settings. */
|
|
3188
3208
|
validationSettings?: ValidationSettings;
|
|
3189
3209
|
}
|
|
3210
|
+
/**
|
|
3211
|
+
* Gets action quota information.
|
|
3212
|
+
* @public
|
|
3213
|
+
* @documentationMaturity preview
|
|
3214
|
+
* @permissionId AUTOMATIONS.AUTOMATION_READ
|
|
3215
|
+
* @applicableIdentity APP
|
|
3216
|
+
* @fqn wix.automations.v2.AutomationsService.GetActionsQuotaInfo
|
|
3217
|
+
*/
|
|
3218
|
+
declare function getActionsQuotaInfo(): Promise<NonNullablePaths<GetActionsQuotaInfoResponse, `actionProviderQuotaInfo` | `actionProviderQuotaInfo.${number}.appId` | `actionProviderQuotaInfo.${number}.actionKey` | `actionProviderQuotaInfo.${number}.actionQuotaInfo.enforced`, 5>>;
|
|
3190
3219
|
/**
|
|
3191
3220
|
* Generates action input mapping from a template.
|
|
3192
3221
|
* @param appId - Action app ID.
|
|
@@ -3211,25 +3240,5 @@ interface GenerateActionInputMappingFromTemplateOptions {
|
|
|
3211
3240
|
/** Action input mapping template the action SPI provider will generate input mapping from. */
|
|
3212
3241
|
actionInputMappingTemplate: Record<string, any> | null;
|
|
3213
3242
|
}
|
|
3214
|
-
/**
|
|
3215
|
-
* Gets the specified automation revision.
|
|
3216
|
-
* @param automationId - Automation ID.
|
|
3217
|
-
* @public
|
|
3218
|
-
* @documentationMaturity preview
|
|
3219
|
-
* @requiredField automationId
|
|
3220
|
-
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
3221
|
-
* @applicableIdentity APP
|
|
3222
|
-
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
3223
|
-
*/
|
|
3224
|
-
declare function getAutomationRevision(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, `automation.applicationInfo.appId` | `automation.preinstalledInfo.appId` | `automation.createdBy.userId` | `automation.createdBy.appId` | `automation.name` | `automation.configuration.status` | `automation.configuration.trigger.appId` | `automation.configuration.trigger.triggerKey` | `automation.configuration.trigger.filters` | `automation.configuration.trigger.filters.${number}._id` | `automation.configuration.trigger.filters.${number}.fieldKey` | `automation.configuration.trigger.filters.${number}.filterExpression` | `automation.configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `automation.configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `automation.configuration.trigger.rateLimit.maxActivationsExpression` | `automation.configuration.trigger.rateLimit.durationTimeUnit` | `automation.configuration.rootActionIds` | `automation.origin` | `automation.settings.hidden` | `automation.settings.readonly` | `automation.settings.disableDelete` | `automation.settings.disableStatusChange` | `automation.settings.actionSettings.permanentActionIds` | `automation.settings.actionSettings.readonlyActionIds` | `automation.archived`, 7>>;
|
|
3225
|
-
interface GetAutomationRevisionOptions {
|
|
3226
|
-
/** Revision number. */
|
|
3227
|
-
revision?: string | null;
|
|
3228
|
-
/**
|
|
3229
|
-
* Requested fields.
|
|
3230
|
-
* @maxSize 20
|
|
3231
|
-
*/
|
|
3232
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
3233
|
-
}
|
|
3234
3243
|
|
|
3235
|
-
export { type AIMetadata, type Action, type ActionConfigurationError, ActionErrorType, type ActionErrorTypeWithLiterals, type ActionEvent, type ActionInfoOneOf, type ActionProviderQuotaInfo, type ActionQuotaInfo, type ActionSettings, type ActionUsageSummary, type ActionValidationError, type ActionValidationErrorErrorOneOf, type ActionValidationInfo, type AdditionalInfo, type AppDefinedAction, type ApplicationError, type ApplicationOrigin, type Asset, type AuditInfo, type AuditInfoIdOneOf, type AutoArchivePolicy, type Automation, type AutomationConfiguration, type AutomationConfigurationError, type AutomationCreatedEnvelope, type AutomationDeletedEnvelope, AutomationErrorType, type AutomationErrorTypeWithLiterals, type AutomationOriginInfoOneOf, type AutomationQuery, type AutomationQuerySpec, type AutomationSettings, type AutomationUpdatedEnvelope, type AutomationValidationError, type AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, type AutomationValidationErrorValidationErrorTypeWithLiterals, type AutomationsQueryBuilder, type AutomationsQueryResult, type BaseEventMetadata, type BulkActionMetadata, type BulkCountAutomationsWithDraftsOptions, type BulkCountAutomationsWithDraftsRequest, type BulkCountAutomationsWithDraftsResponse, type BulkDeleteAutomationsRequest, type BulkDeleteAutomationsResponse, type BulkDeleteResult, type CTA, type CodeConditionAction, type CodeSnippet, type CommonQueryWithEntityContext, type ConditionAction, type ConditionExpressionGroup, type CopyAutomationOptions, type CopyAutomationRequest, type CopyAutomationResponse, type CreateAutomationRequest, type CreateAutomationResponse, type CreateDraftAutomationOptions, type CreateDraftAutomationRequest, type CreateDraftAutomationResponse, type CreatePreinstalledAutomationRequest, type CreatePreinstalledAutomationResponse, type CreatedByAppIdUsageSummary, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DelayAction, type DeleteAutomationRequest, type DeleteAutomationResponse, type DeleteContext, type DeleteDraftAutomationRequest, type DeleteDraftAutomationResponse, type DeletePreinstalledAutomationRequest, type DeletePreinstalledAutomationResponse, DeleteStatus, type DeleteStatusWithLiterals, type Dimensions, Domain, type DomainEvent, type DomainEventBodyOneOf, type DomainWithLiterals, type DraftInfo, type DraftPublished, type DraftsInfo, type Empty, type Enrichment, type Enrichments, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type Filter, type FilterValueSelection, type FilterableAppDefinedActions, type FutureDateActivationOffset, type GenerateActionInputMappingFromTemplateOptions, type GenerateActionInputMappingFromTemplateRequest, type GenerateActionInputMappingFromTemplateResponse, type GeneratePreinstalledAutomationOptions, type GeneratePreinstalledAutomationRequest, type GeneratePreinstalledAutomationResponse, type GetActionsQuotaInfoRequest, type GetActionsQuotaInfoResponse, type GetAggregatedUsageInfoOptions, type GetAggregatedUsageInfoRequest, type GetAggregatedUsageInfoResponse, type GetAutomationActionSchemaRequest, type GetAutomationActionSchemaResponse, type GetAutomationRequest, type GetAutomationResponse, type GetAutomationRevisionOptions, type GetAutomationRevisionRequest, type GetAutomationRevisionResponse, type GetOrCreateDraftAutomationRequest, type GetOrCreateDraftAutomationResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, Language, type LanguageWithLiterals, type MergeOverridePreinstalledWithRuntimeVersionRequest, type MergeOverridePreinstalledWithRuntimeVersionResponse, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, type MigrateVeloActionAutomationsRequest, type MigrateVeloActionAutomationsResponse, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type Note, type Notes, type OdeditorAssigned, type OdeditorUnassigned, type Offset, Operator, type OperatorWithLiterals, Origin, type OriginAutomationInfo, type OriginWithLiterals, type OutputAction, type Path, type PicassoAssigned, type PicassoUnassigned, type Plan, type Position, type PreinstalledAutomationSpecInfo, type PreinstalledOrigin, type ProviderConfigurationError, type PublishDraftAutomationRequest, type PublishDraftAutomationResponse, type QueryAutomationsOptions, type QueryAutomationsRequest, type QueryAutomationsResponse, type QueryAutomationsWithDraftsOptions, type QueryAutomationsWithDraftsRequest, type QueryAutomationsWithDraftsResponse, type QueryDraftAutomationsRequest, type QueryDraftAutomationsResponse, type QueryPreinstalledAutomationsForAppOptions, type QueryPreinstalledAutomationsForAppRequest, type QueryPreinstalledAutomationsForAppResponse, type QueryPreinstalledAutomationsRequest, type QueryPreinstalledAutomationsResponse, type Quota, type QuotaInfo, type RateLimit, type RateLimitAction, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type ServiceProvisioned, type ServiceRemoved, type SetVariablesAction, Severity, type SeverityWithLiterals, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, type SplitAction, State, type StateWithLiterals, Status, type StatusWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, TimeUnit, type TimeUnitWithLiterals, type Trigger, type TriggerConfigurationError, TriggerErrorType, type TriggerErrorTypeWithLiterals, type TriggerSettings, type TriggerUsageSummary, type TriggerValidationError, type TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, type TriggerValidationErrorValidationErrorTypeWithLiterals, Type, type TypeWithLiterals, type UpdateAutomation, type UpdateAutomationRequest, type UpdateAutomationResponse, type UpdateDraftAutomation, type UpdateDraftAutomationRequest, type UpdateDraftAutomationResponse, type UpdatePreinstalledAutomationRequest, type UpdatePreinstalledAutomationResponse, type UpgradeCTA, type ValidateAutomationByIdOptions, type ValidateAutomationByIdRequest, type ValidateAutomationByIdResponse, type ValidateAutomationOptions, type ValidateAutomationRequest, type ValidateAutomationResponse, ValidationErrorSeverity, type ValidationErrorSeverityWithLiterals, ValidationErrorType, type ValidationErrorTypeWithLiterals, ValidationResultStatus, type ValidationResultStatusWithLiterals, type ValidationSettings, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generateActionInputMappingFromTemplate, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomationsForApp, typedQueryAutomations, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
3244
|
+
export { type AIMetadata, type Action, type ActionConfigurationError, ActionErrorType, type ActionErrorTypeWithLiterals, type ActionEvent, type ActionInfoOneOf, type ActionProviderQuotaInfo, type ActionQuotaInfo, type ActionSettings, type ActionUsageSummary, type ActionValidationError, type ActionValidationErrorErrorOneOf, type ActionValidationInfo, type AdditionalInfo, type AppDefinedAction, type ApplicationError, type ApplicationOrigin, type Asset, type AuditInfo, type AuditInfoIdOneOf, type AutoArchivePolicy, type Automation, type AutomationConfiguration, type AutomationConfigurationError, type AutomationCreatedEnvelope, type AutomationDeletedEnvelope, AutomationErrorType, type AutomationErrorTypeWithLiterals, type AutomationOriginInfoOneOf, type AutomationQuery, type AutomationQuerySpec, type AutomationSettings, type AutomationUpdatedEnvelope, type AutomationValidationError, type AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, type AutomationValidationErrorValidationErrorTypeWithLiterals, type AutomationsQueryBuilder, type AutomationsQueryResult, type BaseEventMetadata, type BulkActionMetadata, type BulkCountAutomationsWithDraftsOptions, type BulkCountAutomationsWithDraftsRequest, type BulkCountAutomationsWithDraftsResponse, type BulkDeleteAutomationsRequest, type BulkDeleteAutomationsResponse, type BulkDeleteResult, type CTA, type CodeConditionAction, type CodeSnippet, type CommonQueryWithEntityContext, type ConditionAction, type ConditionExpressionGroup, type CopyAutomationOptions, type CopyAutomationRequest, type CopyAutomationResponse, type CreateAutomationRequest, type CreateAutomationResponse, type CreateDraftAutomationOptions, type CreateDraftAutomationRequest, type CreateDraftAutomationResponse, type CreatePreinstalledAutomationRequest, type CreatePreinstalledAutomationResponse, type CreatedByAppIdUsageSummary, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DelayAction, type DeleteAutomationRequest, type DeleteAutomationResponse, type DeleteContext, type DeleteDraftAutomationRequest, type DeleteDraftAutomationResponse, type DeletePreinstalledAutomationRequest, type DeletePreinstalledAutomationResponse, DeleteStatus, type DeleteStatusWithLiterals, type Dimensions, Domain, type DomainEvent, type DomainEventBodyOneOf, type DomainWithLiterals, type DraftInfo, type DraftPublished, type DraftsInfo, type Empty, type Enrichment, type Enrichments, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type Filter, type FilterValueSelection, type FilterableAppDefinedActions, type FutureDateActivationOffset, type GenerateActionInputMappingFromTemplateOptions, type GenerateActionInputMappingFromTemplateRequest, type GenerateActionInputMappingFromTemplateResponse, type GeneratePreinstalledAutomationOptions, type GeneratePreinstalledAutomationRequest, type GeneratePreinstalledAutomationResponse, type GetActionsQuotaInfoRequest, type GetActionsQuotaInfoResponse, type GetAggregatedUsageInfoOptions, type GetAggregatedUsageInfoRequest, type GetAggregatedUsageInfoResponse, type GetAutomationActionSchemaRequest, type GetAutomationActionSchemaResponse, type GetAutomationRequest, type GetAutomationResponse, type GetAutomationRevisionOptions, type GetAutomationRevisionRequest, type GetAutomationRevisionResponse, type GetOrCreateDraftAutomationRequest, type GetOrCreateDraftAutomationResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, Language, type LanguageWithLiterals, type MergeOverridePreinstalledWithRuntimeVersionRequest, type MergeOverridePreinstalledWithRuntimeVersionResponse, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, type MigrateVeloActionAutomationsRequest, type MigrateVeloActionAutomationsResponse, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type Note, type Notes, type OdeditorAssigned, type OdeditorUnassigned, type Offset, Operator, type OperatorWithLiterals, Origin, type OriginAutomationInfo, type OriginWithLiterals, type OutputAction, type Path, type PicassoAssigned, type PicassoUnassigned, type Plan, type Position, type PreinstalledAutomationSpecInfo, type PreinstalledOrigin, type ProviderConfigurationError, type PublishDraftAutomationRequest, type PublishDraftAutomationResponse, type QueryAutomationsOptions, type QueryAutomationsRequest, type QueryAutomationsResponse, type QueryAutomationsWithDraftsOptions, type QueryAutomationsWithDraftsRequest, type QueryAutomationsWithDraftsResponse, type QueryDraftAutomationsRequest, type QueryDraftAutomationsResponse, type QueryPreinstalledAutomationsForAppOptions, type QueryPreinstalledAutomationsForAppRequest, type QueryPreinstalledAutomationsForAppResponse, type QueryPreinstalledAutomationsRequest, type QueryPreinstalledAutomationsResponse, type Quota, type QuotaInfo, type RateLimit, type RateLimitAction, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type ServiceProvisioned, type ServiceRemoved, type SetVariablesAction, Severity, type SeverityWithLiterals, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, type SplitAction, State, type StateWithLiterals, Status, type StatusWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, TimeUnit, type TimeUnitWithLiterals, type Trigger, type TriggerConfigurationError, TriggerErrorType, type TriggerErrorTypeWithLiterals, type TriggerSettings, type TriggerUsageSummary, type TriggerValidationError, type TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, type TriggerValidationErrorValidationErrorTypeWithLiterals, Type, type TypeWithLiterals, type UpdateAutomation, type UpdateAutomationRequest, type UpdateAutomationResponse, type UpdateDraftAutomation, type UpdateDraftAutomationRequest, type UpdateDraftAutomationResponse, type UpdatePreinstalledAutomationRequest, type UpdatePreinstalledAutomationResponse, type UpgradeCTA, type ValidateAutomationByIdOptions, type ValidateAutomationByIdRequest, type ValidateAutomationByIdResponse, type ValidateAutomationOptions, type ValidateAutomationRequest, type ValidateAutomationResponse, ValidationErrorSeverity, type ValidationErrorSeverityWithLiterals, ValidationErrorType, type ValidationErrorTypeWithLiterals, ValidationResultStatus, type ValidationResultStatusWithLiterals, type ValidationSettings, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generateActionInputMappingFromTemplate, generatePreinstalledAutomation, getActionsQuotaInfo, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomationsForApp, typedQueryAutomations, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
@@ -13,7 +13,7 @@ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transform
|
|
|
13
13
|
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
14
14
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
15
15
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
16
|
-
function
|
|
16
|
+
function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
17
17
|
const domainToMappings = {
|
|
18
18
|
"manage._base_domain_": [
|
|
19
19
|
{
|
|
@@ -52,7 +52,7 @@ function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
|
52
52
|
};
|
|
53
53
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function resolveWixAutomationsV2AutomationRevisionsServiceUrl(opts) {
|
|
56
56
|
const domainToMappings = {
|
|
57
57
|
"manage._base_domain_": [
|
|
58
58
|
{
|
|
@@ -92,6 +92,38 @@ function resolveWixAutomationsV2AutomationsServiceUrl(opts) {
|
|
|
92
92
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
93
93
|
}
|
|
94
94
|
var PACKAGE_NAME = "@wix/auto_sdk_automations_automations-v-2";
|
|
95
|
+
function getAutomationRevision(payload) {
|
|
96
|
+
function __getAutomationRevision({ host }) {
|
|
97
|
+
const metadata = {
|
|
98
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
99
|
+
method: "GET",
|
|
100
|
+
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
101
|
+
packageName: PACKAGE_NAME,
|
|
102
|
+
migrationOptions: {
|
|
103
|
+
optInTransformResponse: true
|
|
104
|
+
},
|
|
105
|
+
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
106
|
+
protoPath: "/v1/automation-revisions/{automationId}",
|
|
107
|
+
data: payload,
|
|
108
|
+
host
|
|
109
|
+
}),
|
|
110
|
+
params: toURLSearchParams(payload),
|
|
111
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
112
|
+
{
|
|
113
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
114
|
+
paths: [
|
|
115
|
+
{ path: "automation.createdDate" },
|
|
116
|
+
{ path: "automation.updatedDate" },
|
|
117
|
+
{ path: "automation.draftUpdatedDate" },
|
|
118
|
+
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
])
|
|
122
|
+
};
|
|
123
|
+
return metadata;
|
|
124
|
+
}
|
|
125
|
+
return __getAutomationRevision;
|
|
126
|
+
}
|
|
95
127
|
function createAutomation(payload) {
|
|
96
128
|
function __createAutomation({ host }) {
|
|
97
129
|
const serializedData = transformPaths(payload, [
|
|
@@ -708,58 +740,57 @@ function validateAutomationById(payload) {
|
|
|
708
740
|
}
|
|
709
741
|
return __validateAutomationById;
|
|
710
742
|
}
|
|
711
|
-
function
|
|
712
|
-
function
|
|
743
|
+
function getActionsQuotaInfo(payload) {
|
|
744
|
+
function __getActionsQuotaInfo({ host }) {
|
|
713
745
|
const metadata = {
|
|
714
746
|
entityFqdn: "wix.automations.v2.automation",
|
|
715
|
-
method: "
|
|
716
|
-
methodFqn: "wix.automations.v2.AutomationsService.
|
|
747
|
+
method: "GET",
|
|
748
|
+
methodFqn: "wix.automations.v2.AutomationsService.GetActionsQuotaInfo",
|
|
717
749
|
packageName: PACKAGE_NAME,
|
|
718
750
|
migrationOptions: {
|
|
719
751
|
optInTransformResponse: true
|
|
720
752
|
},
|
|
721
753
|
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
722
|
-
protoPath: "/v2/automations/actions/
|
|
754
|
+
protoPath: "/v2/automations/actions/quota",
|
|
723
755
|
data: payload,
|
|
724
756
|
host
|
|
725
757
|
}),
|
|
726
|
-
|
|
758
|
+
params: toURLSearchParams(payload),
|
|
759
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
760
|
+
{
|
|
761
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
762
|
+
paths: [
|
|
763
|
+
{
|
|
764
|
+
path: "actionProviderQuotaInfo.actionQuotaInfo.quotaInfo.quotas.renewalDate"
|
|
765
|
+
}
|
|
766
|
+
]
|
|
767
|
+
}
|
|
768
|
+
])
|
|
727
769
|
};
|
|
728
770
|
return metadata;
|
|
729
771
|
}
|
|
730
|
-
return
|
|
772
|
+
return __getActionsQuotaInfo;
|
|
731
773
|
}
|
|
732
|
-
function
|
|
733
|
-
function
|
|
774
|
+
function generateActionInputMappingFromTemplate(payload) {
|
|
775
|
+
function __generateActionInputMappingFromTemplate({ host }) {
|
|
734
776
|
const metadata = {
|
|
735
777
|
entityFqdn: "wix.automations.v2.automation",
|
|
736
|
-
method: "
|
|
737
|
-
methodFqn: "wix.automations.v2.
|
|
778
|
+
method: "POST",
|
|
779
|
+
methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
|
|
738
780
|
packageName: PACKAGE_NAME,
|
|
739
781
|
migrationOptions: {
|
|
740
782
|
optInTransformResponse: true
|
|
741
783
|
},
|
|
742
|
-
url:
|
|
743
|
-
protoPath: "/
|
|
784
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
785
|
+
protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
744
786
|
data: payload,
|
|
745
787
|
host
|
|
746
788
|
}),
|
|
747
|
-
|
|
748
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
749
|
-
{
|
|
750
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
751
|
-
paths: [
|
|
752
|
-
{ path: "automation.createdDate" },
|
|
753
|
-
{ path: "automation.updatedDate" },
|
|
754
|
-
{ path: "automation.draftUpdatedDate" },
|
|
755
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
756
|
-
]
|
|
757
|
-
}
|
|
758
|
-
])
|
|
789
|
+
data: payload
|
|
759
790
|
};
|
|
760
791
|
return metadata;
|
|
761
792
|
}
|
|
762
|
-
return
|
|
793
|
+
return __generateActionInputMappingFromTemplate;
|
|
763
794
|
}
|
|
764
795
|
|
|
765
796
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
@@ -955,6 +986,37 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
955
986
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
956
987
|
return AutomationErrorType2;
|
|
957
988
|
})(AutomationErrorType || {});
|
|
989
|
+
async function getAutomationRevision2(automationId, options) {
|
|
990
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
991
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
992
|
+
automationId,
|
|
993
|
+
revision: options?.revision,
|
|
994
|
+
fields: options?.fields
|
|
995
|
+
});
|
|
996
|
+
const reqOpts = getAutomationRevision(payload);
|
|
997
|
+
sideEffects?.onSiteCall?.();
|
|
998
|
+
try {
|
|
999
|
+
const result = await httpClient.request(reqOpts);
|
|
1000
|
+
sideEffects?.onSuccess?.(result);
|
|
1001
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1002
|
+
} catch (err) {
|
|
1003
|
+
const transformedError = sdkTransformError(
|
|
1004
|
+
err,
|
|
1005
|
+
{
|
|
1006
|
+
spreadPathsToArguments: {},
|
|
1007
|
+
explicitPathsToArguments: {
|
|
1008
|
+
automationId: "$[0]",
|
|
1009
|
+
revision: "$[1].revision",
|
|
1010
|
+
fields: "$[1].fields"
|
|
1011
|
+
},
|
|
1012
|
+
singleArgumentUnchanged: false
|
|
1013
|
+
},
|
|
1014
|
+
["automationId", "options"]
|
|
1015
|
+
);
|
|
1016
|
+
sideEffects?.onError?.(err);
|
|
1017
|
+
throw transformedError;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
958
1020
|
async function createAutomation2(automation) {
|
|
959
1021
|
const { httpClient, sideEffects } = arguments[1];
|
|
960
1022
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1497,16 +1559,10 @@ async function validateAutomationById2(automationId, options) {
|
|
|
1497
1559
|
throw transformedError;
|
|
1498
1560
|
}
|
|
1499
1561
|
}
|
|
1500
|
-
async function
|
|
1501
|
-
const { httpClient, sideEffects } = arguments[
|
|
1502
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1503
|
-
|
|
1504
|
-
actionKey: options?.actionKey,
|
|
1505
|
-
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1506
|
-
});
|
|
1507
|
-
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1508
|
-
payload
|
|
1509
|
-
);
|
|
1562
|
+
async function getActionsQuotaInfo2() {
|
|
1563
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
1564
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({});
|
|
1565
|
+
const reqOpts = getActionsQuotaInfo(payload);
|
|
1510
1566
|
sideEffects?.onSiteCall?.();
|
|
1511
1567
|
try {
|
|
1512
1568
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1517,27 +1573,25 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1517
1573
|
err,
|
|
1518
1574
|
{
|
|
1519
1575
|
spreadPathsToArguments: {},
|
|
1520
|
-
explicitPathsToArguments: {
|
|
1521
|
-
appId: "$[0]",
|
|
1522
|
-
actionKey: "$[1].actionKey",
|
|
1523
|
-
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1524
|
-
},
|
|
1576
|
+
explicitPathsToArguments: {},
|
|
1525
1577
|
singleArgumentUnchanged: false
|
|
1526
1578
|
},
|
|
1527
|
-
[
|
|
1579
|
+
[]
|
|
1528
1580
|
);
|
|
1529
1581
|
sideEffects?.onError?.(err);
|
|
1530
1582
|
throw transformedError;
|
|
1531
1583
|
}
|
|
1532
1584
|
}
|
|
1533
|
-
async function
|
|
1585
|
+
async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
1534
1586
|
const { httpClient, sideEffects } = arguments[2];
|
|
1535
1587
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1588
|
+
appId,
|
|
1589
|
+
actionKey: options?.actionKey,
|
|
1590
|
+
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1539
1591
|
});
|
|
1540
|
-
const reqOpts =
|
|
1592
|
+
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1593
|
+
payload
|
|
1594
|
+
);
|
|
1541
1595
|
sideEffects?.onSiteCall?.();
|
|
1542
1596
|
try {
|
|
1543
1597
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1549,13 +1603,13 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1549
1603
|
{
|
|
1550
1604
|
spreadPathsToArguments: {},
|
|
1551
1605
|
explicitPathsToArguments: {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1606
|
+
appId: "$[0]",
|
|
1607
|
+
actionKey: "$[1].actionKey",
|
|
1608
|
+
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1555
1609
|
},
|
|
1556
1610
|
singleArgumentUnchanged: false
|
|
1557
1611
|
},
|
|
1558
|
-
["
|
|
1612
|
+
["appId", "options"]
|
|
1559
1613
|
);
|
|
1560
1614
|
sideEffects?.onError?.(err);
|
|
1561
1615
|
throw transformedError;
|
|
@@ -1594,6 +1648,7 @@ export {
|
|
|
1594
1648
|
deleteDraftAutomation2 as deleteDraftAutomation,
|
|
1595
1649
|
generateActionInputMappingFromTemplate2 as generateActionInputMappingFromTemplate,
|
|
1596
1650
|
generatePreinstalledAutomation2 as generatePreinstalledAutomation,
|
|
1651
|
+
getActionsQuotaInfo2 as getActionsQuotaInfo,
|
|
1597
1652
|
getAggregatedUsageInfo2 as getAggregatedUsageInfo,
|
|
1598
1653
|
getAutomation2 as getAutomation,
|
|
1599
1654
|
getAutomationRevision2 as getAutomationRevision,
|