@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
|
@@ -1900,7 +1900,7 @@ interface ValidateAutomationRequest {
|
|
|
1900
1900
|
*
|
|
1901
1901
|
* When not specified, the method validates the full automation. This includes the trigger, actions, and provider validation logic.
|
|
1902
1902
|
*
|
|
1903
|
-
* > **Note**: Trigger and action providers can add custom validation logic by implementing the Validate Configuration method in the [trigger](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action service
|
|
1903
|
+
* > **Note**: Trigger and action providers can add custom validation logic by implementing the Validate Configuration method in the [trigger service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration).
|
|
1904
1904
|
*/
|
|
1905
1905
|
validationSettings?: ValidationSettings;
|
|
1906
1906
|
}
|
|
@@ -1910,13 +1910,13 @@ interface ValidationSettings {
|
|
|
1910
1910
|
*
|
|
1911
1911
|
* When specified, only these actions are validated.
|
|
1912
1912
|
*
|
|
1913
|
-
* When not specified, the full automation is validated. This includes the trigger, actions, and custom logic added by the [trigger](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action
|
|
1913
|
+
* When not specified, the full automation is validated. This includes the trigger, actions, and custom logic added by the [trigger provider](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action provider](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration).
|
|
1914
1914
|
* @maxSize 30
|
|
1915
1915
|
* @format GUID
|
|
1916
1916
|
*/
|
|
1917
1917
|
actionIds?: string[];
|
|
1918
1918
|
/**
|
|
1919
|
-
* Whether to skip [trigger](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/introduction) and [action provider](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction) validations.
|
|
1919
|
+
* Whether to skip [trigger provider](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/introduction) and [action provider](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction) validations.
|
|
1920
1920
|
*
|
|
1921
1921
|
* Default: `false`.
|
|
1922
1922
|
*/
|
|
@@ -2358,6 +2358,25 @@ interface UpgradeCTA {
|
|
|
2358
2358
|
*/
|
|
2359
2359
|
label?: string;
|
|
2360
2360
|
}
|
|
2361
|
+
interface GenerateActionInputMappingFromTemplateRequest {
|
|
2362
|
+
/**
|
|
2363
|
+
* Action app ID.
|
|
2364
|
+
* @format GUID
|
|
2365
|
+
*/
|
|
2366
|
+
appId: string;
|
|
2367
|
+
/**
|
|
2368
|
+
* Action key.
|
|
2369
|
+
* @minLength 1
|
|
2370
|
+
* @maxLength 100
|
|
2371
|
+
*/
|
|
2372
|
+
actionKey: string;
|
|
2373
|
+
/** Action input mapping template the action SPI provider will generate input mapping from. */
|
|
2374
|
+
actionInputMappingTemplate: Record<string, any> | null;
|
|
2375
|
+
}
|
|
2376
|
+
interface GenerateActionInputMappingFromTemplateResponse {
|
|
2377
|
+
/** Generated action input mapping. */
|
|
2378
|
+
generatedActionInputMapping?: Record<string, any> | null;
|
|
2379
|
+
}
|
|
2361
2380
|
interface MigrateVeloActionAutomationsRequest {
|
|
2362
2381
|
/** @format GUID */
|
|
2363
2382
|
oldAppId?: string;
|
|
@@ -2482,6 +2501,7 @@ declare function onAutomationDeleted(handler: (event: AutomationDeletedEnvelope)
|
|
|
2482
2501
|
interface AutomationUpdatedEnvelope {
|
|
2483
2502
|
entity: Automation;
|
|
2484
2503
|
metadata: EventMetadata;
|
|
2504
|
+
/** @hidden */
|
|
2485
2505
|
modifiedFields: Record<string, any>;
|
|
2486
2506
|
}
|
|
2487
2507
|
/**
|
|
@@ -2661,6 +2681,28 @@ interface GeneratePreinstalledAutomationOptions {
|
|
|
2661
2681
|
*/
|
|
2662
2682
|
appId?: string;
|
|
2663
2683
|
}
|
|
2684
|
+
/**
|
|
2685
|
+
* Allows an app to query its preinstalled automations.
|
|
2686
|
+
*
|
|
2687
|
+
* > **Note**: You must have an account permission to edit an app.
|
|
2688
|
+
* @public
|
|
2689
|
+
* @documentationMaturity preview
|
|
2690
|
+
* @fqn wix.automations.v2.AutomationsService.QueryPreinstalledAutomationsForApp
|
|
2691
|
+
*/
|
|
2692
|
+
declare function queryPreinstalledAutomationsForApp(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>>;
|
|
2693
|
+
interface QueryPreinstalledAutomationsForAppOptions {
|
|
2694
|
+
/**
|
|
2695
|
+
* Query.
|
|
2696
|
+
*
|
|
2697
|
+
* Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
|
|
2698
|
+
*/
|
|
2699
|
+
query?: CursorQuery;
|
|
2700
|
+
/**
|
|
2701
|
+
* ID of the app for which to query preinstalled automations.
|
|
2702
|
+
* @format GUID
|
|
2703
|
+
*/
|
|
2704
|
+
appId?: string;
|
|
2705
|
+
}
|
|
2664
2706
|
/**
|
|
2665
2707
|
* Retrieves a list of automations. This includes both automations overridden on a site and preinstalled automations. If a preinstalled automation has been overridden on the site, the method returns the override automation.
|
|
2666
2708
|
*
|
|
@@ -3093,9 +3135,7 @@ declare function publishDraftAutomation(automationId: string): Promise<NonNullab
|
|
|
3093
3135
|
*
|
|
3094
3136
|
* - 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).
|
|
3095
3137
|
* - 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.
|
|
3096
|
-
* - 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).
|
|
3097
|
-
*
|
|
3098
|
-
* > **Note**: This method identifies configuration errors but doesn't fix them. It does not modify the automation.
|
|
3138
|
+
* - 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).
|
|
3099
3139
|
* @param automation - Automation to validate.
|
|
3100
3140
|
* @public
|
|
3101
3141
|
* @documentationMaturity preview
|
|
@@ -3111,7 +3151,7 @@ interface ValidateAutomationOptions {
|
|
|
3111
3151
|
*
|
|
3112
3152
|
* When not specified, the method validates the full automation. This includes the trigger, actions, and provider validation logic.
|
|
3113
3153
|
*
|
|
3114
|
-
* > **Note**: Trigger and action providers can add custom validation logic by implementing the Validate Configuration method in the [trigger](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action service
|
|
3154
|
+
* > **Note**: Trigger and action providers can add custom validation logic by implementing the Validate Configuration method in the [trigger service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration).
|
|
3115
3155
|
*/
|
|
3116
3156
|
validationSettings?: ValidationSettings;
|
|
3117
3157
|
}
|
|
@@ -3130,6 +3170,30 @@ interface ValidateAutomationByIdOptions {
|
|
|
3130
3170
|
/** Validation settings. */
|
|
3131
3171
|
validationSettings?: ValidationSettings;
|
|
3132
3172
|
}
|
|
3173
|
+
/**
|
|
3174
|
+
* Generates action input mapping from a template.
|
|
3175
|
+
* @param appId - Action app ID.
|
|
3176
|
+
* @public
|
|
3177
|
+
* @documentationMaturity preview
|
|
3178
|
+
* @requiredField appId
|
|
3179
|
+
* @requiredField options
|
|
3180
|
+
* @requiredField options.actionInputMappingTemplate
|
|
3181
|
+
* @requiredField options.actionKey
|
|
3182
|
+
* @permissionId AUTOMATIONS.AUTOMATION_READ
|
|
3183
|
+
* @applicableIdentity APP
|
|
3184
|
+
* @fqn wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate
|
|
3185
|
+
*/
|
|
3186
|
+
declare function generateActionInputMappingFromTemplate(appId: string, options: NonNullablePaths<GenerateActionInputMappingFromTemplateOptions, `actionInputMappingTemplate` | `actionKey`, 2>): Promise<GenerateActionInputMappingFromTemplateResponse>;
|
|
3187
|
+
interface GenerateActionInputMappingFromTemplateOptions {
|
|
3188
|
+
/**
|
|
3189
|
+
* Action key.
|
|
3190
|
+
* @minLength 1
|
|
3191
|
+
* @maxLength 100
|
|
3192
|
+
*/
|
|
3193
|
+
actionKey: string;
|
|
3194
|
+
/** Action input mapping template the action SPI provider will generate input mapping from. */
|
|
3195
|
+
actionInputMappingTemplate: Record<string, any> | null;
|
|
3196
|
+
}
|
|
3133
3197
|
/**
|
|
3134
3198
|
* Gets the specified automation revision.
|
|
3135
3199
|
* @param automationId - Automation ID.
|
|
@@ -3151,4 +3215,4 @@ interface GetAutomationRevisionOptions {
|
|
|
3151
3215
|
fields?: RequestedFieldsWithLiterals[];
|
|
3152
3216
|
}
|
|
3153
3217
|
|
|
3154
|
-
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 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 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, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, typedQueryAutomations, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
3218
|
+
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 };
|
|
@@ -50,6 +50,7 @@ __export(index_typings_exports, {
|
|
|
50
50
|
createDraftAutomation: () => createDraftAutomation2,
|
|
51
51
|
deleteAutomation: () => deleteAutomation2,
|
|
52
52
|
deleteDraftAutomation: () => deleteDraftAutomation2,
|
|
53
|
+
generateActionInputMappingFromTemplate: () => generateActionInputMappingFromTemplate2,
|
|
53
54
|
generatePreinstalledAutomation: () => generatePreinstalledAutomation2,
|
|
54
55
|
getAggregatedUsageInfo: () => getAggregatedUsageInfo2,
|
|
55
56
|
getAutomation: () => getAutomation2,
|
|
@@ -58,6 +59,7 @@ __export(index_typings_exports, {
|
|
|
58
59
|
publishDraftAutomation: () => publishDraftAutomation2,
|
|
59
60
|
queryAutomations: () => queryAutomations2,
|
|
60
61
|
queryAutomationsWithDrafts: () => queryAutomationsWithDrafts2,
|
|
62
|
+
queryPreinstalledAutomationsForApp: () => queryPreinstalledAutomationsForApp2,
|
|
61
63
|
typedQueryAutomations: () => typedQueryAutomations,
|
|
62
64
|
updateAutomation: () => updateAutomation2,
|
|
63
65
|
updateDraftAutomation: () => updateDraftAutomation2,
|
|
@@ -364,6 +366,38 @@ function generatePreinstalledAutomation(payload) {
|
|
|
364
366
|
}
|
|
365
367
|
return __generatePreinstalledAutomation;
|
|
366
368
|
}
|
|
369
|
+
function queryPreinstalledAutomationsForApp(payload) {
|
|
370
|
+
function __queryPreinstalledAutomationsForApp({ host }) {
|
|
371
|
+
const metadata = {
|
|
372
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
373
|
+
method: "POST",
|
|
374
|
+
methodFqn: "wix.automations.v2.AutomationsService.QueryPreinstalledAutomationsForApp",
|
|
375
|
+
packageName: PACKAGE_NAME,
|
|
376
|
+
migrationOptions: {
|
|
377
|
+
optInTransformResponse: true
|
|
378
|
+
},
|
|
379
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
380
|
+
protoPath: "/v2/preinstalled-automations/query",
|
|
381
|
+
data: payload,
|
|
382
|
+
host
|
|
383
|
+
}),
|
|
384
|
+
data: payload,
|
|
385
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
386
|
+
{
|
|
387
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
388
|
+
paths: [
|
|
389
|
+
{ path: "automations.createdDate" },
|
|
390
|
+
{ path: "automations.updatedDate" },
|
|
391
|
+
{ path: "automations.draftUpdatedDate" },
|
|
392
|
+
{ path: "automations.autoArchivePolicy.archiveDate" }
|
|
393
|
+
]
|
|
394
|
+
}
|
|
395
|
+
])
|
|
396
|
+
};
|
|
397
|
+
return metadata;
|
|
398
|
+
}
|
|
399
|
+
return __queryPreinstalledAutomationsForApp;
|
|
400
|
+
}
|
|
367
401
|
function queryAutomations(payload) {
|
|
368
402
|
function __queryAutomations({ host }) {
|
|
369
403
|
const metadata = {
|
|
@@ -741,6 +775,27 @@ function validateAutomationById(payload) {
|
|
|
741
775
|
}
|
|
742
776
|
return __validateAutomationById;
|
|
743
777
|
}
|
|
778
|
+
function generateActionInputMappingFromTemplate(payload) {
|
|
779
|
+
function __generateActionInputMappingFromTemplate({ host }) {
|
|
780
|
+
const metadata = {
|
|
781
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
782
|
+
method: "POST",
|
|
783
|
+
methodFqn: "wix.automations.v2.AutomationsService.GenerateActionInputMappingFromTemplate",
|
|
784
|
+
packageName: PACKAGE_NAME,
|
|
785
|
+
migrationOptions: {
|
|
786
|
+
optInTransformResponse: true
|
|
787
|
+
},
|
|
788
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
789
|
+
protoPath: "/v2/automations/actions/generate-action-input-mapping-from-template",
|
|
790
|
+
data: payload,
|
|
791
|
+
host
|
|
792
|
+
}),
|
|
793
|
+
data: payload
|
|
794
|
+
};
|
|
795
|
+
return metadata;
|
|
796
|
+
}
|
|
797
|
+
return __generateActionInputMappingFromTemplate;
|
|
798
|
+
}
|
|
744
799
|
function getAutomationRevision(payload) {
|
|
745
800
|
function __getAutomationRevision({ host }) {
|
|
746
801
|
const metadata = {
|
|
@@ -1118,6 +1173,34 @@ async function generatePreinstalledAutomation2(automation, options) {
|
|
|
1118
1173
|
throw transformedError;
|
|
1119
1174
|
}
|
|
1120
1175
|
}
|
|
1176
|
+
async function queryPreinstalledAutomationsForApp2(options) {
|
|
1177
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1178
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1179
|
+
query: options?.query,
|
|
1180
|
+
appId: options?.appId
|
|
1181
|
+
});
|
|
1182
|
+
const reqOpts = queryPreinstalledAutomationsForApp(
|
|
1183
|
+
payload
|
|
1184
|
+
);
|
|
1185
|
+
sideEffects?.onSiteCall?.();
|
|
1186
|
+
try {
|
|
1187
|
+
const result = await httpClient.request(reqOpts);
|
|
1188
|
+
sideEffects?.onSuccess?.(result);
|
|
1189
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1190
|
+
} catch (err) {
|
|
1191
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1192
|
+
err,
|
|
1193
|
+
{
|
|
1194
|
+
spreadPathsToArguments: {},
|
|
1195
|
+
explicitPathsToArguments: { query: "$[0].query", appId: "$[0].appId" },
|
|
1196
|
+
singleArgumentUnchanged: false
|
|
1197
|
+
},
|
|
1198
|
+
["options"]
|
|
1199
|
+
);
|
|
1200
|
+
sideEffects?.onError?.(err);
|
|
1201
|
+
throw transformedError;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1121
1204
|
function queryAutomations2(options) {
|
|
1122
1205
|
const { httpClient, sideEffects } = arguments[1];
|
|
1123
1206
|
return (0, import_query_builder.queryBuilder)({
|
|
@@ -1480,6 +1563,39 @@ async function validateAutomationById2(automationId, options) {
|
|
|
1480
1563
|
throw transformedError;
|
|
1481
1564
|
}
|
|
1482
1565
|
}
|
|
1566
|
+
async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
1567
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1568
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1569
|
+
appId,
|
|
1570
|
+
actionKey: options?.actionKey,
|
|
1571
|
+
actionInputMappingTemplate: options?.actionInputMappingTemplate
|
|
1572
|
+
});
|
|
1573
|
+
const reqOpts = generateActionInputMappingFromTemplate(
|
|
1574
|
+
payload
|
|
1575
|
+
);
|
|
1576
|
+
sideEffects?.onSiteCall?.();
|
|
1577
|
+
try {
|
|
1578
|
+
const result = await httpClient.request(reqOpts);
|
|
1579
|
+
sideEffects?.onSuccess?.(result);
|
|
1580
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1581
|
+
} catch (err) {
|
|
1582
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1583
|
+
err,
|
|
1584
|
+
{
|
|
1585
|
+
spreadPathsToArguments: {},
|
|
1586
|
+
explicitPathsToArguments: {
|
|
1587
|
+
appId: "$[0]",
|
|
1588
|
+
actionKey: "$[1].actionKey",
|
|
1589
|
+
actionInputMappingTemplate: "$[1].actionInputMappingTemplate"
|
|
1590
|
+
},
|
|
1591
|
+
singleArgumentUnchanged: false
|
|
1592
|
+
},
|
|
1593
|
+
["appId", "options"]
|
|
1594
|
+
);
|
|
1595
|
+
sideEffects?.onError?.(err);
|
|
1596
|
+
throw transformedError;
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1483
1599
|
async function getAutomationRevision2(automationId, options) {
|
|
1484
1600
|
const { httpClient, sideEffects } = arguments[2];
|
|
1485
1601
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1543,6 +1659,7 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1543
1659
|
createDraftAutomation,
|
|
1544
1660
|
deleteAutomation,
|
|
1545
1661
|
deleteDraftAutomation,
|
|
1662
|
+
generateActionInputMappingFromTemplate,
|
|
1546
1663
|
generatePreinstalledAutomation,
|
|
1547
1664
|
getAggregatedUsageInfo,
|
|
1548
1665
|
getAutomation,
|
|
@@ -1551,6 +1668,7 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1551
1668
|
publishDraftAutomation,
|
|
1552
1669
|
queryAutomations,
|
|
1553
1670
|
queryAutomationsWithDrafts,
|
|
1671
|
+
queryPreinstalledAutomationsForApp,
|
|
1554
1672
|
typedQueryAutomations,
|
|
1555
1673
|
updateAutomation,
|
|
1556
1674
|
updateDraftAutomation,
|