@wix/auto_sdk_automations_automations-v-2 1.0.81 → 1.0.82
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 +14 -6
- package/build/cjs/index.js +70 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +29 -8
- package/build/cjs/index.typings.js +62 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +6 -5
- package/build/cjs/meta.js +54 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +14 -6
- package/build/es/index.mjs +69 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +29 -8
- package/build/es/index.typings.mjs +61 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +6 -5
- package/build/es/meta.mjs +53 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +14 -6
- package/build/internal/cjs/index.js +70 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +29 -8
- package/build/internal/cjs/index.typings.js +62 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +6 -5
- package/build/internal/cjs/meta.js +54 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +14 -6
- package/build/internal/es/index.mjs +69 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +29 -8
- package/build/internal/es/index.typings.mjs +61 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +6 -5
- package/build/internal/es/meta.mjs +53 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Automation, UpdateAutomation, BulkDeleteAutomationsResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.mjs';
|
|
3
|
-
export { AIMetadata, Action, ActionConfigurationError, ActionErrorType, ActionErrorTypeWithLiterals, ActionEvent, ActionInfoOneOf, ActionProviderQuotaInfo, ActionQuotaInfo, ActionSettings, ActionUsageSummary, ActionValidationError, ActionValidationErrorErrorOneOf, ActionValidationInfo, AdditionalInfo, AppDefinedAction, ApplicationError, ApplicationOrigin, Asset, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, AutomationConfiguration, AutomationConfigurationError, AutomationErrorType, AutomationErrorTypeWithLiterals, AutomationOriginInfoOneOf, AutomationQuerySpec, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, CommonQueryWithEntityContext, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetActionsQuotaInfoResponse, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeOverridePreinstalledWithRuntimeVersionRequest, MergeOverridePreinstalledWithRuntimeVersionResponse, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigrateVeloActionAutomationsRequest, MigrateVeloActionAutomationsResponse, Namespace, NamespaceChanged, NamespaceWithLiterals, Note, Notes, OdeditorAssigned, OdeditorUnassigned, Offset, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, Position, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryDraftAutomationsRequest, QueryDraftAutomationsResponse, QueryPreinstalledAutomationsForAppRequest,
|
|
2
|
+
import { Automation, UpdateAutomation, BulkDeleteAutomationsResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationQuery, QueryAutomationsOptions, typedQueryAutomations, AutomationsQueryBuilder } from './index.typings.mjs';
|
|
3
|
+
export { AIMetadata, Action, ActionConfigurationError, ActionErrorType, ActionErrorTypeWithLiterals, ActionEvent, ActionInfoOneOf, ActionProviderQuotaInfo, ActionQuotaInfo, ActionSettings, ActionUsageSummary, ActionValidationError, ActionValidationErrorErrorOneOf, ActionValidationInfo, AdditionalInfo, AppDefinedAction, ApplicationError, ApplicationOrigin, Asset, AuditInfo, AuditInfoIdOneOf, AutoArchivePolicy, AutomationConfiguration, AutomationConfigurationError, AutomationErrorType, AutomationErrorTypeWithLiterals, AutomationOriginInfoOneOf, AutomationQuerySpec, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, CommonQueryWithEntityContext, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CreatedByAppIdUsageSummary, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, Dimensions, Domain, DomainEvent, DomainEventBodyOneOf, DomainWithLiterals, DraftInfo, DraftPublished, DraftsInfo, Empty, Enrichment, Enrichments, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Filter, FilterValueSelection, FilterableAppDefinedActions, FutureDateActivationOffset, GeneratePreinstalledAutomationRequest, GetActionsQuotaInfoRequest, GetActionsQuotaInfoResponse, GetAggregatedUsageInfoRequest, GetAutomationActionSchemaRequest, GetAutomationActionSchemaResponse, GetAutomationRequest, GetAutomationResponse, GetAutomationRevisionRequest, GetOrCreateDraftAutomationRequest, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, Language, LanguageWithLiterals, MergeOverridePreinstalledWithRuntimeVersionRequest, MergeOverridePreinstalledWithRuntimeVersionResponse, MessageEnvelope, MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf, MigrateVeloActionAutomationsRequest, MigrateVeloActionAutomationsResponse, Namespace, NamespaceChanged, NamespaceWithLiterals, Note, Notes, OdeditorAssigned, OdeditorUnassigned, Offset, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, Position, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryDraftAutomationsRequest, QueryDraftAutomationsResponse, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsRequest, QueryPreinstalledAutomationsResponse, Quota, QuotaInfo, RateLimit, RateLimitAction, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, ServiceProvisioned, ServiceRemoved, SetVariablesAction, Severity, SeverityWithLiterals, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SplitAction, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioTwoAssigned, StudioTwoUnassigned, StudioUnassigned, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerSettings, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpdatePreinstalledAutomationResponse, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationResultStatus, ValidationResultStatusWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WixelAssigned, WixelUnassigned } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createAutomation$1(httpClient: HttpClient): CreateAutomationSignature;
|
|
6
6
|
interface CreateAutomationSignature {
|
|
@@ -59,6 +59,15 @@ interface GeneratePreinstalledAutomationSignature {
|
|
|
59
59
|
*/
|
|
60
60
|
(automation: Automation, options?: GeneratePreinstalledAutomationOptions): Promise<NonNullablePaths<GeneratePreinstalledAutomationResponse, `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>>;
|
|
61
61
|
}
|
|
62
|
+
declare function queryPreinstalledAutomationsForApp$1(httpClient: HttpClient): QueryPreinstalledAutomationsForAppSignature;
|
|
63
|
+
interface QueryPreinstalledAutomationsForAppSignature {
|
|
64
|
+
/**
|
|
65
|
+
* Allows an app to query its preinstalled automations.
|
|
66
|
+
*
|
|
67
|
+
* > **Note**: You must have an account permission to edit an app.
|
|
68
|
+
*/
|
|
69
|
+
(options?: QueryPreinstalledAutomationsForAppOptions): Promise<NonNullablePaths<QueryPreinstalledAutomationsForAppResponse, `automations` | `automations.${number}.applicationInfo.appId` | `automations.${number}.preinstalledInfo.appId` | `automations.${number}.createdBy.userId` | `automations.${number}.createdBy.appId` | `automations.${number}.name` | `automations.${number}.configuration.status` | `automations.${number}.configuration.trigger.appId` | `automations.${number}.configuration.trigger.triggerKey` | `automations.${number}.origin` | `automations.${number}.settings.hidden` | `automations.${number}.settings.readonly` | `automations.${number}.settings.disableDelete` | `automations.${number}.settings.disableStatusChange` | `automations.${number}.archived`, 6>>;
|
|
70
|
+
}
|
|
62
71
|
declare function getAggregatedUsageInfo$1(httpClient: HttpClient): GetAggregatedUsageInfoSignature;
|
|
63
72
|
interface GetAggregatedUsageInfoSignature {
|
|
64
73
|
/**
|
|
@@ -151,9 +160,7 @@ interface ValidateAutomationSignature {
|
|
|
151
160
|
*
|
|
152
161
|
* - Validates that the [trigger is properly configured](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/configure-your-automation#configuring-the-trigger).
|
|
153
162
|
* - Validates that all [actions are properly configured](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/configure-your-automation#configuring-actions) with correct [input](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions#understanding-input-mapping) and other mappings.
|
|
154
|
-
* - Validates custom logic added by [trigger](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action providers](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration).
|
|
155
|
-
*
|
|
156
|
-
* > **Note**: This method identifies configuration errors but doesn't fix them. It does not modify the automation.
|
|
163
|
+
* - Validates custom logic added by [trigger providers](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-provider-service-plugin/validate-configuration) and [action providers](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration).
|
|
157
164
|
* @param - Automation to validate.
|
|
158
165
|
*/
|
|
159
166
|
(automation: Automation, options?: ValidateAutomationOptions): Promise<NonNullablePaths<ValidateAutomationResponse, `status` | `triggerValidationErrors` | `triggerValidationErrors.${number}.configurationError.errorType` | `triggerValidationErrors.${number}.providerConfigurationError.message` | `triggerValidationErrors.${number}.providerConfigurationError.title` | `triggerValidationErrors.${number}.errorType` | `triggerValidationErrors.${number}.errorSeverity` | `actionValidationErrors` | `actionValidationErrors.${number}.configurationError.errorType` | `actionValidationErrors.${number}.providerConfigurationError.message` | `actionValidationErrors.${number}.providerConfigurationError.title` | `actionValidationErrors.${number}.actionId` | `actionValidationErrors.${number}.appId` | `actionValidationErrors.${number}.actionKey` | `actionValidationErrors.${number}.errorType` | `actionValidationErrors.${number}.errorSeverity`, 5>>;
|
|
@@ -188,6 +195,7 @@ declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAuto
|
|
|
188
195
|
declare const deleteAutomation: MaybeContext<BuildRESTFunction<typeof deleteAutomation$1> & typeof deleteAutomation$1>;
|
|
189
196
|
declare const bulkDeleteAutomations: MaybeContext<BuildRESTFunction<typeof bulkDeleteAutomations$1> & typeof bulkDeleteAutomations$1>;
|
|
190
197
|
declare const generatePreinstalledAutomation: MaybeContext<BuildRESTFunction<typeof generatePreinstalledAutomation$1> & typeof generatePreinstalledAutomation$1>;
|
|
198
|
+
declare const queryPreinstalledAutomationsForApp: MaybeContext<BuildRESTFunction<typeof queryPreinstalledAutomationsForApp$1> & typeof queryPreinstalledAutomationsForApp$1>;
|
|
191
199
|
declare const getAggregatedUsageInfo: MaybeContext<BuildRESTFunction<typeof getAggregatedUsageInfo$1> & typeof getAggregatedUsageInfo$1>;
|
|
192
200
|
declare const copyAutomation: MaybeContext<BuildRESTFunction<typeof copyAutomation$1> & typeof copyAutomation$1>;
|
|
193
201
|
declare const createDraftAutomation: MaybeContext<BuildRESTFunction<typeof createDraftAutomation$1> & typeof createDraftAutomation$1>;
|
|
@@ -214,4 +222,4 @@ declare const onAutomationDeleted: BuildEventDefinition<typeof onAutomationDelet
|
|
|
214
222
|
*/
|
|
215
223
|
declare const onAutomationUpdated: BuildEventDefinition<typeof onAutomationUpdated$1> & typeof onAutomationUpdated$1;
|
|
216
224
|
|
|
217
|
-
export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationQuery, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, QueryAutomationsOptions, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, UpdateAutomation, UpdateDraftAutomation, UpdateDraftAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, ValidateAutomationOptions, ValidateAutomationResponse, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
225
|
+
export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationQuery, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, QueryAutomationsOptions, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, QueryPreinstalledAutomationsForAppOptions, QueryPreinstalledAutomationsForAppResponse, UpdateAutomation, UpdateDraftAutomation, UpdateDraftAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, ValidateAutomationOptions, ValidateAutomationResponse, bulkCountAutomationsWithDrafts, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generatePreinstalledAutomation, getAggregatedUsageInfo, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, onAutomationCreated, onAutomationDeleted, onAutomationUpdated, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, queryPreinstalledAutomationsForApp, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };
|
|
@@ -305,6 +305,38 @@ function generatePreinstalledAutomation(payload) {
|
|
|
305
305
|
}
|
|
306
306
|
return __generatePreinstalledAutomation;
|
|
307
307
|
}
|
|
308
|
+
function queryPreinstalledAutomationsForApp(payload) {
|
|
309
|
+
function __queryPreinstalledAutomationsForApp({ host }) {
|
|
310
|
+
const metadata = {
|
|
311
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
312
|
+
method: "POST",
|
|
313
|
+
methodFqn: "wix.automations.v2.AutomationsService.QueryPreinstalledAutomationsForApp",
|
|
314
|
+
packageName: PACKAGE_NAME,
|
|
315
|
+
migrationOptions: {
|
|
316
|
+
optInTransformResponse: true
|
|
317
|
+
},
|
|
318
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
319
|
+
protoPath: "/v2/preinstalled-automations/query",
|
|
320
|
+
data: payload,
|
|
321
|
+
host
|
|
322
|
+
}),
|
|
323
|
+
data: payload,
|
|
324
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
325
|
+
{
|
|
326
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
327
|
+
paths: [
|
|
328
|
+
{ path: "automations.createdDate" },
|
|
329
|
+
{ path: "automations.updatedDate" },
|
|
330
|
+
{ path: "automations.draftUpdatedDate" },
|
|
331
|
+
{ path: "automations.autoArchivePolicy.archiveDate" }
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
])
|
|
335
|
+
};
|
|
336
|
+
return metadata;
|
|
337
|
+
}
|
|
338
|
+
return __queryPreinstalledAutomationsForApp;
|
|
339
|
+
}
|
|
308
340
|
function queryAutomations(payload) {
|
|
309
341
|
function __queryAutomations({ host }) {
|
|
310
342
|
const metadata = {
|
|
@@ -1059,6 +1091,34 @@ async function generatePreinstalledAutomation2(automation, options) {
|
|
|
1059
1091
|
throw transformedError;
|
|
1060
1092
|
}
|
|
1061
1093
|
}
|
|
1094
|
+
async function queryPreinstalledAutomationsForApp2(options) {
|
|
1095
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1096
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1097
|
+
query: options?.query,
|
|
1098
|
+
appId: options?.appId
|
|
1099
|
+
});
|
|
1100
|
+
const reqOpts = queryPreinstalledAutomationsForApp(
|
|
1101
|
+
payload
|
|
1102
|
+
);
|
|
1103
|
+
sideEffects?.onSiteCall?.();
|
|
1104
|
+
try {
|
|
1105
|
+
const result = await httpClient.request(reqOpts);
|
|
1106
|
+
sideEffects?.onSuccess?.(result);
|
|
1107
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1108
|
+
} catch (err) {
|
|
1109
|
+
const transformedError = sdkTransformError(
|
|
1110
|
+
err,
|
|
1111
|
+
{
|
|
1112
|
+
spreadPathsToArguments: {},
|
|
1113
|
+
explicitPathsToArguments: { query: "$[0].query", appId: "$[0].appId" },
|
|
1114
|
+
singleArgumentUnchanged: false
|
|
1115
|
+
},
|
|
1116
|
+
["options"]
|
|
1117
|
+
);
|
|
1118
|
+
sideEffects?.onError?.(err);
|
|
1119
|
+
throw transformedError;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1062
1122
|
function queryAutomations2(options) {
|
|
1063
1123
|
const { httpClient, sideEffects } = arguments[1];
|
|
1064
1124
|
return queryBuilder({
|
|
@@ -1498,6 +1558,13 @@ function generatePreinstalledAutomation3(httpClient) {
|
|
|
1498
1558
|
{ httpClient }
|
|
1499
1559
|
);
|
|
1500
1560
|
}
|
|
1561
|
+
function queryPreinstalledAutomationsForApp3(httpClient) {
|
|
1562
|
+
return (options) => queryPreinstalledAutomationsForApp2(
|
|
1563
|
+
options,
|
|
1564
|
+
// @ts-ignore
|
|
1565
|
+
{ httpClient }
|
|
1566
|
+
);
|
|
1567
|
+
}
|
|
1501
1568
|
function queryAutomations3(httpClient) {
|
|
1502
1569
|
return (options) => queryAutomations2(
|
|
1503
1570
|
options,
|
|
@@ -1682,6 +1749,7 @@ var updateAutomation4 = /* @__PURE__ */ createRESTModule(updateAutomation3);
|
|
|
1682
1749
|
var deleteAutomation4 = /* @__PURE__ */ createRESTModule(deleteAutomation3);
|
|
1683
1750
|
var bulkDeleteAutomations4 = /* @__PURE__ */ createRESTModule(bulkDeleteAutomations3);
|
|
1684
1751
|
var generatePreinstalledAutomation4 = /* @__PURE__ */ createRESTModule(generatePreinstalledAutomation3);
|
|
1752
|
+
var queryPreinstalledAutomationsForApp4 = /* @__PURE__ */ createRESTModule(queryPreinstalledAutomationsForApp3);
|
|
1685
1753
|
var getAggregatedUsageInfo4 = /* @__PURE__ */ createRESTModule(getAggregatedUsageInfo3);
|
|
1686
1754
|
var copyAutomation4 = /* @__PURE__ */ createRESTModule(copyAutomation3);
|
|
1687
1755
|
var createDraftAutomation4 = /* @__PURE__ */ createRESTModule(createDraftAutomation3);
|
|
@@ -1746,6 +1814,7 @@ export {
|
|
|
1746
1814
|
publishDraftAutomation4 as publishDraftAutomation,
|
|
1747
1815
|
queryAutomations4 as queryAutomations,
|
|
1748
1816
|
queryAutomationsWithDrafts4 as queryAutomationsWithDrafts,
|
|
1817
|
+
queryPreinstalledAutomationsForApp4 as queryPreinstalledAutomationsForApp,
|
|
1749
1818
|
updateAutomation4 as updateAutomation,
|
|
1750
1819
|
updateDraftAutomation4 as updateDraftAutomation,
|
|
1751
1820
|
validateAutomation4 as validateAutomation,
|