@wix/auto_sdk_automations_trigger-provider 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/build/cjs/index.typings.d.ts +3 -13
  2. package/build/cjs/index.typings.js.map +1 -1
  3. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.d.ts +1 -19
  4. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.js +0 -39
  5. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.js.map +1 -1
  6. package/build/cjs/src/service-plugins-types.d.ts +251 -54
  7. package/build/cjs/src/service-plugins-types.js.map +1 -1
  8. package/build/es/index.typings.d.ts +3 -13
  9. package/build/es/index.typings.js.map +1 -1
  10. package/build/es/src/interfaces-automations-v1-trigger-provider.public.d.ts +1 -19
  11. package/build/es/src/interfaces-automations-v1-trigger-provider.public.js +0 -39
  12. package/build/es/src/interfaces-automations-v1-trigger-provider.public.js.map +1 -1
  13. package/build/es/src/service-plugins-types.d.ts +251 -54
  14. package/build/es/src/service-plugins-types.js.map +1 -1
  15. package/build/internal/cjs/index.typings.d.ts +3 -13
  16. package/build/internal/cjs/index.typings.js.map +1 -1
  17. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.d.ts +1 -19
  18. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.js +0 -39
  19. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.js.map +1 -1
  20. package/build/internal/cjs/src/service-plugins-types.d.ts +251 -54
  21. package/build/internal/cjs/src/service-plugins-types.js.map +1 -1
  22. package/build/internal/es/index.typings.d.ts +3 -13
  23. package/build/internal/es/index.typings.js.map +1 -1
  24. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.d.ts +1 -19
  25. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.js +0 -39
  26. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.js.map +1 -1
  27. package/build/internal/es/src/service-plugins-types.d.ts +251 -54
  28. package/build/internal/es/src/service-plugins-types.js.map +1 -1
  29. package/package.json +2 -2
@@ -1,6 +1,4 @@
1
1
  import { ServicePluginDefinition } from '@wix/sdk-types';
2
- import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
3
- import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
4
2
  import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
5
3
  export const provideHandlers = ServicePluginDefinition('AUTOMATIONS_TRIGGER_PROVIDER', [
6
4
  {
@@ -45,42 +43,5 @@ export const provideHandlers = ServicePluginDefinition('AUTOMATIONS_TRIGGER_PROV
45
43
  },
46
44
  },
47
45
  },
48
- {
49
- name: 'onAutomationSaved',
50
- primaryHttpMappingPath: '/on-automation-saved',
51
- transformations: {
52
- toREST: (payload) => {
53
- const toRestResponse = payload;
54
- return renameKeysFromSDKRequestToRESTRequest(toRestResponse);
55
- },
56
- fromREST: (payload) => {
57
- const fromRestRequest = transformPaths(payload, [
58
- {
59
- transformFn: transformRESTTimestampToSDKTimestamp,
60
- paths: [
61
- { path: 'request.automation.createdDate' },
62
- { path: 'request.automation.updatedDate' },
63
- { path: 'request.automation.draftUpdatedDate' },
64
- ],
65
- },
66
- ]);
67
- return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);
68
- },
69
- },
70
- },
71
- {
72
- name: 'onAutomationDeleted',
73
- primaryHttpMappingPath: '/on-automation-deleted',
74
- transformations: {
75
- toREST: (payload) => {
76
- const toRestResponse = payload;
77
- return renameKeysFromSDKRequestToRESTRequest(toRestResponse);
78
- },
79
- fromREST: (payload) => {
80
- const fromRestRequest = payload;
81
- return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);
82
- },
83
- },
84
- },
85
46
  ]);
