@wix/auto_sdk_automations_trigger-provider 1.0.11 → 1.0.13

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 (77) hide show
  1. package/build/cjs/index.d.ts +967 -3
  2. package/build/cjs/index.js +173 -16
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/{cjs/src/service-plugins-types.d.ts → es/index.d.mts} +131 -56
  5. package/build/es/index.mjs +143 -0
  6. package/build/es/index.mjs.map +1 -0
  7. package/build/internal/cjs/index.d.ts +967 -3
  8. package/build/internal/cjs/index.js +173 -16
  9. package/build/internal/cjs/index.js.map +1 -1
  10. package/build/{es/src/service-plugins-types.d.ts → internal/es/index.d.mts} +131 -56
  11. package/build/internal/es/index.mjs +143 -0
  12. package/build/internal/es/index.mjs.map +1 -0
  13. package/package.json +9 -8
  14. package/build/cjs/index.typings.d.ts +0 -43
  15. package/build/cjs/index.typings.js +0 -19
  16. package/build/cjs/index.typings.js.map +0 -1
  17. package/build/cjs/src/interfaces-automations-v1-trigger-provider.context.d.ts +0 -5
  18. package/build/cjs/src/interfaces-automations-v1-trigger-provider.context.js +0 -9
  19. package/build/cjs/src/interfaces-automations-v1-trigger-provider.context.js.map +0 -1
  20. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.d.ts +0 -52
  21. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.js +0 -50
  22. package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.js.map +0 -1
  23. package/build/cjs/src/service-plugins-error-classes.d.ts +0 -17
  24. package/build/cjs/src/service-plugins-error-classes.js +0 -21
  25. package/build/cjs/src/service-plugins-error-classes.js.map +0 -1
  26. package/build/cjs/src/service-plugins-types.js +0 -84
  27. package/build/cjs/src/service-plugins-types.js.map +0 -1
  28. package/build/es/index.d.ts +0 -3
  29. package/build/es/index.js +0 -4
  30. package/build/es/index.js.map +0 -1
  31. package/build/es/index.typings.d.ts +0 -43
  32. package/build/es/index.typings.js +0 -3
  33. package/build/es/index.typings.js.map +0 -1
  34. package/build/es/src/interfaces-automations-v1-trigger-provider.context.d.ts +0 -5
  35. package/build/es/src/interfaces-automations-v1-trigger-provider.context.js +0 -6
  36. package/build/es/src/interfaces-automations-v1-trigger-provider.context.js.map +0 -1
  37. package/build/es/src/interfaces-automations-v1-trigger-provider.public.d.ts +0 -52
  38. package/build/es/src/interfaces-automations-v1-trigger-provider.public.js +0 -47
  39. package/build/es/src/interfaces-automations-v1-trigger-provider.public.js.map +0 -1
  40. package/build/es/src/service-plugins-error-classes.d.ts +0 -17
  41. package/build/es/src/service-plugins-error-classes.js +0 -17
  42. package/build/es/src/service-plugins-error-classes.js.map +0 -1
  43. package/build/es/src/service-plugins-types.js +0 -81
  44. package/build/es/src/service-plugins-types.js.map +0 -1
  45. package/build/internal/cjs/index.typings.d.ts +0 -43
  46. package/build/internal/cjs/index.typings.js +0 -19
  47. package/build/internal/cjs/index.typings.js.map +0 -1
  48. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.context.d.ts +0 -5
  49. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.context.js +0 -9
  50. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.context.js.map +0 -1
  51. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.d.ts +0 -52
  52. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.js +0 -50
  53. package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.js.map +0 -1
  54. package/build/internal/cjs/src/service-plugins-error-classes.d.ts +0 -17
  55. package/build/internal/cjs/src/service-plugins-error-classes.js +0 -21
  56. package/build/internal/cjs/src/service-plugins-error-classes.js.map +0 -1
  57. package/build/internal/cjs/src/service-plugins-types.d.ts +0 -892
  58. package/build/internal/cjs/src/service-plugins-types.js +0 -84
  59. package/build/internal/cjs/src/service-plugins-types.js.map +0 -1
  60. package/build/internal/es/index.d.ts +0 -3
  61. package/build/internal/es/index.js +0 -4
  62. package/build/internal/es/index.js.map +0 -1
  63. package/build/internal/es/index.typings.d.ts +0 -43
  64. package/build/internal/es/index.typings.js +0 -3
  65. package/build/internal/es/index.typings.js.map +0 -1
  66. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.context.d.ts +0 -5
  67. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.context.js +0 -6
  68. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.context.js.map +0 -1
  69. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.d.ts +0 -52
  70. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.js +0 -47
  71. package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.js.map +0 -1
  72. package/build/internal/es/src/service-plugins-error-classes.d.ts +0 -17
  73. package/build/internal/es/src/service-plugins-error-classes.js +0 -17
  74. package/build/internal/es/src/service-plugins-error-classes.js.map +0 -1
  75. package/build/internal/es/src/service-plugins-types.d.ts +0 -892
  76. package/build/internal/es/src/service-plugins-types.js +0 -81
  77. package/build/internal/es/src/service-plugins-types.js.map +0 -1
