@awell-health/awell-extensions 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
1
2
  import z from 'zod';
2
3
  /**
3
4
  * No action fields needed:
@@ -6,5 +7,19 @@ import z from 'zod';
6
7
  *
7
8
  * The logic to compare the two will live in Hosted Pages as well.
8
9
  */
9
- export declare const fields: {};
10
- export declare const FieldsValidationSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
10
+ export declare const fields: {
11
+ label: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: FieldType.STRING;
16
+ required: false;
17
+ };
18
+ };
19
+ export declare const FieldsValidationSchema: z.ZodObject<{
20
+ label: z.ZodOptional<z.ZodString>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ label?: string | undefined;
23
+ }, {
24
+ label?: string | undefined;
25
+ }>;
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FieldsValidationSchema = exports.fields = void 0;
7
+ const extensions_core_1 = require("@awell-health/extensions-core");
7
8
  const zod_1 = __importDefault(require("zod"));
8
9
  /**
9
10
  * No action fields needed:
@@ -12,6 +13,16 @@ const zod_1 = __importDefault(require("zod"));
12
13
  *
13
14
  * The logic to compare the two will live in Hosted Pages as well.
14
15
  */
15
- exports.fields = {};
16
- exports.FieldsValidationSchema = zod_1.default.object({});
16
+ exports.fields = {
17
+ label: {
18
+ id: 'label',
19
+ label: 'Label',
20
+ description: 'Label shown to the user above the date input',
21
+ type: extensions_core_1.FieldType.STRING,
22
+ required: false,
23
+ },
24
+ };
25
+ exports.FieldsValidationSchema = zod_1.default.object({
26
+ label: zod_1.default.string().optional(),
27
+ });
17
28
  //# sourceMappingURL=fields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/identityVerification/actions/dobCheck/config/fields.ts"],"names":[],"mappings":";;;;;;AACA,8CAAwC;AAExC;;;;;;GAMG;AACU,QAAA,MAAM,GAAG,EAAkC,CAAA;AAE3C,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAC5C,EAAoD,CACrD,CAAA"}
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/identityVerification/actions/dobCheck/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAExC;;;;;;GAMG;AACU,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,8CAA8C;QAC3D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACqB,CAAC,CAAA"}
@@ -11,7 +11,9 @@ describe('Identity verification - DOB check', () => {
11
11
  test('Should work', async () => {
12
12
  await extensionAction.onEvent({
13
13
  payload: (0, tests_1.generateTestPayload)({
14
- fields: {},
14
+ fields: {
15
+ dobCheck: 'Enter your date of birth to verify your identity',
16
+ },
15
17
  settings: {},
16
18
  }),
17
19
  onComplete,
@@ -1 +1 @@
1
- {"version":3,"file":"dobCheck.test.js","sourceRoot":"","sources":["../../../../../extensions/identityVerification/actions/dobCheck/dobCheck.test.ts"],"names":[],"mappings":";;AAAA,mEAA2D;AAC3D,mCAA6C;AAC7C,wBAA4B;AAE5B,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,GACjE,6BAAW,CAAC,UAAU,CAAC,WAAQ,CAAC,CAAA;IAElC,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,EAAE,CAAA;IACd,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE;QAC7B,MAAM,eAAe,CAAC,OAAO,CAAC;YAC5B,OAAO,EAAE,IAAA,2BAAmB,EAAC;gBAC3B,MAAM,EAAE,EAAE;gBACV,QAAQ,EAAE,EAAE;aACb,CAAC;YACF,UAAU;YACV,OAAO;YACP,OAAO;SACR,CAAC,CAAA;QAEF;;WAEG;QACH,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;QACzC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"dobCheck.test.js","sourceRoot":"","sources":["../../../../../extensions/identityVerification/actions/dobCheck/dobCheck.test.ts"],"names":[],"mappings":";;AAAA,mEAA2D;AAC3D,mCAA6C;AAC7C,wBAA4B;AAE5B,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,GACjE,6BAAW,CAAC,UAAU,CAAC,WAAQ,CAAC,CAAA;IAElC,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,EAAE,CAAA;IACd,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE;QAC7B,MAAM,eAAe,CAAC,OAAO,CAAC;YAC5B,OAAO,EAAE,IAAA,2BAAmB,EAAC;gBAC3B,MAAM,EAAE;oBACN,QAAQ,EAAE,kDAAkD;iBAC7D;gBACD,QAAQ,EAAE,EAAE;aACb,CAAC;YACF,UAAU;YACV,OAAO;YACP,OAAO;SACR,CAAC,CAAA;QAEF;;WAEG;QACH,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;QACzC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,4 +1,12 @@
1
1
  declare const actions: {
2
- dobCheck: import("@awell-health/extensions-core").Action<{}, {}, "success">;
2
+ dobCheck: import("@awell-health/extensions-core").Action<{
3
+ label: {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ type: import("@awell-health/extensions-core").FieldType.STRING;
8
+ required: false;
9
+ };
10
+ }, {}, "success">;
3
11
  };
4
12
  export default actions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {