@wix/auto_sdk_automations_automations-v-2 1.0.55 → 1.0.56
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 +10 -15
- package/build/cjs/index.js +56 -6
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +10 -2
- package/build/cjs/index.typings.js +35 -4
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +10 -15
- package/build/es/index.mjs +56 -6
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +10 -2
- package/build/es/index.typings.mjs +34 -4
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -15
- package/build/internal/cjs/index.js +56 -6
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +10 -2
- package/build/internal/cjs/index.typings.js +35 -4
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -15
- package/build/internal/es/index.mjs +56 -6
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +10 -2
- package/build/internal/es/index.typings.mjs +34 -4
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -2591,7 +2591,9 @@ interface GeneratePreinstalledAutomationOptions {
|
|
|
2591
2591
|
* @applicableIdentity APP
|
|
2592
2592
|
* @fqn wix.automations.v2.AutomationsService.QueryAutomations
|
|
2593
2593
|
*/
|
|
2594
|
-
declare function queryAutomations(): AutomationsQueryBuilder;
|
|
2594
|
+
declare function queryAutomations(options?: QueryAutomationsOptions): AutomationsQueryBuilder;
|
|
2595
|
+
interface QueryAutomationsOptions {
|
|
2596
|
+
}
|
|
2595
2597
|
interface QueryCursorResult {
|
|
2596
2598
|
cursors: Cursors;
|
|
2597
2599
|
hasNext: () => boolean;
|
|
@@ -2674,6 +2676,12 @@ interface AutomationsQueryBuilder {
|
|
|
2674
2676
|
/** @documentationMaturity preview */
|
|
2675
2677
|
find: () => Promise<AutomationsQueryResult>;
|
|
2676
2678
|
}
|
|
2679
|
+
/**
|
|
2680
|
+
* @hidden
|
|
2681
|
+
* @fqn wix.automations.v2.AutomationsService.QueryAutomations
|
|
2682
|
+
* @requiredField query
|
|
2683
|
+
*/
|
|
2684
|
+
declare function typedQueryAutomations(query: CursorQuery, options?: QueryAutomationsOptions): Promise<NonNullablePaths<QueryAutomationsResponse, `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>>;
|
|
2677
2685
|
/**
|
|
2678
2686
|
* Get aggregated info
|
|
2679
2687
|
* @public
|
|
@@ -2967,4 +2975,4 @@ interface GetAutomationRevisionOptions {
|
|
|
2967
2975
|
fields?: RequestedFieldsWithLiterals[];
|
|
2968
2976
|
}
|
|
2969
2977
|
|
|
2970
|
-
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 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 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 DeletedWithEntity, 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 QueryAutomationsRequest, type QueryAutomationsResponse, type QueryAutomationsWithDraftsOptions, type QueryAutomationsWithDraftsRequest, type QueryAutomationsWithDraftsResponse, 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 UpdatedWithPreviousEntity, 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, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
2978
|
+
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 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 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 DeletedWithEntity, 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 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 UpdatedWithPreviousEntity, 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 };
|
|
@@ -58,6 +58,7 @@ __export(index_typings_exports, {
|
|
|
58
58
|
publishDraftAutomation: () => publishDraftAutomation2,
|
|
59
59
|
queryAutomations: () => queryAutomations2,
|
|
60
60
|
queryAutomationsWithDrafts: () => queryAutomationsWithDrafts2,
|
|
61
|
+
typedQueryAutomations: () => typedQueryAutomations,
|
|
61
62
|
updateAutomation: () => updateAutomation2,
|
|
62
63
|
updateDraftAutomation: () => updateDraftAutomation2,
|
|
63
64
|
validateAutomation: () => validateAutomation2,
|
|
@@ -1116,11 +1117,14 @@ async function generatePreinstalledAutomation2(automation, options) {
|
|
|
1116
1117
|
throw transformedError;
|
|
1117
1118
|
}
|
|
1118
1119
|
}
|
|
1119
|
-
function queryAutomations2() {
|
|
1120
|
-
const { httpClient, sideEffects } = arguments[
|
|
1120
|
+
function queryAutomations2(options) {
|
|
1121
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1121
1122
|
return (0, import_query_builder.queryBuilder)({
|
|
1122
1123
|
func: async (payload) => {
|
|
1123
|
-
const reqOpts = queryAutomations(
|
|
1124
|
+
const reqOpts = queryAutomations({
|
|
1125
|
+
...payload,
|
|
1126
|
+
...options ?? {}
|
|
1127
|
+
});
|
|
1124
1128
|
sideEffects?.onSiteCall?.();
|
|
1125
1129
|
try {
|
|
1126
1130
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1132,7 +1136,7 @@ function queryAutomations2() {
|
|
|
1132
1136
|
}
|
|
1133
1137
|
},
|
|
1134
1138
|
requestTransformer: (query) => {
|
|
1135
|
-
const args = [query,
|
|
1139
|
+
const args = [query, options];
|
|
1136
1140
|
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1137
1141
|
...args?.[1],
|
|
1138
1142
|
query: args?.[0]
|
|
@@ -1159,6 +1163,32 @@ function queryAutomations2() {
|
|
|
1159
1163
|
transformationPaths: {}
|
|
1160
1164
|
});
|
|
1161
1165
|
}
|
|
1166
|
+
async function typedQueryAutomations(query, options) {
|
|
1167
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1168
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1169
|
+
query,
|
|
1170
|
+
...options
|
|
1171
|
+
});
|
|
1172
|
+
const reqOpts = queryAutomations(payload);
|
|
1173
|
+
sideEffects?.onSiteCall?.();
|
|
1174
|
+
try {
|
|
1175
|
+
const result = await httpClient.request(reqOpts);
|
|
1176
|
+
sideEffects?.onSuccess?.(result);
|
|
1177
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1178
|
+
} catch (err) {
|
|
1179
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1180
|
+
err,
|
|
1181
|
+
{
|
|
1182
|
+
spreadPathsToArguments: {},
|
|
1183
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1184
|
+
singleArgumentUnchanged: false
|
|
1185
|
+
},
|
|
1186
|
+
["query", "options"]
|
|
1187
|
+
);
|
|
1188
|
+
sideEffects?.onError?.(err);
|
|
1189
|
+
throw transformedError;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1162
1192
|
async function getAggregatedUsageInfo2(options) {
|
|
1163
1193
|
const { httpClient, sideEffects } = arguments[1];
|
|
1164
1194
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1520,6 +1550,7 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1520
1550
|
publishDraftAutomation,
|
|
1521
1551
|
queryAutomations,
|
|
1522
1552
|
queryAutomationsWithDrafts,
|
|
1553
|
+
typedQueryAutomations,
|
|
1523
1554
|
updateAutomation,
|
|
1524
1555
|
updateDraftAutomation,
|
|
1525
1556
|
validateAutomation,
|