@awell-health/awell-extensions 2.1.8 → 2.1.10
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/transform/v1/actions/listToCommaSeparatedText/config/fields.d.ts +3 -3
- package/dist/extensions/transform/v1/actions/listToCommaSeparatedText/config/fields.js +1 -1
- package/dist/extensions/transform/v1/actions/listToCommaSeparatedText/config/fields.js.map +1 -1
- package/dist/extensions/transform/v1/actions/listToCommaSeparatedText/listToCommaSeparatedText.js +22 -9
- package/dist/extensions/transform/v1/actions/listToCommaSeparatedText/listToCommaSeparatedText.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,9 +10,9 @@ export declare const fields: {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
export declare const FieldsValidationSchema: z.ZodObject<{
|
|
13
|
-
list: z.
|
|
13
|
+
list: z.ZodUnknown;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
list
|
|
15
|
+
list?: unknown;
|
|
16
16
|
}, {
|
|
17
|
-
list
|
|
17
|
+
list?: unknown;
|
|
18
18
|
}>;
|
|
@@ -14,6 +14,6 @@ exports.fields = {
|
|
|
14
14
|
};
|
|
15
15
|
exports.FieldsValidationSchema = zod_1.z.object({
|
|
16
16
|
// the string array is received as a string in the extension server, so we need to parse it to an array
|
|
17
|
-
list: zod_1.z.
|
|
17
|
+
list: zod_1.z.unknown(),
|
|
18
18
|
});
|
|
19
19
|
//# sourceMappingURL=fields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/transform/v1/actions/listToCommaSeparatedText/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EACT,2DAA2D;QAC7D,IAAI,EAAE,2BAAS,CAAC,YAAY;QAC5B,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,uGAAuG;IACvG,IAAI,EAAE,OAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/transform/v1/actions/listToCommaSeparatedText/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EACT,2DAA2D;QAC7D,IAAI,EAAE,2BAAS,CAAC,YAAY;QAC5B,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,uGAAuG;IACvG,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE;CACgC,CAAC,CAAA"}
|
package/dist/extensions/transform/v1/actions/listToCommaSeparatedText/listToCommaSeparatedText.js
CHANGED
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.listToCommaSeparatedText = void 0;
|
|
4
4
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
5
|
const config_1 = require("./config");
|
|
6
|
-
const
|
|
6
|
+
const awell_1 = require("../../../../../src/lib/awell");
|
|
7
|
+
// import { z } from 'zod'
|
|
7
8
|
exports.listToCommaSeparatedText = {
|
|
8
9
|
key: 'listToCommaSeparatedText',
|
|
9
10
|
title: 'List to comma separated text',
|
|
@@ -13,18 +14,30 @@ exports.listToCommaSeparatedText = {
|
|
|
13
14
|
dataPoints: config_1.dataPoints,
|
|
14
15
|
previewable: true,
|
|
15
16
|
onActivityCreated: async (payload, onComplete) => {
|
|
16
|
-
const { fields: { list }, } = (0, extensions_core_1.validate)({
|
|
17
|
-
schema: zod_1.z.object({
|
|
18
|
-
fields: config_1.FieldsValidationSchema,
|
|
19
|
-
}),
|
|
20
|
-
payload,
|
|
21
|
-
});
|
|
22
|
-
const output = list.join(',');
|
|
23
17
|
await onComplete({
|
|
18
|
+
events: [
|
|
19
|
+
(0, awell_1.addActivityEventLog)({
|
|
20
|
+
message: JSON.stringify(payload.fields, null, 2),
|
|
21
|
+
}),
|
|
22
|
+
],
|
|
24
23
|
data_points: {
|
|
25
|
-
listText:
|
|
24
|
+
listText: 'todo',
|
|
26
25
|
},
|
|
27
26
|
});
|
|
27
|
+
// const {
|
|
28
|
+
// fields: { list },
|
|
29
|
+
// } = validate({
|
|
30
|
+
// schema: z.object({
|
|
31
|
+
// fields: FieldsValidationSchema,
|
|
32
|
+
// }),
|
|
33
|
+
// payload,
|
|
34
|
+
// })
|
|
35
|
+
// const output = list.join(',')
|
|
36
|
+
// await onComplete({
|
|
37
|
+
// data_points: {
|
|
38
|
+
// listText: output,
|
|
39
|
+
// },
|
|
40
|
+
// })
|
|
28
41
|
},
|
|
29
42
|
};
|
|
30
43
|
//# sourceMappingURL=listToCommaSeparatedText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listToCommaSeparatedText.js","sourceRoot":"","sources":["../../../../../../extensions/transform/v1/actions/listToCommaSeparatedText/listToCommaSeparatedText.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"listToCommaSeparatedText.js","sourceRoot":"","sources":["../../../../../../extensions/transform/v1/actions/listToCommaSeparatedText/listToCommaSeparatedText.ts"],"names":[],"mappings":";;;AACA,mEAAwD;AAExD,qCAA6C;AAC7C,wDAAkE;AAClE,0BAA0B;AAEb,QAAA,wBAAwB,GAIjC;IACF,GAAG,EAAE,0BAA0B;IAC/B,KAAK,EAAE,8BAA8B;IACrC,WAAW,EACT,mEAAmE;IACrE,QAAQ,EAAE,0BAAQ,CAAC,IAAI;IACvB,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE;QAC/C,MAAM,UAAU,CAAC;YACf,MAAM,EAAE;gBACN,IAAA,2BAAmB,EAAC;oBAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBACjD,CAAC;aACH;YACD,WAAW,EAAE;gBACX,QAAQ,EAAE,MAAM;aACjB;SACF,CAAC,CAAA;QAEF,UAAU;QACV,sBAAsB;QACtB,iBAAiB;QACjB,uBAAuB;QACvB,sCAAsC;QACtC,QAAQ;QACR,aAAa;QACb,KAAK;QAEL,gCAAgC;QAChC,qBAAqB;QACrB,mBAAmB;QACnB,wBAAwB;QACxB,OAAO;QACP,KAAK;IACP,CAAC;CACF,CAAA"}
|