@wix/auto_sdk_automations_automations-v-2 1.0.4 → 1.0.6

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 (121) hide show
  1. package/build/{internal/cjs/src/automations-v2-automation-automations-v-2.universal.d.ts → cjs/automations-v2-automation-automations-v-2.universal-CUoGClWF.d.ts} +220 -567
  2. package/build/cjs/index.d.ts +202 -1
  3. package/build/cjs/index.js +1555 -15
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +1167 -1
  6. package/build/cjs/meta.js +960 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/{cjs/src/automations-v2-automation-automations-v-2.universal.d.ts → es/automations-v2-automation-automations-v-2.universal-CUoGClWF.d.mts} +220 -567
  9. package/build/es/index.d.mts +202 -0
  10. package/build/es/index.mjs +1494 -0
  11. package/build/es/index.mjs.map +1 -0
  12. package/build/es/meta.d.mts +1167 -0
  13. package/build/es/meta.mjs +920 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/internal/{es/src/automations-v2-automation-automations-v-2.universal.d.ts → cjs/automations-v2-automation-automations-v-2.universal-CUoGClWF.d.ts} +220 -567
  16. package/build/internal/cjs/index.d.ts +202 -1
  17. package/build/internal/cjs/index.js +1555 -15
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +1167 -1
  20. package/build/internal/cjs/meta.js +960 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/{es/src/automations-v2-automation-automations-v-2.universal.d.ts → internal/es/automations-v2-automation-automations-v-2.universal-CUoGClWF.d.mts} +220 -567
  23. package/build/internal/es/index.d.mts +202 -0
  24. package/build/internal/es/index.mjs +1494 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/internal/es/meta.d.mts +1167 -0
  27. package/build/internal/es/meta.mjs +920 -0
  28. package/build/internal/es/meta.mjs.map +1 -0
  29. package/package.json +9 -8
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
  34. package/build/cjs/src/automations-v2-automation-automations-v-2.context.js +0 -61
  35. package/build/cjs/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
  36. package/build/cjs/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
  37. package/build/cjs/src/automations-v2-automation-automations-v-2.http.js +0 -666
  38. package/build/cjs/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
  39. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
  40. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.js +0 -351
  41. package/build/cjs/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
  42. package/build/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
  43. package/build/cjs/src/automations-v2-automation-automations-v-2.public.js +0 -167
  44. package/build/cjs/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
  45. package/build/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
  46. package/build/cjs/src/automations-v2-automation-automations-v-2.types.js +0 -276
  47. package/build/cjs/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
  48. package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js +0 -1025
  49. package/build/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
  50. package/build/es/index.d.ts +0 -1
  51. package/build/es/index.js +0 -2
  52. package/build/es/index.js.map +0 -1
  53. package/build/es/index.typings.d.ts +0 -1
  54. package/build/es/index.typings.js +0 -2
  55. package/build/es/index.typings.js.map +0 -1
  56. package/build/es/meta.d.ts +0 -1
  57. package/build/es/meta.js +0 -2
  58. package/build/es/meta.js.map +0 -1
  59. package/build/es/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
  60. package/build/es/src/automations-v2-automation-automations-v-2.context.js +0 -37
  61. package/build/es/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
  62. package/build/es/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
  63. package/build/es/src/automations-v2-automation-automations-v-2.http.js +0 -646
  64. package/build/es/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
  65. package/build/es/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
  66. package/build/es/src/automations-v2-automation-automations-v-2.meta.js +0 -308
  67. package/build/es/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
  68. package/build/es/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
  69. package/build/es/src/automations-v2-automation-automations-v-2.public.js +0 -126
  70. package/build/es/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
  71. package/build/es/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
  72. package/build/es/src/automations-v2-automation-automations-v-2.types.js +0 -273
  73. package/build/es/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
  74. package/build/es/src/automations-v2-automation-automations-v-2.universal.js +0 -982
  75. package/build/es/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
  76. package/build/internal/cjs/index.typings.d.ts +0 -1
  77. package/build/internal/cjs/index.typings.js +0 -18
  78. package/build/internal/cjs/index.typings.js.map +0 -1
  79. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
  80. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js +0 -61
  81. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
  82. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
  83. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.js +0 -666
  84. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
  85. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
  86. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.js +0 -351
  87. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
  88. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
  89. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js +0 -167
  90. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
  91. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
  92. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js +0 -276
  93. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
  94. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js +0 -1025
  95. package/build/internal/cjs/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
  96. package/build/internal/es/index.d.ts +0 -1
  97. package/build/internal/es/index.js +0 -2
  98. package/build/internal/es/index.js.map +0 -1
  99. package/build/internal/es/index.typings.d.ts +0 -1
  100. package/build/internal/es/index.typings.js +0 -2
  101. package/build/internal/es/index.typings.js.map +0 -1
  102. package/build/internal/es/meta.d.ts +0 -1
  103. package/build/internal/es/meta.js +0 -2
  104. package/build/internal/es/meta.js.map +0 -1
  105. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.d.ts +0 -37
  106. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js +0 -37
  107. package/build/internal/es/src/automations-v2-automation-automations-v-2.context.js.map +0 -1
  108. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.d.ts +0 -74
  109. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.js +0 -646
  110. package/build/internal/es/src/automations-v2-automation-automations-v-2.http.js.map +0 -1
  111. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.d.ts +0 -49
  112. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.js +0 -308
  113. package/build/internal/es/src/automations-v2-automation-automations-v-2.meta.js.map +0 -1
  114. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.d.ts +0 -172
  115. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js +0 -126
  116. package/build/internal/es/src/automations-v2-automation-automations-v-2.public.js.map +0 -1
  117. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.d.ts +0 -2223
  118. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js +0 -273
  119. package/build/internal/es/src/automations-v2-automation-automations-v-2.types.js.map +0 -1
  120. package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js +0 -982
  121. package/build/internal/es/src/automations-v2-automation-automations-v-2.universal.js.map +0 -1
