@wix/auto_sdk_automations_automations-v-2 1.0.80 → 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 +75 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +30 -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 +74 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +30 -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 +75 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +30 -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 +74 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +30 -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
package/build/cjs/index.d.ts
CHANGED
|
@@ -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.js';
|
|
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.js';
|
|
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.js';
|
|
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 };
|
package/build/cjs/index.js
CHANGED
|
@@ -61,6 +61,7 @@ __export(index_exports, {
|
|
|
61
61
|
publishDraftAutomation: () => publishDraftAutomation4,
|
|
62
62
|
queryAutomations: () => queryAutomations4,
|
|
63
63
|
queryAutomationsWithDrafts: () => queryAutomationsWithDrafts4,
|
|
64
|
+
queryPreinstalledAutomationsForApp: () => queryPreinstalledAutomationsForApp4,
|
|
64
65
|
updateAutomation: () => updateAutomation4,
|
|
65
66
|
updateDraftAutomation: () => updateDraftAutomation4,
|
|
66
67
|
validateAutomation: () => validateAutomation4,
|
|
@@ -372,6 +373,38 @@ function generatePreinstalledAutomation(payload) {
|
|
|
372
373
|
}
|
|
373
374
|
return __generatePreinstalledAutomation;
|
|
374
375
|
}
|
|
376
|
+
function queryPreinstalledAutomationsForApp(payload) {
|
|
377
|
+
function __queryPreinstalledAutomationsForApp({ host }) {
|
|
378
|
+
const metadata = {
|
|
379
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
380
|
+
method: "POST",
|
|
381
|
+
methodFqn: "wix.automations.v2.AutomationsService.QueryPreinstalledAutomationsForApp",
|
|
382
|
+
packageName: PACKAGE_NAME,
|
|
383
|
+
migrationOptions: {
|
|
384
|
+
optInTransformResponse: true
|
|
385
|
+
},
|
|
386
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
387
|
+
protoPath: "/v2/preinstalled-automations/query",
|
|
388
|
+
data: payload,
|
|
389
|
+
host
|
|
390
|
+
}),
|
|
391
|
+
data: payload,
|
|
392
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
393
|
+
{
|
|
394
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
395
|
+
paths: [
|
|
396
|
+
{ path: "automations.createdDate" },
|
|
397
|
+
{ path: "automations.updatedDate" },
|
|
398
|
+
{ path: "automations.draftUpdatedDate" },
|
|
399
|
+
{ path: "automations.autoArchivePolicy.archiveDate" }
|
|
400
|
+
]
|
|
401
|
+
}
|
|
402
|
+
])
|
|
403
|
+
};
|
|
404
|
+
return metadata;
|
|
405
|
+
}
|
|
406
|
+
return __queryPreinstalledAutomationsForApp;
|
|
407
|
+
}
|
|
375
408
|
function queryAutomations(payload) {
|
|
376
409
|
function __queryAutomations({ host }) {
|
|
377
410
|
const metadata = {
|
|
@@ -1126,6 +1159,34 @@ async function generatePreinstalledAutomation2(automation, options) {
|
|
|
1126
1159
|
throw transformedError;
|
|
1127
1160
|
}
|
|
1128
1161
|
}
|
|
1162
|
+
async function queryPreinstalledAutomationsForApp2(options) {
|
|
1163
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1164
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1165
|
+
query: options?.query,
|
|
1166
|
+
appId: options?.appId
|
|
1167
|
+
});
|
|
1168
|
+
const reqOpts = queryPreinstalledAutomationsForApp(
|
|
1169
|
+
payload
|
|
1170
|
+
);
|
|
1171
|
+
sideEffects?.onSiteCall?.();
|
|
1172
|
+
try {
|
|
1173
|
+
const result = await httpClient.request(reqOpts);
|
|
1174
|
+
sideEffects?.onSuccess?.(result);
|
|
1175
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1176
|
+
} catch (err) {
|
|
1177
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1178
|
+
err,
|
|
1179
|
+
{
|
|
1180
|
+
spreadPathsToArguments: {},
|
|
1181
|
+
explicitPathsToArguments: { query: "$[0].query", appId: "$[0].appId" },
|
|
1182
|
+
singleArgumentUnchanged: false
|
|
1183
|
+
},
|
|
1184
|
+
["options"]
|
|
1185
|
+
);
|
|
1186
|
+
sideEffects?.onError?.(err);
|
|
1187
|
+
throw transformedError;
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1129
1190
|
function queryAutomations2(options) {
|
|
1130
1191
|
const { httpClient, sideEffects } = arguments[1];
|
|
1131
1192
|
return (0, import_query_builder.queryBuilder)({
|
|
@@ -1565,6 +1626,13 @@ function generatePreinstalledAutomation3(httpClient) {
|
|
|
1565
1626
|
{ httpClient }
|
|
1566
1627
|
);
|
|
1567
1628
|
}
|
|
1629
|
+
function queryPreinstalledAutomationsForApp3(httpClient) {
|
|
1630
|
+
return (options) => queryPreinstalledAutomationsForApp2(
|
|
1631
|
+
options,
|
|
1632
|
+
// @ts-ignore
|
|
1633
|
+
{ httpClient }
|
|
1634
|
+
);
|
|
1635
|
+
}
|
|
1568
1636
|
function queryAutomations3(httpClient) {
|
|
1569
1637
|
return (options) => queryAutomations2(
|
|
1570
1638
|
options,
|
|
@@ -1717,7 +1785,11 @@ var onAutomationUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
1717
1785
|
{ path: "entity.updatedDate" },
|
|
1718
1786
|
{ path: "entity.draftUpdatedDate" },
|
|
1719
1787
|
{ path: "entity.autoArchivePolicy.archiveDate" },
|
|
1720
|
-
{ path: "metadata.eventTime" }
|
|
1788
|
+
{ path: "metadata.eventTime" },
|
|
1789
|
+
{ path: "modifiedFields.createdDate" },
|
|
1790
|
+
{ path: "modifiedFields.updatedDate" },
|
|
1791
|
+
{ path: "modifiedFields.draftUpdatedDate" },
|
|
1792
|
+
{ path: "modifiedFields.autoArchivePolicy.archiveDate" }
|
|
1721
1793
|
]
|
|
1722
1794
|
}
|
|
1723
1795
|
])
|
|
@@ -1745,6 +1817,7 @@ var updateAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModul
|
|
|
1745
1817
|
var deleteAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteAutomation3);
|
|
1746
1818
|
var bulkDeleteAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteAutomations3);
|
|
1747
1819
|
var generatePreinstalledAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(generatePreinstalledAutomation3);
|
|
1820
|
+
var queryPreinstalledAutomationsForApp4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryPreinstalledAutomationsForApp3);
|
|
1748
1821
|
var getAggregatedUsageInfo4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAggregatedUsageInfo3);
|
|
1749
1822
|
var copyAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(copyAutomation3);
|
|
1750
1823
|
var createDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDraftAutomation3);
|
|
@@ -1810,6 +1883,7 @@ var onAutomationUpdated2 = (0, import_event_definition_modules.createEventModule
|
|
|
1810
1883
|
publishDraftAutomation,
|
|
1811
1884
|
queryAutomations,
|
|
1812
1885
|
queryAutomationsWithDrafts,
|
|
1886
|
+
queryPreinstalledAutomationsForApp,
|
|
1813
1887
|
updateAutomation,
|
|
1814
1888
|
updateDraftAutomation,
|
|
1815
1889
|
validateAutomation,
|