@wix/auto_sdk_automations_automations-v-2 1.0.54 → 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 -7
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +19 -6
- package/build/cjs/index.typings.js +35 -5
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +9 -4
- package/build/cjs/meta.js +0 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -15
- package/build/es/index.mjs +56 -7
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +19 -6
- package/build/es/index.typings.mjs +34 -5
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +9 -4
- package/build/es/meta.mjs +0 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -15
- package/build/internal/cjs/index.js +56 -7
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +19 -6
- package/build/internal/cjs/index.typings.js +35 -5
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +9 -4
- package/build/internal/cjs/meta.js +0 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -15
- package/build/internal/es/index.mjs +56 -7
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +19 -6
- package/build/internal/es/index.typings.mjs +34 -5
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +9 -4
- package/build/internal/es/meta.mjs +0 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -337,7 +337,7 @@ interface AppDefinedAction {
|
|
|
337
337
|
* @deprecated Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
|
|
338
338
|
*
|
|
339
339
|
* > **Note**: Actions that follow a skipped action still run.
|
|
340
|
-
* @replacedBy
|
|
340
|
+
* @replacedBy skip_action_expression
|
|
341
341
|
* @targetRemovalDate 2026-02-01
|
|
342
342
|
*/
|
|
343
343
|
skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
|
|
@@ -373,6 +373,13 @@ interface ConditionAction {
|
|
|
373
373
|
interface CodeConditionAction {
|
|
374
374
|
/** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */
|
|
375
375
|
snippet?: CodeSnippet;
|
|
376
|
+
/**
|
|
377
|
+
* dynamic variables used in the code snippet. these variables can be used inside the code using var('variableName') function.
|
|
378
|
+
* this list is mainly for validation purpose.
|
|
379
|
+
* @maxSize 50
|
|
380
|
+
* @maxLength 100
|
|
381
|
+
*/
|
|
382
|
+
dynamicVariableExpressions?: string[];
|
|
376
383
|
/**
|
|
377
384
|
* IDs of actions to run when the condition evaluates to `true`.
|
|
378
385
|
* @maxSize 1
|
|
@@ -2081,13 +2088,11 @@ declare enum ActionErrorType {
|
|
|
2081
2088
|
MAPPING_SCHEMA_MISMATCH = "MAPPING_SCHEMA_MISMATCH",
|
|
2082
2089
|
/** Mapping variable missing from schema. */
|
|
2083
2090
|
MAPPING_VARIABLE_MISSING_FROM_SCHEMA = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA",
|
|
2084
|
-
/** Sample code run failed. */
|
|
2085
|
-
SAMPLE_CODE_RUN_FAILED = "SAMPLE_CODE_RUN_FAILED",
|
|
2086
2091
|
/** Configured post action not found. */
|
|
2087
2092
|
POST_ACTION_NOT_FOUND = "POST_ACTION_NOT_FOUND"
|
|
2088
2093
|
}
|
|
2089
2094
|
/** @enumType */
|
|
2090
|
-
type ActionErrorTypeWithLiterals = ActionErrorType | 'UNKNOWN_ACTION_ERROR_TYPE' | 'NOT_FOUND' | 'APP_NOT_INSTALLED' | 'INVALID_ACTION_KEY' | 'INVALID_MAPPING' | 'MAPPING_TYPE_MISMATCH' | 'MAPPING_MISSING_REQUIRED_FIELD' | 'MAPPING_SCHEMA_MISMATCH' | 'MAPPING_VARIABLE_MISSING_FROM_SCHEMA' | '
|
|
2095
|
+
type ActionErrorTypeWithLiterals = ActionErrorType | 'UNKNOWN_ACTION_ERROR_TYPE' | 'NOT_FOUND' | 'APP_NOT_INSTALLED' | 'INVALID_ACTION_KEY' | 'INVALID_MAPPING' | 'MAPPING_TYPE_MISMATCH' | 'MAPPING_MISSING_REQUIRED_FIELD' | 'MAPPING_SCHEMA_MISMATCH' | 'MAPPING_VARIABLE_MISSING_FROM_SCHEMA' | 'POST_ACTION_NOT_FOUND';
|
|
2091
2096
|
interface AutomationValidationError extends AutomationValidationErrorErrorOneOf {
|
|
2092
2097
|
/** Automation configuration error. */
|
|
2093
2098
|
configurationError?: AutomationConfigurationError;
|
|
@@ -2586,7 +2591,9 @@ interface GeneratePreinstalledAutomationOptions {
|
|
|
2586
2591
|
* @applicableIdentity APP
|
|
2587
2592
|
* @fqn wix.automations.v2.AutomationsService.QueryAutomations
|
|
2588
2593
|
*/
|
|
2589
|
-
declare function queryAutomations(): AutomationsQueryBuilder;
|
|
2594
|
+
declare function queryAutomations(options?: QueryAutomationsOptions): AutomationsQueryBuilder;
|
|
2595
|
+
interface QueryAutomationsOptions {
|
|
2596
|
+
}
|
|
2590
2597
|
interface QueryCursorResult {
|
|
2591
2598
|
cursors: Cursors;
|
|
2592
2599
|
hasNext: () => boolean;
|
|
@@ -2669,6 +2676,12 @@ interface AutomationsQueryBuilder {
|
|
|
2669
2676
|
/** @documentationMaturity preview */
|
|
2670
2677
|
find: () => Promise<AutomationsQueryResult>;
|
|
2671
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>>;
|
|
2672
2685
|
/**
|
|
2673
2686
|
* Get aggregated info
|
|
2674
2687
|
* @public
|
|
@@ -2962,4 +2975,4 @@ interface GetAutomationRevisionOptions {
|
|
|
2962
2975
|
fields?: RequestedFieldsWithLiterals[];
|
|
2963
2976
|
}
|
|
2964
2977
|
|
|
2965
|
-
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 };
|
|
@@ -887,7 +887,6 @@ var ActionErrorType = /* @__PURE__ */ ((ActionErrorType2) => {
|
|
|
887
887
|
ActionErrorType2["MAPPING_MISSING_REQUIRED_FIELD"] = "MAPPING_MISSING_REQUIRED_FIELD";
|
|
888
888
|
ActionErrorType2["MAPPING_SCHEMA_MISMATCH"] = "MAPPING_SCHEMA_MISMATCH";
|
|
889
889
|
ActionErrorType2["MAPPING_VARIABLE_MISSING_FROM_SCHEMA"] = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA";
|
|
890
|
-
ActionErrorType2["SAMPLE_CODE_RUN_FAILED"] = "SAMPLE_CODE_RUN_FAILED";
|
|
891
890
|
ActionErrorType2["POST_ACTION_NOT_FOUND"] = "POST_ACTION_NOT_FOUND";
|
|
892
891
|
return ActionErrorType2;
|
|
893
892
|
})(ActionErrorType || {});
|
|
@@ -1053,11 +1052,14 @@ async function generatePreinstalledAutomation2(automation, options) {
|
|
|
1053
1052
|
throw transformedError;
|
|
1054
1053
|
}
|
|
1055
1054
|
}
|
|
1056
|
-
function queryAutomations2() {
|
|
1057
|
-
const { httpClient, sideEffects } = arguments[
|
|
1055
|
+
function queryAutomations2(options) {
|
|
1056
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1058
1057
|
return queryBuilder({
|
|
1059
1058
|
func: async (payload) => {
|
|
1060
|
-
const reqOpts = queryAutomations(
|
|
1059
|
+
const reqOpts = queryAutomations({
|
|
1060
|
+
...payload,
|
|
1061
|
+
...options ?? {}
|
|
1062
|
+
});
|
|
1061
1063
|
sideEffects?.onSiteCall?.();
|
|
1062
1064
|
try {
|
|
1063
1065
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1069,7 +1071,7 @@ function queryAutomations2() {
|
|
|
1069
1071
|
}
|
|
1070
1072
|
},
|
|
1071
1073
|
requestTransformer: (query) => {
|
|
1072
|
-
const args = [query,
|
|
1074
|
+
const args = [query, options];
|
|
1073
1075
|
return renameKeysFromSDKRequestToRESTRequest({
|
|
1074
1076
|
...args?.[1],
|
|
1075
1077
|
query: args?.[0]
|
|
@@ -1096,6 +1098,32 @@ function queryAutomations2() {
|
|
|
1096
1098
|
transformationPaths: {}
|
|
1097
1099
|
});
|
|
1098
1100
|
}
|
|
1101
|
+
async function typedQueryAutomations(query, options) {
|
|
1102
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1103
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1104
|
+
query,
|
|
1105
|
+
...options
|
|
1106
|
+
});
|
|
1107
|
+
const reqOpts = queryAutomations(payload);
|
|
1108
|
+
sideEffects?.onSiteCall?.();
|
|
1109
|
+
try {
|
|
1110
|
+
const result = await httpClient.request(reqOpts);
|
|
1111
|
+
sideEffects?.onSuccess?.(result);
|
|
1112
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1113
|
+
} catch (err) {
|
|
1114
|
+
const transformedError = sdkTransformError(
|
|
1115
|
+
err,
|
|
1116
|
+
{
|
|
1117
|
+
spreadPathsToArguments: {},
|
|
1118
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1119
|
+
singleArgumentUnchanged: false
|
|
1120
|
+
},
|
|
1121
|
+
["query", "options"]
|
|
1122
|
+
);
|
|
1123
|
+
sideEffects?.onError?.(err);
|
|
1124
|
+
throw transformedError;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1099
1127
|
async function getAggregatedUsageInfo2(options) {
|
|
1100
1128
|
const { httpClient, sideEffects } = arguments[1];
|
|
1101
1129
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1456,6 +1484,7 @@ export {
|
|
|
1456
1484
|
publishDraftAutomation2 as publishDraftAutomation,
|
|
1457
1485
|
queryAutomations2 as queryAutomations,
|
|
1458
1486
|
queryAutomationsWithDrafts2 as queryAutomationsWithDrafts,
|
|
1487
|
+
typedQueryAutomations,
|
|
1459
1488
|
updateAutomation2 as updateAutomation,
|
|
1460
1489
|
updateDraftAutomation2 as updateDraftAutomation,
|
|
1461
1490
|
validateAutomation2 as validateAutomation,
|