@wix/auto_sdk_automations_automations-v-2 1.0.27 → 1.0.29
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 +4 -4
- package/build/cjs/index.js +22 -16
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +179 -264
- package/build/cjs/index.typings.js +13 -13
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +36 -36
- package/build/es/index.d.mts +4 -4
- package/build/es/index.mjs +22 -16
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +179 -264
- package/build/es/index.typings.mjs +13 -13
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +36 -36
- package/build/internal/cjs/index.d.ts +4 -4
- package/build/internal/cjs/index.js +22 -16
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +179 -264
- package/build/internal/cjs/index.typings.js +13 -13
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +36 -36
- package/build/internal/es/index.d.mts +4 -4
- package/build/internal/es/index.mjs +22 -16
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +179 -264
- package/build/internal/es/index.typings.mjs +13 -13
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +36 -36
- package/package.json +2 -2
|
@@ -245,6 +245,23 @@ declare enum Operator {
|
|
|
245
245
|
}
|
|
246
246
|
/** @enumType */
|
|
247
247
|
type OperatorWithLiterals = Operator | 'UNKNOWN_OPERATOR' | 'OR' | 'AND';
|
|
248
|
+
interface CodeSnippet {
|
|
249
|
+
/** Logical operator used to evaluate the condition expressions. */
|
|
250
|
+
language?: LanguageWithLiterals;
|
|
251
|
+
/**
|
|
252
|
+
* Expressions evaluated using the selected operator. this code should comply the language syntax. and format
|
|
253
|
+
* @maxLength 1000
|
|
254
|
+
*/
|
|
255
|
+
code?: string;
|
|
256
|
+
}
|
|
257
|
+
declare enum Language {
|
|
258
|
+
/** Unknown. */
|
|
259
|
+
UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
|
|
260
|
+
/** `JAVASCRIPT` language. */
|
|
261
|
+
JAVASCRIPT = "JAVASCRIPT"
|
|
262
|
+
}
|
|
263
|
+
/** @enumType */
|
|
264
|
+
type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';
|
|
248
265
|
declare enum Type {
|
|
249
266
|
/** Based on the trigger. */
|
|
250
267
|
UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
|
|
@@ -314,6 +331,22 @@ interface ConditionAction {
|
|
|
314
331
|
*/
|
|
315
332
|
falsePostActionIds?: string[];
|
|
316
333
|
}
|
|
334
|
+
interface CodeConditionAction {
|
|
335
|
+
/** 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. */
|
|
336
|
+
snippet?: CodeSnippet;
|
|
337
|
+
/**
|
|
338
|
+
* IDs of actions to run when the condition evaluates to `true`.
|
|
339
|
+
* @maxSize 20
|
|
340
|
+
* @format GUID
|
|
341
|
+
*/
|
|
342
|
+
truePostActionIds?: string[];
|
|
343
|
+
/**
|
|
344
|
+
* IDs of actions to run when the condition evaluates to `false`.
|
|
345
|
+
* @maxSize 20
|
|
346
|
+
* @format GUID
|
|
347
|
+
*/
|
|
348
|
+
falsePostActionIds?: string[];
|
|
349
|
+
}
|
|
317
350
|
interface DelayAction {
|
|
318
351
|
/**
|
|
319
352
|
* Time to wait before running the action. The wait time starts from when the current action completes.
|
|
@@ -450,12 +483,12 @@ interface Action extends ActionInfoOneOf {
|
|
|
450
483
|
*/
|
|
451
484
|
namespace?: string | null;
|
|
452
485
|
/**
|
|
453
|
-
*
|
|
486
|
+
* skip_action_expression: evaluates to a boolean to decide if the action should be skipped
|
|
454
487
|
* For ConditionAction: if skipped, true_post_action_ids execute; false_post_action_ids are skipped
|
|
455
|
-
* SplitAction and OutputAction do not support
|
|
488
|
+
* SplitAction and OutputAction do not support skip_action_expression
|
|
456
489
|
* @maxLength 1000
|
|
457
490
|
*/
|
|
458
|
-
|
|
491
|
+
skipActionExpression?: string | null;
|
|
459
492
|
}
|
|
460
493
|
/** @oneof */
|
|
461
494
|
interface ActionInfoOneOf {
|
|
@@ -548,39 +581,6 @@ interface DraftInfo {
|
|
|
548
581
|
*/
|
|
549
582
|
originalAutomationId?: string | null;
|
|
550
583
|
}
|
|
551
|
-
interface CodeSnippet {
|
|
552
|
-
/** Logical operator used to evaluate the condition expressions. */
|
|
553
|
-
language?: LanguageWithLiterals;
|
|
554
|
-
/**
|
|
555
|
-
* Expressions evaluated using the selected operator. this code should comply the language syntax. and format
|
|
556
|
-
* @maxLength 1000
|
|
557
|
-
*/
|
|
558
|
-
code?: string;
|
|
559
|
-
}
|
|
560
|
-
declare enum Language {
|
|
561
|
-
/** Unknown. */
|
|
562
|
-
UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
|
|
563
|
-
/** `JAVASCRIPT` language. */
|
|
564
|
-
JAVASCRIPT = "JAVASCRIPT"
|
|
565
|
-
}
|
|
566
|
-
/** @enumType */
|
|
567
|
-
type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';
|
|
568
|
-
interface CodeConditionAction {
|
|
569
|
-
/** 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. */
|
|
570
|
-
snippet?: CodeSnippet;
|
|
571
|
-
/**
|
|
572
|
-
* IDs of actions to run when the condition evaluates to `true`.
|
|
573
|
-
* @maxSize 20
|
|
574
|
-
* @format GUID
|
|
575
|
-
*/
|
|
576
|
-
truePostActionIds?: string[];
|
|
577
|
-
/**
|
|
578
|
-
* IDs of actions to run when the condition evaluates to `false`.
|
|
579
|
-
* @maxSize 20
|
|
580
|
-
* @format GUID
|
|
581
|
-
*/
|
|
582
|
-
falsePostActionIds?: string[];
|
|
583
|
-
}
|
|
584
584
|
interface AutoArchivePolicy {
|
|
585
585
|
/**
|
|
586
586
|
* Date when to archive the automation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
2
|
import { Automation, UpdateAutomation, BulkDeleteAutomationsResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, AutomationsQueryBuilder, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GetOrCreateDraftAutomationResponse, UpdateDraftAutomation, UpdateDraftAutomationResponse, QueryAutomationsWithDraftsOptions, QueryAutomationsWithDraftsResponse, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, PublishDraftAutomationResponse, ValidateAutomationOptions, ValidateAutomationResponse, ValidateAutomationByIdOptions, ValidateAutomationByIdResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope } from './index.typings.mjs';
|
|
3
|
-
export { 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,
|
|
3
|
+
export { 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, AutomationSettings, AutomationValidationError, AutomationValidationErrorErrorOneOf, AutomationValidationErrorValidationErrorType, AutomationValidationErrorValidationErrorTypeWithLiterals, AutomationsQueryResult, BaseEventMetadata, BulkActionMetadata, BulkCountAutomationsWithDraftsRequest, BulkDeleteAutomationsRequest, BulkDeleteResult, CTA, CodeConditionAction, CodeSnippet, ConditionAction, ConditionExpressionGroup, CopyAutomationRequest, CreateAutomationRequest, CreateAutomationResponse, CreateDraftAutomationRequest, CreatePreinstalledAutomationRequest, CreatePreinstalledAutomationResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DelayAction, DeleteAutomationRequest, DeleteAutomationResponse, DeleteContext, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse, DeletePreinstalledAutomationRequest, DeletePreinstalledAutomationResponse, DeleteStatus, DeleteStatusWithLiterals, DeletedWithEntity, 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, OdeditorAssigned, OdeditorUnassigned, Operator, OperatorWithLiterals, Origin, OriginAutomationInfo, OriginWithLiterals, OutputAction, Path, PicassoAssigned, PicassoUnassigned, Plan, PreinstalledAutomationSpecInfo, PreinstalledOrigin, ProviderConfigurationError, PublishDraftAutomationRequest, QueryAutomationsRequest, QueryAutomationsResponse, QueryAutomationsWithDraftsRequest, QueryPreinstalledAutomationsForAppRequest, QueryPreinstalledAutomationsForAppResponse, QueryPreinstalledAutomationsRequest, QueryPreinstalledAutomationsResponse, Quota, QuotaInfo, RateLimit, RateLimitAction, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, ServiceProvisioned, ServiceRemoved, SetVariablesAction, SiteCreated, SiteCreatedContext, SiteCreatedContextWithLiterals, SiteDeleted, SiteHardDeleted, SiteMarkedAsTemplate, SiteMarkedAsWixSite, SitePublished, SitePurgedExternally, SiteRenamed, SiteTransferred, SiteUndeleted, SiteUnpublished, SiteUrlChanged, SortOrder, SortOrderWithLiterals, Sorting, SplitAction, State, StateWithLiterals, Status, StatusWithLiterals, StudioAssigned, StudioUnassigned, TimeUnit, TimeUnitWithLiterals, Trigger, TriggerConfigurationError, TriggerErrorType, TriggerErrorTypeWithLiterals, TriggerUsageSummary, TriggerValidationError, TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType, TriggerValidationErrorValidationErrorTypeWithLiterals, Type, TypeWithLiterals, UpdateAutomationRequest, UpdateAutomationResponse, UpdateDraftAutomationRequest, UpdatePreinstalledAutomationRequest, UpdatePreinstalledAutomationResponse, UpdatedWithPreviousEntity, UpgradeCTA, ValidateAutomationByIdRequest, ValidateAutomationRequest, ValidationErrorSeverity, ValidationErrorSeverityWithLiterals, ValidationErrorType, ValidationErrorTypeWithLiterals, ValidationSettings, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createAutomation$1(httpClient: HttpClient): CreateAutomationSignature;
|
|
6
6
|
interface CreateAutomationSignature {
|
|
@@ -203,14 +203,14 @@ declare const getAutomationRevision: MaybeContext<BuildRESTFunction<typeof getAu
|
|
|
203
203
|
/**
|
|
204
204
|
* Triggered when a new automation is created.
|
|
205
205
|
*/
|
|
206
|
-
declare const onAutomationCreated: BuildEventDefinition<typeof onAutomationCreated$1
|
|
206
|
+
declare const onAutomationCreated: BuildEventDefinition<typeof onAutomationCreated$1> & typeof onAutomationCreated$1;
|
|
207
207
|
/**
|
|
208
208
|
* Triggered when an automation is deleted.
|
|
209
209
|
*/
|
|
210
|
-
declare const onAutomationDeleted: BuildEventDefinition<typeof onAutomationDeleted$1
|
|
210
|
+
declare const onAutomationDeleted: BuildEventDefinition<typeof onAutomationDeleted$1> & typeof onAutomationDeleted$1;
|
|
211
211
|
/**
|
|
212
212
|
* Triggered when an automation is updated.
|
|
213
213
|
*/
|
|
214
|
-
declare const onAutomationUpdated: BuildEventDefinition<typeof onAutomationUpdated$1
|
|
214
|
+
declare const onAutomationUpdated: BuildEventDefinition<typeof onAutomationUpdated$1> & typeof onAutomationUpdated$1;
|
|
215
215
|
|
|
216
216
|
export { Automation, AutomationCreatedEnvelope, AutomationDeletedEnvelope, AutomationUpdatedEnvelope, AutomationsQueryBuilder, BulkCountAutomationsWithDraftsOptions, BulkCountAutomationsWithDraftsResponse, BulkDeleteAutomationsResponse, CopyAutomationOptions, CopyAutomationResponse, CreateDraftAutomationOptions, CreateDraftAutomationResponse, GeneratePreinstalledAutomationOptions, GeneratePreinstalledAutomationResponse, GetAggregatedUsageInfoOptions, GetAggregatedUsageInfoResponse, GetAutomationRevisionOptions, GetAutomationRevisionResponse, GetOrCreateDraftAutomationResponse, PublishDraftAutomationResponse, 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 };
|
|
@@ -681,6 +681,11 @@ var Operator = /* @__PURE__ */ ((Operator2) => {
|
|
|
681
681
|
Operator2["AND"] = "AND";
|
|
682
682
|
return Operator2;
|
|
683
683
|
})(Operator || {});
|
|
684
|
+
var Language = /* @__PURE__ */ ((Language2) => {
|
|
685
|
+
Language2["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
|
|
686
|
+
Language2["JAVASCRIPT"] = "JAVASCRIPT";
|
|
687
|
+
return Language2;
|
|
688
|
+
})(Language || {});
|
|
684
689
|
var Type = /* @__PURE__ */ ((Type2) => {
|
|
685
690
|
Type2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
|
|
686
691
|
Type2["APP_DEFINED"] = "APP_DEFINED";
|
|
@@ -702,19 +707,6 @@ var Origin = /* @__PURE__ */ ((Origin2) => {
|
|
|
702
707
|
Origin2["PREINSTALLED"] = "PREINSTALLED";
|
|
703
708
|
return Origin2;
|
|
704
709
|
})(Origin || {});
|
|
705
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
706
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
707
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
708
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
709
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
710
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
711
|
-
return WebhookIdentityType2;
|
|
712
|
-
})(WebhookIdentityType || {});
|
|
713
|
-
var Language = /* @__PURE__ */ ((Language2) => {
|
|
714
|
-
Language2["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
|
|
715
|
-
Language2["JAVASCRIPT"] = "JAVASCRIPT";
|
|
716
|
-
return Language2;
|
|
717
|
-
})(Language || {});
|
|
718
710
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
719
711
|
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
720
712
|
RequestedFields2["OVERRIDE_SCHEMA"] = "OVERRIDE_SCHEMA";
|
|
@@ -839,6 +831,14 @@ var AutomationErrorType = /* @__PURE__ */ ((AutomationErrorType2) => {
|
|
|
839
831
|
AutomationErrorType2["UNKNOWN_AUTOMATION_ERROR_TYPE"] = "UNKNOWN_AUTOMATION_ERROR_TYPE";
|
|
840
832
|
return AutomationErrorType2;
|
|
841
833
|
})(AutomationErrorType || {});
|
|
834
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
835
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
836
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
837
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
838
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
839
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
840
|
+
return WebhookIdentityType2;
|
|
841
|
+
})(WebhookIdentityType || {});
|
|
842
842
|
async function createAutomation2(automation) {
|
|
843
843
|
const { httpClient, sideEffects } = arguments[1];
|
|
844
844
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1573,9 +1573,15 @@ var publishDraftAutomation4 = /* @__PURE__ */ createRESTModule(publishDraftAutom
|
|
|
1573
1573
|
var validateAutomation4 = /* @__PURE__ */ createRESTModule(validateAutomation3);
|
|
1574
1574
|
var validateAutomationById4 = /* @__PURE__ */ createRESTModule(validateAutomationById3);
|
|
1575
1575
|
var getAutomationRevision4 = /* @__PURE__ */ createRESTModule(getAutomationRevision3);
|
|
1576
|
-
var onAutomationCreated2 = createEventModule(
|
|
1577
|
-
|
|
1578
|
-
|
|
1576
|
+
var onAutomationCreated2 = createEventModule(
|
|
1577
|
+
onAutomationCreated
|
|
1578
|
+
);
|
|
1579
|
+
var onAutomationDeleted2 = createEventModule(
|
|
1580
|
+
onAutomationDeleted
|
|
1581
|
+
);
|
|
1582
|
+
var onAutomationUpdated2 = createEventModule(
|
|
1583
|
+
onAutomationUpdated
|
|
1584
|
+
);
|
|
1579
1585
|
export {
|
|
1580
1586
|
ActionErrorType,
|
|
1581
1587
|
AutomationErrorType,
|