@awell-health/awell-extensions 2.0.309 → 2.0.310
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/stedi/actions/checkEligibility/checkEligibility.js +1 -2
- package/dist/extensions/stedi/actions/checkEligibility/checkEligibility.js.map +1 -1
- package/dist/extensions/stedi/actions/checkEligibility/config/dataPoints.d.ts +1 -1
- package/dist/extensions/stedi/actions/checkEligibility/config/dataPoints.js +1 -1
- package/dist/extensions/stedi/actions/checkEligibility/config/dataPoints.js.map +1 -1
- package/dist/extensions/stedi/actions/checkEligibility/config/fields.d.ts +3 -3
- package/dist/extensions/stedi/actions/checkEligibility/config/fields.js +2 -19
- package/dist/extensions/stedi/actions/checkEligibility/config/fields.js.map +1 -1
- package/dist/extensions/stedi/actions/index.d.ts +1 -1
- package/package.json +1 -1
@@ -5,7 +5,6 @@ const extensions_core_1 = require("@awell-health/extensions-core");
|
|
5
5
|
const extensions_core_2 = require("@awell-health/extensions-core");
|
6
6
|
const settings_1 = require("../../settings");
|
7
7
|
const config_1 = require("./config");
|
8
|
-
const lodash_1 = require("lodash");
|
9
8
|
const zod_1 = require("zod");
|
10
9
|
exports.checkEligibility = {
|
11
10
|
key: 'checkEligibility',
|
@@ -25,7 +24,7 @@ exports.checkEligibility = {
|
|
25
24
|
});
|
26
25
|
await onComplete({
|
27
26
|
data_points: {
|
28
|
-
data:
|
27
|
+
data: fields.data,
|
29
28
|
},
|
30
29
|
});
|
31
30
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"checkEligibility.js","sourceRoot":"","sources":["../../../../../extensions/stedi/actions/checkEligibility/checkEligibility.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,mEAAwD;AACxD,6CAAwE;AACxE,qCAAqE;AACrE,
|
1
|
+
{"version":3,"file":"checkEligibility.js","sourceRoot":"","sources":["../../../../../extensions/stedi/actions/checkEligibility/checkEligibility.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,mEAAwD;AACxD,6CAAwE;AACxE,qCAAqE;AACrE,6BAAuB;AAEV,QAAA,gBAAgB,GAIzB;IACF,GAAG,EAAE,kBAAkB;IACvB,QAAQ,EAAE,0BAAQ,CAAC,OAAO;IAC1B,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,qEAAqE;IACvE,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAiB,EAAE;QACxD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,0BAAQ,EAAC;YAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;gBAC9B,QAAQ,EAAE,mCAAwB;aACnC,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/stedi/actions/checkEligibility/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM;QACX,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/stedi/actions/checkEligibility/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM;QACX,SAAS,EAAE,QAAQ,EAAE,4CAA4C;KAClE;CAC4C,CAAA"}
|
@@ -5,14 +5,14 @@ export declare const fields: {
|
|
5
5
|
id: string;
|
6
6
|
label: string;
|
7
7
|
description: string;
|
8
|
-
type: FieldType.
|
8
|
+
type: FieldType.STRING;
|
9
9
|
required: true;
|
10
10
|
};
|
11
11
|
};
|
12
12
|
export declare const FieldsValidationSchema: z.ZodObject<{
|
13
|
-
data: z.
|
13
|
+
data: z.ZodString;
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
15
|
-
data
|
15
|
+
data: string;
|
16
16
|
}, {
|
17
17
|
data: string;
|
18
18
|
}>;
|
@@ -3,33 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FieldsValidationSchema = exports.fields = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const extensions_core_1 = require("@awell-health/extensions-core");
|
6
|
-
const lodash_1 = require("lodash");
|
7
6
|
exports.fields = {
|
8
7
|
data: {
|
9
8
|
id: 'data',
|
10
9
|
label: 'Data',
|
11
10
|
description: 'Paste example JSON here that mocks the data Stedi would return',
|
12
|
-
type: extensions_core_1.FieldType.JSON
|
11
|
+
type: extensions_core_1.FieldType.STRING, // JSON doesn't work reliably with the agent
|
13
12
|
required: true,
|
14
13
|
},
|
15
14
|
};
|
16
15
|
exports.FieldsValidationSchema = zod_1.z.object({
|
17
|
-
data: zod_1.z
|
18
|
-
.string()
|
19
|
-
.transform((str, ctx) => {
|
20
|
-
if ((0, lodash_1.isNil)(str) || (0, lodash_1.isEmpty)(str))
|
21
|
-
return undefined;
|
22
|
-
try {
|
23
|
-
const parsedJson = JSON.parse(str);
|
24
|
-
if ((0, lodash_1.isEmpty)(parsedJson)) {
|
25
|
-
return undefined;
|
26
|
-
}
|
27
|
-
return parsedJson;
|
28
|
-
}
|
29
|
-
catch (e) {
|
30
|
-
ctx.addIssue({ code: 'custom', message: 'Invalid JSON.' });
|
31
|
-
return zod_1.z.NEVER;
|
32
|
-
}
|
33
|
-
}),
|
16
|
+
data: zod_1.z.string().min(1),
|
34
17
|
});
|
35
18
|
//# sourceMappingURL=fields.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/stedi/actions/checkEligibility/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/stedi/actions/checkEligibility/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,gEAAgE;QAClE,IAAI,EAAE,2BAAS,CAAC,MAAM,EAAE,4CAA4C;QACpE,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC0B,CAAC,CAAA"}
|