@wix/auto_sdk_automations_automations-v-2 1.0.0

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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +37 -0
  11. package/build/cjs/src/automations-v2-automation-automations-v-2.context.js +60 -0
  12. package/build/cjs/src/automations-v2-automation-automations-v-2.context.js.map +1 -0
  13. package/build/cjs/src/automations-v2-automation-automations-v-2.http.d.ts +74 -0
  14. package/build/cjs/src/automations-v2-automation-automations-v-2.http.js +666 -0
  15. package/build/cjs/src/automations-v2-automation-automations-v-2.http.js.map +1 -0
  16. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.d.ts +49 -0
  17. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.js +351 -0
  18. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.js.map +1 -0
  19. package/build/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +172 -0
  20. package/build/cjs/src/automations-v2-automation-automations-v-2.public.js +166 -0
  21. package/build/cjs/src/automations-v2-automation-automations-v-2.public.js.map +1 -0
  22. package/build/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +2153 -0
  23. package/build/cjs/src/automations-v2-automation-automations-v-2.types.js +268 -0
  24. package/build/cjs/src/automations-v2-automation-automations-v-2.types.js.map +1 -0
  25. package/build/cjs/src/automations-v2-automation-automations-v-2.universal.d.ts +2804 -0
  26. package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js +1015 -0
  27. package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/automations-v2-automation-automations-v-2.context.d.ts +37 -0
  39. package/build/es/src/automations-v2-automation-automations-v-2.context.js +37 -0
  40. package/build/es/src/automations-v2-automation-automations-v-2.context.js.map +1 -0
  41. package/build/es/src/automations-v2-automation-automations-v-2.http.d.ts +74 -0
  42. package/build/es/src/automations-v2-automation-automations-v-2.http.js +646 -0
  43. package/build/es/src/automations-v2-automation-automations-v-2.http.js.map +1 -0
  44. package/build/es/src/automations-v2-automation-automations-v-2.meta.d.ts +49 -0
  45. package/build/es/src/automations-v2-automation-automations-v-2.meta.js +308 -0
  46. package/build/es/src/automations-v2-automation-automations-v-2.meta.js.map +1 -0
  47. package/build/es/src/automations-v2-automation-automations-v-2.public.d.ts +172 -0
  48. package/build/es/src/automations-v2-automation-automations-v-2.public.js +126 -0
  49. package/build/es/src/automations-v2-automation-automations-v-2.public.js.map +1 -0
  50. package/build/es/src/automations-v2-automation-automations-v-2.types.d.ts +2153 -0
  51. package/build/es/src/automations-v2-automation-automations-v-2.types.js +265 -0
  52. package/build/es/src/automations-v2-automation-automations-v-2.types.js.map +1 -0
  53. package/build/es/src/automations-v2-automation-automations-v-2.universal.d.ts +2804 -0
  54. package/build/es/src/automations-v2-automation-automations-v-2.universal.js +972 -0
  55. package/build/es/src/automations-v2-automation-automations-v-2.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +37 -0
  66. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js +60 -0
  67. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js.map +1 -0
  68. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.d.ts +74 -0
  69. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.js +666 -0
  70. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.js.map +1 -0
  71. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.d.ts +49 -0
  72. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.js +351 -0
  73. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.js.map +1 -0
  74. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +172 -0
  75. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js +166 -0
  76. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js.map +1 -0
  77. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +2153 -0
  78. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js +268 -0
  79. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js.map +1 -0
  80. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.d.ts +2804 -0
  81. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js +1015 -0
  82. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.d.ts +37 -0
  93. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js +37 -0
  94. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js.map +1 -0
  95. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.d.ts +74 -0
  96. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.js +646 -0
  97. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.js.map +1 -0
  98. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.d.ts +49 -0
  99. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.js +308 -0
  100. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.js.map +1 -0
  101. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.d.ts +172 -0
  102. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js +126 -0
  103. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js.map +1 -0
  104. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.d.ts +2153 -0
  105. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js +265 -0
  106. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js.map +1 -0
  107. package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.d.ts +2804 -0
  108. package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js +972 -0
  109. package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,2804 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface Automation extends AutomationOriginInfoOneOf {
3
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
4
+ applicationInfo?: ApplicationOrigin;
5
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
6
+ preinstalledInfo?: PreinstalledOrigin;
7
+ /**
8
+ * Automation ID.
9
+ * @format GUID
10
+ * @readonly
11
+ */
12
+ _id?: string | null;
13
+ /**
14
+ * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.
15
+ * @readonly
16
+ */
17
+ revision?: string | null;
18
+ /**
19
+ * Who created the automation.
20
+ * @immutable
21
+ * @readonly
22
+ */
23
+ createdBy?: AuditInfo;
24
+ /**
25
+ * When the automation was created.
26
+ * @readonly
27
+ */
28
+ _createdDate?: Date | null;
29
+ /**
30
+ * Who last updated the automation.
31
+ * @readonly
32
+ */
33
+ updatedBy?: AuditInfo;
34
+ /**
35
+ * When the automation was last updated.
36
+ * @readonly
37
+ */
38
+ _updatedDate?: Date | null;
39
+ /**
40
+ * Automation name as displayed on the user's site.
41
+ * @minLength 1
42
+ * @maxLength 500
43
+ */
44
+ name?: string;
45
+ /**
46
+ * Automation description.
47
+ * @maxLength 2000
48
+ */
49
+ description?: string | null;
50
+ /** Automation configuration. */
51
+ configuration?: AutomationConfiguration;
52
+ /**
53
+ * How the automation was added to the user's site.
54
+ * @immutable
55
+ */
56
+ origin?: Origin;
57
+ /** Automation settings. */
58
+ settings?: AutomationSettings;
59
+ /**
60
+ * When the automation is a draft, the draft details.
61
+ * @readonly
62
+ */
63
+ draftInfo?: DraftInfo;
64
+ /**
65
+ * Whether the automation is archived.
66
+ *
67
+ * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.
68
+ */
69
+ archived?: boolean;
70
+ }
71
+ /** @oneof */
72
+ export interface AutomationOriginInfoOneOf {
73
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
74
+ applicationInfo?: ApplicationOrigin;
75
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
76
+ preinstalledInfo?: PreinstalledOrigin;
77
+ }
78
+ export interface ActionSettings {
79
+ /**
80
+ * Permanent actions. Permanent actions cannot be deleted.
81
+ *
82
+ * When empty, all actions can be deleted by the user.
83
+ * @maxSize 30
84
+ * @format GUID
85
+ */
86
+ permanentActionIds?: string[];
87
+ /**
88
+ * Read-only actions. Read-only actions cannot be edited.
89
+ *
90
+ * When empty, all actions are editable.
91
+ * @maxSize 30
92
+ * @format GUID
93
+ */
94
+ readonlyActionIds?: string[];
95
+ /**
96
+ * Whether to disable the ability to add a delay to the automation.
97
+ *
98
+ * Default: `false`.
99
+ */
100
+ disableDelayAddition?: boolean;
101
+ /**
102
+ * Whether to disable the ability to add a condition to the automation.
103
+ *
104
+ * Default: `false`.
105
+ */
106
+ disableConditionAddition?: boolean;
107
+ }
108
+ export declare enum Domain {
109
+ /** User domain (default). */
110
+ USER = "USER",
111
+ /** Wix domain. */
112
+ WIX = "WIX",
113
+ /** Wix account-level domain. */
114
+ WIX_ACCOUNT = "WIX_ACCOUNT"
115
+ }
116
+ export interface Enrichment {
117
+ /**
118
+ * Enrichment input mappings.
119
+ * @maxSize 2
120
+ */
121
+ inputMappings?: Record<string, any>[] | null;
122
+ }
123
+ export interface AuditInfo extends AuditInfoIdOneOf {
124
+ /**
125
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
126
+ * @format GUID
127
+ */
128
+ userId?: string;
129
+ /**
130
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
131
+ *
132
+ * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.
133
+ * @format GUID
134
+ */
135
+ appId?: string;
136
+ }
137
+ /** @oneof */
138
+ export interface AuditInfoIdOneOf {
139
+ /**
140
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
141
+ * @format GUID
142
+ */
143
+ userId?: string;
144
+ /**
145
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
146
+ *
147
+ * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.
148
+ * @format GUID
149
+ */
150
+ appId?: string;
151
+ }
152
+ export interface AutomationConfiguration {
153
+ /** Status of the automation on the site. */
154
+ status?: Status;
155
+ /** Trigger configuration. */
156
+ trigger?: Trigger;
157
+ /**
158
+ * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.
159
+ *
160
+ * > **Note**: You can currently only specify 1 root action.
161
+ * @maxSize 20
162
+ * @format GUID
163
+ */
164
+ rootActionIds?: string[];
165
+ /** Actions the automation can execute, as key:value pairs. For the key, specify the action ID. The value must be an object structured as described below. */
166
+ actions?: Record<string, Action>;
167
+ }
168
+ export declare enum TimeUnit {
169
+ UNKNOWN_TIME_UNIT = "UNKNOWN_TIME_UNIT",
170
+ /** Minutes. */
171
+ MINUTES = "MINUTES",
172
+ /** Hours. */
173
+ HOURS = "HOURS",
174
+ /** Days. */
175
+ DAYS = "DAYS",
176
+ /** Weeks. */
177
+ WEEKS = "WEEKS",
178
+ /** Months. */
179
+ MONTHS = "MONTHS"
180
+ }
181
+ export interface Filter {
182
+ /**
183
+ * Filter ID.
184
+ * @format GUID
185
+ */
186
+ _id?: string;
187
+ /**
188
+ * Field key.
189
+ *
190
+ * You can find the field key in [the trigger payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema).
191
+ * @minLength 1
192
+ * @maxLength 110
193
+ */
194
+ fieldKey?: string;
195
+ /**
196
+ * Filter expression.
197
+ *
198
+ * For the automation to run, the expression must evaluate to `true`.
199
+ * @maxLength 2500
200
+ */
201
+ filterExpression?: string;
202
+ }
203
+ export interface FutureDateActivationOffset {
204
+ /**
205
+ * Amount of time before the trigger to run the automation.
206
+ *
207
+ * > **Note**: To delay an automation after the trigger event occurs, use a [delay action](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#delay-action).
208
+ * @maxLength 1000
209
+ */
210
+ preScheduledEventOffsetExpression?: string;
211
+ /** Unit in which to set the action offset. */
212
+ scheduledEventOffsetTimeUnit?: TimeUnit;
213
+ }
214
+ export interface RateLimit {
215
+ /**
216
+ * Maximum number of times the trigger can be activated.
217
+ * @maxLength 1000
218
+ */
219
+ maxActivationsExpression?: string;
220
+ /**
221
+ * Duration of the rate limit. The rate limit applies for the specified duration and then expires.
222
+ *
223
+ * When empty, the rate limit does not expire.
224
+ * @maxLength 1000
225
+ */
226
+ durationExpression?: string | null;
227
+ /** Unit in which to set the duration of the rate limit. */
228
+ durationTimeUnit?: TimeUnit;
229
+ /**
230
+ * Activation identifier used to count the number of activations.
231
+ * @minLength 1
232
+ * @maxLength 400
233
+ */
234
+ uniqueIdentifierExpression?: string | null;
235
+ }
236
+ export interface FilterValueSelection {
237
+ /**
238
+ * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.
239
+ * @maxLength 80
240
+ * @maxSize 50
241
+ */
242
+ selectedFilterValues?: string[];
243
+ }
244
+ export interface ConditionExpressionGroup {
245
+ /** Logical operator used to evaluate the condition expressions. */
246
+ operator?: Operator;
247
+ /**
248
+ * Expressions evaluated using the selected operator.
249
+ * @minSize 1
250
+ * @maxSize 20
251
+ * @maxLength 2500
252
+ */
253
+ booleanExpressions?: string[];
254
+ }
255
+ export declare enum Operator {
256
+ /** Unknown. */
257
+ UNKNOWN_OPERATOR = "UNKNOWN_OPERATOR",
258
+ /** `OR` operator. */
259
+ OR = "OR",
260
+ /** `AND` operator. */
261
+ AND = "AND"
262
+ }
263
+ /** Path definition */
264
+ export interface Path {
265
+ /**
266
+ * Unique path ID.
267
+ * @format GUID
268
+ */
269
+ _id?: string;
270
+ /**
271
+ * Path display name.
272
+ * @minLength 1
273
+ * @maxLength 100
274
+ */
275
+ name?: string;
276
+ /**
277
+ * ID of the action to run when this path is taken.
278
+ * @format GUID
279
+ */
280
+ postActionId?: string | null;
281
+ }
282
+ export declare enum Type {
283
+ /** Based on the trigger. */
284
+ UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
285
+ /** Defined by a [Wix app](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#app-defined-actions). This action type is available in the site dashboard. */
286
+ APP_DEFINED = "APP_DEFINED",
287
+ /** Condition. This determines which action runs next. */
288
+ CONDITION = "CONDITION",
289
+ /** Delay. The automation must wait before executing the next step. */
290
+ DELAY = "DELAY",
291
+ /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
292
+ RATE_LIMIT = "RATE_LIMIT"
293
+ }
294
+ export interface AppDefinedAction {
295
+ /**
296
+ * ID of the app that defines the action.
297
+ * @format GUID
298
+ */
299
+ appId?: string;
300
+ /**
301
+ * Action key.
302
+ * @minLength 1
303
+ * @maxLength 100
304
+ */
305
+ actionKey?: string;
306
+ /** Action input mapping as defined in the action's [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/the-action-input-schema). */
307
+ inputMapping?: Record<string, any> | null;
308
+ /**
309
+ * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
310
+ *
311
+ * > **Note**: Actions that follow a skipped action still run.
312
+ * @maxSize 10
313
+ */
314
+ skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
315
+ /**
316
+ * IDs of actions that run in parallel after the action completes.
317
+ * @maxSize 20
318
+ * @format GUID
319
+ */
320
+ postActionIds?: string[];
321
+ /** Action output schema. When specified, this replaces the action schema. */
322
+ overrideOutputSchema?: Record<string, any> | null;
323
+ }
324
+ export interface ConditionAction {
325
+ /**
326
+ * Condition is `true` if one or more of the expression groups evaluates to `true`.
327
+ * @minSize 1
328
+ * @maxSize 10
329
+ */
330
+ orExpressionGroups?: ConditionExpressionGroup[];
331
+ /**
332
+ * IDs of actions to run when the condition evaluates to `true`.
333
+ * @maxSize 20
334
+ * @format GUID
335
+ */
336
+ truePostActionIds?: string[];
337
+ /**
338
+ * IDs of actions to run when the condition evaluates to `false`.
339
+ * @maxSize 20
340
+ * @format GUID
341
+ */
342
+ falsePostActionIds?: string[];
343
+ }
344
+ export interface DelayAction {
345
+ /**
346
+ * Time to wait before running the action. The wait time starts from when the current action completes.
347
+ *
348
+ * > **Note**: To define the wait time from a specific moment in time, use `dueDateEpochExpression`.
349
+ * @maxLength 1000
350
+ */
351
+ offsetExpression?: string | null;
352
+ /** Unit in which to set the wait time to wait before the action runs. */
353
+ offsetTimeUnit?: TimeUnit;
354
+ /**
355
+ * Action run date in milliseconds elapsed since January 1, 1970 UTC.
356
+ *
357
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
358
+ * @maxLength 1000
359
+ */
360
+ dueDateEpochExpression?: string | null;
361
+ /**
362
+ * IDs of actions to run in parallel after the time delay.
363
+ * @maxSize 20
364
+ * @format GUID
365
+ */
366
+ postActionIds?: string[];
367
+ }
368
+ export interface RateLimitAction {
369
+ /**
370
+ * Maximum number of times the action can run.
371
+ * @maxLength 1000
372
+ */
373
+ maxActivationsExpression?: string;
374
+ /**
375
+ * Rate limit duration.
376
+ *
377
+ * When empty, the rate limit does not expire.
378
+ * @maxLength 1000
379
+ */
380
+ rateLimitDurationExpression?: string | null;
381
+ /** Unit in which to set the duration of the rate limit. */
382
+ rateLimitDurationTimeUnit?: TimeUnit;
383
+ /**
384
+ * Unique identifier of each activation by which rate limiter counts activations.
385
+ * @minLength 1
386
+ * @maxLength 400
387
+ */
388
+ uniqueIdentifierExpression?: string | null;
389
+ /**
390
+ * IDs of actions to run in parallel after the action completes.
391
+ * @maxSize 20
392
+ * @format GUID
393
+ */
394
+ postActionIds?: string[];
395
+ }
396
+ export interface SetVariablesAction {
397
+ /** Output mapping. For example: `{"someField": "{{10}}", "someOtherField": "{{multiply( var('account.points.balance') ;2 )}}" }`. */
398
+ outputMapping?: Record<string, any> | null;
399
+ /**
400
+ * Output JSON schema representation.
401
+ *
402
+ * > **Note**: To minimize request size, you can also specify a string.
403
+ */
404
+ outputSchema?: Record<string, any> | null;
405
+ /**
406
+ * IDs of actions to run in parallel after variable initialization.
407
+ * @maxSize 20
408
+ * @format GUID
409
+ */
410
+ postActionIds?: string[];
411
+ }
412
+ export interface OutputAction {
413
+ /** Output action output mapping. */
414
+ outputMapping?: Record<string, any> | null;
415
+ }
416
+ export interface SplitAction {
417
+ /**
418
+ * List of paths to split execution into.
419
+ * @minSize 2
420
+ * @maxSize 10
421
+ */
422
+ paths?: Path[];
423
+ }
424
+ export declare enum Status {
425
+ /** Unknown. */
426
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
427
+ /** Active. Active automations can be triggered. */
428
+ ACTIVE = "ACTIVE",
429
+ /** Inactive. Inactive automations cannot be triggered. */
430
+ INACTIVE = "INACTIVE"
431
+ }
432
+ export interface Trigger {
433
+ /**
434
+ * ID of the app that defines the trigger.
435
+ * @format GUID
436
+ */
437
+ appId?: string;
438
+ /**
439
+ * Trigger key.
440
+ *
441
+ * Learn about [setting up a trigger](https://dev.wix.com/docs/rest/business-management/automations/triggers/add-a-trigger-to-your-app#step-1--set-up-the-trigger).
442
+ * @minLength 1
443
+ * @maxLength 100
444
+ */
445
+ triggerKey?: string;
446
+ /**
447
+ * Schema field filters. All filter conditions must be met for the automation to run.
448
+ *
449
+ * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#filters).
450
+ * @maxSize 5
451
+ */
452
+ filters?: Filter[];
453
+ /**
454
+ * Automation offset. You can schedule automations to run before the trigger occurs.
455
+ *
456
+ * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).
457
+ */
458
+ scheduledEventOffset?: FutureDateActivationOffset;
459
+ /** Limit on the number of times an automation can be triggered. */
460
+ rateLimit?: RateLimit;
461
+ /** Trigger schema override. When specified, this replaces the trigger schema. */
462
+ overrideSchema?: Record<string, any> | null;
463
+ }
464
+ export interface Action extends ActionInfoOneOf {
465
+ /** Details of the action when its `type` is `APP_DEFINED`. */
466
+ appDefinedInfo?: AppDefinedAction;
467
+ /** Details of the action when its `type` is `CONDITION`. */
468
+ conditionInfo?: ConditionAction;
469
+ /** Details of the action when its `type` is `DELAY`. */
470
+ delayInfo?: DelayAction;
471
+ /** Details of the action when its `type` is `RATE_LIMIT`. */
472
+ rateLimitInfo?: RateLimitAction;
473
+ /**
474
+ * Action ID.
475
+ *
476
+ * If not specified, automatically generated by Wix.
477
+ * @format GUID
478
+ */
479
+ _id?: string | null;
480
+ /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#action-type). */
481
+ type?: Type;
482
+ /**
483
+ * [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
+ *
485
+ * If the action outputs any data, the data appears under the namespace in the payload sent to the subsequent steps in the automation. If the user has multiple actions with the same `appId` and `actionKey`, the output of the previous action is overwritten.
486
+ * @minLength 1
487
+ * @maxLength 100
488
+ */
489
+ namespace?: string | null;
490
+ }
491
+ /** @oneof */
492
+ export interface ActionInfoOneOf {
493
+ /** Details of the action when its `type` is `APP_DEFINED`. */
494
+ appDefinedInfo?: AppDefinedAction;
495
+ /** Details of the action when its `type` is `CONDITION`. */
496
+ conditionInfo?: ConditionAction;
497
+ /** Details of the action when its `type` is `DELAY`. */
498
+ delayInfo?: DelayAction;
499
+ /** Details of the action when its `type` is `RATE_LIMIT`. */
500
+ rateLimitInfo?: RateLimitAction;
501
+ }
502
+ export interface FilterableAppDefinedActions {
503
+ /**
504
+ * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.
505
+ * @minSize 1
506
+ * @maxSize 100
507
+ * @minLength 1
508
+ * @maxLength 150
509
+ */
510
+ actionIdentifiers?: string[];
511
+ }
512
+ export declare enum Origin {
513
+ /** Default value. */
514
+ UNKNOWN_ORIGIN = "UNKNOWN_ORIGIN",
515
+ /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
516
+ USER = "USER",
517
+ /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */
518
+ APPLICATION = "APPLICATION",
519
+ /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */
520
+ PREINSTALLED = "PREINSTALLED"
521
+ }
522
+ export interface ApplicationOrigin {
523
+ /**
524
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
525
+ *
526
+ * You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.
527
+ * @format GUID
528
+ */
529
+ appId?: string;
530
+ }
531
+ export interface PreinstalledOrigin {
532
+ /**
533
+ * ID of the app that added the [preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations).
534
+ * @format GUID
535
+ */
536
+ appId?: string;
537
+ /**
538
+ * Whether the automation is an override.
539
+ *
540
+ * When a user modifies the preinstalled automation installed on their site, a site-specific version of the automation is created that overrides the automation that was originally installed. This override automation has the same automation ID as the original preinstalled automation.
541
+ *
542
+ * > **Note**: An override automation can no longer be updated by the app that originally installed it.
543
+ * >
544
+ * > To revert to the original preinstalled version, the user must delete the override by calling the Delete Automation method. Calling Delete Automation on an override automation removes the override method and restores the preinstalled automation that was previously installed.
545
+ *
546
+ * Default: `false`.
547
+ * @immutable
548
+ * @readonly
549
+ */
550
+ override?: boolean | null;
551
+ }
552
+ export interface AutomationSettings {
553
+ /**
554
+ * Whether the automation is hidden from users.
555
+ *
556
+ * Default: `false`
557
+ */
558
+ hidden?: boolean;
559
+ /**
560
+ * Whether the automation is read-only.
561
+ *
562
+ * Default: `false`
563
+ */
564
+ readonly?: boolean;
565
+ /**
566
+ * Whether to disable the option to delete the automation from the site.
567
+ *
568
+ * Default: `false`.
569
+ */
570
+ disableDelete?: boolean;
571
+ /**
572
+ * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.
573
+ *
574
+ * Default: `false`.
575
+ */
576
+ disableStatusChange?: boolean;
577
+ /** Automation action settings. */
578
+ actionSettings?: ActionSettings;
579
+ }
580
+ export interface DraftInfo {
581
+ /**
582
+ * ID of the original automation.
583
+ * @format GUID
584
+ * @readonly
585
+ */
586
+ originalAutomationId?: string | null;
587
+ }
588
+ export interface Enrichments {
589
+ /** Whether the studio site enrichment is wanted. */
590
+ studioSite?: Enrichment;
591
+ }
592
+ export interface ExtendedFields {
593
+ /**
594
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
595
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
596
+ *
597
+ * You can only access fields for which you have the appropriate permissions.
598
+ *
599
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
600
+ */
601
+ namespaces?: Record<string, Record<string, any>>;
602
+ }
603
+ export interface AutomationMigrationRequest {
604
+ /**
605
+ * Automation id
606
+ * @format GUID
607
+ */
608
+ userAutomationId?: string;
609
+ /**
610
+ * An automation to use to migrate the old automation
611
+ * @readonly
612
+ */
613
+ automation?: Automation;
614
+ /**
615
+ * List of action ids to override in the automations.
616
+ * @format GUID
617
+ * @maxSize 100
618
+ */
619
+ overrideActionIds?: string[];
620
+ /** if true, the trigger will be overridden */
621
+ overrideTrigger?: boolean;
622
+ /**
623
+ * Job id
624
+ * @format GUID
625
+ */
626
+ jobId?: string;
627
+ }
628
+ export interface UpdatedWithPreviousEntity {
629
+ /** Previous automation. */
630
+ previousAutomation?: Automation;
631
+ /** Updated automation. */
632
+ currentAutomation?: Automation;
633
+ }
634
+ export interface DeletedWithEntity {
635
+ /** Deleted automation. */
636
+ automation?: Automation;
637
+ }
638
+ export interface DraftPublished {
639
+ /**
640
+ * ID of the draft automation.
641
+ * @format GUID
642
+ */
643
+ draftAutomationId?: string;
644
+ /**
645
+ * Original automation on which the draft is based.
646
+ *
647
+ * > **Note**: If the draft is not based on an existing automation, the draft itself is the original automation.
648
+ */
649
+ draftOriginalAutomation?: Automation;
650
+ /** Updated, published automation. */
651
+ updatedAutomation?: Automation;
652
+ }
653
+ export interface DomainEvent extends DomainEventBodyOneOf {
654
+ createdEvent?: EntityCreatedEvent;
655
+ updatedEvent?: EntityUpdatedEvent;
656
+ deletedEvent?: EntityDeletedEvent;
657
+ actionEvent?: ActionEvent;
658
+ /**
659
+ * Unique event ID.
660
+ * Allows clients to ignore duplicate webhooks.
661
+ */
662
+ _id?: string;
663
+ /**
664
+ * Assumes actions are also always typed to an entity_type
665
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
666
+ */
667
+ entityFqdn?: string;
668
+ /**
669
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
670
+ * This is although the created/updated/deleted notion is duplication of the oneof types
671
+ * Example: created/updated/deleted/started/completed/email_opened
672
+ */
673
+ slug?: string;
674
+ /** ID of the entity associated with the event. */
675
+ entityId?: string;
676
+ /** 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
+ eventTime?: Date | null;
678
+ /**
679
+ * Whether the event was triggered as a result of a privacy regulation application
680
+ * (for example, GDPR).
681
+ */
682
+ triggeredByAnonymizeRequest?: boolean | null;
683
+ /** If present, indicates the action that triggered the event. */
684
+ originatedFrom?: string | null;
685
+ /**
686
+ * A sequence number defining the order of updates to the underlying entity.
687
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
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.
692
+ */
693
+ entityEventSequence?: string | null;
694
+ }
695
+ /** @oneof */
696
+ export interface DomainEventBodyOneOf {
697
+ createdEvent?: EntityCreatedEvent;
698
+ updatedEvent?: EntityUpdatedEvent;
699
+ deletedEvent?: EntityDeletedEvent;
700
+ actionEvent?: ActionEvent;
701
+ }
702
+ export interface EntityCreatedEvent {
703
+ entity?: string;
704
+ }
705
+ export interface RestoreInfo {
706
+ deletedDate?: Date | null;
707
+ }
708
+ export interface EntityUpdatedEvent {
709
+ /**
710
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
711
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
712
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
713
+ */
714
+ currentEntity?: string;
715
+ }
716
+ export interface EntityDeletedEvent {
717
+ /** Entity that was deleted */
718
+ deletedEntity?: string | null;
719
+ }
720
+ export interface ActionEvent {
721
+ body?: string;
722
+ }
723
+ export interface Empty {
724
+ }
725
+ export interface UpdateApplicationAutomationsRequest {
726
+ /** Automation to use for updating other automations. */
727
+ automation?: Automation;
728
+ /**
729
+ * List of action ids to override in the automations.
730
+ * @format GUID
731
+ * @maxSize 100
732
+ */
733
+ overrideActionIds?: string[];
734
+ /**
735
+ * An id to identify the application automations.
736
+ * @format GUID
737
+ */
738
+ appDefinedExternalId?: string;
739
+ /**
740
+ * The application id to update automations for.
741
+ * @format GUID
742
+ */
743
+ appId?: string;
744
+ /** True if the update should override the trigger. */
745
+ overrideTrigger?: boolean;
746
+ }
747
+ export interface UpdateApplicationAutomationsResponse {
748
+ /**
749
+ * Job id for the update process.
750
+ * @format GUID
751
+ */
752
+ jobId?: string;
753
+ }
754
+ export interface TestUpdateApplicationAutomationRequest {
755
+ /** Automation to use for updating the test automation. */
756
+ automation?: Automation;
757
+ /**
758
+ * Automation id in site to update with the given automation.
759
+ * @format GUID
760
+ */
761
+ automationId?: string;
762
+ /**
763
+ * List of action ids to override in the automations.
764
+ * @format GUID
765
+ * @maxSize 100
766
+ */
767
+ overrideActionIds?: string[];
768
+ /**
769
+ * An id to identify the application automations. should be configured in the automation
770
+ * @format GUID
771
+ */
772
+ appDefinedExternalId?: string;
773
+ /**
774
+ * The application id to update automations for. should be configured in the automation
775
+ * @format GUID
776
+ */
777
+ appId?: string;
778
+ /** True if the update should override the trigger. */
779
+ overrideTrigger?: boolean;
780
+ }
781
+ export interface TestUpdateApplicationAutomationResponse {
782
+ /** The automation after the update. */
783
+ automation?: Automation;
784
+ }
785
+ export interface MessageEnvelope {
786
+ /**
787
+ * App instance ID.
788
+ * @format GUID
789
+ */
790
+ instanceId?: string | null;
791
+ /**
792
+ * Event type.
793
+ * @maxLength 150
794
+ */
795
+ eventType?: string;
796
+ /** The identification type and identity data. */
797
+ identity?: IdentificationData;
798
+ /** Stringify payload. */
799
+ data?: string;
800
+ }
801
+ export interface IdentificationData extends IdentificationDataIdOneOf {
802
+ /**
803
+ * ID of a site visitor that has not logged in to the site.
804
+ * @format GUID
805
+ */
806
+ anonymousVisitorId?: string;
807
+ /**
808
+ * ID of a site visitor that has logged in to the site.
809
+ * @format GUID
810
+ */
811
+ memberId?: string;
812
+ /**
813
+ * ID of a Wix user (site owner, contributor, etc.).
814
+ * @format GUID
815
+ */
816
+ wixUserId?: string;
817
+ /**
818
+ * ID of an app.
819
+ * @format GUID
820
+ */
821
+ appId?: string;
822
+ /** @readonly */
823
+ identityType?: WebhookIdentityType;
824
+ }
825
+ /** @oneof */
826
+ export interface IdentificationDataIdOneOf {
827
+ /**
828
+ * ID of a site visitor that has not logged in to the site.
829
+ * @format GUID
830
+ */
831
+ anonymousVisitorId?: string;
832
+ /**
833
+ * ID of a site visitor that has logged in to the site.
834
+ * @format GUID
835
+ */
836
+ memberId?: string;
837
+ /**
838
+ * ID of a Wix user (site owner, contributor, etc.).
839
+ * @format GUID
840
+ */
841
+ wixUserId?: string;
842
+ /**
843
+ * ID of an app.
844
+ * @format GUID
845
+ */
846
+ appId?: string;
847
+ }
848
+ export declare enum WebhookIdentityType {
849
+ UNKNOWN = "UNKNOWN",
850
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
851
+ MEMBER = "MEMBER",
852
+ WIX_USER = "WIX_USER",
853
+ APP = "APP"
854
+ }
855
+ export interface CreateAutomationRequest {
856
+ /** Automation to create. */
857
+ automation: Automation;
858
+ }
859
+ export declare enum RequestedFields {
860
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
861
+ /** whether to return in response `configuration.trigger.override_output_schema` field and in `configuration.actions` the `override_output_schema` field */
862
+ OVERRIDE_SCHEMA = "OVERRIDE_SCHEMA"
863
+ }
864
+ export interface CreateAutomationResponse {
865
+ /** Details of the created automation. */
866
+ automation?: Automation;
867
+ }
868
+ export interface GetAutomationRequest {
869
+ /**
870
+ * Automation ID.
871
+ * @format GUID
872
+ */
873
+ automationId: string;
874
+ }
875
+ export interface GetAutomationResponse {
876
+ /** Retrieved automation. */
877
+ automation?: Automation;
878
+ }
879
+ export interface UpdateAutomationRequest {
880
+ /** Automation to update. */
881
+ automation: Automation;
882
+ }
883
+ export interface UpdateAutomationResponse {
884
+ /** Updated automation. */
885
+ automation?: Automation;
886
+ }
887
+ export interface DeleteAutomationRequest {
888
+ /**
889
+ * Automation ID.
890
+ * @format GUID
891
+ */
892
+ automationId: string;
893
+ }
894
+ export interface DeleteAutomationResponse {
895
+ }
896
+ export interface BulkDeleteAutomationsRequest {
897
+ /**
898
+ * IDs of the automations to delete.
899
+ * @format GUID
900
+ * @minSize 1
901
+ * @maxSize 200
902
+ */
903
+ automationIds: string[];
904
+ }
905
+ export interface BulkDeleteAutomationsResponse {
906
+ /**
907
+ * Results of the bulk deletion.
908
+ * @minSize 1
909
+ * @maxSize 200
910
+ */
911
+ results?: BulkDeleteResult[];
912
+ /** Metadata for the API call. */
913
+ bulkActionMetadata?: BulkActionMetadata;
914
+ }
915
+ export interface BulkDeleteResult {
916
+ /** Deleted item metadata. */
917
+ itemMetadata?: ItemMetadata;
918
+ }
919
+ export interface ItemMetadata {
920
+ /**
921
+ * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
922
+ * @format GUID
923
+ */
924
+ _id?: string | null;
925
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
926
+ originalIndex?: number;
927
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
928
+ success?: boolean;
929
+ /** Details about the error in case of failure. */
930
+ error?: ApplicationError;
931
+ }
932
+ export interface ApplicationError {
933
+ /** Error code. */
934
+ code?: string;
935
+ /** Description of the error. */
936
+ description?: string;
937
+ /** Data related to the error. */
938
+ data?: Record<string, any> | null;
939
+ }
940
+ export interface BulkActionMetadata {
941
+ /** Number of items that were successfully processed. */
942
+ totalSuccesses?: number;
943
+ /** Number of items that couldn't be processed. */
944
+ totalFailures?: number;
945
+ /** Number of failures without details because detailed failure threshold was exceeded. */
946
+ undetailedFailures?: number;
947
+ }
948
+ export interface CreatePreinstalledAutomationRequest {
949
+ /** Preinstalled automation to create. */
950
+ automation?: Automation;
951
+ /**
952
+ * Hide the created automation behind a spec.
953
+ *
954
+ * For internal use only.
955
+ */
956
+ specInfo?: PreinstalledAutomationSpecInfo;
957
+ /**
958
+ * Original site automation used to create the current preinstalled automation.
959
+ *
960
+ * Usually an existing automation on a site is used to create the preinstalled automation.
961
+ *
962
+ * For internal use only.
963
+ */
964
+ originAutomationInfo?: OriginAutomationInfo;
965
+ /**
966
+ * ID of the app to which the automation belongs.
967
+ * @format GUID
968
+ */
969
+ appId?: string;
970
+ }
971
+ export interface PreinstalledAutomationSpecInfo {
972
+ /**
973
+ * Spec to conduct on for the automation.
974
+ *
975
+ * For internal use only.
976
+ * @maxLength 128
977
+ */
978
+ spec?: string;
979
+ /**
980
+ * Value the spec should return in order to affect the user with the operation
981
+ * e.g. creation - show the users the automation, update - show the users the updated automation, deletion - not show the users the automation
982
+ * @maxLength 128
983
+ */
984
+ variantValue?: string | null;
985
+ /**
986
+ * Version from which the experiment should decide whether to expose it to users when !conduct(spec).contains(variant_value)
987
+ * For example, if 50 is set, version 49 and below (including 49) will not expose the preinstalled automation to the user.
988
+ */
989
+ experimentVersion?: number;
990
+ }
991
+ export interface OriginAutomationInfo {
992
+ /**
993
+ * ID of the original automation.
994
+ * @format GUID
995
+ */
996
+ siteAutomationId?: string;
997
+ /**
998
+ * Metasite ID of the original automation.
999
+ * @format GUID
1000
+ */
1001
+ metaSiteId?: string;
1002
+ }
1003
+ export interface CreatePreinstalledAutomationResponse {
1004
+ /** Details of the created preinstalled automation. */
1005
+ automation?: Automation;
1006
+ }
1007
+ export interface UpdatePreinstalledAutomationRequest {
1008
+ /** Preinstalled automation to update. */
1009
+ automation?: Automation;
1010
+ /**
1011
+ * Hide the updated automation behind a spec.
1012
+ *
1013
+ * For internal use only.
1014
+ */
1015
+ specInfo?: PreinstalledAutomationSpecInfo;
1016
+ /**
1017
+ * ID of the app to which the automation belongs.
1018
+ * @format GUID
1019
+ */
1020
+ appId?: string;
1021
+ }
1022
+ export interface UpdatePreinstalledAutomationResponse {
1023
+ /** Updated preinstalled automation. */
1024
+ automation?: Automation;
1025
+ }
1026
+ export interface DeletePreinstalledAutomationRequest {
1027
+ /**
1028
+ * ID of the preinstalled component.
1029
+ * @format GUID
1030
+ */
1031
+ componentId?: string;
1032
+ /**
1033
+ * Makes the deletion operation gradual.
1034
+ * The automation will not return if the variant returns for the site
1035
+ *
1036
+ * For internal use only.
1037
+ */
1038
+ specInfo?: PreinstalledAutomationSpecInfo;
1039
+ /**
1040
+ * ID of the app to which the component belongs.
1041
+ * @format GUID
1042
+ */
1043
+ appId?: string;
1044
+ }
1045
+ export interface DeletePreinstalledAutomationResponse {
1046
+ }
1047
+ export interface GeneratePreinstalledAutomationRequest {
1048
+ /** Automation. */
1049
+ automation: Automation;
1050
+ /**
1051
+ * ID of the app to which the automation belongs.
1052
+ * @format GUID
1053
+ */
1054
+ appId?: string;
1055
+ }
1056
+ export interface GeneratePreinstalledAutomationResponse {
1057
+ /** Automation. */
1058
+ automation?: Automation;
1059
+ }
1060
+ export interface QueryPreinstalledAutomationsForAppRequest {
1061
+ /**
1062
+ * Query.
1063
+ *
1064
+ * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
1065
+ */
1066
+ query?: CursorQuery;
1067
+ /**
1068
+ * ID of the app for which to query preinstalled automations.
1069
+ * @format GUID
1070
+ */
1071
+ appId?: string;
1072
+ }
1073
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
1074
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1075
+ cursorPaging?: CursorPaging;
1076
+ /**
1077
+ * Filter object in the following format:
1078
+ * `"filter" : {
1079
+ * "fieldName1": "value1",
1080
+ * "fieldName2": { "$operator": "value2" }
1081
+ * }`
1082
+ *
1083
+ * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
1084
+ */
1085
+ filter?: Record<string, any> | null;
1086
+ /**
1087
+ * Sort configuration in the following format:
1088
+ * `[{ "fieldName": "sortField1", "order": "ASC" }, { "fieldName":" sortField2", "order": "DESC" }]`
1089
+ * @maxSize 5
1090
+ */
1091
+ sort?: Sorting[];
1092
+ }
1093
+ /** @oneof */
1094
+ export interface CursorQueryPagingMethodOneOf {
1095
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
1096
+ cursorPaging?: CursorPaging;
1097
+ }
1098
+ export interface Sorting {
1099
+ /**
1100
+ * Name of the field to sort by.
1101
+ * @maxLength 512
1102
+ */
1103
+ fieldName?: string;
1104
+ /** Sort order. */
1105
+ order?: SortOrder;
1106
+ }
1107
+ export declare enum SortOrder {
1108
+ ASC = "ASC",
1109
+ DESC = "DESC"
1110
+ }
1111
+ export interface CursorPaging {
1112
+ /**
1113
+ * Maximum number of items to return in the results.
1114
+ * @max 500
1115
+ */
1116
+ limit?: number | null;
1117
+ /**
1118
+ * Pointer to the next or previous page in the list of results.
1119
+ *
1120
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1121
+ * Not relevant for the first request.
1122
+ * @maxLength 64000
1123
+ */
1124
+ cursor?: string | null;
1125
+ }
1126
+ export interface QueryPreinstalledAutomationsForAppResponse {
1127
+ /** Automations. */
1128
+ automations?: Automation[];
1129
+ /** Paging metadata. */
1130
+ pagingMetadata?: CursorPagingMetadata;
1131
+ }
1132
+ export interface CursorPagingMetadata {
1133
+ /** Number of items returned in the response. */
1134
+ count?: number | null;
1135
+ /** Cursor strings that point to the next page, previous page, or both. */
1136
+ cursors?: Cursors;
1137
+ /**
1138
+ * Whether there are more pages to retrieve following the current page.
1139
+ *
1140
+ * + `true`: Another page of results can be retrieved.
1141
+ * + `false`: This is the last page.
1142
+ */
1143
+ hasNext?: boolean | null;
1144
+ }
1145
+ export interface Cursors {
1146
+ /**
1147
+ * Cursor string pointing to the next page in the list of results.
1148
+ * @maxLength 64000
1149
+ */
1150
+ next?: string | null;
1151
+ /**
1152
+ * Cursor pointing to the previous page in the list of results.
1153
+ * @maxLength 64000
1154
+ */
1155
+ prev?: string | null;
1156
+ }
1157
+ export interface QueryAutomationsRequest {
1158
+ /**
1159
+ * Query.
1160
+ *
1161
+ * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
1162
+ *
1163
+ * > **Note**: To query archived automations, specify `{ "archived": true }` in the [query filter object](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).
1164
+ */
1165
+ query?: CursorQuery;
1166
+ }
1167
+ export interface QueryAutomationsResponse {
1168
+ /** Automations. */
1169
+ automations?: Automation[];
1170
+ /** Paging metadata. */
1171
+ pagingMetadata?: CursorPagingMetadata;
1172
+ }
1173
+ export interface GetAggregatedUsageInfoRequest {
1174
+ /**
1175
+ * Filter in the following format:
1176
+ *
1177
+ * `"filter" :
1178
+ * {
1179
+ * "fieldName1": "value1",
1180
+ * "fieldName2":{"$operator":"value2"}
1181
+ * }`
1182
+ *
1183
+ * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).
1184
+ */
1185
+ filter?: Record<string, any> | null;
1186
+ }
1187
+ export interface GetAggregatedUsageInfoResponse {
1188
+ /** Triggers in use. */
1189
+ triggersUsageSummary?: TriggerUsageSummary[];
1190
+ /** Actions in use */
1191
+ actionsUsageSummary?: ActionUsageSummary[];
1192
+ }
1193
+ export interface TriggerUsageSummary {
1194
+ /**
1195
+ * ID of the app that defined the trigger.
1196
+ * @format GUID
1197
+ */
1198
+ appId?: string;
1199
+ /**
1200
+ * Trigger key.
1201
+ * @minLength 1
1202
+ * @maxLength 100
1203
+ */
1204
+ triggerKey?: string;
1205
+ /** Number of automations that include this trigger. */
1206
+ automationsCount?: number;
1207
+ }
1208
+ export interface ActionUsageSummary {
1209
+ /**
1210
+ * ID of the app that defined the action.
1211
+ * @format GUID
1212
+ */
1213
+ appId?: string;
1214
+ /**
1215
+ * Action key.
1216
+ * @minLength 1
1217
+ * @maxLength 100
1218
+ */
1219
+ actionKey?: string;
1220
+ /** Number of automations that include this action. */
1221
+ automationsCount?: number;
1222
+ }
1223
+ export interface CopyAutomationRequest {
1224
+ /**
1225
+ * ID of the automation to copy.
1226
+ * @format GUID
1227
+ */
1228
+ automationId: string;
1229
+ /** Origin of the automation to copy. */
1230
+ origin?: Origin;
1231
+ /** Automation to copy. Skips fetching by ID. */
1232
+ automation?: Automation;
1233
+ }
1234
+ export interface CopyAutomationResponse {
1235
+ /** Copy of the automation. */
1236
+ automation?: Automation;
1237
+ }
1238
+ export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
1239
+ /** Emitted on a meta site creation. */
1240
+ siteCreated?: SiteCreated;
1241
+ /** Emitted on a meta site transfer completion. */
1242
+ siteTransferred?: SiteTransferred;
1243
+ /** Emitted on a meta site deletion. */
1244
+ siteDeleted?: SiteDeleted;
1245
+ /** Emitted on a meta site restoration. */
1246
+ siteUndeleted?: SiteUndeleted;
1247
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
1248
+ sitePublished?: SitePublished;
1249
+ /** Emitted on a meta site unpublish. */
1250
+ siteUnpublished?: SiteUnpublished;
1251
+ /** Emitted when meta site is marked as template. */
1252
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
1253
+ /** Emitted when meta site is marked as a WixSite. */
1254
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
1255
+ /** Emitted when an application is provisioned (installed). */
1256
+ serviceProvisioned?: ServiceProvisioned;
1257
+ /** Emitted when an application is removed (uninstalled). */
1258
+ serviceRemoved?: ServiceRemoved;
1259
+ /** Emitted when meta site name (URL slug) is changed. */
1260
+ siteRenamedPayload?: SiteRenamed;
1261
+ /** Emitted when meta site was permanently deleted. */
1262
+ hardDeleted?: SiteHardDeleted;
1263
+ /** Emitted on a namespace change. */
1264
+ namespaceChanged?: NamespaceChanged;
1265
+ /** Emitted when Studio is attached. */
1266
+ studioAssigned?: StudioAssigned;
1267
+ /** Emitted when Studio is detached. */
1268
+ studioUnassigned?: StudioUnassigned;
1269
+ /**
1270
+ * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
1271
+ * the actual URL.
1272
+ *
1273
+ * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
1274
+ * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
1275
+ */
1276
+ urlChanged?: SiteUrlChanged;
1277
+ /** Site is marked as PurgedExternally */
1278
+ sitePurgedExternally?: SitePurgedExternally;
1279
+ /** Emitted when Odeditor is attached. */
1280
+ odeditorAssigned?: OdeditorAssigned;
1281
+ /** Emitted when Odeditor is detached. */
1282
+ odeditorUnassigned?: OdeditorUnassigned;
1283
+ /** Emitted when Picasso is attached. */
1284
+ picassoAssigned?: PicassoAssigned;
1285
+ /** Emitted when Picasso is detached. */
1286
+ picassoUnassigned?: PicassoUnassigned;
1287
+ /**
1288
+ * A meta site id.
1289
+ * @format GUID
1290
+ */
1291
+ metaSiteId?: string;
1292
+ /** A meta site version. Monotonically increasing. */
1293
+ version?: string;
1294
+ /** A timestamp of the event. */
1295
+ timestamp?: string;
1296
+ /**
1297
+ * TODO(meta-site): Change validation once validations are disabled for consumers
1298
+ * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659
1299
+ * @maxSize 4000
1300
+ */
1301
+ assets?: Asset[];
1302
+ }
1303
+ /** @oneof */
1304
+ export interface MetaSiteSpecialEventPayloadOneOf {
1305
+ /** Emitted on a meta site creation. */
1306
+ siteCreated?: SiteCreated;
1307
+ /** Emitted on a meta site transfer completion. */
1308
+ siteTransferred?: SiteTransferred;
1309
+ /** Emitted on a meta site deletion. */
1310
+ siteDeleted?: SiteDeleted;
1311
+ /** Emitted on a meta site restoration. */
1312
+ siteUndeleted?: SiteUndeleted;
1313
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
1314
+ sitePublished?: SitePublished;
1315
+ /** Emitted on a meta site unpublish. */
1316
+ siteUnpublished?: SiteUnpublished;
1317
+ /** Emitted when meta site is marked as template. */
1318
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
1319
+ /** Emitted when meta site is marked as a WixSite. */
1320
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
1321
+ /** Emitted when an application is provisioned (installed). */
1322
+ serviceProvisioned?: ServiceProvisioned;
1323
+ /** Emitted when an application is removed (uninstalled). */
1324
+ serviceRemoved?: ServiceRemoved;
1325
+ /** Emitted when meta site name (URL slug) is changed. */
1326
+ siteRenamedPayload?: SiteRenamed;
1327
+ /** Emitted when meta site was permanently deleted. */
1328
+ hardDeleted?: SiteHardDeleted;
1329
+ /** Emitted on a namespace change. */
1330
+ namespaceChanged?: NamespaceChanged;
1331
+ /** Emitted when Studio is attached. */
1332
+ studioAssigned?: StudioAssigned;
1333
+ /** Emitted when Studio is detached. */
1334
+ studioUnassigned?: StudioUnassigned;
1335
+ /**
1336
+ * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
1337
+ * the actual URL.
1338
+ *
1339
+ * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
1340
+ * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
1341
+ */
1342
+ urlChanged?: SiteUrlChanged;
1343
+ /** Site is marked as PurgedExternally */
1344
+ sitePurgedExternally?: SitePurgedExternally;
1345
+ /** Emitted when Odeditor is attached. */
1346
+ odeditorAssigned?: OdeditorAssigned;
1347
+ /** Emitted when Odeditor is detached. */
1348
+ odeditorUnassigned?: OdeditorUnassigned;
1349
+ /** Emitted when Picasso is attached. */
1350
+ picassoAssigned?: PicassoAssigned;
1351
+ /** Emitted when Picasso is detached. */
1352
+ picassoUnassigned?: PicassoUnassigned;
1353
+ }
1354
+ export interface Asset {
1355
+ /**
1356
+ * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
1357
+ * @maxLength 36
1358
+ */
1359
+ appDefId?: string;
1360
+ /**
1361
+ * An instance id. For legacy reasons may be UUID or a string.
1362
+ * @maxLength 200
1363
+ */
1364
+ instanceId?: string;
1365
+ /** An application state. */
1366
+ state?: State;
1367
+ }
1368
+ export declare enum State {
1369
+ UNKNOWN = "UNKNOWN",
1370
+ ENABLED = "ENABLED",
1371
+ DISABLED = "DISABLED",
1372
+ PENDING = "PENDING",
1373
+ DEMO = "DEMO"
1374
+ }
1375
+ export interface SiteCreated {
1376
+ /**
1377
+ * A template identifier (empty if not created from a template).
1378
+ * @maxLength 36
1379
+ */
1380
+ originTemplateId?: string;
1381
+ /**
1382
+ * An account id of the owner.
1383
+ * @format GUID
1384
+ */
1385
+ ownerId?: string;
1386
+ /** A context in which meta site was created. */
1387
+ context?: SiteCreatedContext;
1388
+ /**
1389
+ * A meta site id from which this site was created.
1390
+ *
1391
+ * In case of a creation from a template it's a template id.
1392
+ * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
1393
+ * @format GUID
1394
+ */
1395
+ originMetaSiteId?: string | null;
1396
+ /**
1397
+ * A meta site name (URL slug).
1398
+ * @maxLength 20
1399
+ */
1400
+ siteName?: string;
1401
+ /** A namespace. */
1402
+ namespace?: Namespace;
1403
+ }
1404
+ export declare enum SiteCreatedContext {
1405
+ /** A valid option, we don't expose all reasons why site might be created. */
1406
+ OTHER = "OTHER",
1407
+ /** A meta site was created from template. */
1408
+ FROM_TEMPLATE = "FROM_TEMPLATE",
1409
+ /** A meta site was created by copying of the transfferred meta site. */
1410
+ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
1411
+ /** A copy of existing meta site. */
1412
+ DUPLICATE = "DUPLICATE",
1413
+ /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
1414
+ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
1415
+ /** deprecated A meta site was created for Flash editor. */
1416
+ FLASH = "FLASH"
1417
+ }
1418
+ export declare enum Namespace {
1419
+ UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
1420
+ /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
1421
+ WIX = "WIX",
1422
+ /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
1423
+ SHOUT_OUT = "SHOUT_OUT",
1424
+ /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
1425
+ ALBUMS = "ALBUMS",
1426
+ /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
1427
+ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
1428
+ /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
1429
+ HOTELS = "HOTELS",
1430
+ /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
1431
+ CLUBS = "CLUBS",
1432
+ /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
1433
+ ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
1434
+ /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
1435
+ DEV_SITE = "DEV_SITE",
1436
+ /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
1437
+ LOGOS = "LOGOS",
1438
+ /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
1439
+ VIDEO_MAKER = "VIDEO_MAKER",
1440
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
1441
+ PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
1442
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
1443
+ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
1444
+ /**
1445
+ * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
1446
+ *
1447
+ * Meta site with this namespace will *not* be shown in a user's site list by default.
1448
+ */
1449
+ HTML_DRAFT = "HTML_DRAFT",
1450
+ /**
1451
+ * the user-journey for Fitness users who want to start from managing their business instead of designing their website.
1452
+ * Will be accessible from Site List and will not have a website app.
1453
+ * Once the user attaches a site, the site will become a regular wixsite.
1454
+ */
1455
+ SITELESS_BUSINESS = "SITELESS_BUSINESS",
1456
+ /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
1457
+ CREATOR_ECONOMY = "CREATOR_ECONOMY",
1458
+ /** It is to be used in the Business First efforts. */
1459
+ DASHBOARD_FIRST = "DASHBOARD_FIRST",
1460
+ /** Bookings business flow with no site. */
1461
+ ANYWHERE = "ANYWHERE",
1462
+ /** Namespace for Headless Backoffice with no editor */
1463
+ HEADLESS = "HEADLESS",
1464
+ /**
1465
+ * Namespace for master site that will exist in parent account that will be referenced by subaccounts
1466
+ * The site will be used for account level CSM feature for enterprise
1467
+ */
1468
+ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
1469
+ /** Rise.ai Siteless account management for Gift Cards and Store Credit. */
1470
+ RISE = "RISE",
1471
+ /**
1472
+ * As part of the branded app new funnel, users now can create a meta site that will be branded app first.
1473
+ * There's a blank site behind the scene but it's blank).
1474
+ * The Mobile company will be the owner of this namespace.
1475
+ */
1476
+ BRANDED_FIRST = "BRANDED_FIRST",
1477
+ /** Nownia.com Siteless account management for Ai Scheduling Assistant. */
1478
+ NOWNIA = "NOWNIA",
1479
+ /**
1480
+ * UGC Templates are templates that are created by users for personal use and to sale to other users.
1481
+ * The Partners company owns this namespace.
1482
+ */
1483
+ UGC_TEMPLATE = "UGC_TEMPLATE",
1484
+ /** Codux Headless Sites */
1485
+ CODUX = "CODUX",
1486
+ /** Bobb - AI Design Creator. */
1487
+ MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR",
1488
+ /**
1489
+ * Shared Blog Site is a unique single site across Enterprise account,
1490
+ * This site will hold all Blog posts related to the Marketing product.
1491
+ */
1492
+ SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE",
1493
+ /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
1494
+ STANDALONE_FORMS = "STANDALONE_FORMS",
1495
+ /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
1496
+ STANDALONE_EVENTS = "STANDALONE_EVENTS",
1497
+ /** MIMIR - Siteless account for MIMIR Ai Job runner. */
1498
+ MIMIR = "MIMIR"
1499
+ }
1500
+ /** Site transferred to another user. */
1501
+ export interface SiteTransferred {
1502
+ /**
1503
+ * A previous owner id (user that transfers meta site).
1504
+ * @format GUID
1505
+ */
1506
+ oldOwnerId?: string;
1507
+ /**
1508
+ * A new owner id (user that accepts meta site).
1509
+ * @format GUID
1510
+ */
1511
+ newOwnerId?: string;
1512
+ }
1513
+ /** Soft deletion of the meta site. Could be restored. */
1514
+ export interface SiteDeleted {
1515
+ /** A deletion context. */
1516
+ deleteContext?: DeleteContext;
1517
+ }
1518
+ export interface DeleteContext {
1519
+ /** When the meta site was deleted. */
1520
+ dateDeleted?: Date | null;
1521
+ /** A status. */
1522
+ deleteStatus?: DeleteStatus;
1523
+ /**
1524
+ * A reason (flow).
1525
+ * @maxLength 255
1526
+ */
1527
+ deleteOrigin?: string;
1528
+ /**
1529
+ * A service that deleted it.
1530
+ * @maxLength 255
1531
+ */
1532
+ initiatorId?: string | null;
1533
+ }
1534
+ export declare enum DeleteStatus {
1535
+ UNKNOWN = "UNKNOWN",
1536
+ TRASH = "TRASH",
1537
+ DELETED = "DELETED",
1538
+ PENDING_PURGE = "PENDING_PURGE",
1539
+ PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
1540
+ }
1541
+ /** Restoration of the meta site. */
1542
+ export interface SiteUndeleted {
1543
+ }
1544
+ /** First publish of a meta site. Or subsequent publish after unpublish. */
1545
+ export interface SitePublished {
1546
+ }
1547
+ export interface SiteUnpublished {
1548
+ /**
1549
+ * A list of URLs previously associated with the meta site.
1550
+ * @maxLength 4000
1551
+ * @maxSize 10000
1552
+ */
1553
+ urls?: string[];
1554
+ }
1555
+ export interface SiteMarkedAsTemplate {
1556
+ }
1557
+ export interface SiteMarkedAsWixSite {
1558
+ }
1559
+ /**
1560
+ * Represents a service provisioned a site.
1561
+ *
1562
+ * Note on `origin_instance_id`:
1563
+ * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.
1564
+ * This is because of the following scenario:
1565
+ *
1566
+ * Imagine you have a template where a third-party application (TPA) includes some stub data,
1567
+ * such as a product catalog. When you create a site from this template, you inherit this
1568
+ * default product catalog. However, if the template's product catalog is modified,
1569
+ * your site will retain the catalog as it was at the time of site creation. This ensures that
1570
+ * your site remains consistent with what you initially received and does not include any
1571
+ * changes made to the original template afterward.
1572
+ * To ensure this, the TPA on the template gets a new instance_id.
1573
+ */
1574
+ export interface ServiceProvisioned {
1575
+ /**
1576
+ * Either UUID or EmbeddedServiceType.
1577
+ * @maxLength 36
1578
+ */
1579
+ appDefId?: string;
1580
+ /**
1581
+ * Not only UUID. Something here could be something weird.
1582
+ * @maxLength 36
1583
+ */
1584
+ instanceId?: string;
1585
+ /**
1586
+ * An instance id from which this instance is originated.
1587
+ * @maxLength 36
1588
+ */
1589
+ originInstanceId?: string;
1590
+ /**
1591
+ * A version.
1592
+ * @maxLength 500
1593
+ */
1594
+ version?: string | null;
1595
+ /**
1596
+ * The origin meta site id
1597
+ * @format GUID
1598
+ */
1599
+ originMetaSiteId?: string | null;
1600
+ }
1601
+ export interface ServiceRemoved {
1602
+ /**
1603
+ * Either UUID or EmbeddedServiceType.
1604
+ * @maxLength 36
1605
+ */
1606
+ appDefId?: string;
1607
+ /**
1608
+ * Not only UUID. Something here could be something weird.
1609
+ * @maxLength 36
1610
+ */
1611
+ instanceId?: string;
1612
+ /**
1613
+ * A version.
1614
+ * @maxLength 500
1615
+ */
1616
+ version?: string | null;
1617
+ }
1618
+ /** Rename of the site. Meaning, free public url has been changed as well. */
1619
+ export interface SiteRenamed {
1620
+ /**
1621
+ * A new meta site name (URL slug).
1622
+ * @maxLength 20
1623
+ */
1624
+ newSiteName?: string;
1625
+ /**
1626
+ * A previous meta site name (URL slug).
1627
+ * @maxLength 255
1628
+ */
1629
+ oldSiteName?: string;
1630
+ }
1631
+ /**
1632
+ * Hard deletion of the meta site.
1633
+ *
1634
+ * Could not be restored. Therefore it's desirable to cleanup data.
1635
+ */
1636
+ export interface SiteHardDeleted {
1637
+ /** A deletion context. */
1638
+ deleteContext?: DeleteContext;
1639
+ }
1640
+ export interface NamespaceChanged {
1641
+ /** A previous namespace. */
1642
+ oldNamespace?: Namespace;
1643
+ /** A new namespace. */
1644
+ newNamespace?: Namespace;
1645
+ }
1646
+ /** Assigned Studio editor */
1647
+ export interface StudioAssigned {
1648
+ }
1649
+ /** Unassigned Studio editor */
1650
+ export interface StudioUnassigned {
1651
+ }
1652
+ /**
1653
+ * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
1654
+ *
1655
+ * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up
1656
+ * with sites and its urls, you need to listen to another topic/event. Read about it:
1657
+ *
1658
+ * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
1659
+ */
1660
+ export interface SiteUrlChanged {
1661
+ }
1662
+ /**
1663
+ * Used at the end of the deletion flow for both draft sites and when a user deletes a site.
1664
+ * Consumed by other teams to remove relevant data.
1665
+ */
1666
+ export interface SitePurgedExternally {
1667
+ /**
1668
+ * @maxLength 2048
1669
+ * @maxSize 100
1670
+ * @deprecated
1671
+ * @targetRemovalDate 2025-04-15
1672
+ */
1673
+ appDefId?: string[];
1674
+ }
1675
+ /** Assigned Odeditor */
1676
+ export interface OdeditorAssigned {
1677
+ }
1678
+ /** Unassigned Odeditor */
1679
+ export interface OdeditorUnassigned {
1680
+ }
1681
+ /** Assigned Picasso editor */
1682
+ export interface PicassoAssigned {
1683
+ }
1684
+ /** Unassigned Picasso */
1685
+ export interface PicassoUnassigned {
1686
+ }
1687
+ export interface CreateDraftAutomationRequest {
1688
+ /** Draft automation to create. */
1689
+ automation?: Automation;
1690
+ }
1691
+ export interface CreateDraftAutomationResponse {
1692
+ /** Draft automation that was created. */
1693
+ automation?: Automation;
1694
+ }
1695
+ export interface GetOrCreateDraftAutomationRequest {
1696
+ /**
1697
+ * ID of the original automation on which the draft is based.
1698
+ * @format GUID
1699
+ */
1700
+ originalAutomationId: string;
1701
+ }
1702
+ export interface GetOrCreateDraftAutomationResponse {
1703
+ /** Draft automation. */
1704
+ automation?: Automation;
1705
+ }
1706
+ export interface UpdateDraftAutomationRequest {
1707
+ /** Automation to update. Updates can be partial. */
1708
+ automation: Automation;
1709
+ }
1710
+ export interface UpdateDraftAutomationResponse {
1711
+ /** Updated draft automation. */
1712
+ automation?: Automation;
1713
+ }
1714
+ export interface QueryAutomationsWithDraftsRequest {
1715
+ /**
1716
+ * Query.
1717
+ *
1718
+ * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
1719
+ */
1720
+ query?: CursorQuery;
1721
+ }
1722
+ export interface QueryAutomationsWithDraftsResponse {
1723
+ /** Retrieved automations. */
1724
+ automations?: Automation[];
1725
+ /** Paging metadata. */
1726
+ pagingMetadata?: CursorPagingMetadata;
1727
+ /**
1728
+ * Map of existing automation IDs and their drafts' automation IDs.
1729
+ * When include_draft_data is set to `false`, the map is empty. The key is the automationId of the original automation, and the value a list of related draft automationIds.
1730
+ */
1731
+ originalAutomationIdToDrafts?: Record<string, DraftsInfo>;
1732
+ }
1733
+ export interface DraftsInfo {
1734
+ /**
1735
+ * IDs of the draft automations.
1736
+ * @maxSize 1
1737
+ * @format GUID
1738
+ */
1739
+ draftAutomationIds?: string[];
1740
+ }
1741
+ export interface DeleteDraftAutomationRequest {
1742
+ /**
1743
+ * ID of the draft automation to delete.
1744
+ * @format GUID
1745
+ */
1746
+ automationId: string;
1747
+ }
1748
+ export interface DeleteDraftAutomationResponse {
1749
+ }
1750
+ export interface PublishDraftAutomationRequest {
1751
+ /**
1752
+ * ID of the draft automation to publish.
1753
+ * @format GUID
1754
+ */
1755
+ automationId: string;
1756
+ }
1757
+ export interface PublishDraftAutomationResponse {
1758
+ /** Updated published automation. */
1759
+ automation?: Automation;
1760
+ }
1761
+ export interface ValidateAutomationRequest {
1762
+ /** Automation to validate. */
1763
+ automation: Automation;
1764
+ /** Automation validation settings. */
1765
+ validationSettings?: ValidationSettings;
1766
+ }
1767
+ export interface ValidationSettings {
1768
+ /**
1769
+ * IDs of actions to validate. Only actions whose IDs are specified are validated.
1770
+ *
1771
+ * When action IDs are specified, triggers are not validated. When empty, the full automation is validated, including triggers.
1772
+ * @maxSize 30
1773
+ * @format GUID
1774
+ */
1775
+ actionIds?: string[];
1776
+ /**
1777
+ * Whether to skip provider validations.
1778
+ *
1779
+ * Default: `false`.
1780
+ */
1781
+ skipProviderValidations?: boolean;
1782
+ }
1783
+ export interface ValidateAutomationResponse {
1784
+ /** Whether the automation is valid. */
1785
+ valid?: boolean;
1786
+ /**
1787
+ * Validation errors generated by the automation trigger.
1788
+ * @maxSize 100
1789
+ */
1790
+ triggerValidationErrors?: TriggerValidationError[];
1791
+ /**
1792
+ * Validation information generated by the automation actions.
1793
+ * @maxSize 100
1794
+ */
1795
+ actionValidationInfo?: ActionValidationInfo[];
1796
+ /**
1797
+ * Additional validation errors generated by the automation.
1798
+ * @maxSize 100
1799
+ */
1800
+ automationValidationErrors?: AutomationValidationError[];
1801
+ }
1802
+ export interface TriggerValidationError extends TriggerValidationErrorErrorOneOf {
1803
+ /** Trigger configuration error. */
1804
+ configurationError?: TriggerConfigurationError;
1805
+ /** Provider configuration error. */
1806
+ providerConfigurationError?: ProviderConfigurationError;
1807
+ /** Validation error type. */
1808
+ errorType?: TriggerValidationErrorValidationErrorType;
1809
+ /** Validation error severity */
1810
+ severity?: ValidationErrorSeverity;
1811
+ }
1812
+ /** @oneof */
1813
+ export interface TriggerValidationErrorErrorOneOf {
1814
+ /** Trigger configuration error. */
1815
+ configurationError?: TriggerConfigurationError;
1816
+ /** Provider configuration error. */
1817
+ providerConfigurationError?: ProviderConfigurationError;
1818
+ }
1819
+ export declare enum TriggerValidationErrorValidationErrorType {
1820
+ UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
1821
+ /** Configuration error. */
1822
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
1823
+ /** Provider error. */
1824
+ PROVIDER_ERROR = "PROVIDER_ERROR"
1825
+ }
1826
+ export interface TriggerConfigurationError {
1827
+ /** Trigger error type. */
1828
+ errorType?: TriggerErrorType;
1829
+ /**
1830
+ * Related filter field key.
1831
+ * @maxLength 110
1832
+ */
1833
+ filterFieldKey?: string | null;
1834
+ }
1835
+ export declare enum TriggerErrorType {
1836
+ UNKNOWN_TRIGGER_ERROR_TYPE = "UNKNOWN_TRIGGER_ERROR_TYPE",
1837
+ /** Trigger not found. */
1838
+ NOT_FOUND = "NOT_FOUND",
1839
+ /** App not installed. */
1840
+ APP_NOT_INSTALLED = "APP_NOT_INSTALLED",
1841
+ /** Moderation mismatch. */
1842
+ MODERATION_MISMATCH = "MODERATION_MISMATCH",
1843
+ /** Deprecated. */
1844
+ DEPRECATED = "DEPRECATED",
1845
+ /** Invalid trigger key. */
1846
+ INVALID_TRIGGER_KEY = "INVALID_TRIGGER_KEY",
1847
+ /** Invalid filter field key. */
1848
+ INVALID_FILTER_FIELD_KEY = "INVALID_FILTER_FIELD_KEY",
1849
+ /** Invalid filter expression. */
1850
+ INVALID_FILTER_EXPRESSION = "INVALID_FILTER_EXPRESSION"
1851
+ }
1852
+ export interface ProviderConfigurationError {
1853
+ /** Key corresponding to the field in the schema. */
1854
+ fieldKey?: string | null;
1855
+ /** Error message. */
1856
+ message?: string;
1857
+ /** Label for a call-to-action button that's displayed with the error. Translated according to the SPI language context. */
1858
+ ctaLabel?: string | null;
1859
+ /** URL to redirect to when the call-to-action button is clicked. */
1860
+ ctaUrl?: string | null;
1861
+ /** Title for the error. */
1862
+ title?: string;
1863
+ }
1864
+ export declare enum ValidationErrorSeverity {
1865
+ UNKNOWN_VALIDATION_ERROR_SEVERITY = "UNKNOWN_VALIDATION_ERROR_SEVERITY",
1866
+ /** Warning. */
1867
+ WARNING = "WARNING",
1868
+ /** Error. */
1869
+ ERROR = "ERROR"
1870
+ }
1871
+ export interface ActionValidationInfo {
1872
+ /**
1873
+ * Action ID.
1874
+ * @format GUID
1875
+ */
1876
+ actionId?: string | null;
1877
+ /**
1878
+ * ID of the app that defined the action.
1879
+ * @format GUID
1880
+ */
1881
+ appId?: string;
1882
+ /**
1883
+ * Human-readable action identifier.
1884
+ * @minLength 1
1885
+ * @maxLength 100
1886
+ */
1887
+ actionKey?: string;
1888
+ /**
1889
+ * Action validation errors.
1890
+ * @maxSize 100
1891
+ */
1892
+ validationErrors?: ActionValidationError[];
1893
+ }
1894
+ export interface ActionValidationError extends ActionValidationErrorErrorOneOf {
1895
+ /** Action configuration error. */
1896
+ configurationError?: ActionConfigurationError;
1897
+ /** Provider configuration error. */
1898
+ providerConfigurationError?: ProviderConfigurationError;
1899
+ /** Validation error type. */
1900
+ errorType?: ValidationErrorType;
1901
+ /** Validation error severity */
1902
+ severity?: ValidationErrorSeverity;
1903
+ }
1904
+ /** @oneof */
1905
+ export interface ActionValidationErrorErrorOneOf {
1906
+ /** Action configuration error. */
1907
+ configurationError?: ActionConfigurationError;
1908
+ /** Provider configuration error. */
1909
+ providerConfigurationError?: ProviderConfigurationError;
1910
+ }
1911
+ export declare enum ValidationErrorType {
1912
+ UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
1913
+ /** Configuration error. */
1914
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
1915
+ /** Provider error. */
1916
+ PROVIDER_ERROR = "PROVIDER_ERROR"
1917
+ }
1918
+ export interface ActionConfigurationError {
1919
+ /** Action error type. */
1920
+ errorType?: ActionErrorType;
1921
+ /**
1922
+ * Related field key.
1923
+ * @maxLength 110
1924
+ */
1925
+ fieldKey?: string | null;
1926
+ }
1927
+ export declare enum ActionErrorType {
1928
+ UNKNOWN_ACTION_ERROR_TYPE = "UNKNOWN_ACTION_ERROR_TYPE",
1929
+ NOT_FOUND = "NOT_FOUND",
1930
+ APP_NOT_INSTALLED = "APP_NOT_INSTALLED",
1931
+ MODERATION_MISMATCH = "MODERATION_MISMATCH",
1932
+ DEPRECATED = "DEPRECATED",
1933
+ INVALID_ACTION_KEY = "INVALID_ACTION_KEY",
1934
+ INVALID_MAPPING = "INVALID_MAPPING",
1935
+ MAPPING_TYPE_MISMATCH = "MAPPING_TYPE_MISMATCH",
1936
+ MAPPING_MISSING_REQUIRED_FIELD = "MAPPING_MISSING_REQUIRED_FIELD",
1937
+ MAPPING_SCHEMA_MISMATCH = "MAPPING_SCHEMA_MISMATCH",
1938
+ MAPPING_VARIABLE_MISSING_FROM_SCHEMA = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA"
1939
+ }
1940
+ export interface AutomationValidationError extends AutomationValidationErrorErrorOneOf {
1941
+ /** Automation configuration error. */
1942
+ configurationError?: AutomationConfigurationError;
1943
+ /** Provider configuration error. */
1944
+ providerConfigurationError?: ProviderConfigurationError;
1945
+ /** Validation error type. */
1946
+ errorType?: AutomationValidationErrorValidationErrorType;
1947
+ /** Validation error severity. */
1948
+ severity?: ValidationErrorSeverity;
1949
+ }
1950
+ /** @oneof */
1951
+ export interface AutomationValidationErrorErrorOneOf {
1952
+ /** Automation configuration error. */
1953
+ configurationError?: AutomationConfigurationError;
1954
+ /** Provider configuration error. */
1955
+ providerConfigurationError?: ProviderConfigurationError;
1956
+ }
1957
+ export declare enum AutomationValidationErrorValidationErrorType {
1958
+ UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
1959
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
1960
+ PROVIDER_ERROR = "PROVIDER_ERROR"
1961
+ }
1962
+ export interface AutomationConfigurationError {
1963
+ /** Automation error type. */
1964
+ errorType?: AutomationErrorType;
1965
+ }
1966
+ export declare enum AutomationErrorType {
1967
+ UNKNOWN_AUTOMATION_ERROR_TYPE = "UNKNOWN_AUTOMATION_ERROR_TYPE"
1968
+ }
1969
+ export interface ValidateAutomationByIdRequest {
1970
+ /**
1971
+ * Automation ID.
1972
+ * @format GUID
1973
+ */
1974
+ automationId: string;
1975
+ /** Validation settings. */
1976
+ validationSettings?: ValidationSettings;
1977
+ }
1978
+ export interface ValidateAutomationByIdResponse {
1979
+ /** Whether the automation is valid. */
1980
+ valid?: boolean;
1981
+ /**
1982
+ * Validation errors generated by the automation trigger.
1983
+ * @maxSize 100
1984
+ */
1985
+ triggerValidationErrors?: TriggerValidationError[];
1986
+ /**
1987
+ * Validation information generated by the automation actions.
1988
+ * @maxSize 100
1989
+ */
1990
+ actionValidationInfo?: ActionValidationInfo[];
1991
+ /**
1992
+ * Additional validation errors generated by the automation.
1993
+ * @maxSize 100
1994
+ */
1995
+ automationValidationErrors?: AutomationValidationError[];
1996
+ }
1997
+ export interface GetAutomationActionSchemaRequest {
1998
+ /**
1999
+ * Automation ID.
2000
+ * @format GUID
2001
+ */
2002
+ automationId?: string;
2003
+ /**
2004
+ * Action ID.
2005
+ * @format GUID
2006
+ */
2007
+ actionId?: string;
2008
+ }
2009
+ export interface GetAutomationActionSchemaResponse {
2010
+ /** The accumulated payload schema for an action. */
2011
+ schema?: Record<string, any> | null;
2012
+ }
2013
+ export interface GetActionsQuotaInfoRequest {
2014
+ }
2015
+ export interface GetActionsQuotaInfoResponse {
2016
+ /** Action quotas. */
2017
+ actionProviderQuotaInfo?: ActionProviderQuotaInfo[];
2018
+ }
2019
+ export interface ActionProviderQuotaInfo {
2020
+ /**
2021
+ * ID of the app that defined the action.
2022
+ * @format GUID
2023
+ */
2024
+ appId?: string;
2025
+ /**
2026
+ * Action key.
2027
+ * @minLength 1
2028
+ * @maxLength 80
2029
+ */
2030
+ actionKey?: string;
2031
+ /** Action quota information. */
2032
+ actionQuotaInfo?: ActionQuotaInfo;
2033
+ }
2034
+ export interface ActionQuotaInfo {
2035
+ /**
2036
+ * Whether the quotas for your action are enforced. If you mark this as `true` in the response body,
2037
+ * Wix displays the information in the quota object on the site dashboard. If you mark this as `false` for
2038
+ * a user, Wix does not display any quota info on the site dashboard for your service.
2039
+ */
2040
+ enforced?: boolean;
2041
+ /**
2042
+ * The plans your service provides, together with the quotas enforced by each plan. A site may be enrolled
2043
+ * in multiple plans. Plans and quotas can be related as follows:
2044
+ *
2045
+ * + A single plan has a single quota.
2046
+ * + A single plan has multiple quotas.
2047
+ * + Multiple plans are associated with multiple quotas.
2048
+ *
2049
+ * Plans and quotas that are related should be grouped together in a single `quotaInfo`
2050
+ * object.
2051
+ */
2052
+ quotaInfo?: QuotaInfo[];
2053
+ }
2054
+ export interface QuotaInfo {
2055
+ /** List of plans associated with the site making the request. */
2056
+ plans?: Plan[];
2057
+ /**
2058
+ * List of quotas associated with the plans the site is enrolled in.
2059
+ * @minSize 1
2060
+ */
2061
+ quotas?: Quota[];
2062
+ /**
2063
+ * Details for an upgrade call-to-action button.
2064
+ * Displayed in the Wix user’s site dashboard together with the quota details.
2065
+ */
2066
+ upgradeCta?: UpgradeCTA;
2067
+ }
2068
+ export interface Plan {
2069
+ /** Plan ID defined by the action provider. */
2070
+ _id?: string;
2071
+ /** Plan name to display in the Wix user’s site dashboard. */
2072
+ name?: string;
2073
+ }
2074
+ export interface Quota {
2075
+ /**
2076
+ * Name of the feature the quota is related to. For example, "Messages sent".
2077
+ * @minLength 1
2078
+ */
2079
+ featureName?: string;
2080
+ /**
2081
+ * Quota renewal date in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
2082
+ * For example, 10 July 2020 at 15:00 is written as `2020-07-10 15:00:00.000`.
2083
+ */
2084
+ renewalDate?: Date | null;
2085
+ /** The user's current quota usage. */
2086
+ currentUsage?: string;
2087
+ /** Quota limit data. */
2088
+ limit?: string | null;
2089
+ /** Additional information about the quota. Displayed as a tooltip in the Wix user’s dashboard. */
2090
+ additionalInfo?: AdditionalInfo;
2091
+ }
2092
+ export interface CTA {
2093
+ /**
2094
+ * Call-to-action redirect URL.
2095
+ * @minLength 1
2096
+ */
2097
+ url?: string;
2098
+ /**
2099
+ * Call-to-action label.
2100
+ * @minLength 1
2101
+ */
2102
+ label?: string;
2103
+ }
2104
+ export interface AdditionalInfo {
2105
+ /**
2106
+ * Tooltip content.
2107
+ * @minLength 1
2108
+ */
2109
+ description?: string;
2110
+ /** Details for an options call-to-action link that appears in the tooltip. */
2111
+ cta?: CTA;
2112
+ }
2113
+ export interface UpgradeCTA {
2114
+ /**
2115
+ * CTA button redirect URL.
2116
+ * @minLength 1
2117
+ */
2118
+ url?: string;
2119
+ /**
2120
+ * CTA button label.
2121
+ * @minLength 1
2122
+ */
2123
+ label?: string;
2124
+ }
2125
+ export interface MigrateVeloActionAutomationsRequest {
2126
+ /** @format GUID */
2127
+ oldAppId?: string;
2128
+ /** @format GUID */
2129
+ newAppId?: string;
2130
+ /** @format GUID */
2131
+ newComponentId?: string;
2132
+ }
2133
+ export interface MigrateVeloActionAutomationsResponse {
2134
+ }
2135
+ export interface GetAutomationRevisionRequest {
2136
+ /**
2137
+ * Automation ID.
2138
+ * @format GUID
2139
+ */
2140
+ automationId: string;
2141
+ /** Revision number. */
2142
+ revision?: string | null;
2143
+ /**
2144
+ * Requested fields.
2145
+ * @maxSize 20
2146
+ */
2147
+ fields?: RequestedFields[];
2148
+ }
2149
+ export interface GetAutomationRevisionResponse {
2150
+ /** Automation revision. */
2151
+ automation?: Automation;
2152
+ }
2153
+ export interface BaseEventMetadata {
2154
+ /**
2155
+ * App instance ID.
2156
+ * @format GUID
2157
+ */
2158
+ instanceId?: string | null;
2159
+ /**
2160
+ * Event type.
2161
+ * @maxLength 150
2162
+ */
2163
+ eventType?: string;
2164
+ /** The identification type and identity data. */
2165
+ identity?: IdentificationData;
2166
+ }
2167
+ export interface EventMetadata extends BaseEventMetadata {
2168
+ /**
2169
+ * Unique event ID.
2170
+ * Allows clients to ignore duplicate webhooks.
2171
+ */
2172
+ _id?: string;
2173
+ /**
2174
+ * Assumes actions are also always typed to an entity_type
2175
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2176
+ */
2177
+ entityFqdn?: string;
2178
+ /**
2179
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2180
+ * This is although the created/updated/deleted notion is duplication of the oneof types
2181
+ * Example: created/updated/deleted/started/completed/email_opened
2182
+ */
2183
+ slug?: string;
2184
+ /** ID of the entity associated with the event. */
2185
+ entityId?: string;
2186
+ /** 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
+ eventTime?: Date | null;
2188
+ /**
2189
+ * Whether the event was triggered as a result of a privacy regulation application
2190
+ * (for example, GDPR).
2191
+ */
2192
+ triggeredByAnonymizeRequest?: boolean | null;
2193
+ /** If present, indicates the action that triggered the event. */
2194
+ originatedFrom?: string | null;
2195
+ /**
2196
+ * A sequence number defining the order of updates to the underlying entity.
2197
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
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.
2202
+ */
2203
+ entityEventSequence?: string | null;
2204
+ }
2205
+ export interface AutomationCreatedEnvelope {
2206
+ entity: Automation;
2207
+ metadata: EventMetadata;
2208
+ }
2209
+ /**
2210
+ * Triggered when a new automation is created.
2211
+ * @permissionScope Manage Stores
2212
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2213
+ * @permissionScope Set Up Automations
2214
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2215
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2216
+ * @webhook
2217
+ * @eventType wix.automations.v2.automation_created
2218
+ * @slug created
2219
+ * @documentationMaturity preview
2220
+ */
2221
+ export declare function onAutomationCreated(handler: (event: AutomationCreatedEnvelope) => void | Promise<void>): void;
2222
+ export interface AutomationDeletedEnvelope {
2223
+ entity: Automation;
2224
+ metadata: EventMetadata;
2225
+ }
2226
+ /**
2227
+ * Triggered when an automation is deleted.
2228
+ * @permissionScope Manage Stores
2229
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2230
+ * @permissionScope Set Up Automations
2231
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2232
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2233
+ * @webhook
2234
+ * @eventType wix.automations.v2.automation_deleted
2235
+ * @slug deleted
2236
+ * @documentationMaturity preview
2237
+ */
2238
+ export declare function onAutomationDeleted(handler: (event: AutomationDeletedEnvelope) => void | Promise<void>): void;
2239
+ export interface AutomationUpdatedEnvelope {
2240
+ entity: Automation;
2241
+ metadata: EventMetadata;
2242
+ }
2243
+ /**
2244
+ * Triggered when an automation is updated.
2245
+ * @permissionScope Manage Stores
2246
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2247
+ * @permissionScope Set Up Automations
2248
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2249
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2250
+ * @webhook
2251
+ * @eventType wix.automations.v2.automation_updated
2252
+ * @slug updated
2253
+ * @documentationMaturity preview
2254
+ */
2255
+ export declare function onAutomationUpdated(handler: (event: AutomationUpdatedEnvelope) => void | Promise<void>): void;
2256
+ type AutomationNonNullablePaths = `applicationInfo.appId` | `preinstalledInfo.appId` | `createdBy.userId` | `createdBy.appId` | `updatedBy.userId` | `updatedBy.appId` | `name` | `configuration.status` | `configuration.trigger.appId` | `configuration.trigger.triggerKey` | `configuration.trigger.filters` | `configuration.trigger.filters.${number}._id` | `configuration.trigger.filters.${number}.fieldKey` | `configuration.trigger.filters.${number}.filterExpression` | `configuration.trigger.scheduledEventOffset.preScheduledEventOffsetExpression` | `configuration.trigger.scheduledEventOffset.scheduledEventOffsetTimeUnit` | `configuration.trigger.rateLimit.maxActivationsExpression` | `configuration.trigger.rateLimit.durationTimeUnit` | `configuration.rootActionIds` | `origin` | `settings.hidden` | `settings.readonly` | `settings.disableDelete` | `settings.disableStatusChange` | `settings.actionSettings.permanentActionIds` | `settings.actionSettings.readonlyActionIds` | `settings.actionSettings.disableDelayAddition` | `settings.actionSettings.disableConditionAddition` | `archived`;
2257
+ /**
2258
+ * Creates an automation.
2259
+ * @param automation - Automation to create.
2260
+ * @public
2261
+ * @documentationMaturity preview
2262
+ * @requiredField automation
2263
+ * @requiredField automation.configuration
2264
+ * @requiredField automation.configuration.actions
2265
+ * @requiredField automation.configuration.rootActionIds
2266
+ * @requiredField automation.configuration.status
2267
+ * @requiredField automation.configuration.trigger
2268
+ * @requiredField automation.configuration.trigger.appId
2269
+ * @requiredField automation.configuration.trigger.triggerKey
2270
+ * @requiredField automation.name
2271
+ * @requiredField automation.origin
2272
+ * @permissionId AUTOMATIONS.AUTOMATION_CREATE
2273
+ * @permissionScope Manage Stores
2274
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2275
+ * @permissionScope Set Up Automations
2276
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2277
+ * @applicableIdentity APP
2278
+ * @returns Details of the created automation.
2279
+ * @fqn wix.automations.v2.AutomationsService.CreateAutomation
2280
+ */
2281
+ export declare function createAutomation(automation: NonNullablePaths<Automation, `configuration` | `configuration.actions` | `configuration.rootActionIds` | `configuration.status` | `configuration.trigger` | `configuration.trigger.appId` | `configuration.trigger.triggerKey` | `name` | `origin`>): Promise<NonNullablePaths<Automation, AutomationNonNullablePaths>>;
2282
+ /**
2283
+ * Retrieves an automation by ID.
2284
+ * @param automationId - Automation ID.
2285
+ * @public
2286
+ * @documentationMaturity preview
2287
+ * @requiredField automationId
2288
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2289
+ * @permissionScope Manage Stores
2290
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2291
+ * @permissionScope Set Up Automations
2292
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2293
+ * @applicableIdentity APP
2294
+ * @returns Retrieved automation.
2295
+ * @fqn wix.automations.v2.AutomationsService.GetAutomation
2296
+ */
2297
+ export declare function getAutomation(automationId: string): Promise<NonNullablePaths<Automation, AutomationNonNullablePaths>>;
2298
+ /**
2299
+ * Updates the specified automation.
2300
+ *
2301
+ * When an automation is updated, its `revision` property is incremented by 1. When updating an automation, you must specify the current revision number.
2302
+ * @param _id - Automation ID.
2303
+ * @public
2304
+ * @documentationMaturity preview
2305
+ * @requiredField _id
2306
+ * @requiredField automation
2307
+ * @requiredField automation.revision
2308
+ * @permissionId AUTOMATIONS.AUTOMATION_UPDATE
2309
+ * @permissionScope Manage Stores
2310
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2311
+ * @permissionScope Set Up Automations
2312
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2313
+ * @applicableIdentity APP
2314
+ * @returns Updated automation.
2315
+ * @fqn wix.automations.v2.AutomationsService.UpdateAutomation
2316
+ */
2317
+ export declare function updateAutomation(_id: string, automation: NonNullablePaths<UpdateAutomation, `revision`>): Promise<NonNullablePaths<Automation, AutomationNonNullablePaths>>;
2318
+ export interface UpdateAutomation {
2319
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
2320
+ applicationInfo?: ApplicationOrigin;
2321
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
2322
+ preinstalledInfo?: PreinstalledOrigin;
2323
+ /**
2324
+ * Automation ID.
2325
+ * @format GUID
2326
+ * @readonly
2327
+ */
2328
+ _id?: string | null;
2329
+ /**
2330
+ * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.
2331
+ * @readonly
2332
+ */
2333
+ revision?: string | null;
2334
+ /**
2335
+ * Who created the automation.
2336
+ * @immutable
2337
+ * @readonly
2338
+ */
2339
+ createdBy?: AuditInfo;
2340
+ /**
2341
+ * When the automation was created.
2342
+ * @readonly
2343
+ */
2344
+ _createdDate?: Date | null;
2345
+ /**
2346
+ * Who last updated the automation.
2347
+ * @readonly
2348
+ */
2349
+ updatedBy?: AuditInfo;
2350
+ /**
2351
+ * When the automation was last updated.
2352
+ * @readonly
2353
+ */
2354
+ _updatedDate?: Date | null;
2355
+ /**
2356
+ * Automation name as displayed on the user's site.
2357
+ * @minLength 1
2358
+ * @maxLength 500
2359
+ */
2360
+ name?: string;
2361
+ /**
2362
+ * Automation description.
2363
+ * @maxLength 2000
2364
+ */
2365
+ description?: string | null;
2366
+ /** Automation configuration. */
2367
+ configuration?: AutomationConfiguration;
2368
+ /**
2369
+ * How the automation was added to the user's site.
2370
+ * @immutable
2371
+ */
2372
+ origin?: Origin;
2373
+ /** Automation settings. */
2374
+ settings?: AutomationSettings;
2375
+ /**
2376
+ * When the automation is a draft, the draft details.
2377
+ * @readonly
2378
+ */
2379
+ draftInfo?: DraftInfo;
2380
+ /**
2381
+ * Whether the automation is archived.
2382
+ *
2383
+ * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.
2384
+ */
2385
+ archived?: boolean;
2386
+ }
2387
+ /**
2388
+ * Deletes the specified automation.
2389
+ * @param automationId - Automation ID.
2390
+ * @public
2391
+ * @documentationMaturity preview
2392
+ * @requiredField automationId
2393
+ * @permissionId AUTOMATIONS.AUTOMATION_DELETE
2394
+ * @permissionScope Manage Stores
2395
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2396
+ * @permissionScope Set Up Automations
2397
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2398
+ * @applicableIdentity APP
2399
+ * @fqn wix.automations.v2.AutomationsService.DeleteAutomation
2400
+ */
2401
+ export declare function deleteAutomation(automationId: string): Promise<void>;
2402
+ /**
2403
+ * Deletes one or more automations.
2404
+ * @param automationIds - IDs of the automations to delete.
2405
+ * @public
2406
+ * @documentationMaturity preview
2407
+ * @requiredField automationIds
2408
+ * @permissionId AUTOMATIONS.AUTOMATION_DELETE
2409
+ * @permissionScope Manage Stores
2410
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2411
+ * @permissionScope Set Up Automations
2412
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2413
+ * @applicableIdentity APP
2414
+ * @fqn wix.automations.v2.AutomationsService.BulkDeleteAutomations
2415
+ */
2416
+ export declare function bulkDeleteAutomations(automationIds: string[]): Promise<NonNullablePaths<BulkDeleteAutomationsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
2417
+ /**
2418
+ * Generates a preinstalled automation from another automation.
2419
+ *
2420
+ * Calls the action providers for changes needed to make a preinstalled automation, such as changes made to email template.
2421
+ *
2422
+ * > **Note**: You must have an account permission to edit an app.
2423
+ * @param automation - Automation.
2424
+ * @public
2425
+ * @documentationMaturity preview
2426
+ * @requiredField automation
2427
+ * @fqn wix.automations.v2.AutomationsService.GeneratePreinstalledAutomation
2428
+ */
2429
+ export declare function generatePreinstalledAutomation(automation: Automation, options?: GeneratePreinstalledAutomationOptions): Promise<NonNullablePaths<GeneratePreinstalledAutomationResponse, {
2430
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2431
+ }[AutomationNonNullablePaths]>>;
2432
+ export interface GeneratePreinstalledAutomationOptions {
2433
+ /**
2434
+ * ID of the app to which the automation belongs.
2435
+ * @format GUID
2436
+ */
2437
+ appId?: string;
2438
+ }
2439
+ /**
2440
+ * Retrieves a list of automations. This includes both automations overridden on a site and preinstalled automations. If a preinstalled automation has been overridden on the site, the method returns the override automation.
2441
+ *
2442
+ * > **Note**: The method only returns automations by apps installed on the site.
2443
+ *
2444
+ * Learn more about [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
2445
+ * @public
2446
+ * @documentationMaturity preview
2447
+ * @permissionScope Manage Stores
2448
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2449
+ * @permissionScope Set Up Automations
2450
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2451
+ * @permissionId AUTOMATIONS.AUTOMATION_READ
2452
+ * @applicableIdentity APP
2453
+ * @fqn wix.automations.v2.AutomationsService.QueryAutomations
2454
+ */
2455
+ export declare function queryAutomations(options?: QueryAutomationsOptions): AutomationsQueryBuilder;
2456
+ export interface QueryAutomationsOptions {
2457
+ }
2458
+ interface QueryCursorResult {
2459
+ cursors: Cursors;
2460
+ hasNext: () => boolean;
2461
+ hasPrev: () => boolean;
2462
+ length: number;
2463
+ pageSize: number;
2464
+ }
2465
+ export interface AutomationsQueryResult extends QueryCursorResult {
2466
+ items: Automation[];
2467
+ query: AutomationsQueryBuilder;
2468
+ next: () => Promise<AutomationsQueryResult>;
2469
+ prev: () => Promise<AutomationsQueryResult>;
2470
+ }
2471
+ export interface AutomationsQueryBuilder {
2472
+ /** @param propertyName - Property whose value is compared with `value`.
2473
+ * @param value - Value to compare against.
2474
+ * @documentationMaturity preview
2475
+ */
2476
+ eq: (propertyName: 'name' | 'configuration.status' | 'configuration.trigger.appId' | 'configuration.trigger.triggerKey' | 'configuration.trigger.filterValueSelection.selectedFilterValues' | 'origin' | 'settings' | 'settings.readonly' | 'settings.disableDelete' | 'settings.disableStatusChange' | 'settings.actionSettings' | 'settings.actionSettings.permanentActionIds' | 'settings.actionSettings.readonlyActionIds' | 'settings.actionSettings.disableDelayAddition' | 'settings.actionSettings.disableConditionAddition' | 'archived', value: any) => AutomationsQueryBuilder;
2477
+ /** @param propertyName - Property whose value is compared with `value`.
2478
+ * @param value - Value to compare against.
2479
+ * @documentationMaturity preview
2480
+ */
2481
+ ne: (propertyName: 'name' | 'configuration.status' | 'configuration.trigger.appId' | 'configuration.trigger.triggerKey' | 'configuration.trigger.filterValueSelection.selectedFilterValues' | 'origin' | 'settings' | 'settings.readonly' | 'settings.disableDelete' | 'settings.disableStatusChange' | 'settings.actionSettings' | 'settings.actionSettings.permanentActionIds' | 'settings.actionSettings.readonlyActionIds' | 'settings.actionSettings.disableDelayAddition' | 'settings.actionSettings.disableConditionAddition' | 'archived', value: any) => AutomationsQueryBuilder;
2482
+ /** @param propertyName - Property whose value is compared with `string`.
2483
+ * @param string - String to compare against. Case-insensitive.
2484
+ * @documentationMaturity preview
2485
+ */
2486
+ startsWith: (propertyName: 'name' | 'configuration.trigger.appId' | 'configuration.trigger.triggerKey', value: string) => AutomationsQueryBuilder;
2487
+ /** @param propertyName - Property whose value is compared with `values`.
2488
+ * @param values - List of values to compare against.
2489
+ * @documentationMaturity preview
2490
+ */
2491
+ hasSome: (propertyName: 'name' | 'configuration.status' | 'configuration.trigger.appId' | 'configuration.trigger.triggerKey' | 'configuration.trigger.filterValueSelection.selectedFilterValues' | 'origin' | 'settings' | 'settings.readonly' | 'settings.disableDelete' | 'settings.disableStatusChange' | 'settings.actionSettings' | 'settings.actionSettings.permanentActionIds' | 'settings.actionSettings.readonlyActionIds' | 'settings.actionSettings.disableDelayAddition' | 'settings.actionSettings.disableConditionAddition' | 'archived', value: any[]) => AutomationsQueryBuilder;
2492
+ /** @param propertyName - Property whose value is compared with `values`.
2493
+ * @param values - List of values to compare against.
2494
+ * @documentationMaturity preview
2495
+ */
2496
+ hasAll: (propertyName: 'configuration.trigger.filterValueSelection.selectedFilterValues' | 'settings.actionSettings.permanentActionIds' | 'settings.actionSettings.readonlyActionIds', value: any[]) => AutomationsQueryBuilder;
2497
+ /** @documentationMaturity preview */
2498
+ in: (propertyName: 'name' | 'configuration.status' | 'configuration.trigger.appId' | 'configuration.trigger.triggerKey' | 'configuration.trigger.filterValueSelection.selectedFilterValues' | 'origin' | 'settings' | 'settings.readonly' | 'settings.disableDelete' | 'settings.disableStatusChange' | 'settings.actionSettings' | 'settings.actionSettings.permanentActionIds' | 'settings.actionSettings.readonlyActionIds' | 'settings.actionSettings.disableDelayAddition' | 'settings.actionSettings.disableConditionAddition' | 'archived', value: any) => AutomationsQueryBuilder;
2499
+ /** @documentationMaturity preview */
2500
+ exists: (propertyName: 'name' | 'configuration.status' | 'configuration.trigger.appId' | 'configuration.trigger.triggerKey' | 'configuration.trigger.filterValueSelection.selectedFilterValues' | 'origin' | 'settings' | 'settings.readonly' | 'settings.disableDelete' | 'settings.disableStatusChange' | 'settings.actionSettings' | 'settings.actionSettings.permanentActionIds' | 'settings.actionSettings.readonlyActionIds' | 'settings.actionSettings.disableDelayAddition' | 'settings.actionSettings.disableConditionAddition' | 'archived', value: boolean) => AutomationsQueryBuilder;
2501
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
2502
+ * @documentationMaturity preview
2503
+ */
2504
+ ascending: (...propertyNames: Array<'name' | 'configuration.status' | 'configuration.trigger.appId' | 'configuration.trigger.triggerKey' | 'configuration.trigger.filters' | 'configuration.trigger.filterValueSelection.selectedFilterValues' | 'origin' | 'settings' | 'settings.readonly' | 'settings.disableDelete' | 'settings.disableStatusChange' | 'settings.actionSettings' | 'settings.actionSettings.permanentActionIds' | 'settings.actionSettings.readonlyActionIds' | 'settings.actionSettings.disableDelayAddition' | 'settings.actionSettings.disableConditionAddition' | 'archived'>) => AutomationsQueryBuilder;
2505
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
2506
+ * @documentationMaturity preview
2507
+ */
2508
+ descending: (...propertyNames: Array<'name' | 'configuration.status' | 'configuration.trigger.appId' | 'configuration.trigger.triggerKey' | 'configuration.trigger.filters' | 'configuration.trigger.filterValueSelection.selectedFilterValues' | 'origin' | 'settings' | 'settings.readonly' | 'settings.disableDelete' | 'settings.disableStatusChange' | 'settings.actionSettings' | 'settings.actionSettings.permanentActionIds' | 'settings.actionSettings.readonlyActionIds' | 'settings.actionSettings.disableDelayAddition' | 'settings.actionSettings.disableConditionAddition' | 'archived'>) => AutomationsQueryBuilder;
2509
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
2510
+ * @documentationMaturity preview
2511
+ */
2512
+ limit: (limit: number) => AutomationsQueryBuilder;
2513
+ /** @param cursor - A pointer to specific record
2514
+ * @documentationMaturity preview
2515
+ */
2516
+ skipTo: (cursor: string) => AutomationsQueryBuilder;
2517
+ /** @documentationMaturity preview */
2518
+ find: () => Promise<AutomationsQueryResult>;
2519
+ }
2520
+ /**
2521
+ * Creates a copy of an action with a new ID, and changes the action's input mapping if necessary.
2522
+ *
2523
+ * The action copy isn't saved automatically. To save it, the user must perform an action
2524
+ * such as clicking the **Save** button.
2525
+ * @param automationId - ID of the automation to copy.
2526
+ * @public
2527
+ * @documentationMaturity preview
2528
+ * @requiredField automationId
2529
+ * @permissionId AUTOMATIONS.AUTOMATION_COPY
2530
+ * @permissionScope Manage Stores
2531
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2532
+ * @permissionScope Set Up Automations
2533
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2534
+ * @applicableIdentity APP
2535
+ * @fqn wix.automations.v2.AutomationsService.CopyAutomation
2536
+ */
2537
+ export declare function copyAutomation(automationId: string, options?: CopyAutomationOptions): Promise<NonNullablePaths<CopyAutomationResponse, {
2538
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2539
+ }[AutomationNonNullablePaths]>>;
2540
+ export interface CopyAutomationOptions {
2541
+ /** Origin of the automation to copy. */
2542
+ origin?: Origin;
2543
+ /** Automation to copy. Skips fetching by ID. */
2544
+ automation?: Automation;
2545
+ }
2546
+ /**
2547
+ * Creates a draft automation.
2548
+ * @public
2549
+ * @documentationMaturity preview
2550
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE
2551
+ * @permissionScope Manage Stores
2552
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2553
+ * @permissionScope Set Up Automations
2554
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2555
+ * @applicableIdentity APP
2556
+ * @fqn wix.automations.v2.AutomationsService.CreateDraftAutomation
2557
+ */
2558
+ export declare function createDraftAutomation(options?: CreateDraftAutomationOptions): Promise<NonNullablePaths<CreateDraftAutomationResponse, {
2559
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2560
+ }[AutomationNonNullablePaths]>>;
2561
+ export interface CreateDraftAutomationOptions {
2562
+ /** Draft automation to create. */
2563
+ automation?: Automation;
2564
+ }
2565
+ /**
2566
+ * Retrieves the draft of the specified automation. If a draft doesn't exist, the method creates one.
2567
+ *
2568
+ * > **Note**: If the specified automation is a draft, the method returns it.
2569
+ * @param originalAutomationId - ID of the original automation on which the draft is based.
2570
+ * @public
2571
+ * @documentationMaturity preview
2572
+ * @requiredField originalAutomationId
2573
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_CREATE
2574
+ * @permissionScope Manage Stores
2575
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2576
+ * @permissionScope Set Up Automations
2577
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2578
+ * @applicableIdentity APP
2579
+ * @fqn wix.automations.v2.AutomationsService.GetOrCreateDraftAutomation
2580
+ */
2581
+ export declare function getOrCreateDraftAutomation(originalAutomationId: string): Promise<NonNullablePaths<GetOrCreateDraftAutomationResponse, {
2582
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2583
+ }[AutomationNonNullablePaths]>>;
2584
+ /**
2585
+ * Updates a draft automation.
2586
+ * @param _id - Automation ID.
2587
+ * @public
2588
+ * @documentationMaturity preview
2589
+ * @requiredField _id
2590
+ * @requiredField automation
2591
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_UPDATE
2592
+ * @permissionScope Manage Stores
2593
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2594
+ * @permissionScope Set Up Automations
2595
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2596
+ * @applicableIdentity APP
2597
+ * @fqn wix.automations.v2.AutomationsService.UpdateDraftAutomation
2598
+ */
2599
+ export declare function updateDraftAutomation(_id: string, automation: UpdateDraftAutomation): Promise<NonNullablePaths<UpdateDraftAutomationResponse, {
2600
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2601
+ }[AutomationNonNullablePaths]>>;
2602
+ export interface UpdateDraftAutomation {
2603
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
2604
+ applicationInfo?: ApplicationOrigin;
2605
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
2606
+ preinstalledInfo?: PreinstalledOrigin;
2607
+ /**
2608
+ * Automation ID.
2609
+ * @format GUID
2610
+ * @readonly
2611
+ */
2612
+ _id?: string | null;
2613
+ /**
2614
+ * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.
2615
+ * @readonly
2616
+ */
2617
+ revision?: string | null;
2618
+ /**
2619
+ * Who created the automation.
2620
+ * @immutable
2621
+ * @readonly
2622
+ */
2623
+ createdBy?: AuditInfo;
2624
+ /**
2625
+ * When the automation was created.
2626
+ * @readonly
2627
+ */
2628
+ _createdDate?: Date | null;
2629
+ /**
2630
+ * Who last updated the automation.
2631
+ * @readonly
2632
+ */
2633
+ updatedBy?: AuditInfo;
2634
+ /**
2635
+ * When the automation was last updated.
2636
+ * @readonly
2637
+ */
2638
+ _updatedDate?: Date | null;
2639
+ /**
2640
+ * Automation name as displayed on the user's site.
2641
+ * @minLength 1
2642
+ * @maxLength 500
2643
+ */
2644
+ name?: string;
2645
+ /**
2646
+ * Automation description.
2647
+ * @maxLength 2000
2648
+ */
2649
+ description?: string | null;
2650
+ /** Automation configuration. */
2651
+ configuration?: AutomationConfiguration;
2652
+ /**
2653
+ * How the automation was added to the user's site.
2654
+ * @immutable
2655
+ */
2656
+ origin?: Origin;
2657
+ /** Automation settings. */
2658
+ settings?: AutomationSettings;
2659
+ /**
2660
+ * When the automation is a draft, the draft details.
2661
+ * @readonly
2662
+ */
2663
+ draftInfo?: DraftInfo;
2664
+ /**
2665
+ * Whether the automation is archived.
2666
+ *
2667
+ * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.
2668
+ */
2669
+ archived?: boolean;
2670
+ }
2671
+ /**
2672
+ * Retrieves a list of automations, including drafts. Max query filter depth is 3.
2673
+ *
2674
+ * Relevant automations for the query are returned. This includes automations created on the site and pre-installed automations.
2675
+ * If there's an existing override for a pre-installed automation, the override is returned in the query result.
2676
+ * The query only returns automations from apps that are installed on the site.
2677
+ *
2678
+ * - new drafts that are not related to existing automations will be returned in the list
2679
+ * - the response will contain a map of originalAutomationId => relatedDrafts
2680
+ *
2681
+ * To learn about working with _Query_ endpoints, see
2682
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
2683
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
2684
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
2685
+ * @public
2686
+ * @documentationMaturity preview
2687
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_READ
2688
+ * @permissionScope Manage Stores
2689
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2690
+ * @permissionScope Manage Restaurants - all permissions
2691
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
2692
+ * @permissionScope Set Up Automations
2693
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2694
+ * @applicableIdentity APP
2695
+ * @fqn wix.automations.v2.AutomationsService.QueryAutomationsWithDrafts
2696
+ */
2697
+ export declare function queryAutomationsWithDrafts(options?: QueryAutomationsWithDraftsOptions): Promise<NonNullablePaths<QueryAutomationsWithDraftsResponse, {
2698
+ [P in AutomationNonNullablePaths]: `automations.${number}.${P}`;
2699
+ }[AutomationNonNullablePaths]>>;
2700
+ export interface QueryAutomationsWithDraftsOptions {
2701
+ /**
2702
+ * Query.
2703
+ *
2704
+ * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
2705
+ */
2706
+ query?: CursorQuery;
2707
+ }
2708
+ /**
2709
+ * Deletes a draft automation.
2710
+ * @param automationId - ID of the draft automation to delete.
2711
+ * @public
2712
+ * @documentationMaturity preview
2713
+ * @requiredField automationId
2714
+ * @permissionId AUTOMATIONS.AUTOMATION_DRAFT_DELETE
2715
+ * @permissionScope Manage Stores
2716
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2717
+ * @permissionScope Set Up Automations
2718
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2719
+ * @applicableIdentity APP
2720
+ * @fqn wix.automations.v2.AutomationsService.DeleteDraftAutomation
2721
+ */
2722
+ export declare function deleteDraftAutomation(automationId: string): Promise<void>;
2723
+ /**
2724
+ * Publishes a draft automation. This applies any changes to the live automation.
2725
+ * @param automationId - ID of the draft automation to publish.
2726
+ * @public
2727
+ * @documentationMaturity preview
2728
+ * @requiredField automationId
2729
+ * @permissionId AUTOMATIONS.AUTOMATION_UPDATE
2730
+ * @permissionScope Manage Stores
2731
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2732
+ * @permissionScope Set Up Automations
2733
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2734
+ * @applicableIdentity APP
2735
+ * @fqn wix.automations.v2.AutomationsService.PublishDraftAutomation
2736
+ */
2737
+ export declare function publishDraftAutomation(automationId: string): Promise<NonNullablePaths<PublishDraftAutomationResponse, {
2738
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2739
+ }[AutomationNonNullablePaths]>>;
2740
+ /**
2741
+ * Validates the specified automation.
2742
+ * @param automation - Automation to validate.
2743
+ * @public
2744
+ * @documentationMaturity preview
2745
+ * @requiredField automation
2746
+ * @permissionId AUTOMATIONS.AUTOMATION_VALIDATE
2747
+ * @permissionScope Manage Stores
2748
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2749
+ * @permissionScope Set Up Automations
2750
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2751
+ * @applicableIdentity APP
2752
+ * @fqn wix.automations.v2.AutomationsService.ValidateAutomation
2753
+ */
2754
+ export declare function validateAutomation(automation: Automation, options?: ValidateAutomationOptions): Promise<NonNullablePaths<ValidateAutomationResponse, `valid` | `triggerValidationErrors` | `triggerValidationErrors.${number}.configurationError.errorType` | `triggerValidationErrors.${number}.providerConfigurationError.message` | `triggerValidationErrors.${number}.providerConfigurationError.title` | `triggerValidationErrors.${number}.errorType` | `triggerValidationErrors.${number}.severity` | `actionValidationInfo` | `actionValidationInfo.${number}.appId` | `actionValidationInfo.${number}.actionKey` | `automationValidationErrors` | `automationValidationErrors.${number}.configurationError.errorType` | `automationValidationErrors.${number}.providerConfigurationError.message` | `automationValidationErrors.${number}.providerConfigurationError.title` | `automationValidationErrors.${number}.errorType` | `automationValidationErrors.${number}.severity`>>;
2755
+ export interface ValidateAutomationOptions {
2756
+ /** Automation validation settings. */
2757
+ validationSettings?: ValidationSettings;
2758
+ }
2759
+ /**
2760
+ * Validates the automation specified by ID.
2761
+ * @param automationId - Automation ID.
2762
+ * @public
2763
+ * @documentationMaturity preview
2764
+ * @requiredField automationId
2765
+ * @permissionId AUTOMATIONS.AUTOMATION_VALIDATE
2766
+ * @permissionScope Manage Stores
2767
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2768
+ * @permissionScope Set Up Automations
2769
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2770
+ * @applicableIdentity APP
2771
+ * @fqn wix.automations.v2.AutomationsService.ValidateAutomationById
2772
+ */
2773
+ export declare function validateAutomationById(automationId: string, options?: ValidateAutomationByIdOptions): Promise<NonNullablePaths<ValidateAutomationByIdResponse, `valid` | `triggerValidationErrors` | `triggerValidationErrors.${number}.configurationError.errorType` | `triggerValidationErrors.${number}.providerConfigurationError.message` | `triggerValidationErrors.${number}.providerConfigurationError.title` | `triggerValidationErrors.${number}.errorType` | `triggerValidationErrors.${number}.severity` | `actionValidationInfo` | `actionValidationInfo.${number}.appId` | `actionValidationInfo.${number}.actionKey` | `automationValidationErrors` | `automationValidationErrors.${number}.configurationError.errorType` | `automationValidationErrors.${number}.providerConfigurationError.message` | `automationValidationErrors.${number}.providerConfigurationError.title` | `automationValidationErrors.${number}.errorType` | `automationValidationErrors.${number}.severity`>>;
2774
+ export interface ValidateAutomationByIdOptions {
2775
+ /** Validation settings. */
2776
+ validationSettings?: ValidationSettings;
2777
+ }
2778
+ /**
2779
+ * Gets the specified automation revision.
2780
+ * @param automationId - Automation ID.
2781
+ * @public
2782
+ * @documentationMaturity preview
2783
+ * @requiredField automationId
2784
+ * @permissionId AUTOMATIONS.AUTOMATION_REVISION_READ
2785
+ * @permissionScope Manage Stores
2786
+ * @permissionScopeId SCOPE.STORES.MANAGE-STORES
2787
+ * @permissionScope Set Up Automations
2788
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
2789
+ * @applicableIdentity APP
2790
+ * @fqn wix.automations.v2.AutomationRevisionsService.GetAutomationRevision
2791
+ */
2792
+ export declare function getAutomationRevision(automationId: string, options?: GetAutomationRevisionOptions): Promise<NonNullablePaths<GetAutomationRevisionResponse, {
2793
+ [P in AutomationNonNullablePaths]: `automation.${P}`;
2794
+ }[AutomationNonNullablePaths]>>;
2795
+ export interface GetAutomationRevisionOptions {
2796
+ /** Revision number. */
2797
+ revision?: string | null;
2798
+ /**
2799
+ * Requested fields.
2800
+ * @maxSize 20
2801
+ */
2802
+ fields?: RequestedFields[];
2803
+ }
2804
+ export {};