@awell-health/awell-extensions 1.0.145 → 1.0.148
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/dist/extensions/collectData/index.d.ts +2 -0
- package/dist/extensions/collectData/index.js +21 -0
- package/dist/extensions/collectData/index.js.map +1 -0
- package/dist/extensions/collectData/settings.d.ts +4 -0
- package/dist/extensions/collectData/settings.js +12 -0
- package/dist/extensions/collectData/settings.js.map +1 -0
- package/dist/extensions/collectData/v1/actions/index.d.ts +1 -0
- package/dist/extensions/collectData/v1/actions/index.js +6 -0
- package/dist/extensions/collectData/v1/actions/index.js.map +1 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/dataPoint.d.ts +10 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/dataPoint.js +14 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/dataPoint.js.map +1 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/fields.d.ts +59 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/fields.js +55 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/fields.js.map +1 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/index.d.ts +2 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/index.js +8 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/config/index.js.map +1 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/index.d.ts +1 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/index.js +6 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/index.js.map +1 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.d.ts +4 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.js +60 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.js.map +1 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.test.d.ts +1 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.test.js +27 -0
- package/dist/extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.test.js.map +1 -0
- package/dist/extensions/index.js +10 -8
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/markdown.json +4 -0
- package/package.json +1 -1
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CollectData = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const actions_1 = require("./v1/actions");
|
6
|
+
const settings_1 = require("./settings");
|
7
|
+
exports.CollectData = {
|
8
|
+
key: 'collectData',
|
9
|
+
title: 'Collect Data',
|
10
|
+
icon_url: 'https://res.cloudinary.com/da7x4rzl4/image/upload/v1678870116/Awell%20Extensions/Awell_Logo.png',
|
11
|
+
description: 'Collect data from users to ingest into care flows',
|
12
|
+
category: extensions_core_1.Category.FORMS,
|
13
|
+
author: {
|
14
|
+
authorType: extensions_core_1.AuthorType.AWELL,
|
15
|
+
},
|
16
|
+
actions: {
|
17
|
+
remoteSingleSelect: actions_1.remoteSingleSelect
|
18
|
+
},
|
19
|
+
settings: settings_1.settings,
|
20
|
+
};
|
21
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/collectData/index.ts"],"names":[],"mappings":";;;AACA,mEAAoE;AACpE,0CAEqB;AACrB,yCAAqC;AAExB,QAAA,WAAW,GAAc;IACpC,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,cAAc;IACrB,QAAQ,EACN,iGAAiG;IACnG,WAAW,EACT,mDAAmD;IACrD,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,OAAO,EAAE;QACP,kBAAkB,EAAlB,4BAAkB;KACnB;IACD,QAAQ,EAAR,mBAAQ;CACT,CAAA"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.validateSettings = exports.SettingsValidationSchema = exports.settings = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
exports.settings = {};
|
6
|
+
exports.SettingsValidationSchema = zod_1.z.object({});
|
7
|
+
const validateSettings = (settings) => {
|
8
|
+
const parsedData = exports.SettingsValidationSchema.parse(settings);
|
9
|
+
return parsedData;
|
10
|
+
};
|
11
|
+
exports.validateSettings = validateSettings;
|
12
|
+
//# sourceMappingURL=settings.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../extensions/collectData/settings.ts"],"names":[],"mappings":";;;AACA,6BAAwC;AAE3B,QAAA,QAAQ,GAAG,EAAoC,CAAA;AAE/C,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAsD,CAAC,CAAA;AAEjG,MAAM,gBAAgB,GAAG,CAC9B,QAAiB,EACyB,EAAE;IAC5C,MAAM,UAAU,GAAG,gCAAwB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAE3D,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA;AANY,QAAA,gBAAgB,oBAM5B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { remoteSingleSelect } from './remoteSingleSelect';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.remoteSingleSelect = void 0;
|
4
|
+
var remoteSingleSelect_1 = require("./remoteSingleSelect");
|
5
|
+
Object.defineProperty(exports, "remoteSingleSelect", { enumerable: true, get: function () { return remoteSingleSelect_1.remoteSingleSelect; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/collectData/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = void 0;
|
4
|
+
exports.dataPoints = {
|
5
|
+
value: {
|
6
|
+
key: 'value',
|
7
|
+
valueType: 'string',
|
8
|
+
},
|
9
|
+
label: {
|
10
|
+
key: 'label',
|
11
|
+
valueType: 'string',
|
12
|
+
},
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=dataPoint.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dataPoint.js","sourceRoot":"","sources":["../../../../../../../extensions/collectData/v1/actions/remoteSingleSelect/config/dataPoint.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE;QACL,GAAG,EAAE,OAAO;QACZ,SAAS,EAAE,QAAQ;KACpB;IACD,KAAK,EAAE;QACL,GAAG,EAAE,OAAO;QACZ,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
import { FieldType } from '@awell-health/extensions-core';
|
3
|
+
export declare const fields: {
|
4
|
+
label: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
description: string;
|
8
|
+
type: FieldType.STRING;
|
9
|
+
required: true;
|
10
|
+
};
|
11
|
+
url: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: FieldType.STRING;
|
16
|
+
required: true;
|
17
|
+
};
|
18
|
+
headers: {
|
19
|
+
id: string;
|
20
|
+
label: string;
|
21
|
+
description: string;
|
22
|
+
type: FieldType.JSON;
|
23
|
+
required: false;
|
24
|
+
};
|
25
|
+
queryParam: {
|
26
|
+
id: string;
|
27
|
+
label: string;
|
28
|
+
description: string;
|
29
|
+
type: FieldType.STRING;
|
30
|
+
required: false;
|
31
|
+
};
|
32
|
+
mandatory: {
|
33
|
+
id: string;
|
34
|
+
label: string;
|
35
|
+
description: string;
|
36
|
+
type: FieldType.BOOLEAN;
|
37
|
+
required: true;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
41
|
+
label: z.ZodString;
|
42
|
+
url: z.ZodString;
|
43
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
44
|
+
queryParam: z.ZodOptional<z.ZodString>;
|
45
|
+
mandatory: z.ZodBoolean;
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
47
|
+
url: string;
|
48
|
+
label: string;
|
49
|
+
headers: Record<string, string>;
|
50
|
+
mandatory: boolean;
|
51
|
+
queryParam?: string | undefined;
|
52
|
+
}, {
|
53
|
+
url: string;
|
54
|
+
label: string;
|
55
|
+
headers: Record<string, string>;
|
56
|
+
mandatory: boolean;
|
57
|
+
queryParam?: string | undefined;
|
58
|
+
}>;
|
59
|
+
export declare const validateActionFields: (fields: unknown) => z.infer<typeof FieldsValidationSchema>;
|
@@ -0,0 +1,55 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.validateActionFields = exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
6
|
+
exports.fields = {
|
7
|
+
label: {
|
8
|
+
id: 'label',
|
9
|
+
label: 'Label text',
|
10
|
+
description: 'Enter the label text that will be displayed before the selector.',
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
12
|
+
required: true,
|
13
|
+
},
|
14
|
+
url: {
|
15
|
+
id: 'url',
|
16
|
+
label: 'Options endpoint URL',
|
17
|
+
description: 'Enter the URL where the options to display in the selector can be fetched. The endpoint must return an array of objects with the following properties: `label` and `value`.',
|
18
|
+
type: extensions_core_1.FieldType.STRING,
|
19
|
+
required: true,
|
20
|
+
},
|
21
|
+
headers: {
|
22
|
+
id: 'headers',
|
23
|
+
label: 'Options endpoint headers',
|
24
|
+
description: 'Enter the headers to send to the options source URL. The headers must be in JSON format.',
|
25
|
+
type: extensions_core_1.FieldType.JSON,
|
26
|
+
required: false,
|
27
|
+
},
|
28
|
+
queryParam: {
|
29
|
+
id: 'queryParam',
|
30
|
+
label: 'Options endpoint search query param key',
|
31
|
+
description: 'Enter the key of the free text search query param if the endpoint supports this e.g. `search` for `https://example.com/options?search=foo`.',
|
32
|
+
type: extensions_core_1.FieldType.STRING,
|
33
|
+
required: false,
|
34
|
+
},
|
35
|
+
mandatory: {
|
36
|
+
id: 'mandatory',
|
37
|
+
label: 'Is response required?',
|
38
|
+
description: 'The user must select an option before continuing.',
|
39
|
+
type: extensions_core_1.FieldType.BOOLEAN,
|
40
|
+
required: true,
|
41
|
+
},
|
42
|
+
};
|
43
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
44
|
+
label: zod_1.z.string().nonempty(),
|
45
|
+
url: zod_1.z.string().url(),
|
46
|
+
headers: zod_1.z.record(zod_1.z.string()),
|
47
|
+
queryParam: zod_1.z.string().optional(),
|
48
|
+
mandatory: zod_1.z.boolean(),
|
49
|
+
});
|
50
|
+
const validateActionFields = (fields) => {
|
51
|
+
const parsedData = exports.FieldsValidationSchema.parse(fields);
|
52
|
+
return parsedData;
|
53
|
+
};
|
54
|
+
exports.validateActionFields = validateActionFields;
|
55
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/collectData/v1/actions/remoteSingleSelect/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,kEAAkE;QACpE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EACT,6KAA6K;QAC/K,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,0BAA0B;QACjC,WAAW,EACT,0FAA0F;QAC5F,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,yCAAyC;QAChD,WAAW,EACT,6IAA6I;QAC/I,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,2BAAS,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACrB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE;CAC2B,CAAC,CAAA;AAE7C,MAAM,oBAAoB,GAAG,CAClC,MAAe,EACyB,EAAE;IAC1C,MAAM,UAAU,GAAG,8BAAsB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAEvD,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA;AANY,QAAA,oBAAoB,wBAMhC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
var dataPoint_1 = require("./dataPoint");
|
7
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoint_1.dataPoints; } });
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/collectData/v1/actions/remoteSingleSelect/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,yCAAwC;AAA/B,uGAAA,UAAU,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { remoteSingleSelect } from './remoteSingleSelect';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.remoteSingleSelect = void 0;
|
4
|
+
var remoteSingleSelect_1 = require("./remoteSingleSelect");
|
5
|
+
Object.defineProperty(exports, "remoteSingleSelect", { enumerable: true, get: function () { return remoteSingleSelect_1.remoteSingleSelect; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/remoteSingleSelect/index.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA"}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.remoteSingleSelect = void 0;
|
4
|
+
const config_1 = require("./config");
|
5
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
6
|
+
const fields_1 = require("./config/fields");
|
7
|
+
const zod_validation_error_1 = require("zod-validation-error");
|
8
|
+
const zod_1 = require("zod");
|
9
|
+
exports.remoteSingleSelect = {
|
10
|
+
key: 'remoteSingleSelect',
|
11
|
+
title: 'Remote Single Select',
|
12
|
+
description: 'Allow a stakeholder to select a single option from a set fetched from an API endpoint',
|
13
|
+
category: extensions_core_1.Category.FORMS,
|
14
|
+
fields: config_1.fields,
|
15
|
+
dataPoints: config_1.dataPoints,
|
16
|
+
options: {
|
17
|
+
stakeholders: {
|
18
|
+
label: 'Stakeholder',
|
19
|
+
mode: 'single',
|
20
|
+
},
|
21
|
+
},
|
22
|
+
previewable: false,
|
23
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
24
|
+
try {
|
25
|
+
(0, fields_1.validateActionFields)(payload.fields);
|
26
|
+
}
|
27
|
+
catch (err) {
|
28
|
+
if (err instanceof zod_1.ZodError) {
|
29
|
+
const error = (0, zod_validation_error_1.fromZodError)(err);
|
30
|
+
await onError({
|
31
|
+
events: [
|
32
|
+
{
|
33
|
+
date: new Date().toISOString(),
|
34
|
+
text: { en: error.name },
|
35
|
+
error: {
|
36
|
+
category: 'WRONG_INPUT',
|
37
|
+
message: `${error.message}`,
|
38
|
+
},
|
39
|
+
},
|
40
|
+
],
|
41
|
+
});
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
const error = err;
|
45
|
+
await onError({
|
46
|
+
events: [
|
47
|
+
{
|
48
|
+
date: new Date().toISOString(),
|
49
|
+
text: { en: 'Something went wrong while orchestrating the action' },
|
50
|
+
error: {
|
51
|
+
category: 'SERVER_ERROR',
|
52
|
+
message: error.message,
|
53
|
+
},
|
54
|
+
},
|
55
|
+
],
|
56
|
+
});
|
57
|
+
}
|
58
|
+
},
|
59
|
+
};
|
60
|
+
//# sourceMappingURL=remoteSingleSelect.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"remoteSingleSelect.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.ts"],"names":[],"mappings":";;;AACA,qCAA6C;AAC7C,mEAAwD;AAExD,4CAAsD;AACtD,+DAAmD;AACnD,6BAA8B;AAEjB,QAAA,kBAAkB,GAA2C;IACxE,GAAG,EAAE,oBAAoB;IACzB,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,uFAAuF;IACzF,QAAQ,EAAE,0BAAQ,CAAC,KAAK;IACxB,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;SACf;KACF;IACD,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QACxD,IAAI;YACF,IAAA,6BAAoB,EAAC,OAAO,CAAC,MAAM,CAAC,CAAA;SACrC;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,YAAY,cAAQ,EAAE;gBAC3B,MAAM,KAAK,GAAG,IAAA,mCAAY,EAAC,GAAG,CAAC,CAAA;gBAC/B,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE;4BACxB,KAAK,EAAE;gCACL,QAAQ,EAAE,aAAa;gCACvB,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE;6BAC5B;yBACF;qBACF;iBACF,CAAC,CAAA;gBACF,OAAM;aACP;YAED,MAAM,KAAK,GAAG,GAAY,CAAA;YAC1B,MAAM,OAAO,CAAC;gBACZ,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;wBAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,qDAAqD,EAAE;wBACnE,KAAK,EAAE;4BACL,QAAQ,EAAE,cAAc;4BACxB,OAAO,EAAE,KAAK,CAAC,OAAO;yBACvB;qBACF;iBACF;aACF,CAAC,CAAA;SACH;IACH,CAAC;CACF,CAAA"}
|
package/dist/extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.test.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tests_1 = require("../../../../../src/tests");
|
4
|
+
const remoteSingleSelect_1 = require("./remoteSingleSelect");
|
5
|
+
describe('Complete flow action', () => {
|
6
|
+
const onComplete = jest.fn();
|
7
|
+
beforeEach(() => {
|
8
|
+
onComplete.mockClear();
|
9
|
+
});
|
10
|
+
test('Should not call the onComplete callback', async () => {
|
11
|
+
await remoteSingleSelect_1.remoteSingleSelect.onActivityCreated((0, tests_1.generateTestPayload)({
|
12
|
+
fields: {
|
13
|
+
headers: '{"Content-Type": "application/json"}',
|
14
|
+
queryParam: 'search',
|
15
|
+
url: 'https://example.com',
|
16
|
+
label: 'label',
|
17
|
+
mandatory: true,
|
18
|
+
},
|
19
|
+
settings: {},
|
20
|
+
}), onComplete, jest.fn());
|
21
|
+
/**
|
22
|
+
* Because completion is done in Awell Hosted Pages
|
23
|
+
*/
|
24
|
+
expect(onComplete).not.toHaveBeenCalled();
|
25
|
+
});
|
26
|
+
});
|
27
|
+
//# sourceMappingURL=remoteSingleSelect.test.js.map
|
package/dist/extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.test.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"remoteSingleSelect.test.js","sourceRoot":"","sources":["../../../../../../extensions/collectData/v1/actions/remoteSingleSelect/remoteSingleSelect.test.ts"],"names":[],"mappings":";;AAAA,oDAA8D;AAC9D,6DAAyD;AAEzD,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAE5B,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,CAAC,SAAS,EAAE,CAAA;IACxB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;QACzD,MAAM,uCAAkB,CAAC,iBAAiB,CACxC,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,OAAO,EAAE,sCAAsC;gBAC/C,UAAU,EAAE,QAAQ;gBACpB,GAAG,EAAE,qBAAqB;gBAC1B,KAAK,EAAE,OAAO;gBACd,SAAS,EAAE,IAAI;aAChB;YACD,QAAQ,EAAE,EAAE;SACb,CAAC,EACF,UAAU,EACV,IAAI,CAAC,EAAE,EAAE,CACV,CAAA;QAED;;WAEG;QACH,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IAC3C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist/extensions/index.js
CHANGED
@@ -51,37 +51,39 @@ const iterable_1 = require("./iterable");
|
|
51
51
|
const zendesk_1 = require("./zendesk");
|
52
52
|
const infobip_1 = require("./infobip");
|
53
53
|
const nexuzhealth_1 = require("./nexuzhealth");
|
54
|
+
const collectData_1 = require("./collectData");
|
54
55
|
const json = __importStar(require("./markdown.json"));
|
55
56
|
exports.markdown = json;
|
56
57
|
exports.extensions = [
|
57
58
|
// AvaAi, Best to disable this until we cleared out data privacy & HIPAA with OpenAI
|
59
|
+
// ZusHealth is not ready for public use yet
|
60
|
+
// ZusHealth,
|
58
61
|
awell_1.Awell,
|
59
62
|
calDotCom_1.CalDotCom,
|
60
63
|
calendly_1.Calendly,
|
61
64
|
canvasMedical_1.CanvasMedical,
|
62
65
|
cloudinary_1.Cloudinary,
|
66
|
+
cmDotCom_1.CmDotCom,
|
67
|
+
collectData_1.CollectData,
|
68
|
+
docuSign_1.DocuSign,
|
63
69
|
dropboxSign_1.DropboxSign,
|
64
70
|
elation_1.Elation,
|
65
71
|
formsort_1.Formsort,
|
66
72
|
healthie_1.Healthie,
|
67
73
|
hello_world_1.HelloWorld,
|
74
|
+
infobip_1.Infobip,
|
75
|
+
iterable_1.Iterable,
|
68
76
|
mailchimp_1.Mailchimp,
|
69
77
|
mailgun_1.Mailgun,
|
70
78
|
math_1.MathExtension,
|
71
79
|
messagebird_1.MessageBird,
|
72
80
|
metriport_1.Metriport,
|
73
81
|
nexuzhealth_1.nexuzhealth,
|
82
|
+
sendbird_1.Sendbird,
|
83
|
+
sendgrid_extension_1.Sendgrid,
|
74
84
|
transform_1.Transform,
|
75
85
|
twilio_1.Twilio,
|
76
86
|
wellinks_1.Wellinks,
|
77
|
-
sendgrid_extension_1.Sendgrid,
|
78
|
-
cmDotCom_1.CmDotCom,
|
79
|
-
docuSign_1.DocuSign,
|
80
|
-
sendbird_1.Sendbird,
|
81
|
-
// ZusHealth is not ready for public use yet
|
82
|
-
// ZusHealth,
|
83
|
-
iterable_1.Iterable,
|
84
87
|
zendesk_1.Zendesk,
|
85
|
-
infobip_1.Infobip,
|
86
88
|
];
|
87
89
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,6CAAyC;AACzC,+CAA2C;AAC3C,uCAAmC;AACnC,yCAAqC;AACrC,yCAAqC;AACrC,+CAA0C;AAC1C,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,+CAA2C;AAC3C,2CAAuC;AACvC,qCAAiC;AACjC,yCAAqC;AACrC,6DAA+C;AAC/C,yCAAqC;AACrC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,uCAAmC;AACnC,uCAAmC;AACnC,+CAA2C;AAE3C,sDAAuC;AAG1B,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,oFAAoF;IACpF,aAAK;IACL,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,uBAAU;IACV,yBAAW;IACX,iBAAO;IACP,mBAAQ;IACR,mBAAQ;IACR,wBAAU;IACV,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,qBAAS;IACT,yBAAW;IACX,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,6CAAyC;AACzC,+CAA2C;AAC3C,uCAAmC;AACnC,yCAAqC;AACrC,yCAAqC;AACrC,+CAA0C;AAC1C,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,+CAA2C;AAC3C,2CAAuC;AACvC,qCAAiC;AACjC,yCAAqC;AACrC,6DAA+C;AAC/C,yCAAqC;AACrC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,uCAAmC;AACnC,uCAAmC;AACnC,+CAA2C;AAC3C,+CAA2C;AAE3C,sDAAuC;AAG1B,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,oFAAoF;IACpF,4CAA4C;IAC5C,aAAa;IACb,aAAK;IACL,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,mBAAQ;IACR,yBAAW;IACX,iBAAO;IACP,mBAAQ;IACR,mBAAQ;IACR,wBAAU;IACV,iBAAO;IACP,mBAAQ;IACR,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,qBAAS;IACT,yBAAW;IACX,mBAAQ;IACR,6BAAQ;IACR,qBAAS;IACT,eAAM;IACN,mBAAQ;IACR,iBAAO;CACR,CAAA"}
|
@@ -27,6 +27,10 @@
|
|
27
27
|
"readme": "---\ntitle: cm.com\ndescription: CM.com is a global communication and digital services provider based in the Netherlands.\n---\n# CM.com\n\nCM.com is a global communication and digital services provider based in the Netherlands. It offers a wide range of services and solutions in the areas of messaging, payments, voice, and customer experience.\n\nCM.com enables businesses to communicate with their customers through various channels such as SMS, email, push notifications, social media messaging, and more.\n\n## Extension settings\n\nIn order to set up this extension, you will need:\n\n1. A **Product Token** - visit https://gateway.cmtelecom.com/ to retrieve your product token.\n2. A **From/sender name** - the maximum length is 11 alphanumerical characters or 16 digit\n\n## Custom Actions\n\n### Send SMS\n\nSend an SMS with CM.com to a recipient of your liking.\n",
|
28
28
|
"changelog": "# CM.com changelog\n"
|
29
29
|
},
|
30
|
+
"collectData": {
|
31
|
+
"readme": "---\ntitle: Collect Data\ndescription: Collect data from your users using a variety of input types and data sources\n---\n\n# Collect Data\n\nThe Collect Data extension allows you to collect data from your users using a variety of input types and data sources.\n\n## Extension settings\n\nIn order to set up this extension, no settings are required.\n\n## Custom Actions\n\n### Remote Single Select\n\nThe Remote Single Select action allows you to create a single select input that is populated with data from a remote data source. The data source must be a REST API.\n",
|
32
|
+
"changelog": "# Collect Data changelog\n"
|
33
|
+
},
|
30
34
|
"docuSign": {
|
31
35
|
"readme": "---\ntitle: DocuSign\ndescription: Make your business faster, simpler and more cost-efficient with electronic agreements. Agree with confidence, with intuitive signing experiences across virtually any device.\n---\n# DocuSign\n\nMake your business faster, simpler and more cost-efficient with electronic agreements. Agree with confidence, with intuitive signing experiences across virtually any device.\n\n## Extension settings\n\nIn order to set up this extension, you will need to provide the following settings:\n\n1. **Integration key (client ID)** - An integration key identifies your integration and links to its configuration values. This can be obtained in your developer account from the **Apps and Keys** page\n2. **API Account ID** - A GUID value that identifies your account. This can be obtained in your developer account from the **Apps and Keys** page\n3. **Impersonated User ID (UserID)** - This is a GUID identifying the DocuSign user that you will be impersonating with the access token. Your own User ID can be found at the top of the **Apps and Keys** page.\n4. **RSA private key (in Base64 format)** - This is for the integration key you obtained above and can also be created on the **Apps and Keys** page (DocuSign also allows uploading your own keys). You only need the private key, and it can only be copied once. Make sure to retain it for your records. Provide it in Base64 format - if you copy the key as is, it will not be valid as newlines and formatting won't be persisted.\n5. **Base API URL** - Base API URL for API calls matching your environment on DocuSign. Defaults to: https://demo.docusign.net. Can be obtained from **Account Base URI** section of the **Apps and Keys** page or the `base_uri` property in the response of a call to the `/oauth/userinfo`.\n 1. `DEV` environment: https://demo.docusign.net (default)\n 2. `PRODUCTION` environment: **https://`{server}`.docusign.net**, where `{server}` is the data center location of your production account (for example, **CA**, **NA2**, or **EU**)\n6. **Return URL template** - Return URL for your application to which DocuSign will redirect the user after signing the document. Set when you self host your application. You can use {sessionId}, {pathwayId}, {activityId} and {stakeholderId} variables to construct the URL, where variables will be replaced with actual values. Defaults to: \"https://goto.development.awell.health/?sessionId={sessionId}\". Remember that this URL MUST match the one you registered for your app in DocuSign settings. [See docs](https://developers.docusign.com/platform/configure-app/#redirect-uri) for more details.\n\nAlso, before working with **DocuSign** you should receive consent of the user to impersonate them with the API calls (even for your own account). Check the details on how to do that [on DocuSign docs](https://developers.docusign.com/platform/auth/consent/obtaining-individual-consent/). It's a ONE TIME operation and is required for API calls to work for specific client-scope-uri combination. Required params explained below:\n\n- `YOUR_REQUESTED_SCOPES`: This extension uses JWT Grant, so in place of `YOUR_REQUESTED_SCOPES` you MUST put at least `signature%20impersonation`.\n - sample consent URL: https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation%20click.manage%20click.send&client_id=XYZ-123&redirect_uri=https://test.com\n\n## Custom Actions\n\n### Embedded signing\n\nEmbedded Signing gives users the ability to sign documents directly from Awell Hosted Pages using DocuSign's embedded signing feature. First an embedded signature request with a template is created and then a signing URL is generated for the signature request. Via the signing URL, we can let the user sign the request from within Awell.\n\nEmbedded signing behaves as a blocking action where the action is only completed when the signature request is effectively signed.\n\n**In order to add embedded signing, you need to add 2 actions to you care flow:**\n\n1. First, add the \"Create embedded signature request with template\" action. This action will create an embedded signature request based on a template and return a **sign URL**.\n2. Second, add the \"Embedded signing\" action. In this action you will have to configure the **sign URL** you got from the first action.\n\n**Please note that the signing URL generated in the first step is only valid for 5 minutes and is one-time only.** This means that from as soon as the first action is activated, the user has 5 minutes to complete the signing request. Loading a session by the user also means that sign url is loaded and refreshing the page will cause the link to expire. When the sign URL has expired, the document cannot be signed anymore and and the process would have to be repeated.\n",
|
32
36
|
"changelog": "# DocuSign changelog\n"
|