86
47
  //# sourceMappingURL=interfaces-automations-v1-trigger-provider.public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces-automations-v1-trigger-provider.public.js","sourceRoot":"","sources":["../../../src/interfaces-automations-v1-trigger-provider.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAczD,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AA2BjD,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CA6DnD,8BAA8B,EAAE;IACjC;QACE,IAAI,EAAE,uBAAuB;QAC7B,sBAAsB,EAAE,yBAAyB;QACjD,eAAe,EAAE;YACf,MAAM,EAAE,CAAC,OAAY,EAAE,EAAE;gBACvB,MAAM,cAAc,GAAG,OAAO,CAAC;gBAE/B,OAAO,qCAAqC,CAAC,cAAc,CAAC,CAAC;YAC/D,CAAC;YACD,QAAQ,EAAE,CAAC,OAAY,EAAE,EAAE;gBACzB,MAAM,eAAe,GAAG,OAAO,CAAC;gBAEhC,OAAO,uCAAuC,CAAC,eAAe,CAAC,CAAC;YAClE,CAAC;SACF;KACF;IAED;QACE,IAAI,EAAE,kBAAkB;QACxB,sBAAsB,EAAE,iBAAiB;QACzC,eAAe,EAAE;YACf,MAAM,EAAE,CAAC,OAAY,EAAE,EAAE;gBACvB,MAAM,cAAc,GAAG,OAAO,CAAC;gBAE/B,OAAO,qCAAqC,CAAC,cAAc,CAAC,CAAC;YAC/D,CAAC;YACD,QAAQ,EAAE,CAAC,OAAY,EAAE,EAAE;gBACzB,MAAM,eAAe,GAAG,OAAO,CAAC;gBAEhC,OAAO,uCAAuC,CAAC,eAAe,CAAC,CAAC;YAClE,CAAC;SACF;KACF;IAED;QACE,IAAI,EAAE,gBAAgB;QACtB,sBAAsB,EAAE,kBAAkB;QAC1C,eAAe,EAAE;YACf,MAAM,EAAE,CAAC,OAAY,EAAE,EAAE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ces-automations-v1-trigger-provider.public.js","sourceRoot":"","sources":["../../../src/interfaces-automations-v1-trigger-provider.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAUzD,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAiBjD,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CA6CnD,8BAA8B,EAAE;IACjC;QACE,IAAI,EAAE,uBAAuB;QAC7B,sBAAsB,EAAE,yBAAyB;QACjD,eAAe,EAAE;YACf,MAAM,EAAE,CAAC,OAAY,EAAE,EAAE;gBACvB,MAAM,cAAc,GAAG,OAAO,CAAC;gBAE/B,OAAO,qCAAqC,CAAC,cAAc,CAAC,CAAC;YAC/D,CAAC;YACD,QAAQ,EAAE,CAAC,OAAY,EAAE,EAAE;gBACzB,MAAM,eAAe,GAAG,OAAO,CAAC;gBAEhC,OAAO,uCAAuC,CAAC,eAAe,CAAC,CAAC;YAClE,CAAC;SACF;KACF;IAED;QACE,IAAI,EAAE,kBAAkB;QACxB,sBAAsB,EAAE,iBAAiB;QACzC,eAAe,EAAE;YACf,MAAM,EAAE,CAAC,OAAY,EAAE,EAAE;gBACvB,MAAM,cAAc,GAAG,OAAO,CAAC;gBAE/B,OAAO,qCAAqC,CAAC,cAAc,CAAC,CAAC;YAC/D,CAAC;YACD,QAAQ,EAAE,CAAC,OAAY,EAAE,EAAE;gBACzB,MAAM,eAAe,GAAG,OAAO,CAAC;gBAEhC,OAAO,uCAAuC,CAAC,eAAe,CAAC,CAAC;YAClE,CAAC;SACF;KACF;IAED;QACE,IAAI,EAAE,gBAAgB;QACtB,sBAAsB,EAAE,kBAAkB;QAC1C,eAAe,EAAE;YACf,MAAM,EAAE,CAAC,OAAY,EAAE,EAAE;gBACvB,MAAM,cAAc,GAAG,OAAO,CAAC;gBAE/B,OAAO,qCAAqC,CAAC,cAAc,CAAC,CAAC;YAC/D,CAAC;YACD,QAAQ,EAAE,CAAC,OAAY,EAAE,EAAE;gBACzB,MAAM,eAAe,GAAG,OAAO,CAAC;gBAEhC,OAAO,uCAAuC,CAAC,eAAe,CAAC,CAAC;YAClE,CAAC;SACF;KACF;CACF,CAAC,CAAC"}
@@ -1,15 +1,29 @@
1
1
  export interface ValidateConfigurationRequest {
2
- /** Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`. */
2
+ /**
3
+ * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.
4
+ * @minLength 1
5
+ * @maxLength 100
6
+ */
3
7
  triggerKey: string;
4
- /** Current selection state of the trigger's filters. */
8
+ /**
9
+ * Current selection state of the trigger's filters.
10
+ * @maxSize 5
11
+ */
5
12
  selectedFilterOptions?: SelectedFilterOptions[];
6
13
  /** Trigger configuration mapping that's saved on the automation. */
7
14
  automationConfigMapping?: Record<string, any> | null;
8
15
  }
