@wix/auto_sdk_automations_automations-v-2 1.0.0 → 1.0.2
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/src/automations-v2-automation-automations-v-2.context.d.ts +2 -2
- package/build/cjs/src/automations-v2-automation-automations-v-2.context.js +2 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.context.js.map +1 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +1 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.public.js +2 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.public.js.map +1 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +113 -44
- package/build/cjs/src/automations-v2-automation-automations-v-2.types.js +8 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.types.js.map +1 -1
- package/build/cjs/src/automations-v2-automation-automations-v-2.universal.d.ts +125 -64
- package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js +11 -2
- package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +1 -1
- package/build/es/src/automations-v2-automation-automations-v-2.context.d.ts +2 -2
- package/build/es/src/automations-v2-automation-automations-v-2.context.js +1 -1
- package/build/es/src/automations-v2-automation-automations-v-2.context.js.map +1 -1
- package/build/es/src/automations-v2-automation-automations-v-2.public.d.ts +1 -1
- package/build/es/src/automations-v2-automation-automations-v-2.public.js +1 -1
- package/build/es/src/automations-v2-automation-automations-v-2.public.js.map +1 -1
- package/build/es/src/automations-v2-automation-automations-v-2.types.d.ts +113 -44
- package/build/es/src/automations-v2-automation-automations-v-2.types.js +7 -0
- package/build/es/src/automations-v2-automation-automations-v-2.types.js.map +1 -1
- package/build/es/src/automations-v2-automation-automations-v-2.universal.d.ts +125 -64
- package/build/es/src/automations-v2-automation-automations-v-2.universal.js +10 -1
- package/build/es/src/automations-v2-automation-automations-v-2.universal.js.map +1 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +2 -2
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js +2 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js.map +1 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +1 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js +2 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js.map +1 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +113 -44
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js +8 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js.map +1 -1
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.d.ts +125 -64
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js +11 -2
- package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +1 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.context.d.ts +2 -2
- package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js +1 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js.map +1 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.public.d.ts +1 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js +1 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js.map +1 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.types.d.ts +113 -44
- package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js +7 -0
- package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js.map +1 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.d.ts +125 -64
- package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js +10 -1
- package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -53,7 +53,7 @@ export interface Automation extends AutomationOriginInfoOneOf {
|
|
|
53
53
|
* How the automation was added to the user's site.
|
|
54
54
|
* @immutable
|
|
55
55
|
*/
|
|
56
|
-
origin?:
|
|
56
|
+
origin?: OriginWithLiterals;
|
|
57
57
|
/** Automation settings. */
|
|
58
58
|
settings?: AutomationSettings;
|
|
59
59
|
/**
|
|
@@ -113,6 +113,8 @@ export declare enum Domain {
|
|
|
113
113
|
/** Wix account-level domain. */
|
|
114
114
|
WIX_ACCOUNT = "WIX_ACCOUNT"
|
|
115
115
|
}
|
|
116
|
+
/** @enumType */
|
|
117
|
+
export type DomainWithLiterals = Domain | 'USER' | 'WIX' | 'WIX_ACCOUNT';
|
|
116
118
|
export interface Enrichment {
|
|
117
119
|
/**
|
|
118
120
|
* Enrichment input mappings.
|
|
@@ -151,7 +153,7 @@ export interface AuditInfoIdOneOf {
|
|
|
151
153
|
}
|
|
152
154
|
export interface AutomationConfiguration {
|
|
153
155
|
/** Status of the automation on the site. */
|
|
154
|
-
status?:
|
|
156
|
+
status?: StatusWithLiterals;
|
|
155
157
|
/** Trigger configuration. */
|
|
156
158
|
trigger?: Trigger;
|
|
157
159
|
/**
|
|
@@ -178,6 +180,8 @@ export declare enum TimeUnit {
|
|
|
178
180
|
/** Months. */
|
|
179
181
|
MONTHS = "MONTHS"
|
|
180
182
|
}
|
|
183
|
+
/** @enumType */
|
|
184
|
+
export type TimeUnitWithLiterals = TimeUnit | 'UNKNOWN_TIME_UNIT' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS';
|
|
181
185
|
export interface Filter {
|
|
182
186
|
/**
|
|
183
187
|
* Filter ID.
|
|
@@ -209,7 +213,7 @@ export interface FutureDateActivationOffset {
|
|
|
209
213
|
*/
|
|
210
214
|
preScheduledEventOffsetExpression?: string;
|
|
211
215
|
/** Unit in which to set the action offset. */
|
|
212
|
-
scheduledEventOffsetTimeUnit?:
|
|
216
|
+
scheduledEventOffsetTimeUnit?: TimeUnitWithLiterals;
|
|
213
217
|
}
|
|
214
218
|
export interface RateLimit {
|
|
215
219
|
/**
|
|
@@ -225,7 +229,7 @@ export interface RateLimit {
|
|
|
225
229
|
*/
|
|
226
230
|
durationExpression?: string | null;
|
|
227
231
|
/** Unit in which to set the duration of the rate limit. */
|
|
228
|
-
durationTimeUnit?:
|
|
232
|
+
durationTimeUnit?: TimeUnitWithLiterals;
|
|
229
233
|
/**
|
|
230
234
|
* Activation identifier used to count the number of activations.
|
|
231
235
|
* @minLength 1
|
|
@@ -243,7 +247,7 @@ export interface FilterValueSelection {
|
|
|
243
247
|
}
|
|
244
248
|
export interface ConditionExpressionGroup {
|
|
245
249
|
/** Logical operator used to evaluate the condition expressions. */
|
|
246
|
-
operator?:
|
|
250
|
+
operator?: OperatorWithLiterals;
|
|
247
251
|
/**
|
|
248
252
|
* Expressions evaluated using the selected operator.
|
|
249
253
|
* @minSize 1
|
|
@@ -260,6 +264,8 @@ export declare enum Operator {
|
|
|
260
264
|
/** `AND` operator. */
|
|
261
265
|
AND = "AND"
|
|
262
266
|
}
|
|
267
|
+
/** @enumType */
|
|
268
|
+
export type OperatorWithLiterals = Operator | 'UNKNOWN_OPERATOR' | 'OR' | 'AND';
|
|
263
269
|
/** Path definition */
|
|
264
270
|
export interface Path {
|
|
265
271
|
/**
|
|
@@ -291,6 +297,8 @@ export declare enum Type {
|
|
|
291
297
|
/** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
|
|
292
298
|
RATE_LIMIT = "RATE_LIMIT"
|
|
293
299
|
}
|
|
300
|
+
/** @enumType */
|
|
301
|
+
export type TypeWithLiterals = Type | 'UNKNOWN_ACTION_TYPE' | 'APP_DEFINED' | 'CONDITION' | 'DELAY' | 'RATE_LIMIT';
|
|
294
302
|
export interface AppDefinedAction {
|
|
295
303
|
/**
|
|
296
304
|
* ID of the app that defines the action.
|
|
@@ -350,7 +358,7 @@ export interface DelayAction {
|
|
|
350
358
|
*/
|
|
351
359
|
offsetExpression?: string | null;
|
|
352
360
|
/** Unit in which to set the wait time to wait before the action runs. */
|
|
353
|
-
offsetTimeUnit?:
|
|
361
|
+
offsetTimeUnit?: TimeUnitWithLiterals;
|
|
354
362
|
/**
|
|
355
363
|
* Action run date in milliseconds elapsed since January 1, 1970 UTC.
|
|
356
364
|
*
|
|
@@ -379,7 +387,7 @@ export interface RateLimitAction {
|
|
|
379
387
|
*/
|
|
380
388
|
rateLimitDurationExpression?: string | null;
|
|
381
389
|
/** Unit in which to set the duration of the rate limit. */
|
|
382
|
-
rateLimitDurationTimeUnit?:
|
|
390
|
+
rateLimitDurationTimeUnit?: TimeUnitWithLiterals;
|
|
383
391
|
/**
|
|
384
392
|
* Unique identifier of each activation by which rate limiter counts activations.
|
|
385
393
|
* @minLength 1
|
|
@@ -429,6 +437,8 @@ export declare enum Status {
|
|
|
429
437
|
/** Inactive. Inactive automations cannot be triggered. */
|
|
430
438
|
INACTIVE = "INACTIVE"
|
|
431
439
|
}
|
|
440
|
+
/** @enumType */
|
|
441
|
+
export type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'ACTIVE' | 'INACTIVE';
|
|
432
442
|
export interface Trigger {
|
|
433
443
|
/**
|
|
434
444
|
* ID of the app that defines the trigger.
|
|
@@ -466,6 +476,8 @@ export interface Action extends ActionInfoOneOf {
|
|
|
466
476
|
appDefinedInfo?: AppDefinedAction;
|
|
467
477
|
/** Details of the action when its `type` is `CONDITION`. */
|
|
468
478
|
conditionInfo?: ConditionAction;
|
|
479
|
+
/** Details of the action when its `type` is `CODE_CONDITION`. */
|
|
480
|
+
codeConditionInfo?: CodeConditionAction;
|
|
469
481
|
/** Details of the action when its `type` is `DELAY`. */
|
|
470
482
|
delayInfo?: DelayAction;
|
|
471
483
|
/** Details of the action when its `type` is `RATE_LIMIT`. */
|
|
@@ -478,7 +490,7 @@ export interface Action extends ActionInfoOneOf {
|
|
|
478
490
|
*/
|
|
479
491
|
_id?: string | null;
|
|
480
492
|
/** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#action-type). */
|
|
481
|
-
type?:
|
|
493
|
+
type?: TypeWithLiterals;
|
|
482
494
|
/**
|
|
483
495
|
* [Action namespace](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#namespace). This differentiates it from other actions of the same type.
|
|
484
496
|
*
|
|
@@ -494,6 +506,8 @@ export interface ActionInfoOneOf {
|
|
|
494
506
|
appDefinedInfo?: AppDefinedAction;
|
|
495
507
|
/** Details of the action when its `type` is `CONDITION`. */
|
|
496
508
|
conditionInfo?: ConditionAction;
|
|
509
|
+
/** Details of the action when its `type` is `CODE_CONDITION`. */
|
|
510
|
+
codeConditionInfo?: CodeConditionAction;
|
|
497
511
|
/** Details of the action when its `type` is `DELAY`. */
|
|
498
512
|
delayInfo?: DelayAction;
|
|
499
513
|
/** Details of the action when its `type` is `RATE_LIMIT`. */
|
|
@@ -519,6 +533,8 @@ export declare enum Origin {
|
|
|
519
533
|
/** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */
|
|
520
534
|
PREINSTALLED = "PREINSTALLED"
|
|
521
535
|
}
|
|
536
|
+
/** @enumType */
|
|
537
|
+
export type OriginWithLiterals = Origin | 'UNKNOWN_ORIGIN' | 'USER' | 'APPLICATION' | 'PREINSTALLED';
|
|
522
538
|
export interface ApplicationOrigin {
|
|
523
539
|
/**
|
|
524
540
|
* [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
|
|
@@ -655,25 +671,21 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
655
671
|
updatedEvent?: EntityUpdatedEvent;
|
|
656
672
|
deletedEvent?: EntityDeletedEvent;
|
|
657
673
|
actionEvent?: ActionEvent;
|
|
658
|
-
/**
|
|
659
|
-
* Unique event ID.
|
|
660
|
-
* Allows clients to ignore duplicate webhooks.
|
|
661
|
-
*/
|
|
674
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
662
675
|
_id?: string;
|
|
663
676
|
/**
|
|
664
|
-
*
|
|
665
|
-
*
|
|
677
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
678
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
666
679
|
*/
|
|
667
680
|
entityFqdn?: string;
|
|
668
681
|
/**
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
682
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
683
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
672
684
|
*/
|
|
673
685
|
slug?: string;
|
|
674
686
|
/** ID of the entity associated with the event. */
|
|
675
687
|
entityId?: string;
|
|
676
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
688
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
677
689
|
eventTime?: Date | null;
|
|
678
690
|
/**
|
|
679
691
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -683,12 +695,8 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
683
695
|
/** If present, indicates the action that triggered the event. */
|
|
684
696
|
originatedFrom?: string | null;
|
|
685
697
|
/**
|
|
686
|
-
* A sequence number
|
|
687
|
-
*
|
|
688
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
689
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
690
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
691
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
698
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
699
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
692
700
|
*/
|
|
693
701
|
entityEventSequence?: string | null;
|
|
694
702
|
}
|
|
@@ -714,7 +722,7 @@ export interface EntityUpdatedEvent {
|
|
|
714
722
|
currentEntity?: string;
|
|
715
723
|
}
|
|
716
724
|
export interface EntityDeletedEvent {
|
|
717
|
-
/** Entity that was deleted */
|
|
725
|
+
/** Entity that was deleted. */
|
|
718
726
|
deletedEntity?: string | null;
|
|
719
727
|
}
|
|
720
728
|
export interface ActionEvent {
|
|
@@ -820,7 +828,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
820
828
|
*/
|
|
821
829
|
appId?: string;
|
|
822
830
|
/** @readonly */
|
|
823
|
-
identityType?:
|
|
831
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
824
832
|
}
|
|
825
833
|
/** @oneof */
|
|
826
834
|
export interface IdentificationDataIdOneOf {
|
|
@@ -852,6 +860,41 @@ export declare enum WebhookIdentityType {
|
|
|
852
860
|
WIX_USER = "WIX_USER",
|
|
853
861
|
APP = "APP"
|
|
854
862
|
}
|
|
863
|
+
/** @enumType */
|
|
864
|
+
export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
865
|
+
export interface CodeSnippet {
|
|
866
|
+
/** Logical operator used to evaluate the condition expressions. */
|
|
867
|
+
language?: LanguageWithLiterals;
|
|
868
|
+
/**
|
|
869
|
+
* Expressions evaluated using the selected operator. this code should comply the language syntax. and format
|
|
870
|
+
* @maxLength 1000
|
|
871
|
+
*/
|
|
872
|
+
code?: string;
|
|
873
|
+
}
|
|
874
|
+
export declare enum Language {
|
|
875
|
+
/** Unknown. */
|
|
876
|
+
UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
|
|
877
|
+
/** `JAVASCRIPT` language. */
|
|
878
|
+
JAVASCRIPT = "JAVASCRIPT"
|
|
879
|
+
}
|
|
880
|
+
/** @enumType */
|
|
881
|
+
export type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';
|
|
882
|
+
export interface CodeConditionAction {
|
|
883
|
+
/** 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. */
|
|
884
|
+
snippet?: CodeSnippet;
|
|
885
|
+
/**
|
|
886
|
+
* IDs of actions to run when the condition evaluates to `true`.
|
|
887
|
+
* @maxSize 20
|
|
888
|
+
* @format GUID
|
|
889
|
+
*/
|
|
890
|
+
truePostActionIds?: string[];
|
|
891
|
+
/**
|
|
892
|
+
* IDs of actions to run when the condition evaluates to `false`.
|
|
893
|
+
* @maxSize 20
|
|
894
|
+
* @format GUID
|
|
895
|
+
*/
|
|
896
|
+
falsePostActionIds?: string[];
|
|
897
|
+
}
|
|
855
898
|
export interface CreateAutomationRequest {
|
|
856
899
|
/** Automation to create. */
|
|
857
900
|
automation: Automation;
|
|
@@ -861,6 +904,8 @@ export declare enum RequestedFields {
|
|
|
861
904
|
/** whether to return in response `configuration.trigger.override_output_schema` field and in `configuration.actions` the `override_output_schema` field */
|
|
862
905
|
OVERRIDE_SCHEMA = "OVERRIDE_SCHEMA"
|
|
863
906
|
}
|
|
907
|
+
/** @enumType */
|
|
908
|
+
export type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'OVERRIDE_SCHEMA';
|
|
864
909
|
export interface CreateAutomationResponse {
|
|
865
910
|
/** Details of the created automation. */
|
|
866
911
|
automation?: Automation;
|
|
@@ -1102,12 +1147,14 @@ export interface Sorting {
|
|
|
1102
1147
|
*/
|
|
1103
1148
|
fieldName?: string;
|
|
1104
1149
|
/** Sort order. */
|
|
1105
|
-
order?:
|
|
1150
|
+
order?: SortOrderWithLiterals;
|
|
1106
1151
|
}
|
|
1107
1152
|
export declare enum SortOrder {
|
|
1108
1153
|
ASC = "ASC",
|
|
1109
1154
|
DESC = "DESC"
|
|
1110
1155
|
}
|
|
1156
|
+
/** @enumType */
|
|
1157
|
+
export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
1111
1158
|
export interface CursorPaging {
|
|
1112
1159
|
/**
|
|
1113
1160
|
* Maximum number of items to return in the results.
|
|
@@ -1227,7 +1274,7 @@ export interface CopyAutomationRequest {
|
|
|
1227
1274
|
*/
|
|
1228
1275
|
automationId: string;
|
|
1229
1276
|
/** Origin of the automation to copy. */
|
|
1230
|
-
origin?:
|
|
1277
|
+
origin?: OriginWithLiterals;
|
|
1231
1278
|
/** Automation to copy. Skips fetching by ID. */
|
|
1232
1279
|
automation?: Automation;
|
|
1233
1280
|
}
|
|
@@ -1363,7 +1410,7 @@ export interface Asset {
|
|
|
1363
1410
|
*/
|
|
1364
1411
|
instanceId?: string;
|
|
1365
1412
|
/** An application state. */
|
|
1366
|
-
state?:
|
|
1413
|
+
state?: StateWithLiterals;
|
|
1367
1414
|
}
|
|
1368
1415
|
export declare enum State {
|
|
1369
1416
|
UNKNOWN = "UNKNOWN",
|
|
@@ -1372,6 +1419,8 @@ export declare enum State {
|
|
|
1372
1419
|
PENDING = "PENDING",
|
|
1373
1420
|
DEMO = "DEMO"
|
|
1374
1421
|
}
|
|
1422
|
+
/** @enumType */
|
|
1423
|
+
export type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO';
|
|
1375
1424
|
export interface SiteCreated {
|
|
1376
1425
|
/**
|
|
1377
1426
|
* A template identifier (empty if not created from a template).
|
|
@@ -1384,7 +1433,7 @@ export interface SiteCreated {
|
|
|
1384
1433
|
*/
|
|
1385
1434
|
ownerId?: string;
|
|
1386
1435
|
/** A context in which meta site was created. */
|
|
1387
|
-
context?:
|
|
1436
|
+
context?: SiteCreatedContextWithLiterals;
|
|
1388
1437
|
/**
|
|
1389
1438
|
* A meta site id from which this site was created.
|
|
1390
1439
|
*
|
|
@@ -1399,7 +1448,7 @@ export interface SiteCreated {
|
|
|
1399
1448
|
*/
|
|
1400
1449
|
siteName?: string;
|
|
1401
1450
|
/** A namespace. */
|
|
1402
|
-
namespace?:
|
|
1451
|
+
namespace?: NamespaceWithLiterals;
|
|
1403
1452
|
}
|
|
1404
1453
|
export declare enum SiteCreatedContext {
|
|
1405
1454
|
/** A valid option, we don't expose all reasons why site might be created. */
|
|
@@ -1415,6 +1464,8 @@ export declare enum SiteCreatedContext {
|
|
|
1415
1464
|
/** deprecated A meta site was created for Flash editor. */
|
|
1416
1465
|
FLASH = "FLASH"
|
|
1417
1466
|
}
|
|
1467
|
+
/** @enumType */
|
|
1468
|
+
export type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH';
|
|
1418
1469
|
export declare enum Namespace {
|
|
1419
1470
|
UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
|
|
1420
1471
|
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
@@ -1497,6 +1548,8 @@ export declare enum Namespace {
|
|
|
1497
1548
|
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
1498
1549
|
MIMIR = "MIMIR"
|
|
1499
1550
|
}
|
|
1551
|
+
/** @enumType */
|
|
1552
|
+
export type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR';
|
|
1500
1553
|
/** Site transferred to another user. */
|
|
1501
1554
|
export interface SiteTransferred {
|
|
1502
1555
|
/**
|
|
@@ -1519,7 +1572,7 @@ export interface DeleteContext {
|
|
|
1519
1572
|
/** When the meta site was deleted. */
|
|
1520
1573
|
dateDeleted?: Date | null;
|
|
1521
1574
|
/** A status. */
|
|
1522
|
-
deleteStatus?:
|
|
1575
|
+
deleteStatus?: DeleteStatusWithLiterals;
|
|
1523
1576
|
/**
|
|
1524
1577
|
* A reason (flow).
|
|
1525
1578
|
* @maxLength 255
|
|
@@ -1538,6 +1591,8 @@ export declare enum DeleteStatus {
|
|
|
1538
1591
|
PENDING_PURGE = "PENDING_PURGE",
|
|
1539
1592
|
PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
|
|
1540
1593
|
}
|
|
1594
|
+
/** @enumType */
|
|
1595
|
+
export type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY';
|
|
1541
1596
|
/** Restoration of the meta site. */
|
|
1542
1597
|
export interface SiteUndeleted {
|
|
1543
1598
|
}
|
|
@@ -1639,9 +1694,9 @@ export interface SiteHardDeleted {
|
|
|
1639
1694
|
}
|
|
1640
1695
|
export interface NamespaceChanged {
|
|
1641
1696
|
/** A previous namespace. */
|
|
1642
|
-
oldNamespace?:
|
|
1697
|
+
oldNamespace?: NamespaceWithLiterals;
|
|
1643
1698
|
/** A new namespace. */
|
|
1644
|
-
newNamespace?:
|
|
1699
|
+
newNamespace?: NamespaceWithLiterals;
|
|
1645
1700
|
}
|
|
1646
1701
|
/** Assigned Studio editor */
|
|
1647
1702
|
export interface StudioAssigned {
|
|
@@ -1805,9 +1860,9 @@ export interface TriggerValidationError extends TriggerValidationErrorErrorOneOf
|
|
|
1805
1860
|
/** Provider configuration error. */
|
|
1806
1861
|
providerConfigurationError?: ProviderConfigurationError;
|
|
1807
1862
|
/** Validation error type. */
|
|
1808
|
-
errorType?:
|
|
1863
|
+
errorType?: TriggerValidationErrorValidationErrorTypeWithLiterals;
|
|
1809
1864
|
/** Validation error severity */
|
|
1810
|
-
severity?:
|
|
1865
|
+
severity?: ValidationErrorSeverityWithLiterals;
|
|
1811
1866
|
}
|
|
1812
1867
|
/** @oneof */
|
|
1813
1868
|
export interface TriggerValidationErrorErrorOneOf {
|
|
@@ -1823,9 +1878,11 @@ export declare enum TriggerValidationErrorValidationErrorType {
|
|
|
1823
1878
|
/** Provider error. */
|
|
1824
1879
|
PROVIDER_ERROR = "PROVIDER_ERROR"
|
|
1825
1880
|
}
|
|
1881
|
+
/** @enumType */
|
|
1882
|
+
export type TriggerValidationErrorValidationErrorTypeWithLiterals = TriggerValidationErrorValidationErrorType | 'UNKNOWN_VALIDATION_ERROR_TYPE' | 'CONFIGURATION_ERROR' | 'PROVIDER_ERROR';
|
|
1826
1883
|
export interface TriggerConfigurationError {
|
|
1827
1884
|
/** Trigger error type. */
|
|
1828
|
-
errorType?:
|
|
1885
|
+
errorType?: TriggerErrorTypeWithLiterals;
|
|
1829
1886
|
/**
|
|
1830
1887
|
* Related filter field key.
|
|
1831
1888
|
* @maxLength 110
|
|
@@ -1849,6 +1906,8 @@ export declare enum TriggerErrorType {
|
|
|
1849
1906
|
/** Invalid filter expression. */
|
|
1850
1907
|
INVALID_FILTER_EXPRESSION = "INVALID_FILTER_EXPRESSION"
|
|
1851
1908
|
}
|
|
1909
|
+
/** @enumType */
|
|
1910
|
+
export type TriggerErrorTypeWithLiterals = TriggerErrorType | 'UNKNOWN_TRIGGER_ERROR_TYPE' | 'NOT_FOUND' | 'APP_NOT_INSTALLED' | 'MODERATION_MISMATCH' | 'DEPRECATED' | 'INVALID_TRIGGER_KEY' | 'INVALID_FILTER_FIELD_KEY' | 'INVALID_FILTER_EXPRESSION';
|
|
1852
1911
|
export interface ProviderConfigurationError {
|
|
1853
1912
|
/** Key corresponding to the field in the schema. */
|
|
1854
1913
|
fieldKey?: string | null;
|
|
@@ -1868,6 +1927,8 @@ export declare enum ValidationErrorSeverity {
|
|
|
1868
1927
|
/** Error. */
|
|
1869
1928
|
ERROR = "ERROR"
|
|
1870
1929
|
}
|
|
1930
|
+
/** @enumType */
|
|
1931
|
+
export type ValidationErrorSeverityWithLiterals = ValidationErrorSeverity | 'UNKNOWN_VALIDATION_ERROR_SEVERITY' | 'WARNING' | 'ERROR';
|
|
1871
1932
|
export interface ActionValidationInfo {
|
|
1872
1933
|
/**
|
|
1873
1934
|
* Action ID.
|
|
@@ -1897,9 +1958,9 @@ export interface ActionValidationError extends ActionValidationErrorErrorOneOf {
|
|
|
1897
1958
|
/** Provider configuration error. */
|
|
1898
1959
|
providerConfigurationError?: ProviderConfigurationError;
|
|
1899
1960
|
/** Validation error type. */
|
|
1900
|
-
errorType?:
|
|
1961
|
+
errorType?: ValidationErrorTypeWithLiterals;
|
|
1901
1962
|
/** Validation error severity */
|
|
1902
|
-
severity?:
|
|
1963
|
+
severity?: ValidationErrorSeverityWithLiterals;
|
|
1903
1964
|
}
|
|
1904
1965
|
/** @oneof */
|
|
1905
1966
|
export interface ActionValidationErrorErrorOneOf {
|
|
@@ -1915,9 +1976,11 @@ export declare enum ValidationErrorType {
|
|
|
1915
1976
|
/** Provider error. */
|
|
1916
1977
|
PROVIDER_ERROR = "PROVIDER_ERROR"
|
|
1917
1978
|
}
|
|
1979
|
+
/** @enumType */
|
|
1980
|
+
export type ValidationErrorTypeWithLiterals = ValidationErrorType | 'UNKNOWN_VALIDATION_ERROR_TYPE' | 'CONFIGURATION_ERROR' | 'PROVIDER_ERROR';
|
|
1918
1981
|
export interface ActionConfigurationError {
|
|
1919
1982
|
/** Action error type. */
|
|
1920
|
-
errorType?:
|
|
1983
|
+
errorType?: ActionErrorTypeWithLiterals;
|
|
1921
1984
|
/**
|
|
1922
1985
|
* Related field key.
|
|
1923
1986
|
* @maxLength 110
|
|
@@ -1937,15 +2000,17 @@ export declare enum ActionErrorType {
|
|
|
1937
2000
|
MAPPING_SCHEMA_MISMATCH = "MAPPING_SCHEMA_MISMATCH",
|
|
1938
2001
|
MAPPING_VARIABLE_MISSING_FROM_SCHEMA = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA"
|
|
1939
2002
|
}
|
|
2003
|
+
/** @enumType */
|
|
2004
|
+
export type ActionErrorTypeWithLiterals = ActionErrorType | 'UNKNOWN_ACTION_ERROR_TYPE' | 'NOT_FOUND' | 'APP_NOT_INSTALLED' | 'MODERATION_MISMATCH' | 'DEPRECATED' | 'INVALID_ACTION_KEY' | 'INVALID_MAPPING' | 'MAPPING_TYPE_MISMATCH' | 'MAPPING_MISSING_REQUIRED_FIELD' | 'MAPPING_SCHEMA_MISMATCH' | 'MAPPING_VARIABLE_MISSING_FROM_SCHEMA';
|
|
1940
2005
|
export interface AutomationValidationError extends AutomationValidationErrorErrorOneOf {
|
|
1941
2006
|
/** Automation configuration error. */
|
|
1942
2007
|
configurationError?: AutomationConfigurationError;
|
|
1943
2008
|
/** Provider configuration error. */
|
|
1944
2009
|
providerConfigurationError?: ProviderConfigurationError;
|
|
1945
2010
|
/** Validation error type. */
|
|
1946
|
-
errorType?:
|
|
2011
|
+
errorType?: AutomationValidationErrorValidationErrorTypeWithLiterals;
|
|
1947
2012
|
/** Validation error severity. */
|
|
1948
|
-
severity?:
|
|
2013
|
+
severity?: ValidationErrorSeverityWithLiterals;
|
|
1949
2014
|
}
|
|
1950
2015
|
/** @oneof */
|
|
1951
2016
|
export interface AutomationValidationErrorErrorOneOf {
|
|
@@ -1959,13 +2024,17 @@ export declare enum AutomationValidationErrorValidationErrorType {
|
|
|
1959
2024
|
CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
|
|
1960
2025
|
PROVIDER_ERROR = "PROVIDER_ERROR"
|
|
1961
2026
|
}
|
|
2027
|
+
/** @enumType */
|
|
2028
|
+
export type AutomationValidationErrorValidationErrorTypeWithLiterals = AutomationValidationErrorValidationErrorType | 'UNKNOWN_VALIDATION_ERROR_TYPE' | 'CONFIGURATION_ERROR' | 'PROVIDER_ERROR';
|
|
1962
2029
|
export interface AutomationConfigurationError {
|
|
1963
2030
|
/** Automation error type. */
|
|
1964
|
-
errorType?:
|
|
2031
|
+
errorType?: AutomationErrorTypeWithLiterals;
|
|
1965
2032
|
}
|
|
1966
2033
|
export declare enum AutomationErrorType {
|
|
1967
2034
|
UNKNOWN_AUTOMATION_ERROR_TYPE = "UNKNOWN_AUTOMATION_ERROR_TYPE"
|
|
1968
2035
|
}
|
|
2036
|
+
/** @enumType */
|
|
2037
|
+
export type AutomationErrorTypeWithLiterals = AutomationErrorType | 'UNKNOWN_AUTOMATION_ERROR_TYPE';
|
|
1969
2038
|
export interface ValidateAutomationByIdRequest {
|
|
1970
2039
|
/**
|
|
1971
2040
|
* Automation ID.
|
|
@@ -2144,7 +2213,7 @@ export interface GetAutomationRevisionRequest {
|
|
|
2144
2213
|
* Requested fields.
|
|
2145
2214
|
* @maxSize 20
|
|
2146
2215
|
*/
|
|
2147
|
-
fields?:
|
|
2216
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
2148
2217
|
}
|
|
2149
2218
|
export interface GetAutomationRevisionResponse {
|
|
2150
2219
|
/** Automation revision. */
|
|
@@ -2165,25 +2234,21 @@ export interface BaseEventMetadata {
|
|
|
2165
2234
|
identity?: IdentificationData;
|
|
2166
2235
|
}
|
|
2167
2236
|
export interface EventMetadata extends BaseEventMetadata {
|
|
2168
|
-
/**
|
|
2169
|
-
* Unique event ID.
|
|
2170
|
-
* Allows clients to ignore duplicate webhooks.
|
|
2171
|
-
*/
|
|
2237
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
2172
2238
|
_id?: string;
|
|
2173
2239
|
/**
|
|
2174
|
-
*
|
|
2175
|
-
*
|
|
2240
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
2241
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
2176
2242
|
*/
|
|
2177
2243
|
entityFqdn?: string;
|
|
2178
2244
|
/**
|
|
2179
|
-
*
|
|
2180
|
-
*
|
|
2181
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
2245
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
2246
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
2182
2247
|
*/
|
|
2183
2248
|
slug?: string;
|
|
2184
2249
|
/** ID of the entity associated with the event. */
|
|
2185
2250
|
entityId?: string;
|
|
2186
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example
|
|
2251
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
2187
2252
|
eventTime?: Date | null;
|
|
2188
2253
|
/**
|
|
2189
2254
|
* Whether the event was triggered as a result of a privacy regulation application
|
|
@@ -2193,12 +2258,8 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
2193
2258
|
/** If present, indicates the action that triggered the event. */
|
|
2194
2259
|
originatedFrom?: string | null;
|
|
2195
2260
|
/**
|
|
2196
|
-
* A sequence number
|
|
2197
|
-
*
|
|
2198
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2199
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2200
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2201
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2261
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
2262
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
2202
2263
|
*/
|
|
2203
2264
|
entityEventSequence?: string | null;
|
|
2204
2265
|
}
|
|
@@ -2369,7 +2430,7 @@ export interface UpdateAutomation {
|
|
|
2369
2430
|
* How the automation was added to the user's site.
|
|
2370
2431
|
* @immutable
|
|
2371
2432
|
*/
|
|
2372
|
-
origin?:
|
|
2433
|
+
origin?: OriginWithLiterals;
|
|
2373
2434
|
/** Automation settings. */
|
|
2374
2435
|
settings?: AutomationSettings;
|
|
2375
2436
|
/**
|
|
@@ -2539,7 +2600,7 @@ export declare function copyAutomation(automationId: string, options?: CopyAutom
|
|
|
2539
2600
|
}[AutomationNonNullablePaths]>>;
|
|
2540
2601
|
export interface CopyAutomationOptions {
|
|
2541
2602
|
/** Origin of the automation to copy. */
|
|
2542
|
-
origin?:
|
|
2603
|
+
origin?: OriginWithLiterals;
|
|
2543
2604
|
/** Automation to copy. Skips fetching by ID. */
|
|
2544
2605
|
automation?: Automation;
|
|
2545
2606
|
}
|
|
@@ -2653,7 +2714,7 @@ export interface UpdateDraftAutomation {
|
|
|
2653
2714
|
* How the automation was added to the user's site.
|
|
2654
2715
|
* @immutable
|
|
2655
2716
|
*/
|
|
2656
|
-
origin?:
|
|
2717
|
+
origin?: OriginWithLiterals;
|
|
2657
2718
|
/** Automation settings. */
|
|
2658
2719
|
settings?: AutomationSettings;
|
|
2659
2720
|
/**
|
|
@@ -2799,6 +2860,6 @@ export interface GetAutomationRevisionOptions {
|
|
|
2799
2860
|
* Requested fields.
|
|
2800
2861
|
* @maxSize 20
|
|
2801
2862
|
*/
|
|
2802
|
-
fields?:
|
|
2863
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
2803
2864
|
}
|
|
2804
2865
|
export {};
|
|
@@ -23,11 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getAutomationRevision = exports.validateAutomationById = exports.validateAutomation = exports.publishDraftAutomation = exports.deleteDraftAutomation = exports.queryAutomationsWithDrafts = exports.updateDraftAutomation = exports.getOrCreateDraftAutomation = exports.createDraftAutomation = exports.copyAutomation = exports.queryAutomations = exports.generatePreinstalledAutomation = exports.bulkDeleteAutomations = exports.deleteAutomation = exports.updateAutomation = exports.getAutomation = exports.createAutomation = exports.AutomationErrorType = exports.AutomationValidationErrorValidationErrorType = exports.ActionErrorType = exports.ValidationErrorType = exports.ValidationErrorSeverity = exports.TriggerErrorType = exports.TriggerValidationErrorValidationErrorType = exports.DeleteStatus = exports.Namespace = exports.SiteCreatedContext = exports.State = exports.SortOrder = exports.RequestedFields = exports.WebhookIdentityType = exports.Origin = exports.Status = exports.Type = exports.Operator = exports.TimeUnit = exports.Domain = void 0;
|
|
26
|
+
exports.getAutomationRevision = exports.validateAutomationById = exports.validateAutomation = exports.publishDraftAutomation = exports.deleteDraftAutomation = exports.queryAutomationsWithDrafts = exports.updateDraftAutomation = exports.getOrCreateDraftAutomation = exports.createDraftAutomation = exports.copyAutomation = exports.queryAutomations = exports.generatePreinstalledAutomation = exports.bulkDeleteAutomations = exports.deleteAutomation = exports.updateAutomation = exports.getAutomation = exports.createAutomation = exports.AutomationErrorType = exports.AutomationValidationErrorValidationErrorType = exports.ActionErrorType = exports.ValidationErrorType = exports.ValidationErrorSeverity = exports.TriggerErrorType = exports.TriggerValidationErrorValidationErrorType = exports.DeleteStatus = exports.Namespace = exports.SiteCreatedContext = exports.State = exports.SortOrder = exports.RequestedFields = exports.Language = exports.WebhookIdentityType = exports.Origin = exports.Status = exports.Type = exports.Operator = exports.TimeUnit = exports.Domain = void 0;
|
|
27
27
|
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
28
|
const query_builder_1 = require("@wix/sdk-runtime/query-builder");
|
|
29
29
|
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
30
30
|
const ambassadorWixAutomationsV2Automation = __importStar(require("./automations-v2-automation-automations-v-2.http.js"));
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
31
33
|
var Domain;
|
|
32
34
|
(function (Domain) {
|
|
33
35
|
/** User domain (default). */
|
|
@@ -101,6 +103,13 @@ var WebhookIdentityType;
|
|
|
101
103
|
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
102
104
|
WebhookIdentityType["APP"] = "APP";
|
|
103
105
|
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
106
|
+
var Language;
|
|
107
|
+
(function (Language) {
|
|
108
|
+
/** Unknown. */
|
|
109
|
+
Language["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
|
|
110
|
+
/** `JAVASCRIPT` language. */
|
|
111
|
+
Language["JAVASCRIPT"] = "JAVASCRIPT";
|
|
112
|
+
})(Language || (exports.Language = Language = {}));
|
|
104
113
|
var RequestedFields;
|
|
105
114
|
(function (RequestedFields) {
|
|
106
115
|
RequestedFields["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
@@ -578,7 +587,7 @@ function queryAutomations(options) {
|
|
|
578
587
|
});
|
|
579
588
|
},
|
|
580
589
|
responseTransformer: ({ data }) => {
|
|
581
|
-
const transformedData = (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(data);
|
|
590
|
+
const transformedData = (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(data, []));
|
|
582
591
|
return {
|
|
583
592
|
items: transformedData?.automations,
|
|
584
593
|
pagingMetadata: transformedData?.pagingMetadata,
|