@wix/auto_sdk_automations_automations-v-2 1.0.92 → 1.0.94
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 +11 -11
- package/build/cjs/index.js +74 -74
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +59 -42
- package/build/cjs/index.typings.js +65 -65
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +43 -26
- package/build/cjs/meta.js +52 -52
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +11 -11
- package/build/es/index.mjs +74 -74
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +59 -42
- package/build/es/index.typings.mjs +65 -65
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +43 -26
- package/build/es/meta.mjs +52 -52
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -11
- package/build/internal/cjs/index.js +74 -74
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +59 -42
- package/build/internal/cjs/index.typings.js +65 -65
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +43 -26
- package/build/internal/cjs/meta.js +52 -52
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -11
- package/build/internal/es/index.mjs +74 -74
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +59 -42
- package/build/internal/es/index.typings.mjs +65 -65
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +43 -26
- package/build/internal/es/meta.mjs +52 -52
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -898,9 +898,19 @@ interface AccountDetails {
|
|
|
898
898
|
*/
|
|
899
899
|
siteId?: string | null;
|
|
900
900
|
}
|
|
901
|
-
interface
|
|
902
|
-
/**
|
|
903
|
-
|
|
901
|
+
interface GetAutomationRevisionRequest {
|
|
902
|
+
/**
|
|
903
|
+
* Automation ID.
|
|
904
|
+
* @format GUID
|
|
905
|
+
*/
|
|
906
|
+
automationId: string;
|
|
907
|
+
/** Revision number. */
|
|
908
|
+
revision?: string | null;
|
|
909
|
+
/**
|
|
910
|
+
* Requested fields.
|
|
911
|
+
* @maxSize 20
|
|
912
|
+
*/
|
|
913
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
904
914
|
}
|
|
905
915
|
declare enum RequestedFields {
|
|
906
916
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
@@ -909,6 +919,31 @@ declare enum RequestedFields {
|
|
|
909
919
|
}
|
|
910
920
|
/** @enumType */
|
|
911
921
|
type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'OVERRIDE_SCHEMA';
|
|
922
|
+
interface GetAutomationRevisionResponse {
|
|
923
|
+
/** Automation revision. */
|
|
924
|
+
automation?: Automation;
|
|
925
|
+
}
|
|
926
|
+
interface AccountInfo {
|
|
927
|
+
/**
|
|
928
|
+
* ID of the Wix account associated with the event.
|
|
929
|
+
* @format GUID
|
|
930
|
+
*/
|
|
931
|
+
accountId?: string | null;
|
|
932
|
+
/**
|
|
933
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
934
|
+
* @format GUID
|
|
935
|
+
*/
|
|
936
|
+
parentAccountId?: string | null;
|
|
937
|
+
/**
|
|
938
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
939
|
+
* @format GUID
|
|
940
|
+
*/
|
|
941
|
+
siteId?: string | null;
|
|
942
|
+
}
|
|
943
|
+
interface CreateAutomationRequest {
|
|
944
|
+
/** Automation to create. */
|
|
945
|
+
automation: Automation;
|
|
946
|
+
}
|
|
912
947
|
interface CreateAutomationResponse {
|
|
913
948
|
/** Details of the created automation. */
|
|
914
949
|
automation?: Automation;
|
|
@@ -2432,24 +2467,6 @@ interface MergeOverridePreinstalledWithRuntimeVersionResponse {
|
|
|
2432
2467
|
/** The merged automation after applying the latest runtime version of the preinstalled automation. */
|
|
2433
2468
|
automation?: Automation;
|
|
2434
2469
|
}
|
|
2435
|
-
interface GetAutomationRevisionRequest {
|
|
2436
|
-
/**
|
|
2437
|
-
* Automation ID.
|
|
2438
|
-
* @format GUID
|
|
2439
|
-
*/
|
|
2440
|
-
automationId: string;
|
|
2441
|
-
/** Revision number. */
|
|
2442
|
-
revision?: string | null;
|
|
2443
|
-
/**
|
|
2444
|
-
* Requested fields.
|
|
2445
|
-
* @maxSize 20
|
|
2446
|
-
*/
|
|
2447
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
2448
|
-
}
|
|
2449
|
-
interface GetAutomationRevisionResponse {
|
|
2450
|
-
/** Automation revision. */
|
|
2451
|
-
automation?: Automation;
|
|
2452
|
-
}
|
|
2453
2470
|
interface BaseEventMetadata {
|
|
2454
2471
|
/**
|
|
2455
2472
|
* App instance ID.
|
|
@@ -2553,6 +2570,26 @@ interface AutomationUpdatedEnvelope {
|
|
|
2553
2570
|
* @documentationMaturity preview
|
|
2554
2571
|
*/
|
|
2555
2572
|
declare function onAutomationUpdated(handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>): void;
|
|
2573
|
+
/**
|
|
2574
|
+
* Gets the specified automation revision.
|
|
2575
|
+
* @param automationId - Automation ID.
|
|
2576
|
+
* @public
|
|
2577
|
+
* @documentationMaturity preview
|
|
2578
|
+
* @requiredField automationId
|
|
2579
|
+
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
2580
|
+
* @applicableIdentity APP
|
|
2581
|
+
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
2582
|
+
*/
|
|
2583
|
+
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>>;
|
|
2584
|
+
interface GetAutomationRevisionOptions {
|
|
2585
|
+
/** Revision number. */
|
|
2586
|
+
revision?: string | null;
|
|
2587
|
+
/**
|
|
2588
|
+
* Requested fields.
|
|
2589
|
+
* @maxSize 20
|
|
2590
|
+
*/
|
|
2591
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
2592
|
+
}
|
|
2556
2593
|
/**
|
|
2557
2594
|
* Creates an automation.
|
|
2558
2595
|
* @param automation - Automation to create.
|
|
@@ -3237,25 +3274,5 @@ interface GenerateActionInputMappingFromTemplateOptions {
|
|
|
3237
3274
|
/** Action input mapping template the action SPI provider will generate input mapping from. */
|
|
3238
3275
|
actionInputMappingTemplate: Record<string, any> | null;
|
|
3239
3276
|
}
|
|
3240
|
-
/**
|
|
3241
|
-
* Gets the specified automation revision.
|
|
3242
|
-
* @param automationId - Automation ID.
|
|
3243
|
-
* @public
|
|
3244
|
-
* @documentationMaturity preview
|
|
3245
|
-
* @requiredField automationId
|
|
3246
|
-
* @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
|
|
3247
|
-
* @applicableIdentity APP
|
|
3248
|
-
* @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
|
|
3249
|
-
*/
|
|
3250
|
-
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>>;
|
|
3251
|
-
interface GetAutomationRevisionOptions {
|
|
3252
|
-
/** Revision number. */
|
|
3253
|
-
revision?: string | null;
|
|
3254
|
-
/**
|
|
3255
|
-
* Requested fields.
|
|
3256
|
-
* @maxSize 20
|
|
3257
|
-
*/
|
|
3258
|
-
fields?: RequestedFieldsWithLiterals[];
|
|
3259
|
-
}
|
|
3260
3277
|
|
|
3261
|
-
export { type AIMetadata, type AccountDetails, 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 };
|
|
3278
|
+
export { type AIMetadata, type AccountDetails, type AccountInfo, 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, [
|
|
@@ -760,38 +792,6 @@ function generateActionInputMappingFromTemplate(payload) {
|
|
|
760
792
|
}
|
|
761
793
|
return __generateActionInputMappingFromTemplate;
|
|
762
794
|
}
|
|
763
|
-
function getAutomationRevision(payload) {
|
|
764
|
-
function __getAutomationRevision({ host }) {
|
|
765
|
-
const metadata = {
|
|
766
|
-
entityFqdn: "wix.automations.v2.automation",
|
|
767
|
-
method: "GET",
|
|
768
|
-
methodFqn: "wix.automations.v2.AutomationRevisionsService.GetAutomationRevision",
|
|
769
|
-
packageName: PACKAGE_NAME,
|
|
770
|
-
migrationOptions: {
|
|
771
|
-
optInTransformResponse: true
|
|
772
|
-
},
|
|
773
|
-
url: resolveWixAutomationsV2AutomationRevisionsServiceUrl({
|
|
774
|
-
protoPath: "/v1/automation-revisions/{automationId}",
|
|
775
|
-
data: payload,
|
|
776
|
-
host
|
|
777
|
-
}),
|
|
778
|
-
params: toURLSearchParams(payload),
|
|
779
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
780
|
-
{
|
|
781
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
782
|
-
paths: [
|
|
783
|
-
{ path: "automation.createdDate" },
|
|
784
|
-
{ path: "automation.updatedDate" },
|
|
785
|
-
{ path: "automation.draftUpdatedDate" },
|
|
786
|
-
{ path: "automation.autoArchivePolicy.archiveDate" }
|
|
787
|
-
]
|
|
788
|
-
}
|
|
789
|
-
])
|
|
790
|
-
};
|
|
791
|
-
return metadata;
|
|
792
|
-
}
|
|
793
|
-
return __getAutomationRevision;
|
|
794
|
-
}
|
|
795
795
|
|
|
796
796
|
// src/automations-v2-automation-automations-v-2.universal.ts
|
|
797
797
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
@@ -986,6 +986,37 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
986
986
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
987
987
|
return AutomationErrorType2;
|
|
988
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
|
+
}
|
|
989
1020
|
async function createAutomation2(automation) {
|
|
990
1021
|
const { httpClient, sideEffects } = arguments[1];
|
|
991
1022
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1584,37 +1615,6 @@ async function generateActionInputMappingFromTemplate2(appId, options) {
|
|
|
1584
1615
|
throw transformedError;
|
|
1585
1616
|
}
|
|
1586
1617
|
}
|
|
1587
|
-
async function getAutomationRevision2(automationId, options) {
|
|
1588
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1589
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1590
|
-
automationId,
|
|
1591
|
-
revision: options?.revision,
|
|
1592
|
-
fields: options?.fields
|
|
1593
|
-
});
|
|
1594
|
-
const reqOpts = getAutomationRevision(payload);
|
|
1595
|
-
sideEffects?.onSiteCall?.();
|
|
1596
|
-
try {
|
|
1597
|
-
const result = await httpClient.request(reqOpts);
|
|
1598
|
-
sideEffects?.onSuccess?.(result);
|
|
1599
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1600
|
-
} catch (err) {
|
|
1601
|
-
const transformedError = sdkTransformError(
|
|
1602
|
-
err,
|
|
1603
|
-
{
|
|
1604
|
-
spreadPathsToArguments: {},
|
|
1605
|
-
explicitPathsToArguments: {
|
|
1606
|
-
automationId: "$[0]",
|
|
1607
|
-
revision: "$[1].revision",
|
|
1608
|
-
fields: "$[1].fields"
|
|
1609
|
-
},
|
|
1610
|
-
singleArgumentUnchanged: false
|
|
1611
|
-
},
|
|
1612
|
-
["automationId", "options"]
|
|
1613
|
-
);
|
|
1614
|
-
sideEffects?.onError?.(err);
|
|
1615
|
-
throw transformedError;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
1618
|
export {
|
|
1619
1619
|
ActionErrorType,
|
|
1620
1620
|
AutomationErrorType,
|