9
16
  export interface SelectedFilterOptions {
10
- /** Key representing a field from the trigger's [payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema) that has been configured as an [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection). For example `formId`. */
17
+ /**
18
+ * Key representing a field from the trigger's [payload schema](https://dev.wix.com/docs/rest/business-management/automations/triggers/the-trigger-payload-schema) that has been configured as an [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection). For example `formId`.
19
+ * @minLength 1
20
+ * @maxLength 110
21
+ */
11
22
  fieldKey?: string;
12
- /** Values selected for the filter field. */
23
+ /**
24
+ * Values selected for the filter field.
25
+ * @maxSize 100
26
+ */
13
27
  values?: string[];
14
28
  }
15
29
  export interface ValidateConfigurationResponse {
@@ -31,9 +45,16 @@ export interface ProviderConfigurationError {
31
45
  title?: string;
32
46
  }
33
47
  export interface GetDynamicSchemaRequest {
34
- /** Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`. */
48
+ /**
49
+ * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.
50
+ * @minLength 1
51
+ * @maxLength 100
52
+ */
35
53
  triggerKey: string;
36
- /** Current selection state of the trigger's filters. */
54
+ /**
55
+ * Current selection state of the trigger's filters.
56
+ * @maxSize 5
57
+ */
37
58
  selectedFilterOptions?: SelectedFilterOptions[];
38
59
  }
39
60
  export interface GetDynamicSchemaResponse {
@@ -41,9 +62,16 @@ export interface GetDynamicSchemaResponse {
41
62
  dynamicSchema?: Record<string, any> | null;
42
63
  }
43
64
  export interface RefreshPayloadRequest {
44
- /** Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`. */
65
+ /**
66
+ * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.
67
+ * @minLength 1
68
+ * @maxLength 100
69
+ */
45
70
  triggerKey?: string;
46
- /** ID of the related resource in GUID format. */
71
+ /**
72
+ * ID of the related resource in GUID format.
73
+ * @format GUID
74
+ */
47
75
  externalEntityId?: string | null;
48
76
  /** Payload to update. */
49
77
  payload: Record<string, any> | null;
@@ -69,6 +97,7 @@ export interface Automation extends AutomationOriginInfoOneOf {
69
97
  preinstalledInfo?: PreinstalledOrigin;
70
98
  /**
71
99
  * Automation ID.
100
+ * @format GUID
72
101
  * @readonly
73
102
  */
74
103
  _id?: string | null;
@@ -83,6 +112,7 @@ export interface Automation extends AutomationOriginInfoOneOf {
83
112
  revision?: string | null;
84
113
  /**
85
114
  * Information about the creator of the automation.
115
+ * @immutable
86
116
  * @readonly
87
117
  */
88
118
  createdBy?: AuditInfo;
@@ -101,13 +131,23 @@ export interface Automation extends AutomationOriginInfoOneOf {
101
131
  * @readonly
102
132
  */
103
133
  _updatedDate?: Date | null;
104
- /** Automation name that is displayed on the user's site. */
134
+ /**
135
+ * Automation name that is displayed on the user's site.
136
+ * @minLength 1
137
+ * @maxLength 500
138
+ */
105
139
  name?: string;
106
- /** Automation description. */
140
+ /**
141
+ * Automation description.
142
+ * @maxLength 2000
143
+ */
107
144
  description?: string | null;
108
145
  /** Object that defines the automation's trigger, actions, and activation status. */
109
146
  configuration?: AutomationConfiguration;
110
- /** Defines how the automation was added to the site. */
147
+ /**
148
+ * Defines how the automation was added to the site.
149
+ * @immutable
150
+ */
111
151
  origin?: Origin;
112
152
  /** Automation settings. */
113
153
  settings?: AutomationSettings;
@@ -116,7 +156,10 @@ export interface Automation extends AutomationOriginInfoOneOf {
116
156
  * @readonly
117
157
  */
118
158
  draftInfo?: DraftInfo;
119
- /** Namespace */
159
+ /**
160
+ * Namespace
161
+ * @maxLength 50
162
+ */
120
163
  namespace?: string | null;
121
164
  /** Extended Fields */
122
165
  extendedFields?: ExtendedFields;
@@ -132,11 +175,15 @@ export interface ActionSettings {
132
175
  /**
133
176
  * List of actions that cannot be deleted.
134
177
  * Default: Empty. All actions are deletable by default.
178
+ * @maxSize 30
179
+ * @format GUID
135
180
  */
136
181
  permanentActionIds?: string[];
137
182
  /**
138
183
  * List of actions that cannot be edited.
139
184
  * Default: Empty. All actions are editable by default.
185
+ * @maxSize 30
186
+ * @format GUID
140
187
  */
141
188
  readonlyActionIds?: string[];
142
189
  /** Whether the option to add a delay is disabled for the automation. */
@@ -151,20 +198,35 @@ export declare enum Domain {
151
198
  WIX = "WIX"
152
199
  }
153
200
  export interface Enrichment {
154
- /** Enrichment input mappings. */
201
+ /**
202
+ * Enrichment input mappings.
203
+ * @maxSize 2
204
+ */
155
205
  inputMappings?: Record<string, any>[] | null;
156
206
  }
157
207
  export interface AuditInfo extends AuditInfoIdOneOf {
158
- /** User ID. */
208
+ /**
209
+ * User ID.
210
+ * @format GUID
211
+ */
159
212
  userId?: string;
160
- /** Application ID. */
213
+ /**
214
+ * Application ID.
215
+ * @format GUID
216
+ */
161
217
  appId?: string;
162
218
  }
163
219
  /** @oneof */
164
220
  export interface AuditInfoIdOneOf {
165
- /** User ID. */
221
+ /**
222
+ * User ID.
223
+ * @format GUID
224
+ */
166
225
  userId?: string;
167
- /** Application ID. */
226
+ /**
227
+ * Application ID.
228
+ * @format GUID
229
+ */
168
230
  appId?: string;
169
231
  }
170
232
  /** Automation runtime configuration */
@@ -173,7 +235,11 @@ export interface AutomationConfiguration {
173
235
  status?: Status;
174
236
  /** Automation trigger configuration. */
175
237
  trigger?: Trigger;
176
- /** List of IDs of root actions. Root actions are the first actions to run after the trigger. The actions in the list run in parallel. */
238
+ /**
239
+ * List of IDs of root actions. Root actions are the first actions to run after the trigger. The actions in the list run in parallel.
240
+ * @maxSize 20
241
+ * @format GUID
242
+ */
177
243
  rootActionIds?: string[];
178
244
  /**
179
245
  * Map of all actions that the automation may execute.
@@ -190,36 +256,62 @@ export declare enum TimeUnit {
190
256
  MONTHS = "MONTHS"
191
257
  }
192
258
  export interface Filter {
193
- /** Filter ID. */
259
+ /**
260
+ * Filter ID.
261
+ * @format GUID
262
+ */
194
263
  _id?: string;
195
- /** Field key from the payload schema, for example "formId". */
264
+ /**
265
+ * Field key from the payload schema, for example "formId".
266
+ * @minLength 1
267
+ * @maxLength 110
268
+ */
196
269
  fieldKey?: string;
197
- /** Filter expression that evaluates to a boolean. */
270
+ /**
271
+ * Filter expression that evaluates to a boolean.
272
+ * @maxLength 2500
273
+ */
198
274
  filterExpression?: string;
199
275
  }
200
276
  export interface FutureDateActivationOffset {
201
277
  /**
202
278
  * The offset value. The value is always taken as negative, so that the automation runs before the trigger date.
203
279
  * To create an offset that causes the automation to run after the trigger date, use a delay action.
280
+ * @maxLength 1000
204
281
  */
205
282
  preScheduledEventOffsetExpression?: string;
206
283
  /** Time unit for the scheduled event offset. */
207
284
  scheduledEventOffsetTimeUnit?: TimeUnit;
208
285
  }
209
286
  export interface RateLimit {
210
- /** Value expressing the maximum number of times the trigger can be activated. */
287
+ /**
288
+ * Value expressing the maximum number of times the trigger can be activated.
289
+ * @maxLength 1000
290
+ */
211
291
  maxActivationsExpression?: string;
212
- /** Duration of the rate limiting window in the selected time unit. If no value is set, the rate limit is permanent. */
292
+ /**
293
+ * Duration of the rate limiting window in the selected time unit. If no value is set, the rate limit is permanent.
294
+ * @maxLength 1000
295
+ */
213
296
  durationExpression?: string | null;
214
297
  /** Time unit for the rate limit duration. */
215
298
  durationTimeUnit?: TimeUnit;
216
- /** Unique identifier of each activation, by which rate limiter will count activations. */
299
+ /**
300
+ * Unique identifier of each activation, by which rate limiter will count activations.
301
+ * @minLength 1
302
+ * @maxLength 400
303
+ */
217
304
  uniqueIdentifierExpression?: string | null;
218
305
  }
219
306
  export interface ConditionExpressionGroup {
220
307
  /** Expression group operator. */
221
308
  operator?: Operator;
222
- /** List of boolean expressions to be evaluated with the given operator. */
309
+ /**
310
+ * List of boolean expressions to be evaluated with the given operator.
311
+ * @minSize 1
312
+ * @maxSize 20
313
+ * @maxLength 2500
314
+ */
223
315
  booleanExpressions?: string[];
224
316
  }
225
317
  export declare enum Operator {
@@ -244,9 +336,16 @@ export declare enum Type {
244
336
  OUTPUT = "OUTPUT"
245
337
  }
246
338
  export interface AppDefinedAction {
247
- /** ID of the app that defines the action. */
339
+ /**
340
+ * ID of the app that defines the action.
341
+ * @format GUID
342
+ */
248
343
  appId?: string;
249
- /** Action key. */
344
+ /**
345
+ * Action key.
346
+ * @minLength 1
347
+ * @maxLength 100
348
+ */
250
349
  actionKey?: string;
251
350
  /** Action input mapping. */
252
351
  inputMapping?: Record<string, any> | null;
@@ -254,23 +353,43 @@ export interface AppDefinedAction {
254
353
  * Array of conditions determining whether to skip the action in the automation flow.
255
354
  * The action will be skipped if any of the expression groups evaluate to `true`.
256
355
  * Actions following a skipped action will still run.
356
+ * @maxSize 10
257
357
  */
258
358
  skipConditionOrExpressionGroups?: ConditionExpressionGroup[];
259
- /** List of IDs of actions to run in parallel once the action completes. */
359
+ /**
360
+ * List of IDs of actions to run in parallel once the action completes.
361
+ * @maxSize 20
362
+ * @format GUID
363
+ */
260
364
  postActionIds?: string[];
261
365
  /** Optional output schema of the action. It will be used instead the action schema in case it's provided. */
262
366
  overrideOutputSchema?: Record<string, any> | null;
263
367
  }
264
368
  export interface ConditionAction {
265
- /** The condition evaluates to `true` if either of the expression groups evaluate to `true`. */
369
+ /**
370
+ * The condition evaluates to `true` if either of the expression groups evaluate to `true`.
371
+ * @minSize 1
372
+ * @maxSize 10
373
+ */
266
374
  orExpressionGroups?: ConditionExpressionGroup[];
267
- /** List of IDs of actions to run when the entire condition is evaluated to `true`. */
375
+ /**
376
+ * List of IDs of actions to run when the entire condition is evaluated to `true`.
377
+ * @maxSize 20
378
+ * @format GUID
379
+ */
268
380
  truePostActionIds?: string[];
269
- /** List of IDs of actions to run when the entire condition is evaluated to `false`. */
381
+ /**
382
+ * List of IDs of actions to run when the entire condition is evaluated to `false`.
383
+ * @maxSize 20
384
+ * @format GUID
385
+ */
270
386
  falsePostActionIds?: string[];
271
387
  }
272
388
  export interface DelayAction {
273
- /** Value expressing the amount of time to wait from a specific date or from the time the action is executed. */
389
+ /**
390
+ * Value expressing the amount of time to wait from a specific date or from the time the action is executed.
391
+ * @maxLength 1000
392
+ */
274
393
  offsetExpression?: string | null;
275
394
  /** Time unit for delay offset. */
276
395
  offsetTimeUnit?: TimeUnit;
@@ -278,24 +397,41 @@ export interface DelayAction {
278
397
  * The action due date. If defined without an offset, the automation will wait until this date to execute the next step.
279
398
  * If an offset is defined, it's calculated from this date.
280
399
  * The date is expressed in the number of milliseconds since the Unix Epoch (1 January, 1970 UTC).
400
+ * @maxLength 1000
281
401
  */
282
402
  dueDateEpochExpression?: string | null;
283
- /** List of IDs of actions to run in parallel after the delay. */
403
+ /**
404
+ * List of IDs of actions to run in parallel after the delay.
405
+ * @maxSize 20
406
+ * @format GUID
407
+ */
284
408
  postActionIds?: string[];
285
409
  }
286
410
  export interface RateLimitAction {
287
- /** The maximum number of activations allowed for the action. */
411
+ /**
412
+ * The maximum number of activations allowed for the action.
413
+ * @maxLength 1000
414
+ */
288
415
  maxActivationsExpression?: string;
289
416
  /**
290
417
  * Duration of the rate limiting window, expressed in selected time unit.
291
418
  * If no value is set, then there is no time limit on the rate limiter.
419
+ * @maxLength 1000
292
420
  */
293
421
  rateLimitDurationExpression?: string | null;
294
422
  /** Time unit for the rate limit duration. */
295
423
  rateLimitDurationTimeUnit?: TimeUnit;
296
- /** Unique identifier of each activation by which rate limiter counts activations. */
424
+ /**
425
+ * Unique identifier of each activation by which rate limiter counts activations.
426
+ * @minLength 1
427
+ * @maxLength 400
428
+ */
297
429
  uniqueIdentifierExpression?: string | null;
298
- /** List of IDs of actions to run in parallel once the action completes. */
430
+ /**
431
+ * List of IDs of actions to run in parallel once the action completes.
432
+ * @maxSize 20
433
+ * @format GUID
434
+ */
299
435
  postActionIds?: string[];
300
436
  }
301
437
  export interface SetVariablesAction {
@@ -309,7 +445,11 @@ export interface SetVariablesAction {
309
445
  * could be string instead of Struct (and introduce some compression to minimize the size of it)
310
446
  */
311
447
  outputSchema?: Record<string, any> | null;
312
- /** List of IDs of actions to run in parallel after variable initialization. */
448
+ /**
449
+ * List of IDs of actions to run in parallel after variable initialization.
450
+ * @maxSize 20
451
+ * @format GUID
452
+ */
313
453
  postActionIds?: string[];
314
454
  }
315
455
  export interface OutputAction {
@@ -325,13 +465,21 @@ export declare enum Status {
325
465
  INACTIVE = "INACTIVE"
326
466
  }
327
467
  export interface Trigger {
328
- /** ID of the app that defines the trigger. */
468
+ /**
469
+ * ID of the app that defines the trigger.
470
+ * @format GUID
471
+ */
329
472
  appId?: string;
330
- /** Trigger key. */
473
+ /**
474
+ * Trigger key.
475
+ * @minLength 1
476
+ * @maxLength 100
477
+ */
331
478
  triggerKey?: string;
332
479
  /**
333
480
  * List of filters on schema fields.
334
481
  * In order for the automation to run, all filter expressions must evaluate to `true` for a given payload.
482
+ * @maxSize 5
335
483
  */
336
484
  filters?: Filter[];
337
485
  /** Defines the time offset between the trigger date and when the automation runs. */
@@ -356,7 +504,10 @@ export interface Action extends ActionInfoOneOf {
356
504
  delayInfo?: DelayAction;
357
505
  /** Rate-limiting action. */
358
506
  rateLimitInfo?: RateLimitAction;
359
- /** Action ID. If not specified, a new ID is generated. */
507
+ /**
508
+ * Action ID. If not specified, a new ID is generated.
509
+ * @format GUID
510
+ */
360
511
  _id?: string | null;
361
512
  /** Action type. */
362
513
  type?: Type;
@@ -366,6 +517,8 @@ export interface Action extends ActionInfoOneOf {
366
517
  * generated automatically.
367
518
  * If the action has output, the output will be available in the payload under this name.
368
519
  * If the user has multiple actions with the same appId and actionKey, previous action output will be overwritten.
520
+ * @minLength 1
521
+ * @maxLength 100
369
522
  */
370
523
  namespace?: string | null;
371
524
  }
@@ -393,13 +546,22 @@ export declare enum Origin {
393
546
  RECIPE = "RECIPE"
394
547
  }
395
548
  export interface ApplicationOrigin {
396
- /** Application ID. */
549
+ /**
550
+ * Application ID.
551
+ * @format GUID
552
+ */
397
553
  appId?: string;
398
554
  }
399
555
  export interface PreinstalledOrigin {
400
- /** ID of the app that defines the preinstalled automation. */
556
+ /**
557
+ * ID of the app that defines the preinstalled automation.
558
+ * @format GUID
559
+ */
401
560
  appId?: string;
402
- /** Application component ID. */
561
+ /**
562
+ * Application component ID.
563
+ * @format GUID
564
+ */
403
565
  componentId?: string;
404
566
  /** Application component version. */
405
567
  componentVersion?: number;
@@ -409,6 +571,7 @@ export interface PreinstalledOrigin {
409
571
  * preinstalled automation is used.
410
572
  *
411
573
  * Default: `false`
574
+ * @immutable
412
575
  * @readonly
413
576
  */
414
577
  override?: boolean | null;
@@ -440,6 +603,7 @@ export interface AutomationSettings {
440
603
  export interface DraftInfo {
441
604
  /**
442
605
  * Optional - automationId of the original automation.
606
+ * @format GUID
443
607
  * @readonly
444
608
  */
445
609
  originalAutomationId?: string | null;
@@ -462,7 +626,10 @@ export interface ExtendedFields {
462
626
  export interface OnAutomationSavedResponse {
463
627
  }
464
628
  export interface OnAutomationDeletedRequest {
465
- /** ID of the deleted automation. */
629
+ /**
630
+ * ID of the deleted automation.
631
+ * @format GUID
632
+ */
466
633
  automationId: string;
467
634
  }
468
635
  export interface OnAutomationDeletedResponse {
@@ -551,13 +718,19 @@ export interface TriggerProviderSPIConfig {
551
718
  export interface Context {
552
719
  /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
553
720
  requestId?: string | null;
554
- /** [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code. */
721
+ /**
722
+ * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.
723
+ * @format CURRENCY
724
+ */
555
725
  currency?: string | null;
556
726
  /** An object that describes the identity that triggered this request. */
557
727
  identity?: IdentificationData;
558
728
  /** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
559
729
  languages?: string[];
560
- /** The service provider app's instance ID. */
730
+ /**
731
+ * The service provider app's instance ID.
732
+ * @format GUID
733
+ */
561
734
  instanceId?: string | null;
562
735
  }
563
736
  export declare enum IdentityType {
@@ -568,25 +741,49 @@ export declare enum IdentityType {
568
741
  APP = "APP"
569
742
  }
570
743
  export interface IdentificationData extends IdentificationDataIdOneOf {
571
- /** ID of a site visitor that has not logged in to the site. */
744
+ /**
745
+ * ID of a site visitor that has not logged in to the site.
746
+ * @format GUID
747
+ */
572
748
  anonymousVisitorId?: string;
573
- /** ID of a site visitor that has logged in to the site. */
749
+ /**
750
+ * ID of a site visitor that has logged in to the site.
751
+ * @format GUID
752
+ */
574
753
  memberId?: string;
575
- /** ID of a Wix user (site owner, contributor, etc.). */
754
+ /**
755
+ * ID of a Wix user (site owner, contributor, etc.).
756
+ * @format GUID
757
+ */
576
758
  wixUserId?: string;
577
- /** ID of an app. */
759
+ /**
760
+ * ID of an app.
761
+ * @format GUID
762
+ */
578
763
  appId?: string;
579
764
  /** @readonly */
580
765
  identityType?: IdentityType;
581
766
  }
582
767
  /** @oneof */
583
768
  export interface IdentificationDataIdOneOf {
584
- /** ID of a site visitor that has not logged in to the site. */
769
+ /**
770
+ * ID of a site visitor that has not logged in to the site.
771
+ * @format GUID
772
+ */
585
773
  anonymousVisitorId?: string;
586
- /** ID of a site visitor that has logged in to the site. */
774
+ /**
775
+ * ID of a site visitor that has logged in to the site.
776
+ * @format GUID
777
+ */
587
778
  memberId?: string;
588
- /** ID of a Wix user (site owner, contributor, etc.). */
779
+ /**
780
+ * ID of a Wix user (site owner, contributor, etc.).
781
+ * @format GUID
782
+ */
589
783
  wixUserId?: string;
590
- /** ID of an app. */
784
+ /**
785
+ * ID of an app.
786
+ * @format GUID
787
+ */
591
788
  appId?: string;
592
789
  }
@@ -1 +1 @@
1
- {"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../src/service-plugins-types.ts"],"names":[],"mappings":"AA8JA,MAAM,CAAN,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,6BAA6B;IAC7B,uBAAa,CAAA;IACb,kBAAkB;IAClB,qBAAW,CAAA;AACb,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB;AAqCD,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mDAAuC,CAAA;IACvC,+BAAmB,CAAA;IACnB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,6BAAiB,CAAA;AACnB,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AAuCD,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,iDAAqC,CAAA;IACrC,qBAAS,CAAA;IACT,uBAAW,CAAA;AACb,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB;AAED,MAAM,CAAN,IAAY,IAeX;AAfD,WAAY,IAAI;IACd,2EAA2E;IAC3E,mDAA2C,CAAA;IAC3C,0BAA0B;IAC1B,mCAA2B,CAAA;IAC3B,wBAAwB;IACxB,+BAAuB,CAAA;IACvB,oBAAoB;IACpB,uBAAe,CAAA;IACf,wBAAwB;IACxB,iCAAyB,CAAA;IACzB,4BAA4B;IAC5B,uCAA+B,CAAA;IAC/B,qBAAqB;IACrB,yBAAiB,CAAA;AACnB,CAAC,EAfW,IAAI,KAAJ,IAAI,QAef;AAiFD,MAAM,CAAN,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,aAAa;IACb,2CAAiC,CAAA;IACjC,0EAA0E;IAC1E,2BAAiB,CAAA;IACjB,uCAAuC;IACvC,+BAAqB,CAAA;AACvB,CAAC,EAPW,MAAM,KAAN,MAAM,QAOjB;AA6DD,MAAM,CAAN,IAAY,MAWX;AAXD,WAAY,MAAM;IAChB,qCAAqC;IACrC,2CAAiC,CAAA;IACjC,+BAA+B;IAC/B,uBAAa,CAAA;IACb,yDAAyD;IACzD,qCAA2B,CAAA;IAC3B,2CAA2C;IAC3C,uCAA6B,CAAA;IAC7B,wCAAwC;IACxC,2BAAiB,CAAA;AACnB,CAAC,EAXW,MAAM,KAAN,MAAM,QAWjB;AAmLD,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,uDAAuC,CAAA;IACvC,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB"}
1
+ {"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../src/service-plugins-types.ts"],"names":[],"mappings":"AA6MA,MAAM,CAAN,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,6BAA6B;IAC7B,uBAAa,CAAA;IACb,kBAAkB;IAClB,qBAAW,CAAA;AACb,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB;AAwDD,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,mDAAuC,CAAA;IACvC,+BAAmB,CAAA;IACnB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,6BAAiB,CAAA;AACnB,CAAC,EAPW,QAAQ,KAAR,QAAQ,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avedResponse, OnAutomationDeletedResponse } from './src/service-plugins-types.js';
2
- import { ValidateConfigurationEnvelope, GetDynamicSchemaEnvelope, RefreshPayloadEnvelope, OnAutomationSavedEnvelope, OnAutomationDeletedEnvelope } from './src/interfaces-automations-v1-trigger-provider.public.js';
1
+ import { ValidateConfigurationResponse, GetDynamicSchemaResponse, RefreshPayloadResponse } from './src/service-plugins-types.js';
2
+ import { ValidateConfigurationEnvelope, GetDynamicSchemaEnvelope, RefreshPayloadEnvelope } from './src/interfaces-automations-v1-trigger-provider.public.js';
3
3
  export * from './src/service-plugins-error-classes';
4
4
  export * from './src/service-plugins-types';
5
- export { ValidateConfigurationEnvelope, GetDynamicSchemaEnvelope, RefreshPayloadEnvelope, OnAutomationSavedEnvelope, OnAutomationDeletedEnvelope, };
5
+ export { ValidateConfigurationEnvelope, GetDynamicSchemaEnvelope, RefreshPayloadEnvelope, };
6
6
  /**
7
7
  * This endpoint allows you to run your own logic to validate trigger fields. Implement this endpoint if you need to perform extra validation on top of
8
8
  * the Wix validation process.
@@ -41,13 +41,3 @@ export declare function getDynamicSchema(payload: GetDynamicSchemaEnvelope): Get
41
41
  * to the action.
42
42
  */
43
43
  export declare function refreshPayload(payload: RefreshPayloadEnvelope): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;
44
- /**
45
- * When a Wix user saves an automation, Wix sends the updated automation to your service endpoint, so that you can perform any necessary logic
46
- * in your service.
47
- */
48
- export declare function onAutomationSaved(payload: OnAutomationSavedEnvelope): OnAutomationSavedResponse | Promise<OnAutomationSavedResponse>;
49
- /**
50
- * When a Wix user deletes an automation, Wix sends the automation ID to your service endpoint, so that you can perform any necessary logic
51
- * in your service. For example, you may want to delete data related to that Wix user if the trigger isn't used on the site.
52
- */
53
- export declare function onAutomationDeleted(payload: OnAutomationDeletedEnvelope): OnAutomationDeletedResponse | Promise<OnAutomationDeletedResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAeA,sEAAoD;AACpD,8DAA4C"}
1
+ {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAWA,sEAAoD;AACpD,8DAA4C"}