@wix/auto_sdk_automations_trigger-provider 1.0.11 → 1.0.12

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 (81) hide show
  1. package/build/{cjs/src/service-plugins-types.d.ts → index.d.mts} +131 -56
  2. package/build/{internal/cjs/src/service-plugins-types.d.ts → index.d.ts} +131 -56
  3. package/build/index.js +177 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +143 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/{es/src/service-plugins-types.d.ts → internal/index.d.mts} +131 -56
  8. package/build/internal/{es/src/service-plugins-types.d.ts → index.d.ts} +131 -56
  9. package/build/internal/index.js +177 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +143 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/package.json +12 -11
  14. package/build/cjs/index.d.ts +0 -3
  15. package/build/cjs/index.js +0 -20
  16. package/build/cjs/index.js.map +0 -1
  17. package/build/cjs/index.typings.d.ts +0 -43
  18. package/build/cjs/index.typings.js +0 -19
  19. package/build/cjs/index.typings.js.map +0 -1
  20. package/build/cjs/src/interfaces-automations-v1-trigger-provider.context.d.ts +0 -5
  21. package/build/cjs/src/interfaces-automations-v1-trigger-provider.context.js +0 -9
  22. package/build/cjs/src/interfaces-automations-v1-trigger-provider.context.js.map +0 -1
  23. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.d.ts +0 -52
  24. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.js +0 -50
  25. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.js.map +0 -1
  26. package/build/cjs/src/service-plugins-error-classes.d.ts +0 -17
  27. package/build/cjs/src/service-plugins-error-classes.js +0 -21
  28. package/build/cjs/src/service-plugins-error-classes.js.map +0 -1
  29. package/build/cjs/src/service-plugins-types.js +0 -84
  30. package/build/cjs/src/service-plugins-types.js.map +0 -1
  31. package/build/es/index.d.ts +0 -3
  32. package/build/es/index.js +0 -4
  33. package/build/es/index.js.map +0 -1
  34. package/build/es/index.typings.d.ts +0 -43
  35. package/build/es/index.typings.js +0 -3
  36. package/build/es/index.typings.js.map +0 -1
  37. package/build/es/src/interfaces-automations-v1-trigger-provider.context.d.ts +0 -5
  38. package/build/es/src/interfaces-automations-v1-trigger-provider.context.js +0 -6
  39. package/build/es/src/interfaces-automations-v1-trigger-provider.context.js.map +0 -1
  40. package/build/es/src/interfaces-automations-v1-trigger-provider.public.d.ts +0 -52
  41. package/build/es/src/interfaces-automations-v1-trigger-provider.public.js +0 -47
  42. package/build/es/src/interfaces-automations-v1-trigger-provider.public.js.map +0 -1
  43. package/build/es/src/service-plugins-error-classes.d.ts +0 -17
  44. package/build/es/src/service-plugins-error-classes.js +0 -17
  45. package/build/es/src/service-plugins-error-classes.js.map +0 -1
  46. package/build/es/src/service-plugins-types.js +0 -81
  47. package/build/es/src/service-plugins-types.js.map +0 -1
  48. package/build/internal/cjs/index.d.ts +0 -3
  49. package/build/internal/cjs/index.js +0 -20
  50. package/build/internal/cjs/index.js.map +0 -1
  51. package/build/internal/cjs/index.typings.d.ts +0 -43
  52. package/build/internal/cjs/index.typings.js +0 -19
  53. package/build/internal/cjs/index.typings.js.map +0 -1
  54. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.context.d.ts +0 -5
  55. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.context.js +0 -9
  56. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.context.js.map +0 -1
  57. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.d.ts +0 -52
  58. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.js +0 -50
  59. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.js.map +0 -1
  60. package/build/internal/cjs/src/service-plugins-error-classes.d.ts +0 -17
  61. package/build/internal/cjs/src/service-plugins-error-classes.js +0 -21
  62. package/build/internal/cjs/src/service-plugins-error-classes.js.map +0 -1
  63. package/build/internal/cjs/src/service-plugins-types.js +0 -84
  64. package/build/internal/cjs/src/service-plugins-types.js.map +0 -1
  65. package/build/internal/es/index.d.ts +0 -3
  66. package/build/internal/es/index.js +0 -4
  67. package/build/internal/es/index.js.map +0 -1
  68. package/build/internal/es/index.typings.d.ts +0 -43
  69. package/build/internal/es/index.typings.js +0 -3
  70. package/build/internal/es/index.typings.js.map +0 -1
  71. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.context.d.ts +0 -5
  72. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.context.js +0 -6
  73. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.context.js.map +0 -1
  74. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.d.ts +0 -52
  75. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.js +0 -47
  76. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.js.map +0 -1
  77. package/build/internal/es/src/service-plugins-error-classes.d.ts +0 -17
  78. package/build/internal/es/src/service-plugins-error-classes.js +0 -17
  79. package/build/internal/es/src/service-plugins-error-classes.js.map +0 -1
  80. package/build/internal/es/src/service-plugins-types.js +0 -81
  81. package/build/internal/es/src/service-plugins-types.js.map +0 -1
