@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.
- package/build/cjs/index.typings.d.ts +3 -13
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.d.ts +1 -19
- package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.js +0 -39
- package/build/cjs/src/interfaces-automations-v1-trigger-provider.public.js.map +1 -1
- package/build/cjs/src/service-plugins-types.d.ts +251 -54
- package/build/cjs/src/service-plugins-types.js.map +1 -1
- package/build/es/index.typings.d.ts +3 -13
- package/build/es/index.typings.js.map +1 -1
- package/build/es/src/interfaces-automations-v1-trigger-provider.public.d.ts +1 -19
- package/build/es/src/interfaces-automations-v1-trigger-provider.public.js +0 -39
- package/build/es/src/interfaces-automations-v1-trigger-provider.public.js.map +1 -1
- package/build/es/src/service-plugins-types.d.ts +251 -54
- package/build/es/src/service-plugins-types.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +3 -13
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.d.ts +1 -19
- package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.js +0 -39
- package/build/internal/cjs/src/interfaces-automations-v1-trigger-provider.public.js.map +1 -1
- package/build/internal/cjs/src/service-plugins-types.d.ts +251 -54
- package/build/internal/cjs/src/service-plugins-types.js.map +1 -1
- package/build/internal/es/index.typings.d.ts +3 -13
- package/build/internal/es/index.typings.js.map +1 -1
- package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.d.ts +1 -19
- package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.js +0 -39
- package/build/internal/es/src/interfaces-automations-v1-trigger-provider.public.js.map +1 -1
- package/build/internal/es/src/service-plugins-types.d.ts +251 -54
- package/build/internal/es/src/service-plugins-types.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ValidateConfigurationResponse, GetDynamicSchemaResponse, RefreshPayloadResponse
|
|
2
|
-
import { ValidateConfigurationEnvelope, GetDynamicSchemaEnvelope, RefreshPayloadEnvelope
|
|
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,
|
|
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":"
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":"AAWA,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ServicePluginDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Context, ValidateConfigurationRequest, ValidateConfigurationResponse, GetDynamicSchemaRequest, GetDynamicSchemaResponse, RefreshPayloadRequest, RefreshPayloadResponse
|
|
2
|
+
import { Context, ValidateConfigurationRequest, ValidateConfigurationResponse, GetDynamicSchemaRequest, GetDynamicSchemaResponse, RefreshPayloadRequest, RefreshPayloadResponse } from './service-plugins-types.js';
|
|
3
3
|
export interface ValidateConfigurationEnvelope {
|
|
4
4
|
request: ValidateConfigurationRequest;
|
|
5
5
|
metadata: Context;
|
|
@@ -12,14 +12,6 @@ export interface RefreshPayloadEnvelope {
|
|
|
12
12
|
request: RefreshPayloadRequest;
|
|
13
13
|
metadata: Context;
|
|
14
14
|
}
|
|
15
|
-
export interface OnAutomationSavedEnvelope {
|
|
16
|
-
request: OnAutomationSavedRequest;
|
|
17
|
-
metadata: Context;
|
|
18
|
-
}
|
|
19
|
-
export interface OnAutomationDeletedEnvelope {
|
|
20
|
-
request: OnAutomationDeletedRequest;
|
|
21
|
-
metadata: Context;
|
|
22
|
-
}
|
|
23
15
|
export declare const provideHandlers: ServicePluginDefinition<{
|
|
24
16
|
/**
|
|
25
17
|
*
|
|
@@ -57,14 +49,4 @@ export declare const provideHandlers: ServicePluginDefinition<{
|
|
|
57
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
|
|
58
50
|
* to the action. */
|
|
59
51
|
refreshPayload(payload: RefreshPayloadEnvelope): RefreshPayloadResponse | Promise<RefreshPayloadResponse>;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* When a Wix user saves an automation, Wix sends the updated automation to your service endpoint, so that you can perform any necessary logic
|
|
63
|
-
* in your service. */
|
|
64
|
-
onAutomationSaved(payload: OnAutomationSavedEnvelope): OnAutomationSavedResponse | Promise<OnAutomationSavedResponse>;
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* When a Wix user deletes an automation, Wix sends the automation ID to your service endpoint, so that you can perform any necessary logic
|
|
68
|
-
* 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. */
|
|
69
|
-
onAutomationDeleted(payload: OnAutomationDeletedEnvelope): OnAutomationDeletedResponse | Promise<OnAutomationDeletedResponse>;
|
|
70
52
|
}>;
|
|
@@ -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;
|
|
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,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