@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 };
|
|
@@ -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,
|
|
@@ -951,7 +952,6 @@ var ActionErrorType = /* @__PURE__ */ ((ActionErrorType2) => {
|
|
|
951
952
|
ActionErrorType2["MAPPING_MISSING_REQUIRED_FIELD"] = "MAPPING_MISSING_REQUIRED_FIELD";
|
|
952
953
|
ActionErrorType2["MAPPING_SCHEMA_MISMATCH"] = "MAPPING_SCHEMA_MISMATCH";
|
|
953
954
|
ActionErrorType2["MAPPING_VARIABLE_MISSING_FROM_SCHEMA"] = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA";
|
|
954
|
-
ActionErrorType2["SAMPLE_CODE_RUN_FAILED"] = "SAMPLE_CODE_RUN_FAILED";
|
|
955
955
|
ActionErrorType2["POST_ACTION_NOT_FOUND"] = "POST_ACTION_NOT_FOUND";
|
|
956
956
|
return ActionErrorType2;
|
|
957
957
|
})(ActionErrorType || {});
|
|
@@ -1117,11 +1117,14 @@ async function generatePreinstalledAutomation2(automation, options) {
|
|
|
1117
1117
|
throw transformedError;
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
function queryAutomations2() {
|
|
1121
|
-
const { httpClient, sideEffects } = arguments[
|
|
1120
|
+
function queryAutomations2(options) {
|
|
1121
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1122
1122
|
return (0, import_query_builder.queryBuilder)({
|
|
1123
1123
|
func: async (payload) => {
|
|
1124
|
-
const reqOpts = queryAutomations(
|
|
1124
|
+
const reqOpts = queryAutomations({
|
|
1125
|
+
...payload,
|
|
1126
|
+
...options ?? {}
|
|
1127
|
+
});
|
|
1125
1128
|
sideEffects?.onSiteCall?.();
|
|
1126
1129
|
try {
|
|
1127
1130
|
const result = await httpClient.request(reqOpts);
|
|
@@ -1133,7 +1136,7 @@ function queryAutomations2() {
|
|
|
1133
1136
|
}
|
|
1134
1137
|
},
|
|
1135
1138
|
requestTransformer: (query) => {
|
|
1136
|
-
const args = [query,
|
|
1139
|
+
const args = [query, options];
|
|
1137
1140
|
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1138
1141
|
...args?.[1],
|
|
1139
1142
|
query: args?.[0]
|
|
@@ -1160,6 +1163,32 @@ function queryAutomations2() {
|
|
|
1160
1163
|
transformationPaths: {}
|
|
1161
1164
|
});
|
|
1162
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
|
+
}
|
|
1163
1192
|
async function getAggregatedUsageInfo2(options) {
|
|
1164
1193
|
const { httpClient, sideEffects } = arguments[1];
|
|
1165
1194
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1521,6 +1550,7 @@ async function getAutomationRevision2(automationId, options) {
|
|
|
1521
1550
|
publishDraftAutomation,
|
|
1522
1551
|
queryAutomations,
|
|
1523
1552
|
queryAutomationsWithDrafts,
|
|
1553
|
+
typedQueryAutomations,
|
|
1524
1554
|
updateAutomation,
|
|
1525
1555
|
updateDraftAutomation,
|
|
1526
1556
|
validateAutomation,
|