@@ -1,4 +1,6 @@
1
- export interface ValidateConfigurationRequest {
1
+ import { ServicePluginDefinition, BuildServicePluginDefinition } from '@wix/sdk-types';
2
+
3
+ interface ValidateConfigurationRequest {
2
4
  /**
3
5
  * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.
4
6
  * @minLength 1
@@ -13,7 +15,7 @@ export interface ValidateConfigurationRequest {
13
15
  /** Trigger configuration mapping that's saved on the automation. */
14
16
  automationConfigMapping?: Record<string, any> | null;
15
17
  }
16
- export interface SelectedFilterOptions {
18
+ interface SelectedFilterOptions {
17
19
  /**
18
20
  * 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
21
  * @minLength 1
@@ -26,13 +28,13 @@ export interface SelectedFilterOptions {
26
28
  */
27
29
  values?: string[];
28
30
  }
29
- export interface ValidateConfigurationResponse {
31
+ interface ValidateConfigurationResponse {
30
32
  /** Whether the trigger configuration is valid. */
31
33
  valid?: boolean;
32
34
  /** Error details for an invalid trigger configuration. */
33
35
  configurationErrors?: ProviderConfigurationError[];
34
36
  }
35
- export interface ProviderConfigurationError {
37
+ interface ProviderConfigurationError {
36
38
  /** Key corresponding to the field in the schema. */
37
39
  fieldKey?: string | null;
38
40
  /** Error message. */
@@ -44,7 +46,7 @@ export interface ProviderConfigurationError {
44
46
  /** Title for the error. */
45
47
  title?: string;
46
48
  }
47
- export interface GetDynamicSchemaRequest {
49
+ interface GetDynamicSchemaRequest {
48
50
  /**
49
51
  * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.
50
52
  * @minLength 1
@@ -57,11 +59,11 @@ export interface GetDynamicSchemaRequest {
57
59
  */
58
60
  selectedFilterOptions?: SelectedFilterOptions[];
59
61
  }
60
- export interface GetDynamicSchemaResponse {
62
+ interface GetDynamicSchemaResponse {
61
63
  /** A [JSON schema](https://json-schema.org/) corresponding to the filter selection sent in the request. */
62
64
  dynamicSchema?: Record<string, any> | null;
63
65
  }
64
- export interface RefreshPayloadRequest {
66
+ interface RefreshPayloadRequest {
65
67
  /**
66
68
  * Trigger key as defined in your app's trigger configuration in the app dashboard. For example, `form_submitted` or `invoice_due`.
67
69
  * @minLength 1
@@ -76,7 +78,7 @@ export interface RefreshPayloadRequest {
76
78
  /** Payload to update. */
77
79
  payload: Record<string, any> | null;
78
80
  }
79
- export interface RefreshPayloadResponse {
81
+ interface RefreshPayloadResponse {
80
82
  /** Updated payload. */
81
83
  payload?: Record<string, any> | null;
82
84
  /**
@@ -86,11 +88,11 @@ export interface RefreshPayloadResponse {
86
88
  */
87
89
  cancelActivation?: boolean | null;
88
90
  }
89
- export interface OnAutomationSavedRequest {
91
+ interface OnAutomationSavedRequest {
90
92
  /** Saved automation. */
91
93
  automation: Automation;
92
94
  }
93
- export interface Automation extends AutomationOriginInfoOneOf {
95
+ interface Automation extends AutomationOriginInfoOneOf {
94
96
  /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
95
97
  applicationInfo?: ApplicationOrigin;
96
98
  /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
@@ -160,13 +162,13 @@ export interface Automation extends AutomationOriginInfoOneOf {
160
162
  archived?: boolean;
161
163
  }
162
164
  /** @oneof */
163
- export interface AutomationOriginInfoOneOf {
165
+ interface AutomationOriginInfoOneOf {
164
166
  /** When the origin of the automation is `APPLICATION`, the details of the app that created it. */
165
167
  applicationInfo?: ApplicationOrigin;
166
168
  /** When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation. */
167
169
  preinstalledInfo?: PreinstalledOrigin;
168
170
  }
169
- export interface ActionSettings {
171
+ interface ActionSettings {
170
172
  /**
171
173
  * Permanent actions. Permanent actions cannot be deleted.
172
174
  *
@@ -196,7 +198,7 @@ export interface ActionSettings {
196
198
  */
197
199
  disableConditionAddition?: boolean;
198
200
  }
199
- export declare enum Domain {
201
+ declare enum Domain {
200
202
  /** User domain (default). */
201
203
  USER = "USER",
202
204
  /** Wix domain. */
@@ -204,14 +206,14 @@ export declare enum Domain {
204
206
  /** Wix account-level domain. */
205
207
  WIX_ACCOUNT = "WIX_ACCOUNT"
206
208
  }
207
- export interface Enrichment {
209
+ interface Enrichment {
208
210
  /**
209
211
  * Enrichment input mappings.
210
212
  * @maxSize 2
211
213
  */
212
214
  inputMappings?: Record<string, any>[] | null;
213
215
  }
214
- export interface AuditInfo extends AuditInfoIdOneOf {
216
+ interface AuditInfo extends AuditInfoIdOneOf {
215
217
  /**
216
218
  * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
217
219
  * @format GUID
@@ -226,7 +228,7 @@ export interface AuditInfo extends AuditInfoIdOneOf {
226
228
  appId?: string;
227
229
  }
228
230
  /** @oneof */
229
- export interface AuditInfoIdOneOf {
231
+ interface AuditInfoIdOneOf {
230
232
  /**
231
233
  * [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#user-id).
232
234
  * @format GUID
@@ -240,7 +242,7 @@ export interface AuditInfoIdOneOf {
240
242
  */
241
243
  appId?: string;
242
244
  }
243
- export interface AutomationConfiguration {
245
+ interface AutomationConfiguration {
244
246
  /** Status of the automation on the site. */
245
247
  status?: Status;
246
248
  /** Trigger configuration. */
@@ -256,7 +258,7 @@ export interface AutomationConfiguration {
256
258
  /** 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. */
257
259
  actions?: Record<string, Action>;
258
260
  }
259
- export declare enum TimeUnit {
261
+ declare enum TimeUnit {
260
262
  UNKNOWN_TIME_UNIT = "UNKNOWN_TIME_UNIT",
261
263
  /** Minutes. */
262
264
  MINUTES = "MINUTES",
@@ -269,7 +271,7 @@ export declare enum TimeUnit {
269
271
  /** Months. */
270
272
  MONTHS = "MONTHS"
271
273
  }
272
- export interface Filter {
274
+ interface Filter {
273
275
  /**
274
276
  * Filter ID.
275
277
  * @format GUID
@@ -291,7 +293,7 @@ export interface Filter {
291
293
  */
292
294
  filterExpression?: string;
293
295
  }
294
- export interface FutureDateActivationOffset {
296
+ interface FutureDateActivationOffset {
295
297
  /**
296
298
  * Amount of time before the trigger to run the automation.
297
299
  *
@@ -302,7 +304,7 @@ export interface FutureDateActivationOffset {
302
304
  /** Unit in which to set the action offset. */
303
305
  scheduledEventOffsetTimeUnit?: TimeUnit;
304
306
  }
305
- export interface RateLimit {
307
+ interface RateLimit {
306
308
  /**
307
309
  * Maximum number of times the trigger can be activated.
308
310
  * @maxLength 1000
@@ -324,7 +326,7 @@ export interface RateLimit {
324
326
  */
325
327
  uniqueIdentifierExpression?: string | null;
326
328
  }
327
- export interface FilterValueSelection {
329
+ interface FilterValueSelection {
328
330
  /**
329
331
  * Values that can help the user filter certain automations. Specify values in the following format: `<filter_id>__<selected_value>`.
330
332
  * @maxLength 80
@@ -332,7 +334,7 @@ export interface FilterValueSelection {
332
334
  */
333
335
  selectedFilterValues?: string[];
334
336
  }
335
- export interface ConditionExpressionGroup {
337
+ interface ConditionExpressionGroup {
336
338
  /** Logical operator used to evaluate the condition expressions. */
337
339
  operator?: Operator;
338
340
  /**
@@ -343,7 +345,7 @@ export interface ConditionExpressionGroup {
343
345
  */
344
346
  booleanExpressions?: string[];
345
347
  }
346
- export declare enum Operator {
348
+ declare enum Operator {
347
349
  /** Unknown. */
348
350
  UNKNOWN_OPERATOR = "UNKNOWN_OPERATOR",
349
351
  /** `OR` operator. */
@@ -351,7 +353,7 @@ export declare enum Operator {
351
353
  /** `AND` operator. */
352
354
  AND = "AND"
353
355
  }
354
- export interface CodeSnippet {
356
+ interface CodeSnippet {
355
357
  /** Logical operator used to evaluate the condition expressions. */
356
358
  language?: Language;
357
359
  /**
@@ -360,14 +362,14 @@ export interface CodeSnippet {
360
362
  */
361
363
  code?: string;
362
364
  }
363
- export declare enum Language {
365
+ declare enum Language {
364
366
  /** Unknown. */
365
367
  UNKNOWN_LANGUAGE = "UNKNOWN_LANGUAGE",
366
368
  /** `JAVASCRIPT` language. */
367
369
  JAVASCRIPT = "JAVASCRIPT"
368
370
  }
369
371
  /** Path definition */
370
- export interface Path {
372
+ interface Path {
371
373
  /**
372
374
  * Unique path ID.
373
375
  * @format GUID
@@ -385,7 +387,7 @@ export interface Path {
385
387
  */
386
388
  postActionId?: string | null;
387
389
  }
388
- export declare enum Type {
390
+ declare enum Type {
389
391
  /** Based on the trigger. */
390
392
  UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
391
393
  /** 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. */
@@ -397,7 +399,7 @@ export declare enum Type {
397
399
  /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
398
400
  RATE_LIMIT = "RATE_LIMIT"
399
401
  }
400
- export interface AppDefinedAction {
402
+ interface AppDefinedAction {
401
403
  /**
402
404
  * ID of the app that defines the action.
403
405
  * @format GUID
@@ -427,7 +429,7 @@ export interface AppDefinedAction {
427
429
  /** Action output schema. When specified, this replaces the action schema. */
428
430
  overrideOutputSchema?: Record<string, any> | null;
429
431
  }
430
- export interface ConditionAction {
432
+ interface ConditionAction {
431
433
  /**
432
434
  * Condition is `true` if one or more of the expression groups evaluates to `true`.
433
435
  * @minSize 1
@@ -447,7 +449,7 @@ export interface ConditionAction {
447
449
  */
448
450
  falsePostActionIds?: string[];
449
451
  }
450
- export interface CodeConditionAction {
452
+ interface CodeConditionAction {
451
453
  /** 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. */
452
454
  snippet?: CodeSnippet;
453
455
  /**
@@ -463,7 +465,7 @@ export interface CodeConditionAction {
463
465
  */
464
466
  falsePostActionIds?: string[];
465
467
  }
466
- export interface DelayAction {
468
+ interface DelayAction {
467
469
  /**
468
470
  * Time to wait before running the action. The wait time starts from when the current action completes.
469
471
  *
@@ -487,7 +489,7 @@ export interface DelayAction {
487
489
  */
488
490
  postActionIds?: string[];
489
491
  }
490
- export interface RateLimitAction {
492
+ interface RateLimitAction {
491
493
  /**
492
494
  * Maximum number of times the action can run.
493
495
  * @maxLength 1000
@@ -515,7 +517,7 @@ export interface RateLimitAction {
515
517
  */
516
518
  postActionIds?: string[];
517
519
  }
518
- export interface SetVariablesAction {
520
+ interface SetVariablesAction {
519
521
  /** Output mapping. For example: `{"someField": "{{10}}", "someOtherField": "{{multiply( var('account.points.balance') ;2 )}}" }`. */
520
522
  outputMapping?: Record<string, any> | null;
521
523
  /**
@@ -531,11 +533,11 @@ export interface SetVariablesAction {
531
533
  */
532
534
  postActionIds?: string[];
533
535
  }
534
- export interface OutputAction {
536
+ interface OutputAction {
535
537
  /** Output action output mapping. */
536
538
  outputMapping?: Record<string, any> | null;
537
539
  }
538
- export interface SplitAction {
540
+ interface SplitAction {
539
541
  /**
540
542
  * List of paths to split execution into.
541
543
  * @minSize 2
@@ -543,7 +545,7 @@ export interface SplitAction {
543
545
  */
544
546
  paths?: Path[];
545
547
  }
546
- export declare enum Status {
548
+ declare enum Status {
547
549
  /** Unknown. */
548
550
  UNKNOWN_STATUS = "UNKNOWN_STATUS",
549
551
  /** Active. Active automations can be triggered. */
@@ -551,7 +553,7 @@ export declare enum Status {
551
553
  /** Inactive. Inactive automations cannot be triggered. */
552
554
  INACTIVE = "INACTIVE"
553
555
  }
554
- export interface Trigger {
556
+ interface Trigger {
555
557
  /**
556
558
  * ID of the app that defines the trigger.
557
559
  * @format GUID
@@ -583,7 +585,7 @@ export interface Trigger {
583
585
  /** Trigger schema override. When specified, this replaces the trigger schema. */
584
586
  overrideSchema?: Record<string, any> | null;
585
587
  }
586
- export interface Action extends ActionInfoOneOf {
588
+ interface Action extends ActionInfoOneOf {
587
589
  /** Details of the action when its `type` is `APP_DEFINED`. */
588
590
  appDefinedInfo?: AppDefinedAction;
589
591
  /** Details of the action when its `type` is `CONDITION`. */
@@ -613,7 +615,7 @@ export interface Action extends ActionInfoOneOf {
613
615
  namespace?: string | null;
614
616
  }
615
617
  /** @oneof */
616
- export interface ActionInfoOneOf {
618
+ interface ActionInfoOneOf {
617
619
  /** Details of the action when its `type` is `APP_DEFINED`. */
618
620
  appDefinedInfo?: AppDefinedAction;
619
621
  /** Details of the action when its `type` is `CONDITION`. */
@@ -625,7 +627,7 @@ export interface ActionInfoOneOf {
625
627
  /** Details of the action when its `type` is `RATE_LIMIT`. */
626
628
  rateLimitInfo?: RateLimitAction;
627
629
  }
628
- export interface FilterableAppDefinedActions {
630
+ interface FilterableAppDefinedActions {
629
631
  /**
630
632
  * App-defined action identifiers. Identifiers have the following format: `${appId}_${actionKey}`.
631
633
  * @minSize 1
@@ -635,7 +637,7 @@ export interface FilterableAppDefinedActions {
635
637
  */
636
638
  actionIdentifiers?: string[];
637
639
  }
638
- export declare enum Origin {
640
+ declare enum Origin {
639
641
  /** Default value. */
640
642
  UNKNOWN_ORIGIN = "UNKNOWN_ORIGIN",
641
643
  /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
@@ -645,7 +647,7 @@ export declare enum Origin {
645
647
  /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */
646
648
  PREINSTALLED = "PREINSTALLED"
647
649
  }
648
- export interface ApplicationOrigin {
650
+ interface ApplicationOrigin {
649
651
  /**
650
652
  * [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#app-id).
651
653
  *
@@ -654,7 +656,7 @@ export interface ApplicationOrigin {
654
656
  */
655
657
  appId?: string;
656
658
  }
657
- export interface PreinstalledOrigin {
659
+ interface PreinstalledOrigin {
658
660
  /**
659
661
  * 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).
660
662
  * @format GUID
@@ -675,7 +677,7 @@ export interface PreinstalledOrigin {
675
677
  */
676
678
  override?: boolean | null;
677
679
  }
678
- export interface AutomationSettings {
680
+ interface AutomationSettings {
679
681
  /**
680
682
  * Whether the automation is hidden from users.
681
683
  *
@@ -703,7 +705,7 @@ export interface AutomationSettings {
703
705
  /** Automation action settings. */
704
706
  actionSettings?: ActionSettings;
705
707
  }
706
- export interface DraftInfo {
708
+ interface DraftInfo {
707
709
  /**
708
710
  * ID of the original automation.
709
711
  * @format GUID
@@ -711,11 +713,11 @@ export interface DraftInfo {
711
713
  */
712
714
  originalAutomationId?: string | null;
713
715
  }
714
- export interface Enrichments {
716
+ interface Enrichments {
715
717
  /** Whether the studio site enrichment is wanted. */
716
718
  studioSite?: Enrichment;
717
719
  }
718
- export interface ExtendedFields {
720
+ interface ExtendedFields {
719
721
  /**
720
722
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
721
723
  * The value of each key is structured according to the schema defined when the extended fields were configured.
@@ -726,18 +728,18 @@ export interface ExtendedFields {
726
728
  */
727
729
  namespaces?: Record<string, Record<string, any>>;
728
730
  }
729
- export interface OnAutomationSavedResponse {
731
+ interface OnAutomationSavedResponse {
730
732
  }
731
- export interface OnAutomationDeletedRequest {
733
+ interface OnAutomationDeletedRequest {
732
734
  /**
733
735
  * ID of the deleted automation.
734
736
  * @format GUID
735
737
  */
736
738
  automationId: string;
737
739
  }
738
- export interface OnAutomationDeletedResponse {
740
+ interface OnAutomationDeletedResponse {
739
741
  }
740
- export interface TriggerProviderSPIConfig {
742
+ interface TriggerProviderSPIConfig {
741
743
  /**
742
744
  * The trigger configuration
743
745
  *
@@ -818,7 +820,7 @@ export interface TriggerProviderSPIConfig {
818
820
  * }
819
821
  * ```
820
822
  */
821
- export interface Context {
823
+ interface Context {
822
824
  /** 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. */
823
825
  requestId?: string | null;
824
826
  /**
@@ -836,14 +838,14 @@ export interface Context {
836
838
  */
837
839
  instanceId?: string | null;
838
840
  }
839
- export declare enum IdentityType {
841
+ declare enum IdentityType {
840
842
  UNKNOWN = "UNKNOWN",
841
843
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
842
844
  MEMBER = "MEMBER",
843
845
  WIX_USER = "WIX_USER",
844
846
  APP = "APP"
845
847
  }
846
- export interface IdentificationData extends IdentificationDataIdOneOf {
848
+ interface IdentificationData extends IdentificationDataIdOneOf {
847
849
  /**
848
850
  * ID of a site visitor that has not logged in to the site.
849
851
  * @format GUID
@@ -868,7 +870,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
868
870
  identityType?: IdentityType;
869
871
  }
870
872
  /** @oneof */
871
- export interface IdentificationDataIdOneOf {
873
+ interface IdentificationDataIdOneOf {
872
874
  /**
873
875
  * ID of a site visitor that has not logged in to the site.
874
876
  * @format GUID
@@ -890,3 +892,76 @@ export interface IdentificationDataIdOneOf {
890
892
  */
891
893
  appId?: string;
892
894
  }
895
+
896
+ interface ValidateConfigurationEnvelope {
897
+ request: ValidateConfigurationRequest;
898
+ metadata: Context;
899
+ }
900
+ interface GetDynamicSchemaEnvelope {
901
+ request: GetDynamicSchemaRequest;
902
+ metadata: Context;
903
+ }
904
+ interface RefreshPayloadEnvelope {
905
+ request: RefreshPayloadRequest;
906
+ metadata: Context;
907
+ }
908
+ declare const provideHandlers$1: ServicePluginDefinition<{
909
+ /**
910
+ *
911
+ * 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
912
+ * the Wix validation process.
913
+ *
914
+ * Wix calls Validate Configuration in the following cases:
915
+ *
916
+ * - When a Wix user activates the automation.
917
+ * - When a Wix user selects the automation from the **Your automations** list in the [**Automations**](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations)
918
+ * dashboard.
919
+ * - When a Wix user opens the automation to edit it.
920
+ *
921
+ * If the user configured filters when setting up their automation, these are included in the request.
922
+ * Wix uses the returned response to display an error message to a user if the requested trigger is invalid. */
923
+ validateConfiguration(payload: ValidateConfigurationEnvelope): ValidateConfigurationResponse | Promise<ValidateConfigurationResponse>;
924
+ /**
925
+ *
926
+ * This endpoint returns a [JSON schema](https://json-schema.org/) object
927
+ * that's used to dynamically update the fields available to a Wix user
928
+ * when they configure an [automation](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers/site-automations).
929
+ *
930
+ * Wix calls this endpoint when a user selects an option from an
931
+ * [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection)
932
+ * configured for a trigger.
933
+ * Wix appends the returned schema to the
934
+ * [payload schema](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/payload-schema)
935
+ * you defined for the trigger and makes the fields available to the Wix user's automation. */
936
+ getDynamicSchema(payload: GetDynamicSchemaEnvelope): GetDynamicSchemaResponse | Promise<GetDynamicSchemaResponse>;
937
+ /**
938
+ *
939
+ * If an automation's action is delayed, implement this method to retrieve the latest data in the trigger payload before the action fires.
940
+ *
941
+ * For example, if an automation is triggered but its action is set to fire only 24 hours later, Wix calls Refresh Payload before starting
942
+ * the action. This fetches the latest data in the trigger payload. The returned data can be used to update the trigger payload that is passed
943
+ * to the action. */
944
+ refreshPayload(payload: RefreshPayloadEnvelope): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;
945
+ }>;
946
+
947
+ declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1>;
948
+
949
+ declare class ProviderNotFoundWixError extends Error {
950
+ /** @hidden */
951
+ httpCode: number;
952
+ /** @hidden */
953
+ statusCode: string;
954
+ /** @hidden */
955
+ applicationCode: string;
956
+ /** @hidden */
957
+ name: string;
958
+ /** @hidden */
959
+ errorType: string;
960
+ /** @hidden */
961
+ spiErrorData: object;
962
+ constructor();
963
+ /** @hidden */
964
+ static readonly __type = "wix_spi_error";
965
+ }
966
+
967
+ export { type Action, type ActionInfoOneOf, type ActionSettings, type AppDefinedAction, type ApplicationOrigin, type AuditInfo, type AuditInfoIdOneOf, type Automation, type AutomationConfiguration, type AutomationOriginInfoOneOf, type AutomationSettings, type CodeConditionAction, type CodeSnippet, type ConditionAction, type ConditionExpressionGroup, type Context, type DelayAction, Domain, type DraftInfo, type Enrichment, type Enrichments, type ExtendedFields, type Filter, type FilterValueSelection, type FilterableAppDefinedActions, type FutureDateActivationOffset, type GetDynamicSchemaRequest, type GetDynamicSchemaResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, Language, type OnAutomationDeletedRequest, type OnAutomationDeletedResponse, type OnAutomationSavedRequest, type OnAutomationSavedResponse, Operator, Origin, type OutputAction, type Path, type PreinstalledOrigin, type ProviderConfigurationError, ProviderNotFoundWixError, type RateLimit, type RateLimitAction, type RefreshPayloadRequest, type RefreshPayloadResponse, type SelectedFilterOptions, type SetVariablesAction, type SplitAction, Status, TimeUnit, type Trigger, type TriggerProviderSPIConfig, Type, type ValidateConfigurationRequest, type ValidateConfigurationResponse, provideHandlers, provideHandlers$1 as publicProvideHandlers };