@@ -1 +1,1167 @@
1
- export * from './src/automations-v2-automation-automations-v-2.meta.js';
1
+ import { aG as CreateAutomationRequest$1, aH as CreateAutomationResponse$1, aI as GetAutomationRequest$1, aJ as GetAutomationResponse$1, aK as UpdateAutomationRequest$1, aL as UpdateAutomationResponse$1, aM as DeleteAutomationRequest$1, aN as DeleteAutomationResponse$1, aO as BulkDeleteAutomationsRequest$1, B as BulkDeleteAutomationsResponse$1, a$ as GeneratePreinstalledAutomationRequest$1, a as GeneratePreinstalledAutomationResponse$1, b8 as QueryAutomationsRequest$1, b9 as QueryAutomationsResponse$1, be as CopyAutomationRequest$1, c as CopyAutomationResponse$1, bE as CreateDraftAutomationRequest$1, e as CreateDraftAutomationResponse$1, bF as GetOrCreateDraftAutomationRequest$1, f as GetOrCreateDraftAutomationResponse$1, bG as UpdateDraftAutomationRequest$1, h as UpdateDraftAutomationResponse$1, bH as QueryAutomationsWithDraftsRequest$1, i as QueryAutomationsWithDraftsResponse$1, bJ as DeleteDraftAutomationRequest$1, bK as DeleteDraftAutomationResponse$1, bL as PublishDraftAutomationRequest$1, P as PublishDraftAutomationResponse$1, bM as ValidateAutomationRequest$1, j as ValidateAutomationResponse$1, bZ as ValidateAutomationByIdRequest$1, l as ValidateAutomationByIdResponse$1, cc as GetAutomationRevisionRequest$1, n as GetAutomationRevisionResponse$1 } from './automations-v2-automation-automations-v-2.universal-CUoGClWF.js';
2
+
3
+ interface Automation extends AutomationOriginInfoOneOf {
4
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
5
+ applicationInfo?: ApplicationOrigin;
6
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
7
+ preinstalledInfo?: PreinstalledOrigin;
8
+ /**
9
+ * Automation ID.
10
+ * @format GUID
11
+ * @readonly
12
+ */
13
+ id?: string | null;
14
+ /**
15
+ * Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.
16
+ * @readonly
17
+ */
18
+ revision?: string | null;
19
+ /**
20
+ * Who created the automation.
21
+ * @immutable
22
+ * @readonly
23
+ */
24
+ createdBy?: AuditInfo;
25
+ /**
26
+ * When the automation was created.
27
+ * @readonly
28
+ */
29
+ createdDate?: Date | null;
30
+ /**
31
+ * Who last updated the automation.
32
+ * @readonly
33
+ */
34
+ updatedBy?: AuditInfo;
35
+ /**
36
+ * When the automation was last updated.
37
+ * @readonly
38
+ */
39
+ updatedDate?: Date | null;
40
+ /**
41
+ * Automation name as displayed on the user's site.
42
+ * @minLength 1
43
+ * @maxLength 500
44
+ */
45
+ name?: string;
46
+ /**
47
+ * Automation description.
48
+ * @maxLength 2000
49
+ */
50
+ description?: string | null;
51
+ /** Automation configuration. */
52
+ configuration?: AutomationConfiguration;
53
+ /**
54
+ * How the automation was added to the user's site.
55
+ * @immutable
56
+ */
57
+ origin?: OriginWithLiterals;
58
+ /** Automation settings. */
59
+ settings?: AutomationSettings;
60
+ /**
61
+ * When the automation is a draft, the draft details.
62
+ * @readonly
63
+ */
64
+ draftInfo?: DraftInfo;
65
+ /**
66
+ * Whether the automation is archived.
67
+ *
68
+ * To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.
69
+ */
70
+ archived?: boolean;
71
+ }
72
+ /** @oneof */
73
+ interface AutomationOriginInfoOneOf {
74
+ /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
75
+ applicationInfo?: ApplicationOrigin;
76
+ /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
77
+ preinstalledInfo?: PreinstalledOrigin;
78
+ }
79
+ interface ActionSettings {
80
+ /**
81
+ * Permanent actions. Permanent actions cannot be deleted.
82
+ *
83
+ * When empty, all actions can be deleted by the user.
84
+ * @maxSize 30
85
+ * @format GUID
86
+ */
87
+ permanentActionIds?: string[];
88
+ /**
89
+ * Read-only actions. Read-only actions cannot be edited.
90
+ *
91
+ * When empty, all actions are editable.
92
+ * @maxSize 30
93
+ * @format GUID
94
+ */
95
+ readonlyActionIds?: string[];
96
+ /**
97
+ * Whether to disable the ability to add a delay to the automation.
98
+ *
99
+ * Default: `false`.
100
+ */
101
+ disableDelayAddition?: boolean;
102
+ /**
103
+ * Whether to disable the ability to add a condition to the automation.
104
+ *
105
+ * Default: `false`.
106
+ */
107
+ disableConditionAddition?: boolean;
108
+ }
109
+ interface AuditInfo extends AuditInfoIdOneOf {
110
+ /**
111
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
112
+ * @format GUID
113
+ */
114
+ userId?: string;
115
+ /**
116
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
117
+ *
118
+ * 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.
119
+ * @format GUID
120
+ */
121
+ appId?: string;
122
+ }
123
+ /** @oneof */
124
+ interface AuditInfoIdOneOf {
125
+ /**
126
+ * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
127
+ * @format GUID
128
+ */
129
+ userId?: string;
130
+ /**
131
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
132
+ *
133
+ * 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.
134
+ * @format GUID
135
+ */
136
+ appId?: string;
137
+ }
138
+ interface AutomationConfiguration {
139
+ /** Status of the automation on the site. */
140
+ status?: StatusWithLiterals;
141
+ /** Trigger configuration. */
142
+ trigger?: Trigger;
143
+ /**
144
+ * Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.
145
+ *
146
+ * > **Note**: You can currently only specify 1 root action.
147
+ * @maxSize 20
148
+ * @format GUID
149
+ */
150
+ rootActionIds?: string[];
151
+ /** 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. */
152
+ actions?: Record<string, Action>;
153
+ }
154
+ declare enum TimeUnit {
155
+ UNKNOWN_TIME_UNIT = "UNKNOWN_TIME_UNIT",
156
+ /** Minutes. */
157
+ MINUTES = "MINUTES",
158
+ /** Hours. */
159
+ HOURS = "HOURS",
160
+ /** Days. */
161
+ DAYS = "DAYS",
162
+ /** Weeks. */
163
+ WEEKS = "WEEKS",
164
+ /** Months. */
165
+ MONTHS = "MONTHS"
166
+ }
167
+ /** @enumType */
168
+ type TimeUnitWithLiterals = TimeUnit | 'UNKNOWN_TIME_UNIT' | 'MINUTES' | 'HOURS' | 'DAYS' | 'WEEKS' | 'MONTHS';
169
+ interface Filter {
170
+ /**
171
+ * Filter ID.
172
+ * @format GUID
173
+ */
174
+ id?: string;
175
+ /**
176
+ * Field key.
177
+ *
178
+ * 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).
179
+ * @minLength 1
180
+ * @maxLength 110
181
+ */
182
+ fieldKey?: string;
183
+ /**
184
+ * Filter expression.
185
+ *
186
+ * For the automation to run, the expression must evaluate to `true`.
187
+ * @maxLength 2500
188
+ */
189
+ filterExpression?: string;
190
+ }
191
+ interface FutureDateActivationOffset {
192
+ /**
193
+ * Amount of time before the trigger to run the automation.
194
+ *
195
+ * > **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).
196
+ * @maxLength 1000
197
+ */
198
+ preScheduledEventOffsetExpression?: string;
199
+ /** Unit in which to set the action offset. */
200
+ scheduledEventOffsetTimeUnit?: TimeUnitWithLiterals;
201
+ }
202
+ interface RateLimit {
203
+ /**
204
+ * Maximum number of times the trigger can be activated.
205
+ * @maxLength 1000
206
+ */
207
+ maxActivationsExpression?: string;
208
+ /**
209
+ * Duration of the rate limit. The rate limit applies for the specified duration and then expires.
210
+ *
211
+ * When empty, the rate limit does not expire.
212
+ * @maxLength 1000
213
+ */
214
+ durationExpression?: string | null;
215
+ /** Unit in which to set the duration of the rate limit. */
216
+ durationTimeUnit?: TimeUnitWithLiterals;
217
+ /**
218
+ * Activation identifier used to count the number of activations.
219
+ * @minLength 1
220
+ * @maxLength 400
221
+ */
222
+ uniqueIdentifierExpression?: string | null;
223
+ }
224
+ interface ConditionExpressionGroup {
225
+ /** Logical operator used to evaluate the condition expressions. */
226
+ operator?: OperatorWithLiterals;
227
+ /**
228
+ * Expressions evaluated using the selected operator.
229
+ * @minSize 1
230
+ * @maxSize 20
231
+ * @maxLength 2500
232
+ */
233
+ booleanExpressions?: string[];
234
+ }
235
+ declare enum Operator {
236
+ /** Unknown. */
237
+ UNKNOWN_OPERATOR = "UNKNOWN_OPERATOR",
238
+ /** `OR` operator. */
239
+ OR = "OR",
240
+ /** `AND` operator. */
241
+ AND = "AND"
242
+ }
243
+ /** @enumType */
244
+ type OperatorWithLiterals = Operator | 'UNKNOWN_OPERATOR' | 'OR' | 'AND';
245
+ declare enum Type {
246
+ /** Based on the trigger. */
247
+ UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
248
+ /** 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. */
249
+ APP_DEFINED = "APP_DEFINED",
250
+ /** Condition. This determines which action runs next. */
251
+ CONDITION = "CONDITION",
252
+ /** Delay. The automation must wait before executing the next step. */
253
+ DELAY = "DELAY",
254
+ /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
255
+ RATE_LIMIT = "RATE_LIMIT"
256
+ }
257
+ /** @enumType */
258
+ type TypeWithLiterals = Type | 'UNKNOWN_ACTION_TYPE' | 'APP_DEFINED' | 'CONDITION' | 'DELAY' | 'RATE_LIMIT';
259
+ interface AppDefinedAction {
260
+ /**
261
+ * ID of the app that defines the action.
262
+ * @format GUID
263
+ */
264
+ appId?: string;
265
+ /**
266
+ * Action key.
267
+ * @minLength 1
268
+ * @maxLength 100
269
+ */
270
+ actionKey?: string;
271
+ /** 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). */
272
+ inputMapping?: Record<string, any> | null;
273
+ /**
274
+ * Action skip conditions. An action is skipped if any of the specified conditions evaluates to `true`.
275
+ *
276
+ * > **Note**: Actions that follow a skipped action still run.
277
+ * @maxSize 10
278
+ */
279
+ skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
280
+ /**
281
+ * IDs of actions that run in parallel after the action completes.
282
+ * @maxSize 20
283
+ * @format GUID
284
+ */
285
+ postActionIds?: string[];
286
+ /** Action output schema. When specified, this replaces the action schema. */
287
+ overrideOutputSchema?: Record<string, any> | null;
288
+ }
289
+ interface ConditionAction {
290
+ /**
291
+ * Condition is `true` if one or more of the expression groups evaluates to `true`.
292
+ * @minSize 1
293
+ * @maxSize 10
294
+ */
295
+ orExpressionGroups?: ConditionExpressionGroup[];
296
+ /**
297
+ * IDs of actions to run when the condition evaluates to `true`.
298
+ * @maxSize 20
299
+ * @format GUID
300
+ */
301
+ truePostActionIds?: string[];
302
+ /**
303
+ * IDs of actions to run when the condition evaluates to `false`.
304
+ * @maxSize 20
305
+ * @format GUID
306
+ */
307
+ falsePostActionIds?: string[];
308
+ }
309
+ interface DelayAction {
310
+ /**
311
+ * Time to wait before running the action. The wait time starts from when the current action completes.
312
+ *
313
+ * > **Note**: To define the wait time from a specific moment in time, use `dueDateEpochExpression`.
314
+ * @maxLength 1000
315
+ */
316
+ offsetExpression?: string | null;
317
+ /** Unit in which to set the wait time to wait before the action runs. */
318
+ offsetTimeUnit?: TimeUnitWithLiterals;
319
+ /**
320
+ * Action run date in milliseconds elapsed since January 1, 1970 UTC.
321
+ *
322
+ * > **Note**: If an `offsetExpression` is defined, the delay is calculated from the time of the offset.
323
+ * @maxLength 1000
324
+ */
325
+ dueDateEpochExpression?: string | null;
326
+ /**
327
+ * IDs of actions to run in parallel after the time delay.
328
+ * @maxSize 20
329
+ * @format GUID
330
+ */
331
+ postActionIds?: string[];
332
+ }
333
+ interface RateLimitAction {
334
+ /**
335
+ * Maximum number of times the action can run.
336
+ * @maxLength 1000
337
+ */
338
+ maxActivationsExpression?: string;
339
+ /**
340
+ * Rate limit duration.
341
+ *
342
+ * When empty, the rate limit does not expire.
343
+ * @maxLength 1000
344
+ */
345
+ rateLimitDurationExpression?: string | null;
346
+ /** Unit in which to set the duration of the rate limit. */
347
+ rateLimitDurationTimeUnit?: TimeUnitWithLiterals;
348
+ /**
349
+ * Unique identifier of each activation by which rate limiter counts activations.
350
+ * @minLength 1
351
+ * @maxLength 400
352
+ */
353
+ uniqueIdentifierExpression?: string | null;
354
+ /**
355
+ * IDs of actions to run in parallel after the action completes.
356
+ * @maxSize 20
357
+ * @format GUID
358
+ */
359
+ postActionIds?: string[];
360
+ }
361
+ declare enum Status {
362
+ /** Unknown. */
363
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
364
+ /** Active. Active automations can be triggered. */
365
+ ACTIVE = "ACTIVE",
366
+ /** Inactive. Inactive automations cannot be triggered. */
367
+ INACTIVE = "INACTIVE"
368
+ }
369
+ /** @enumType */
370
+ type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'ACTIVE' | 'INACTIVE';
371
+ interface Trigger {
372
+ /**
373
+ * ID of the app that defines the trigger.
374
+ * @format GUID
375
+ */
376
+ appId?: string;
377
+ /**
378
+ * Trigger key.
379
+ *
380
+ * 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).
381
+ * @minLength 1
382
+ * @maxLength 100
383
+ */
384
+ triggerKey?: string;
385
+ /**
386
+ * Schema field filters. All filter conditions must be met for the automation to run.
387
+ *
388
+ * Learn more about setting up [automation filters](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#filters).
389
+ * @maxSize 5
390
+ */
391
+ filters?: Filter[];
392
+ /**
393
+ * Automation offset. You can schedule automations to run before the trigger occurs.
394
+ *
395
+ * Learn more about [scheduled events](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/configure-your-automation#scheduled-events).
396
+ */
397
+ scheduledEventOffset?: FutureDateActivationOffset;
398
+ /** Limit on the number of times an automation can be triggered. */
399
+ rateLimit?: RateLimit;
400
+ /** Trigger schema override. When specified, this replaces the trigger schema. */
401
+ overrideSchema?: Record<string, any> | null;
402
+ }
403
+ interface Action extends ActionInfoOneOf {
404
+ /** Details of the action when its `type` is `APP_DEFINED`. */
405
+ appDefinedInfo?: AppDefinedAction;
406
+ /** Details of the action when its `type` is `CONDITION`. */
407
+ conditionInfo?: ConditionAction;
408
+ /** Details of the action when its `type` is `CODE_CONDITION`. */
409
+ codeConditionInfo?: CodeConditionAction;
410
+ /** Details of the action when its `type` is `DELAY`. */
411
+ delayInfo?: DelayAction;
412
+ /** Details of the action when its `type` is `RATE_LIMIT`. */
413
+ rateLimitInfo?: RateLimitAction;
414
+ /**
415
+ * Action ID.
416
+ *
417
+ * If not specified, automatically generated by Wix.
418
+ * @format GUID
419
+ */
420
+ id?: string | null;
421
+ /** [Action type](https://dev.wix.com/docs/rest/business-management/automations/automations/automations-v2/about-automation-configuration#action-type). */
422
+ type?: TypeWithLiterals;
423
+ /**
424
+ * [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.
425
+ *
426
+ * 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.
427
+ * @minLength 1
428
+ * @maxLength 100
429
+ */
430
+ namespace?: string | null;
431
+ }
432
+ /** @oneof */
433
+ interface ActionInfoOneOf {
434
+ /** Details of the action when its `type` is `APP_DEFINED`. */
435
+ appDefinedInfo?: AppDefinedAction;
436
+ /** Details of the action when its `type` is `CONDITION`. */
437
+ conditionInfo?: ConditionAction;
438
+ /** Details of the action when its `type` is `CODE_CONDITION`. */
439
+ codeConditionInfo?: CodeConditionAction;
440
+ /** Details of the action when its `type` is `DELAY`. */
441
+ delayInfo?: DelayAction;
442
+ /** Details of the action when its `type` is `RATE_LIMIT`. */
443
+ rateLimitInfo?: RateLimitAction;
444
+ }
445
+ declare enum Origin {
446
+ /** Default value. */
447
+ UNKNOWN_ORIGIN = "UNKNOWN_ORIGIN",
448
+ /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
449
+ USER = "USER",
450
+ /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */
451
+ APPLICATION = "APPLICATION",
452
+ /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */
453
+ PREINSTALLED = "PREINSTALLED"
454
+ }
455
+ /** @enumType */
456
+ type OriginWithLiterals = Origin | 'UNKNOWN_ORIGIN' | 'USER' | 'APPLICATION' | 'PREINSTALLED';
457
+ interface ApplicationOrigin {
458
+ /**
459
+ * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
460
+ *
461
+ * 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.
462
+ * @format GUID
463
+ */
464
+ appId?: string;
465
+ }
466
+ interface PreinstalledOrigin {
467
+ /**
468
+ * 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).
469
+ * @format GUID
470
+ */
471
+ appId?: string;
472
+ /**
473
+ * Whether the automation is an override.
474
+ *
475
+ * 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.
476
+ *
477
+ * > **Note**: An override automation can no longer be updated by the app that originally installed it.
478
+ * >
479
+ * > 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.
480
+ *
481
+ * Default: `false`.
482
+ * @immutable
483
+ * @readonly
484
+ */
485
+ override?: boolean | null;
486
+ }
487
+ interface AutomationSettings {
488
+ /**
489
+ * Whether the automation is hidden from users.
490
+ *
491
+ * Default: `false`
492
+ */
493
+ hidden?: boolean;
494
+ /**
495
+ * Whether the automation is read-only.
496
+ *
497
+ * Default: `false`
498
+ */
499
+ readonly?: boolean;
500
+ /**
501
+ * Whether to disable the option to delete the automation from the site.
502
+ *
503
+ * Default: `false`.
504
+ */
505
+ disableDelete?: boolean;
506
+ /**
507
+ * Whether to disable the option to change the automation's `configuration.status`, for example from `ACTIVE` to `INACTIVE`.
508
+ *
509
+ * Default: `false`.
510
+ */
511
+ disableStatusChange?: boolean;
512
+ /** Automation action settings. */
513
+ actionSettings?: ActionSettings;
514
+ }
515
+ interface DraftInfo {
516
+ /**
517
+ * ID of the original automation.
518
+ * @format GUID
519
+ * @readonly
520
+ */
521
+ originalAutomationId?: string | null;
522
+ }
523
+ interface CodeSnippet {
524
+ /** Logical operator used to evaluate the condition expressions. */
525
+ language?: LanguageWithLiterals;
526
+ /**
527
+ * Expressions evaluated using the selected operator. this code should comply the language syntax. and format
528
+ * @maxLength 1000
529
+ */
530
+ code?: string;
531
+ }
532
+ declare enum Language {
533
+ /** Unknown. */
534
+ UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
535
+ /** `JAVASCRIPT` language. */
536
+ JAVASCRIPT = "JAVASCRIPT"
537
+ }
538
+ /** @enumType */
539
+ type LanguageWithLiterals = Language | 'UNKNOWN_LANGUAGE' | 'JAVASCRIPT';
540
+ interface CodeConditionAction {
541
+ /** condition code. This is a code that can be used to identify the condition in the automation. code should return a boolean value. otherwise the value will be tried to be casted to boolean. */
542
+ snippet?: CodeSnippet;
543
+ /**
544
+ * IDs of actions to run when the condition evaluates to `true`.
545
+ * @maxSize 20
546
+ * @format GUID
547
+ */
548
+ truePostActionIds?: string[];
549
+ /**
550
+ * IDs of actions to run when the condition evaluates to `false`.
551
+ * @maxSize 20
552
+ * @format GUID
553
+ */
554
+ falsePostActionIds?: string[];
555
+ }
556
+ interface CreateAutomationRequest {
557
+ /** Automation to create. */
558
+ automation: Automation;
559
+ }
560
+ declare enum RequestedFields {
561
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
562
+ /** whether to return in response `configuration.trigger.override_output_schema` field and in `configuration.actions` the `override_output_schema` field */
563
+ OVERRIDE_SCHEMA = "OVERRIDE_SCHEMA"
564
+ }
565
+ /** @enumType */
566
+ type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'OVERRIDE_SCHEMA';
567
+ interface CreateAutomationResponse {
568
+ /** Details of the created automation. */
569
+ automation?: Automation;
570
+ }
571
+ interface GetAutomationRequest {
572
+ /**
573
+ * Automation ID.
574
+ * @format GUID
575
+ */
576
+ automationId: string;
577
+ }
578
+ interface GetAutomationResponse {
579
+ /** Retrieved automation. */
580
+ automation?: Automation;
581
+ }
582
+ interface UpdateAutomationRequest {
583
+ /** Automation to update. */
584
+ automation: Automation;
585
+ }
586
+ interface UpdateAutomationResponse {
587
+ /** Updated automation. */
588
+ automation?: Automation;
589
+ }
590
+ interface DeleteAutomationRequest {
591
+ /**
592
+ * Automation ID.
593
+ * @format GUID
594
+ */
595
+ automationId: string;
596
+ }
597
+ interface DeleteAutomationResponse {
598
+ }
599
+ interface BulkDeleteAutomationsRequest {
600
+ /**
601
+ * IDs of the automations to delete.
602
+ * @format GUID
603
+ * @minSize 1
604
+ * @maxSize 200
605
+ */
606
+ automationIds: string[];
607
+ }
608
+ interface BulkDeleteAutomationsResponse {
609
+ /**
610
+ * Results of the bulk deletion.
611
+ * @minSize 1
612
+ * @maxSize 200
613
+ */
614
+ results?: BulkDeleteResult[];
615
+ /** Metadata for the API call. */
616
+ bulkActionMetadata?: BulkActionMetadata;
617
+ }
618
+ interface BulkDeleteResult {
619
+ /** Deleted item metadata. */
620
+ itemMetadata?: ItemMetadata;
621
+ }
622
+ interface ItemMetadata {
623
+ /**
624
+ * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
625
+ * @format GUID
626
+ */
627
+ id?: string | null;
628
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
629
+ originalIndex?: number;
630
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
631
+ success?: boolean;
632
+ /** Details about the error in case of failure. */
633
+ error?: ApplicationError;
634
+ }
635
+ interface ApplicationError {
636
+ /** Error code. */
637
+ code?: string;
638
+ /** Description of the error. */
639
+ description?: string;
640
+ /** Data related to the error. */
641
+ data?: Record<string, any> | null;
642
+ }
643
+ interface BulkActionMetadata {
644
+ /** Number of items that were successfully processed. */
645
+ totalSuccesses?: number;
646
+ /** Number of items that couldn't be processed. */
647
+ totalFailures?: number;
648
+ /** Number of failures without details because detailed failure threshold was exceeded. */
649
+ undetailedFailures?: number;
650
+ }
651
+ interface GeneratePreinstalledAutomationRequest {
652
+ /** Automation. */
653
+ automation: Automation;
654
+ /**
655
+ * ID of the app to which the automation belongs.
656
+ * @format GUID
657
+ */
658
+ appId?: string;
659
+ }
660
+ interface GeneratePreinstalledAutomationResponse {
661
+ /** Automation. */
662
+ automation?: Automation;
663
+ }
664
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
665
+ /** 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`. */
666
+ cursorPaging?: CursorPaging;
667
+ /**
668
+ * Filter object in the following format:
669
+ * `"filter" : {
670
+ * "fieldName1": "value1",
671
+ * "fieldName2": { "$operator": "value2" }
672
+ * }`
673
+ *
674
+ * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
675
+ */
676
+ filter?: Record<string, any> | null;
677
+ /**
678
+ * Sort configuration in the following format:
679
+ * `[{ "fieldName": "sortField1", "order": "ASC" }, { "fieldName":" sortField2", "order": "DESC" }]`
680
+ * @maxSize 5
681
+ */
682
+ sort?: Sorting[];
683
+ }
684
+ /** @oneof */
685
+ interface CursorQueryPagingMethodOneOf {
686
+ /** 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`. */
687
+ cursorPaging?: CursorPaging;
688
+ }
689
+ interface Sorting {
690
+ /**
691
+ * Name of the field to sort by.
692
+ * @maxLength 512
693
+ */
694
+ fieldName?: string;
695
+ /** Sort order. */
696
+ order?: SortOrderWithLiterals;
697
+ }
698
+ declare enum SortOrder {
699
+ ASC = "ASC",
700
+ DESC = "DESC"
701
+ }
702
+ /** @enumType */
703
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
704
+ interface CursorPaging {
705
+ /**
706
+ * Maximum number of items to return in the results.
707
+ * @max 500
708
+ */
709
+ limit?: number | null;
710
+ /**
711
+ * Pointer to the next or previous page in the list of results.
712
+ *
713
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
714
+ * Not relevant for the first request.
715
+ * @maxLength 64000
716
+ */
717
+ cursor?: string | null;
718
+ }
719
+ interface CursorPagingMetadata {
720
+ /** Number of items returned in the response. */
721
+ count?: number | null;
722
+ /** Cursor strings that point to the next page, previous page, or both. */
723
+ cursors?: Cursors;
724
+ /**
725
+ * Whether there are more pages to retrieve following the current page.
726
+ *
727
+ * + `true`: Another page of results can be retrieved.
728
+ * + `false`: This is the last page.
729
+ */
730
+ hasNext?: boolean | null;
731
+ }
732
+ interface Cursors {
733
+ /**
734
+ * Cursor string pointing to the next page in the list of results.
735
+ * @maxLength 64000
736
+ */
737
+ next?: string | null;
738
+ /**
739
+ * Cursor pointing to the previous page in the list of results.
740
+ * @maxLength 64000
741
+ */
742
+ prev?: string | null;
743
+ }
744
+ interface QueryAutomationsRequest {
745
+ /**
746
+ * Query.
747
+ *
748
+ * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
749
+ *
750
+ * > **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).
751
+ */
752
+ query?: CursorQuery;
753
+ }
754
+ interface QueryAutomationsResponse {
755
+ /** Automations. */
756
+ automations?: Automation[];
757
+ /** Paging metadata. */
758
+ pagingMetadata?: CursorPagingMetadata;
759
+ }
760
+ interface CopyAutomationRequest {
761
+ /**
762
+ * ID of the automation to copy.
763
+ * @format GUID
764
+ */
765
+ automationId: string;
766
+ /** Origin of the automation to copy. */
767
+ origin?: OriginWithLiterals;
768
+ /** Automation to copy. Skips fetching by ID. */
769
+ automation?: Automation;
770
+ }
771
+ interface CopyAutomationResponse {
772
+ /** Copy of the automation. */
773
+ automation?: Automation;
774
+ }
775
+ interface CreateDraftAutomationRequest {
776
+ /** Draft automation to create. */
777
+ automation?: Automation;
778
+ }
779
+ interface CreateDraftAutomationResponse {
780
+ /** Draft automation that was created. */
781
+ automation?: Automation;
782
+ }
783
+ interface GetOrCreateDraftAutomationRequest {
784
+ /**
785
+ * ID of the original automation on which the draft is based.
786
+ * @format GUID
787
+ */
788
+ originalAutomationId: string;
789
+ }
790
+ interface GetOrCreateDraftAutomationResponse {
791
+ /** Draft automation. */
792
+ automation?: Automation;
793
+ }
794
+ interface UpdateDraftAutomationRequest {
795
+ /** Automation to update. Updates can be partial. */
796
+ automation: Automation;
797
+ }
798
+ interface UpdateDraftAutomationResponse {
799
+ /** Updated draft automation. */
800
+ automation?: Automation;
801
+ }
802
+ interface QueryAutomationsWithDraftsRequest {
803
+ /**
804
+ * Query.
805
+ *
806
+ * Learn more about [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language).
807
+ */
808
+ query?: CursorQuery;
809
+ }
810
+ interface QueryAutomationsWithDraftsResponse {
811
+ /** Retrieved automations. */
812
+ automations?: Automation[];
813
+ /** Paging metadata. */
814
+ pagingMetadata?: CursorPagingMetadata;
815
+ /**
816
+ * Map of existing automation IDs and their drafts' automation IDs.
817
+ * 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.
818
+ */
819
+ originalAutomationIdToDrafts?: Record<string, DraftsInfo>;
820
+ }
821
+ interface DraftsInfo {
822
+ /**
823
+ * IDs of the draft automations.
824
+ * @maxSize 1
825
+ * @format GUID
826
+ */
827
+ draftAutomationIds?: string[];
828
+ }
829
+ interface DeleteDraftAutomationRequest {
830
+ /**
831
+ * ID of the draft automation to delete.
832
+ * @format GUID
833
+ */
834
+ automationId: string;
835
+ }
836
+ interface DeleteDraftAutomationResponse {
837
+ }
838
+ interface PublishDraftAutomationRequest {
839
+ /**
840
+ * ID of the draft automation to publish.
841
+ * @format GUID
842
+ */
843
+ automationId: string;
844
+ }
845
+ interface PublishDraftAutomationResponse {
846
+ /** Updated published automation. */
847
+ automation?: Automation;
848
+ }
849
+ interface ValidateAutomationRequest {
850
+ /** Automation to validate. */
851
+ automation: Automation;
852
+ /** Automation validation settings. */
853
+ validationSettings?: ValidationSettings;
854
+ }
855
+ interface ValidationSettings {
856
+ /**
857
+ * IDs of actions to validate. Only actions whose IDs are specified are validated.
858
+ *
859
+ * When action IDs are specified, triggers are not validated. When empty, the full automation is validated, including triggers.
860
+ * @maxSize 30
861
+ * @format GUID
862
+ */
863
+ actionIds?: string[];
864
+ /**
865
+ * Whether to skip provider validations.
866
+ *
867
+ * Default: `false`.
868
+ */
869
+ skipProviderValidations?: boolean;
870
+ }
871
+ interface ValidateAutomationResponse {
872
+ /** Whether the automation is valid. */
873
+ valid?: boolean;
874
+ /**
875
+ * Validation errors generated by the automation trigger.
876
+ * @maxSize 100
877
+ */
878
+ triggerValidationErrors?: TriggerValidationError[];
879
+ /**
880
+ * Validation information generated by the automation actions.
881
+ * @maxSize 100
882
+ */
883
+ actionValidationInfo?: ActionValidationInfo[];
884
+ /**
885
+ * Additional validation errors generated by the automation.
886
+ * @maxSize 100
887
+ */
888
+ automationValidationErrors?: AutomationValidationError[];
889
+ }
890
+ interface TriggerValidationError extends TriggerValidationErrorErrorOneOf {
891
+ /** Trigger configuration error. */
892
+ configurationError?: TriggerConfigurationError;
893
+ /** Provider configuration error. */
894
+ providerConfigurationError?: ProviderConfigurationError;
895
+ /** Validation error type. */
896
+ errorType?: TriggerValidationErrorValidationErrorTypeWithLiterals;
897
+ /** Validation error severity */
898
+ severity?: ValidationErrorSeverityWithLiterals;
899
+ }
900
+ /** @oneof */
901
+ interface TriggerValidationErrorErrorOneOf {
902
+ /** Trigger configuration error. */
903
+ configurationError?: TriggerConfigurationError;
904
+ /** Provider configuration error. */
905
+ providerConfigurationError?: ProviderConfigurationError;
906
+ }
907
+ declare enum TriggerValidationErrorValidationErrorType {
908
+ UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
909
+ /** Configuration error. */
910
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
911
+ /** Provider error. */
912
+ PROVIDER_ERROR = "PROVIDER_ERROR"
913
+ }
914
+ /** @enumType */
915
+ type TriggerValidationErrorValidationErrorTypeWithLiterals = TriggerValidationErrorValidationErrorType | 'UNKNOWN_VALIDATION_ERROR_TYPE' | 'CONFIGURATION_ERROR' | 'PROVIDER_ERROR';
916
+ interface TriggerConfigurationError {
917
+ /** Trigger error type. */
918
+ errorType?: TriggerErrorTypeWithLiterals;
919
+ /**
920
+ * Related filter field key.
921
+ * @maxLength 110
922
+ */
923
+ filterFieldKey?: string | null;
924
+ }
925
+ declare enum TriggerErrorType {
926
+ UNKNOWN_TRIGGER_ERROR_TYPE = "UNKNOWN_TRIGGER_ERROR_TYPE",
927
+ /** Trigger not found. */
928
+ NOT_FOUND = "NOT_FOUND",
929
+ /** App not installed. */
930
+ APP_NOT_INSTALLED = "APP_NOT_INSTALLED",
931
+ /** Moderation mismatch. */
932
+ MODERATION_MISMATCH = "MODERATION_MISMATCH",
933
+ /** Deprecated. */
934
+ DEPRECATED = "DEPRECATED",
935
+ /** Invalid trigger key. */
936
+ INVALID_TRIGGER_KEY = "INVALID_TRIGGER_KEY",
937
+ /** Invalid filter field key. */
938
+ INVALID_FILTER_FIELD_KEY = "INVALID_FILTER_FIELD_KEY",
939
+ /** Invalid filter expression. */
940
+ INVALID_FILTER_EXPRESSION = "INVALID_FILTER_EXPRESSION"
941
+ }
942
+ /** @enumType */
943
+ type TriggerErrorTypeWithLiterals = TriggerErrorType | 'UNKNOWN_TRIGGER_ERROR_TYPE' | 'NOT_FOUND' | 'APP_NOT_INSTALLED' | 'MODERATION_MISMATCH' | 'DEPRECATED' | 'INVALID_TRIGGER_KEY' | 'INVALID_FILTER_FIELD_KEY' | 'INVALID_FILTER_EXPRESSION';
944
+ interface ProviderConfigurationError {
945
+ /** Key corresponding to the field in the schema. */
946
+ fieldKey?: string | null;
947
+ /** Error message. */
948
+ message?: string;
949
+ /** Label for a call-to-action button that's displayed with the error. Translated according to the SPI language context. */
950
+ ctaLabel?: string | null;
951
+ /** URL to redirect to when the call-to-action button is clicked. */
952
+ ctaUrl?: string | null;
953
+ /** Title for the error. */
954
+ title?: string;
955
+ }
956
+ declare enum ValidationErrorSeverity {
957
+ UNKNOWN_VALIDATION_ERROR_SEVERITY = "UNKNOWN_VALIDATION_ERROR_SEVERITY",
958
+ /** Warning. */
959
+ WARNING = "WARNING",
960
+ /** Error. */
961
+ ERROR = "ERROR"
962
+ }
963
+ /** @enumType */
964
+ type ValidationErrorSeverityWithLiterals = ValidationErrorSeverity | 'UNKNOWN_VALIDATION_ERROR_SEVERITY' | 'WARNING' | 'ERROR';
965
+ interface ActionValidationInfo {
966
+ /**
967
+ * Action ID.
968
+ * @format GUID
969
+ */
970
+ actionId?: string | null;
971
+ /**
972
+ * ID of the app that defined the action.
973
+ * @format GUID
974
+ */
975
+ appId?: string;
976
+ /**
977
+ * Human-readable action identifier.
978
+ * @minLength 1
979
+ * @maxLength 100
980
+ */
981
+ actionKey?: string;
982
+ /**
983
+ * Action validation errors.
984
+ * @maxSize 100
985
+ */
986
+ validationErrors?: ActionValidationError[];
987
+ }
988
+ interface ActionValidationError extends ActionValidationErrorErrorOneOf {
989
+ /** Action configuration error. */
990
+ configurationError?: ActionConfigurationError;
991
+ /** Provider configuration error. */
992
+ providerConfigurationError?: ProviderConfigurationError;
993
+ /** Validation error type. */
994
+ errorType?: ValidationErrorTypeWithLiterals;
995
+ /** Validation error severity */
996
+ severity?: ValidationErrorSeverityWithLiterals;
997
+ }
998
+ /** @oneof */
999
+ interface ActionValidationErrorErrorOneOf {
1000
+ /** Action configuration error. */
1001
+ configurationError?: ActionConfigurationError;
1002
+ /** Provider configuration error. */
1003
+ providerConfigurationError?: ProviderConfigurationError;
1004
+ }
1005
+ declare enum ValidationErrorType {
1006
+ UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
1007
+ /** Configuration error. */
1008
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
1009
+ /** Provider error. */
1010
+ PROVIDER_ERROR = "PROVIDER_ERROR"
1011
+ }
1012
+ /** @enumType */
1013
+ type ValidationErrorTypeWithLiterals = ValidationErrorType | 'UNKNOWN_VALIDATION_ERROR_TYPE' | 'CONFIGURATION_ERROR' | 'PROVIDER_ERROR';
1014
+ interface ActionConfigurationError {
1015
+ /** Action error type. */
1016
+ errorType?: ActionErrorTypeWithLiterals;
1017
+ /**
1018
+ * Related field key.
1019
+ * @maxLength 110
1020
+ */
1021
+ fieldKey?: string | null;
1022
+ }
1023
+ declare enum ActionErrorType {
1024
+ UNKNOWN_ACTION_ERROR_TYPE = "UNKNOWN_ACTION_ERROR_TYPE",
1025
+ NOT_FOUND = "NOT_FOUND",
1026
+ APP_NOT_INSTALLED = "APP_NOT_INSTALLED",
1027
+ MODERATION_MISMATCH = "MODERATION_MISMATCH",
1028
+ DEPRECATED = "DEPRECATED",
1029
+ INVALID_ACTION_KEY = "INVALID_ACTION_KEY",
1030
+ INVALID_MAPPING = "INVALID_MAPPING",
1031
+ MAPPING_TYPE_MISMATCH = "MAPPING_TYPE_MISMATCH",
1032
+ MAPPING_MISSING_REQUIRED_FIELD = "MAPPING_MISSING_REQUIRED_FIELD",
1033
+ MAPPING_SCHEMA_MISMATCH = "MAPPING_SCHEMA_MISMATCH",
1034
+ MAPPING_VARIABLE_MISSING_FROM_SCHEMA = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA",
1035
+ SAMPLE_CODE_RUN_FAILED = "SAMPLE_CODE_RUN_FAILED"
1036
+ }
1037
+ /** @enumType */
1038
+ type ActionErrorTypeWithLiterals = ActionErrorType | 'UNKNOWN_ACTION_ERROR_TYPE' | 'NOT_FOUND' | 'APP_NOT_INSTALLED' | 'MODERATION_MISMATCH' | 'DEPRECATED' | 'INVALID_ACTION_KEY' | 'INVALID_MAPPING' | 'MAPPING_TYPE_MISMATCH' | 'MAPPING_MISSING_REQUIRED_FIELD' | 'MAPPING_SCHEMA_MISMATCH' | 'MAPPING_VARIABLE_MISSING_FROM_SCHEMA' | 'SAMPLE_CODE_RUN_FAILED';
1039
+ interface AutomationValidationError extends AutomationValidationErrorErrorOneOf {
1040
+ /** Automation configuration error. */
1041
+ configurationError?: AutomationConfigurationError;
1042
+ /** Provider configuration error. */
1043
+ providerConfigurationError?: ProviderConfigurationError;
1044
+ /** Validation error type. */
1045
+ errorType?: AutomationValidationErrorValidationErrorTypeWithLiterals;
1046
+ /** Validation error severity. */
1047
+ severity?: ValidationErrorSeverityWithLiterals;
1048
+ }
1049
+ /** @oneof */
1050
+ interface AutomationValidationErrorErrorOneOf {
1051
+ /** Automation configuration error. */
1052
+ configurationError?: AutomationConfigurationError;
1053
+ /** Provider configuration error. */
1054
+ providerConfigurationError?: ProviderConfigurationError;
1055
+ }
1056
+ declare enum AutomationValidationErrorValidationErrorType {
1057
+ UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
1058
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
1059
+ PROVIDER_ERROR = "PROVIDER_ERROR"
1060
+ }
1061
+ /** @enumType */
1062
+ type AutomationValidationErrorValidationErrorTypeWithLiterals = AutomationValidationErrorValidationErrorType | 'UNKNOWN_VALIDATION_ERROR_TYPE' | 'CONFIGURATION_ERROR' | 'PROVIDER_ERROR';
1063
+ interface AutomationConfigurationError {
1064
+ /** Automation error type. */
1065
+ errorType?: AutomationErrorTypeWithLiterals;
1066
+ }
1067
+ declare enum AutomationErrorType {
1068
+ UNKNOWN_AUTOMATION_ERROR_TYPE = "UNKNOWN_AUTOMATION_ERROR_TYPE"
1069
+ }
1070
+ /** @enumType */
1071
+ type AutomationErrorTypeWithLiterals = AutomationErrorType | 'UNKNOWN_AUTOMATION_ERROR_TYPE';
1072
+ interface ValidateAutomationByIdRequest {
1073
+ /**
1074
+ * Automation ID.
1075
+ * @format GUID
1076
+ */
1077
+ automationId: string;
1078
+ /** Validation settings. */
1079
+ validationSettings?: ValidationSettings;
1080
+ }
1081
+ interface ValidateAutomationByIdResponse {
1082
+ /** Whether the automation is valid. */
1083
+ valid?: boolean;
1084
+ /**
1085
+ * Validation errors generated by the automation trigger.
1086
+ * @maxSize 100
1087
+ */
1088
+ triggerValidationErrors?: TriggerValidationError[];
1089
+ /**
1090
+ * Validation information generated by the automation actions.
1091
+ * @maxSize 100
1092
+ */
1093
+ actionValidationInfo?: ActionValidationInfo[];
1094
+ /**
1095
+ * Additional validation errors generated by the automation.
1096
+ * @maxSize 100
1097
+ */
1098
+ automationValidationErrors?: AutomationValidationError[];
1099
+ }
1100
+ interface GetAutomationRevisionRequest {
1101
+ /**
1102
+ * Automation ID.
1103
+ * @format GUID
1104
+ */
1105
+ automationId: string;
1106
+ /** Revision number. */
1107
+ revision?: string | null;
1108
+ /**
1109
+ * Requested fields.
1110
+ * @maxSize 20
1111
+ */
1112
+ fields?: RequestedFieldsWithLiterals[];
1113
+ }
1114
+ interface GetAutomationRevisionResponse {
1115
+ /** Automation revision. */
1116
+ automation?: Automation;
1117
+ }
1118
+
1119
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1120
+ getUrl: (context: any) => string;
1121
+ httpMethod: K;
1122
+ path: string;
1123
+ pathParams: M;
1124
+ __requestType: T;
1125
+ __originalRequestType: S;
1126
+ __responseType: Q;
1127
+ __originalResponseType: R;
1128
+ };
1129
+ declare function createAutomation(): __PublicMethodMetaInfo<'POST', {}, CreateAutomationRequest$1, CreateAutomationRequest, CreateAutomationResponse$1, CreateAutomationResponse>;
1130
+ declare function getAutomation(): __PublicMethodMetaInfo<'GET', {
1131
+ automationId: string;
1132
+ }, GetAutomationRequest$1, GetAutomationRequest, GetAutomationResponse$1, GetAutomationResponse>;
1133
+ declare function updateAutomation(): __PublicMethodMetaInfo<'PATCH', {
1134
+ automationId: string;
1135
+ }, UpdateAutomationRequest$1, UpdateAutomationRequest, UpdateAutomationResponse$1, UpdateAutomationResponse>;
1136
+ declare function deleteAutomation(): __PublicMethodMetaInfo<'DELETE', {
1137
+ automationId: string;
1138
+ }, DeleteAutomationRequest$1, DeleteAutomationRequest, DeleteAutomationResponse$1, DeleteAutomationResponse>;
1139
+ declare function bulkDeleteAutomations(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteAutomationsRequest$1, BulkDeleteAutomationsRequest, BulkDeleteAutomationsResponse$1, BulkDeleteAutomationsResponse>;
1140
+ declare function generatePreinstalledAutomation(): __PublicMethodMetaInfo<'POST', {}, GeneratePreinstalledAutomationRequest$1, GeneratePreinstalledAutomationRequest, GeneratePreinstalledAutomationResponse$1, GeneratePreinstalledAutomationResponse>;
1141
+ declare function queryAutomations(): __PublicMethodMetaInfo<'POST', {}, QueryAutomationsRequest$1, QueryAutomationsRequest, QueryAutomationsResponse$1, QueryAutomationsResponse>;
1142
+ declare function copyAutomation(): __PublicMethodMetaInfo<'POST', {
1143
+ automationId: string;
1144
+ }, CopyAutomationRequest$1, CopyAutomationRequest, CopyAutomationResponse$1, CopyAutomationResponse>;
1145
+ declare function createDraftAutomation(): __PublicMethodMetaInfo<'POST', {}, CreateDraftAutomationRequest$1, CreateDraftAutomationRequest, CreateDraftAutomationResponse$1, CreateDraftAutomationResponse>;
1146
+ declare function getOrCreateDraftAutomation(): __PublicMethodMetaInfo<'POST', {
1147
+ originalAutomationId: string;
1148
+ }, GetOrCreateDraftAutomationRequest$1, GetOrCreateDraftAutomationRequest, GetOrCreateDraftAutomationResponse$1, GetOrCreateDraftAutomationResponse>;
1149
+ declare function updateDraftAutomation(): __PublicMethodMetaInfo<'PATCH', {
1150
+ automationId: string;
1151
+ }, UpdateDraftAutomationRequest$1, UpdateDraftAutomationRequest, UpdateDraftAutomationResponse$1, UpdateDraftAutomationResponse>;
1152
+ declare function queryAutomationsWithDrafts(): __PublicMethodMetaInfo<'POST', {}, QueryAutomationsWithDraftsRequest$1, QueryAutomationsWithDraftsRequest, QueryAutomationsWithDraftsResponse$1, QueryAutomationsWithDraftsResponse>;
1153
+ declare function deleteDraftAutomation(): __PublicMethodMetaInfo<'DELETE', {
1154
+ automationId: string;
1155
+ }, DeleteDraftAutomationRequest$1, DeleteDraftAutomationRequest, DeleteDraftAutomationResponse$1, DeleteDraftAutomationResponse>;
1156
+ declare function publishDraftAutomation(): __PublicMethodMetaInfo<'POST', {
1157
+ automationId: string;
1158
+ }, PublishDraftAutomationRequest$1, PublishDraftAutomationRequest, PublishDraftAutomationResponse$1, PublishDraftAutomationResponse>;
1159
+ declare function validateAutomation(): __PublicMethodMetaInfo<'POST', {}, ValidateAutomationRequest$1, ValidateAutomationRequest, ValidateAutomationResponse$1, ValidateAutomationResponse>;
1160
+ declare function validateAutomationById(): __PublicMethodMetaInfo<'POST', {
1161
+ automationId: string;
1162
+ }, ValidateAutomationByIdRequest$1, ValidateAutomationByIdRequest, ValidateAutomationByIdResponse$1, ValidateAutomationByIdResponse>;
1163
+ declare function getAutomationRevision(): __PublicMethodMetaInfo<'GET', {
1164
+ automationId: string;
1165
+ }, GetAutomationRevisionRequest$1, GetAutomationRevisionRequest, GetAutomationRevisionResponse$1, GetAutomationRevisionResponse>;
1166
+
1167
+ export { type __PublicMethodMetaInfo, bulkDeleteAutomations, copyAutomation, createAutomation, createDraftAutomation, deleteAutomation, deleteDraftAutomation, generatePreinstalledAutomation, getAutomation, getAutomationRevision, getOrCreateDraftAutomation, publishDraftAutomation, queryAutomations, queryAutomationsWithDrafts, updateAutomation, updateDraftAutomation, validateAutomation, validateAutomationById };