@@ -1,84 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IdentityType = exports.Origin = exports.Status = exports.Type = exports.Language = exports.Operator = exports.TimeUnit = exports.Domain = void 0;
4
- var Domain;
5
- (function (Domain) {
6
- /** User domain (default). */
7
- Domain["USER"] = "USER";
8
- /** Wix domain. */
9
- Domain["WIX"] = "WIX";
10
- /** Wix account-level domain. */
11
- Domain["WIX_ACCOUNT"] = "WIX_ACCOUNT";
12
- })(Domain || (exports.Domain = Domain = {}));
13
- var TimeUnit;
14
- (function (TimeUnit) {
15
- TimeUnit["UNKNOWN_TIME_UNIT"] = "UNKNOWN_TIME_UNIT";
16
- /** Minutes. */
17
- TimeUnit["MINUTES"] = "MINUTES";
18
- /** Hours. */
19
- TimeUnit["HOURS"] = "HOURS";
20
- /** Days. */
21
- TimeUnit["DAYS"] = "DAYS";
22
- /** Weeks. */
23
- TimeUnit["WEEKS"] = "WEEKS";
24
- /** Months. */
25
- TimeUnit["MONTHS"] = "MONTHS";
26
- })(TimeUnit || (exports.TimeUnit = TimeUnit = {}));
27
- var Operator;
28
- (function (Operator) {
29
- /** Unknown. */
30
- Operator["UNKNOWN_OPERATOR"] = "UNKNOWN_OPERATOR";
31
- /** `OR` operator. */
32
- Operator["OR"] = "OR";
33
- /** `AND` operator. */
34
- Operator["AND"] = "AND";
35
- })(Operator || (exports.Operator = Operator = {}));
36
- var Language;
37
- (function (Language) {
38
- /** Unknown. */
39
- Language["UNKNOWN_LANGUAGE"] = "UNKNOWN_LANGUAGE";
40
- /** `JAVASCRIPT` language. */
41
- Language["JAVASCRIPT"] = "JAVASCRIPT";
42
- })(Language || (exports.Language = Language = {}));
43
- var Type;
44
- (function (Type) {
45
- /** Based on the trigger. */
46
- Type["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
47
- /** 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. */
48
- Type["APP_DEFINED"] = "APP_DEFINED";
49
- /** Condition. This determines which action runs next. */
50
- Type["CONDITION"] = "CONDITION";
51
- /** Delay. The automation must wait before executing the next step. */
52
- Type["DELAY"] = "DELAY";
53
- /** Rate-limiter. This stops the automation flow if the subsequent action has reached its maximum allowed executions. */
54
- Type["RATE_LIMIT"] = "RATE_LIMIT";
55
- })(Type || (exports.Type = Type = {}));
56
- var Status;
57
- (function (Status) {
58
- /** Unknown. */
59
- Status["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
60
- /** Active. Active automations can be triggered. */
61
- Status["ACTIVE"] = "ACTIVE";
62
- /** Inactive. Inactive automations cannot be triggered. */
63
- Status["INACTIVE"] = "INACTIVE";
64
- })(Status || (exports.Status = Status = {}));
65
- var Origin;
66
- (function (Origin) {
67
- /** Default value. */
68
- Origin["UNKNOWN_ORIGIN"] = "UNKNOWN_ORIGIN";
69
- /** Created by a [Wix user](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-user). */
70
- Origin["USER"] = "USER";
71
- /** Created by a [Wix app](https://dev.wix.com/docs/build-apps/get-started/overview/glossary#wix-app) for a particular site. */
72
- Origin["APPLICATION"] = "APPLICATION";
73
- /** [Preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations). */
74
- Origin["PREINSTALLED"] = "PREINSTALLED";
75
- })(Origin || (exports.Origin = Origin = {}));
76
- var IdentityType;
77
- (function (IdentityType) {
78
- IdentityType["UNKNOWN"] = "UNKNOWN";
79
- IdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
80
- IdentityType["MEMBER"] = "MEMBER";
81
- IdentityType["WIX_USER"] = "WIX_USER";
82
- IdentityType["APP"] = "APP";
83
- })(IdentityType || (exports.IdentityType = IdentityType = {}));
84
- //# sourceMappingURL=service-plugins-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../../src/service-plugins-types.ts"],"names":[],"mappings":";;;AAkNA,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,6BAA6B;IAC7B,uBAAa,CAAA;IACb,kBAAkB;IAClB,qBAAW,CAAA;IACX,gCAAgC;IAChC,qCAA2B,CAAA;AAC7B,CAAC,EAPW,MAAM,sBAAN,MAAM,QAOjB;AA0DD,IAAY,QAYX;AAZD,WAAY,QAAQ;IAClB,mDAAuC,CAAA;IACvC,eAAe;IACf,+BAAmB,CAAA;IACnB,aAAa;IACb,2BAAe,CAAA;IACf,YAAY;IACZ,yBAAa,CAAA;IACb,aAAa;IACb,2BAAe,CAAA;IACf,cAAc;IACd,6BAAiB,CAAA;AACnB,CAAC,EAZW,QAAQ,wBAAR,QAAQ,QAYnB;AAiFD,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,eAAe;IACf,iDAAqC,CAAA;IACrC,qBAAqB;IACrB,qBAAS,CAAA;IACT,sBAAsB;IACtB,uBAAW,CAAA;AACb,CAAC,EAPW,QAAQ,wBAAR,QAAQ,QAOnB;AAYD,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,eAAe;IACf,iDAAqC,CAAA;IACrC,6BAA6B;IAC7B,qCAAyB,CAAA;AAC3B,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB;AAsBD,IAAY,IAWX;AAXD,WAAY,IAAI;IACd,4BAA4B;IAC5B,mDAA2C,CAAA;IAC3C,gOAAgO;IAChO,mCAA2B,CAAA;IAC3B,yDAAyD;IACzD,+BAAuB,CAAA;IACvB,sEAAsE;IACtE,uBAAe,CAAA;IACf,wHAAwH;IACxH,iCAAyB,CAAA;AAC3B,CAAC,EAXW,IAAI,oBAAJ,IAAI,QAWf;AA4JD,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,eAAe;IACf,2CAAiC,CAAA;IACjC,mDAAmD;IACnD,2BAAiB,CAAA;IACjB,0DAA0D;IAC1D,+BAAqB,CAAA;AACvB,CAAC,EAPW,MAAM,sBAAN,MAAM,QAOjB;AA0FD,IAAY,MASX;AATD,WAAY,MAAM;IAChB,qBAAqB;IACrB,2CAAiC,CAAA;IACjC,2GAA2G;IAC3G,uBAAa,CAAA;IACb,+HAA+H;IAC/H,qCAA2B,CAAA;IAC3B,2LAA2L;IAC3L,uCAA6B,CAAA;AAC/B,CAAC,EATW,MAAM,sBAAN,MAAM,QASjB;AA0MD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,uDAAuC,CAAA;IACvC,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB"}
@@ -1,3 +0,0 @@
1
- export * from './src/service-plugins-types.js';
2
- export * from './src/interfaces-automations-v1-trigger-provider.context.js';
3
- export * from './src/service-plugins-error-classes.js';
@@ -1,4 +0,0 @@
1
- export * from './src/service-plugins-types.js';
2
- export * from './src/interfaces-automations-v1-trigger-provider.context.js';
3
- export * from './src/service-plugins-error-classes.js';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6DAA6D,CAAC;AAC5E,cAAc,wCAAwC,CAAC"}
@@ -1,43 +0,0 @@
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
- export * from './src/service-plugins-error-classes';
4
- export * from './src/service-plugins-types';
5
- export { ValidateConfigurationEnvelope, GetDynamicSchemaEnvelope, RefreshPayloadEnvelope, };
6
- /**
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
- * the Wix validation process.
9
- *
10
- * Wix calls Validate Configuration in the following cases:
11
- *
12
- * - When a Wix user activates the automation.
13
- * - 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)
14
- * dashboard.
15
- * - When a Wix user opens the automation to edit it.
16
- *
17
- * If the user configured filters when setting up their automation, these are included in the request.
18
- * Wix uses the returned response to display an error message to a user if the requested trigger is invalid.
19
- * @throws ProviderNotFoundWixError
20
- */
21
- export declare function validateConfiguration(payload: ValidateConfigurationEnvelope): ValidateConfigurationResponse | Promise<ValidateConfigurationResponse>;
22
- /**
23
- * This endpoint returns a [JSON schema](https://json-schema.org/) object
24
- * that's used to dynamically update the fields available to a Wix user
25
- * 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).
26
- *
27
- * Wix calls this endpoint when a user selects an option from an
28
- * [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection)
29
- * configured for a trigger.
30
- * Wix appends the returned schema to the
31
- * [payload schema](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/payload-schema)
32
- * you defined for the trigger and makes the fields available to the Wix user's automation.
33
- * @throws ProviderNotFoundWixError
34
- */
35
- export declare function getDynamicSchema(payload: GetDynamicSchemaEnvelope): GetDynamicSchemaResponse | Promise<GetDynamicSchemaResponse>;
36
- /**
37
- * If an automation's action is delayed, implement this method to retrieve the latest data in the trigger payload before the action fires.
38
- *
39
- * For example, if an automation is triggered but its action is set to fire only 24 hours later, Wix calls Refresh Payload before starting
40
- * 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
41
- * to the action.
42
- */
43
- export declare function refreshPayload(payload: RefreshPayloadEnvelope): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;
@@ -1,3 +0,0 @@
1
- export * from './src/service-plugins-error-classes';
2
- export * from './src/service-plugins-types';
3
- //# sourceMappingURL=index.typings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":"AAWA,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC"}
@@ -1,5 +0,0 @@
1
- import './interfaces-automations-v1-trigger-provider.public.js';
2
- import { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';
3
- import { provideHandlers as publicProvideHandlers } from './interfaces-automations-v1-trigger-provider.public.js';
4
- export { publicProvideHandlers };
5
- export declare const provideHandlers: ReturnType<typeof createServicePluginModule<typeof publicProvideHandlers>>;
@@ -1,6 +0,0 @@
1
- import './interfaces-automations-v1-trigger-provider.public.js';
2
- import { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';
3
- import { provideHandlers as publicProvideHandlers } from './interfaces-automations-v1-trigger-provider.public.js';
4
- export { publicProvideHandlers };
5
- export const provideHandlers = createServicePluginModule(publicProvideHandlers);
6
- //# sourceMappingURL=interfaces-automations-v1-trigger-provider.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces-automations-v1-trigger-provider.context.js","sourceRoot":"","sources":["../../../../src/interfaces-automations-v1-trigger-provider.context.ts"],"names":[],"mappings":"AAAA,OAAO,wDAAwD,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAElH,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,eAAe,GAExB,yBAAyB,CAAC,qBAAqB,CAAC,CAAC"}
@@ -1,52 +0,0 @@
1
- import { ServicePluginDefinition } from '@wix/sdk-types';
2
- import { Context, ValidateConfigurationRequest, ValidateConfigurationResponse, GetDynamicSchemaRequest, GetDynamicSchemaResponse, RefreshPayloadRequest, RefreshPayloadResponse } from './service-plugins-types.js';
3
- export interface ValidateConfigurationEnvelope {
4
- request: ValidateConfigurationRequest;
5
- metadata: Context;
6
- }
7
- export interface GetDynamicSchemaEnvelope {
8
- request: GetDynamicSchemaRequest;
9
- metadata: Context;
10
- }
11
- export interface RefreshPayloadEnvelope {
12
- request: RefreshPayloadRequest;
13
- metadata: Context;
14
- }
15
- export declare const provideHandlers: ServicePluginDefinition<{
16
- /**
17
- *
18
- * 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
19
- * the Wix validation process.
20
- *
21
- * Wix calls Validate Configuration in the following cases:
22
- *
23
- * - When a Wix user activates the automation.
24
- * - 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)
25
- * dashboard.
26
- * - When a Wix user opens the automation to edit it.
27
- *
28
- * If the user configured filters when setting up their automation, these are included in the request.
29
- * Wix uses the returned response to display an error message to a user if the requested trigger is invalid. */
30
- validateConfiguration(payload: ValidateConfigurationEnvelope): ValidateConfigurationResponse | Promise<ValidateConfigurationResponse>;
31
- /**
32
- *
33
- * This endpoint returns a [JSON schema](https://json-schema.org/) object
34
- * that's used to dynamically update the fields available to a Wix user
35
- * 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).
36
- *
37
- * Wix calls this endpoint when a user selects an option from an
38
- * [item selection filter](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/filter-fields#item-selection)
39
- * configured for a trigger.
40
- * Wix appends the returned schema to the
41
- * [payload schema](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/triggers/payload-schema)
42
- * you defined for the trigger and makes the fields available to the Wix user's automation. */
43
- getDynamicSchema(payload: GetDynamicSchemaEnvelope): GetDynamicSchemaResponse | Promise<GetDynamicSchemaResponse>;
44
- /**
45
- *
46
- * If an automation's action is delayed, implement this method to retrieve the latest data in the trigger payload before the action fires.
47
- *
48
- * For example, if an automation is triggered but its action is set to fire only 24 hours later, Wix calls Refresh Payload before starting
49
- * 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
50
- * to the action. */
51
- refreshPayload(payload: RefreshPayloadEnvelope): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;
52
- }>;
@@ -1,47 +0,0 @@
1
- import { ServicePluginDefinition } from '@wix/sdk-types';
2
- import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
- export const provideHandlers = ServicePluginDefinition('AUTOMATIONS_TRIGGER_PROVIDER', [
4
- {
5
- name: 'validateConfiguration',
6
- primaryHttpMappingPath: '/validate-configuration',
7
- transformations: {
8
- toREST: (payload) => {
9
- const toRestResponse = payload;
10
- return renameKeysFromSDKRequestToRESTRequest(toRestResponse);
11
- },
12
- fromREST: (payload) => {
13
- const fromRestRequest = payload;
14
- return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);
15
- },
16
- },
17
- },
18
- {
19
- name: 'getDynamicSchema',
20
- primaryHttpMappingPath: '/dynamic-schema',
21
- transformations: {
22
- toREST: (payload) => {
23
- const toRestResponse = payload;
24
- return renameKeysFromSDKRequestToRESTRequest(toRestResponse);
25
- },
26
- fromREST: (payload) => {
27
- const fromRestRequest = payload;
28
- return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);
29
- },
30
- },
31
- },
32
- {
33
- name: 'refreshPayload',
34
- primaryHttpMappingPath: '/refresh-payload',
35
- transformations: {
36
- toREST: (payload) => {
37
- const toRestResponse = payload;
38
- return renameKeysFromSDKRequestToRESTRequest(toRestResponse);
39
- },
40
- fromREST: (payload) => {
41
- const fromRestRequest = payload;
42
- return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);
43
- },
44
- },
45
- },
46
- ]);
47
- //# sourceMappingURL=interfaces-automations-v1-trigger-provider.public.js.map
@@ -1 +0,0 @@
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;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,17 +0,0 @@
1
- export declare class ProviderNotFoundWixError extends Error {
2
- /** @hidden */
3
- httpCode: number;
4
- /** @hidden */
5
- statusCode: string;
6
- /** @hidden */
7
- applicationCode: string;
8
- /** @hidden */
9
- name: string;
10
- /** @hidden */
11
- errorType: string;
12
- /** @hidden */
13
- spiErrorData: object;
14
- constructor();
15
- /** @hidden */
16
- static readonly __type = "wix_spi_error";
17
- }
@@ -1,17 +0,0 @@
1
- export class ProviderNotFoundWixError extends Error {
2
- constructor() {
3
- super('ProviderNotFound');
4
- this.httpCode = 404;
5
- this.statusCode = 'NOT_FOUND';
6
- this.applicationCode = 'PROVIDER_NOT_FOUND';
7
- this.name = 'ProviderNotFound';
8
- this.errorType = 'SPI';
9
- this.spiErrorData = {
10
- name: 'ProviderNotFound',
11
- applicationCode: 'PROVIDER_NOT_FOUND',
12
- };
13
- }
14
- }
15
- /** @hidden */
16
- ProviderNotFoundWixError.__type = 'wix_spi_error';
17
- //# sourceMappingURL=service-plugins-error-classes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"service-plugins-error-classes.js","sourceRoot":"","sources":["../../../../src/service-plugins-error-classes.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IAcjD;QACE,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAE1B,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC;QAC9B,IAAI,CAAC,eAAe,GAAG,oBAAoB,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG;YAClB,IAAI,EAAE,kBAAkB;YACxB,eAAe,EAAE,oBAAoB;SACtC,CAAC;IACJ,CAAC;;AAED,cAAc;AACE,+BAAM,GAAG,eAAe,CAAC"}