@awell-health/awell-extensions 1.1.39 → 1.1.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/dist/extensions/markdown.json +1 -1
  2. package/dist/extensions/math/index.js +4 -0
  3. package/dist/extensions/math/index.js.map +1 -1
  4. package/dist/extensions/math/v1/actions/divide/config/dataPoints.d.ts +6 -0
  5. package/dist/extensions/math/v1/actions/divide/config/dataPoints.js +10 -0
  6. package/dist/extensions/math/v1/actions/divide/config/dataPoints.js.map +1 -0
  7. package/dist/extensions/math/v1/actions/divide/config/fields.d.ts +28 -0
  8. package/dist/extensions/math/v1/actions/divide/config/fields.js +26 -0
  9. package/dist/extensions/math/v1/actions/divide/config/fields.js.map +1 -0
  10. package/dist/extensions/math/v1/actions/divide/config/index.d.ts +2 -0
  11. package/dist/extensions/math/v1/actions/divide/config/index.js +9 -0
  12. package/dist/extensions/math/v1/actions/divide/config/index.js.map +1 -0
  13. package/dist/extensions/math/v1/actions/divide/divide.d.ts +4 -0
  14. package/dist/extensions/math/v1/actions/divide/divide.js +28 -0
  15. package/dist/extensions/math/v1/actions/divide/divide.js.map +1 -0
  16. package/dist/extensions/math/v1/actions/divide/divide.test.d.ts +1 -0
  17. package/dist/extensions/math/v1/actions/divide/divide.test.js +38 -0
  18. package/dist/extensions/math/v1/actions/divide/divide.test.js.map +1 -0
  19. package/dist/extensions/math/v1/actions/divide/index.d.ts +1 -0
  20. package/dist/extensions/math/v1/actions/divide/index.js +6 -0
  21. package/dist/extensions/math/v1/actions/divide/index.js.map +1 -0
  22. package/dist/extensions/math/v1/actions/index.d.ts +4 -0
  23. package/dist/extensions/math/v1/actions/index.js +9 -1
  24. package/dist/extensions/math/v1/actions/index.js.map +1 -1
  25. package/dist/extensions/math/v1/actions/multiply/config/dataPoints.d.ts +6 -0
  26. package/dist/extensions/math/v1/actions/multiply/config/dataPoints.js +10 -0
  27. package/dist/extensions/math/v1/actions/multiply/config/dataPoints.js.map +1 -0
  28. package/dist/extensions/math/v1/actions/multiply/config/fields.d.ts +208 -0
  29. package/dist/extensions/math/v1/actions/multiply/config/fields.js +170 -0
  30. package/dist/extensions/math/v1/actions/multiply/config/fields.js.map +1 -0
  31. package/dist/extensions/math/v1/actions/multiply/config/index.d.ts +2 -0
  32. package/dist/extensions/math/v1/actions/multiply/config/index.js +9 -0
  33. package/dist/extensions/math/v1/actions/multiply/config/index.js.map +1 -0
  34. package/dist/extensions/math/v1/actions/multiply/index.d.ts +1 -0
  35. package/dist/extensions/math/v1/actions/multiply/index.js +6 -0
  36. package/dist/extensions/math/v1/actions/multiply/index.js.map +1 -0
  37. package/dist/extensions/math/v1/actions/multiply/multiply.d.ts +4 -0
  38. package/dist/extensions/math/v1/actions/multiply/multiply.js +31 -0
  39. package/dist/extensions/math/v1/actions/multiply/multiply.js.map +1 -0
  40. package/dist/extensions/math/v1/actions/multiply/multiply.test.d.ts +1 -0
  41. package/dist/extensions/math/v1/actions/multiply/multiply.test.js +74 -0
  42. package/dist/extensions/math/v1/actions/multiply/multiply.test.js.map +1 -0
  43. package/dist/extensions/math/v1/actions/subtract/config/dataPoints.d.ts +10 -0
  44. package/dist/extensions/math/v1/actions/subtract/config/dataPoints.js +14 -0
  45. package/dist/extensions/math/v1/actions/subtract/config/dataPoints.js.map +1 -0
  46. package/dist/extensions/math/v1/actions/subtract/config/fields.d.ts +28 -0
  47. package/dist/extensions/math/v1/actions/subtract/config/fields.js +26 -0
  48. package/dist/extensions/math/v1/actions/subtract/config/fields.js.map +1 -0
  49. package/dist/extensions/math/v1/actions/subtract/config/index.d.ts +2 -0
  50. package/dist/extensions/math/v1/actions/subtract/config/index.js +9 -0
  51. package/dist/extensions/math/v1/actions/subtract/config/index.js.map +1 -0
  52. package/dist/extensions/math/v1/actions/subtract/index.d.ts +1 -0
  53. package/dist/extensions/math/v1/actions/subtract/index.js +6 -0
  54. package/dist/extensions/math/v1/actions/subtract/index.js.map +1 -0
  55. package/dist/extensions/math/v1/actions/subtract/subtract.d.ts +4 -0
  56. package/dist/extensions/math/v1/actions/subtract/subtract.js +29 -0
  57. package/dist/extensions/math/v1/actions/subtract/subtract.js.map +1 -0
  58. package/dist/extensions/math/v1/actions/subtract/subtract.test.d.ts +1 -0
  59. package/dist/extensions/math/v1/actions/subtract/subtract.test.js +39 -0
  60. package/dist/extensions/math/v1/actions/subtract/subtract.test.js.map +1 -0
  61. package/dist/extensions/math/v1/actions/sum/config/dataPoints.d.ts +6 -0
  62. package/dist/extensions/math/v1/actions/sum/config/dataPoints.js +10 -0
  63. package/dist/extensions/math/v1/actions/sum/config/dataPoints.js.map +1 -0
  64. package/dist/extensions/math/v1/actions/sum/config/fields.d.ts +208 -0
  65. package/dist/extensions/math/v1/actions/sum/config/fields.js +170 -0
  66. package/dist/extensions/math/v1/actions/sum/config/fields.js.map +1 -0
  67. package/dist/extensions/math/v1/actions/sum/config/index.d.ts +2 -0
  68. package/dist/extensions/math/v1/actions/sum/config/index.js +9 -0
  69. package/dist/extensions/math/v1/actions/sum/config/index.js.map +1 -0
  70. package/dist/extensions/math/v1/actions/sum/index.d.ts +1 -0
  71. package/dist/extensions/math/v1/actions/sum/index.js +6 -0
  72. package/dist/extensions/math/v1/actions/sum/index.js.map +1 -0
  73. package/dist/extensions/math/v1/actions/sum/sum.d.ts +4 -0
  74. package/dist/extensions/math/v1/actions/sum/sum.js +31 -0
  75. package/dist/extensions/math/v1/actions/sum/sum.js.map +1 -0
  76. package/dist/extensions/math/v1/actions/sum/sum.test.d.ts +1 -0
  77. package/dist/extensions/math/v1/actions/sum/sum.test.js +74 -0
  78. package/dist/extensions/math/v1/actions/sum/sum.test.js.map +1 -0
  79. package/package.json +1 -1
@@ -88,7 +88,7 @@
88
88
  "changelog": "# Mailgun changelog"
89
89
  },
90
90
  "math": {
91
- "readme": "---\ntitle: Math\ndescription: This extension adds custom actions to your care flow for simple mathematical operations.\n---\n# Math\n\nThis extension adds custom actions to your care flow for simple mathematical operations.\n\n## Custom Actions\n\n### Generate random number\n\nGenerates a random (whole) number that falls between the ranges of two numbers [min, max].\n\n### Calculate date difference\n\nCalculate the difference between two dates where \"date left\" is the minuend and \"date right\" the subtrahend.\n\n**You can choose the unit in which you would like to see the difference expressed:**\n\n1. Seconds: get the number of seconds between the given dates. Fractional seconds are truncated towards zero.\n2. Minutes: get the signed number of full (rounded towards 0) minutes between the given dates. Fractional minutes are truncated towards zero.\n3. Hours: get the number of hours between the given dates. Fractional hours are truncated towards zero.\n4. Days: get the number of full day periods between two dates. Fractional days are truncated towards zero.\n5. Weeks: get the number of full weeks between two dates. Fractional weeks are truncated towards zero.\n6. Months: get the number of full months between the given dates. Fractional months are truncated towards zero.\n7. Years: get the number of full years between the given dates.\n",
91
+ "readme": "---\ntitle: Math\ndescription: This extension adds custom actions to your care flow for simple mathematical operations.\n---\n# Math\n\nThis extension adds custom actions to your care flow for simple mathematical operations.\n\n## Custom Actions\n\n### Sum\n\nCalculate the sum of two or more addends.\n\n### Subtract\n\nCalculate the difference between two numbers.\n\n### Multiply\n\nMultiply a series of numbers to get a final product.\n\n### Divide\n\nDivide two numbers.\n\n### Generate random number\n\nGenerates a random (whole) number that falls between the ranges of two numbers [min, max].\n\n### Calculate date difference\n\nCalculate the difference between two dates where \"date left\" is the minuend and \"date right\" the subtrahend.\n\n**You can choose the unit in which you would like to see the difference expressed:**\n\n1. Seconds: get the number of seconds between the given dates. Fractional seconds are truncated towards zero.\n2. Minutes: get the signed number of full (rounded towards 0) minutes between the given dates. Fractional minutes are truncated towards zero.\n3. Hours: get the number of hours between the given dates. Fractional hours are truncated towards zero.\n4. Days: get the number of full day periods between two dates. Fractional days are truncated towards zero.\n5. Weeks: get the number of full weeks between two dates. Fractional weeks are truncated towards zero.\n6. Months: get the number of full months between the given dates. Fractional months are truncated towards zero.\n7. Years: get the number of full years between the given dates.\n",
92
92
  "changelog": "# Math changelog"
93
93
  },
94
94
  "medplum": {
@@ -17,6 +17,10 @@ exports.MathExtension = {
17
17
  actions: {
18
18
  generateRandomNumber: actions_1.generateRandomNumber,
19
19
  calculateDateDifference: actions_1.calculateDateDifference,
20
+ subtract: actions_1.subtract,
21
+ sum: actions_1.sum,
22
+ divide: actions_1.divide,
23
+ multiply: actions_1.multiply,
20
24
  },
21
25
  };
22
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/math/index.ts"],"names":[],"mappings":";;;AAAA,0CAA4E;AAE5E,yCAAqC;AACrC,mEAAoE;AAEvD,QAAA,aAAa,GAAc;IACtC,GAAG,EAAE,MAAM;IACX,QAAQ,EAAE,0BAAQ,CAAC,IAAI;IACvB,KAAK,EAAE,MAAM;IACb,QAAQ,EACN,4FAA4F;IAC9F,WAAW,EACT,4FAA4F;IAC9F,QAAQ,EAAR,mBAAQ;IACR,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,OAAO,EAAE;QACP,oBAAoB,EAApB,8BAAoB;QACpB,uBAAuB,EAAvB,iCAAuB;KACxB;CACF,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/math/index.ts"],"names":[],"mappings":";;;AAAA,0CAOqB;AAErB,yCAAqC;AACrC,mEAAoE;AAEvD,QAAA,aAAa,GAAc;IACtC,GAAG,EAAE,MAAM;IACX,QAAQ,EAAE,0BAAQ,CAAC,IAAI;IACvB,KAAK,EAAE,MAAM;IACb,QAAQ,EACN,4FAA4F;IAC9F,WAAW,EACT,4FAA4F;IAC9F,QAAQ,EAAR,mBAAQ;IACR,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,OAAO,EAAE;QACP,oBAAoB,EAApB,8BAAoB;QACpB,uBAAuB,EAAvB,iCAAuB;QACvB,QAAQ,EAAR,kBAAQ;QACR,GAAG,EAAH,aAAG;QACH,MAAM,EAAN,gBAAM;QACN,QAAQ,EAAR,kBAAQ;KACT;CACF,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ quotient: {
3
+ key: string;
4
+ valueType: "number";
5
+ };
6
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ quotient: {
6
+ key: 'quotient',
7
+ valueType: 'number',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../../extensions/math/v1/actions/divide/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,QAAQ,EAAE;QACR,GAAG,EAAE,UAAU;QACf,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ import { FieldType } from '@awell-health/extensions-core';
3
+ export declare const fields: {
4
+ dividend: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ required: true;
9
+ type: FieldType.NUMERIC;
10
+ };
11
+ divisor: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ required: true;
16
+ type: FieldType.NUMERIC;
17
+ };
18
+ };
19
+ export declare const FieldsValidationSchema: z.ZodObject<{
20
+ dividend: z.ZodNumber;
21
+ divisor: z.ZodNumber;
22
+ }, "strip", z.ZodTypeAny, {
23
+ dividend: number;
24
+ divisor: number;
25
+ }, {
26
+ dividend: number;
27
+ divisor: number;
28
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ 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
+ dividend: {
8
+ id: 'dividend',
9
+ label: 'Dividend',
10
+ description: '',
11
+ required: true,
12
+ type: extensions_core_1.FieldType.NUMERIC,
13
+ },
14
+ divisor: {
15
+ id: 'divisor',
16
+ label: 'Divisor',
17
+ description: '',
18
+ required: true,
19
+ type: extensions_core_1.FieldType.NUMERIC,
20
+ },
21
+ };
22
+ exports.FieldsValidationSchema = zod_1.z.object({
23
+ dividend: zod_1.z.number(),
24
+ divisor: zod_1.z.number(),
25
+ });
26
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/math/v1/actions/divide/config/fields.ts"],"names":[],"mappings":";;;AAAA,6BAAwC;AACxC,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,EAAE;QACf,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAS,CAAC,OAAO;KACxB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,EAAE;QACf,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,2BAAS,CAAC,OAAO;KACxB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CAC8B,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { dataPoints } from './dataPoints';
2
+ export { fields, FieldsValidationSchema } from './fields';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = exports.dataPoints = void 0;
4
+ var dataPoints_1 = require("./dataPoints");
5
+ Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return dataPoints_1.dataPoints; } });
6
+ var fields_1 = require("./fields");
7
+ Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
8
+ Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/math/v1/actions/divide/config/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../../settings';
3
+ import { fields } from './config';
4
+ export declare const divide: Action<typeof fields, typeof settings>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.divide = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const config_1 = require("./config");
6
+ const zod_1 = require("zod");
7
+ exports.divide = {
8
+ key: 'divide',
9
+ title: 'Divide',
10
+ description: 'Divide two numbers',
11
+ category: extensions_core_1.Category.MATH,
12
+ fields: config_1.fields,
13
+ dataPoints: config_1.dataPoints,
14
+ previewable: true,
15
+ onActivityCreated: async (payload, onComplete, onError) => {
16
+ const { fields: { dividend, divisor }, } = (0, extensions_core_1.validate)({
17
+ schema: zod_1.z.object({ fields: config_1.FieldsValidationSchema }),
18
+ payload,
19
+ });
20
+ const quotient = dividend / divisor;
21
+ await onComplete({
22
+ data_points: {
23
+ quotient: String(quotient),
24
+ },
25
+ });
26
+ },
27
+ };
28
+ //# sourceMappingURL=divide.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divide.js","sourceRoot":"","sources":["../../../../../../extensions/math/v1/actions/divide/divide.ts"],"names":[],"mappings":";;;AACA,mEAAkE;AAElE,qCAAqE;AACrE,6BAAuB;AAEV,QAAA,MAAM,GAA2C;IAC5D,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,oBAAoB;IACjC,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,OAAO,EAAiB,EAAE;QACvE,MAAM,EACJ,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,GAC9B,GAAG,IAAA,0BAAQ,EAAC;YACX,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,+BAAsB,EAAE,CAAC;YACpD,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;QAEnC,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;aAC3B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const zod_1 = require("zod");
4
+ const tests_1 = require("../../../../../src/tests");
5
+ const divide_1 = require("./divide");
6
+ describe('Divide', () => {
7
+ const onComplete = jest.fn();
8
+ const onError = jest.fn();
9
+ beforeEach(() => {
10
+ onComplete.mockClear();
11
+ onError.mockClear();
12
+ });
13
+ test('Should work', async () => {
14
+ await divide_1.divide.onActivityCreated((0, tests_1.generateTestPayload)({
15
+ fields: {
16
+ dividend: 10,
17
+ divisor: 5,
18
+ },
19
+ settings: {},
20
+ }), onComplete, onError);
21
+ expect(onComplete).toHaveBeenCalledWith({
22
+ data_points: {
23
+ quotient: '2',
24
+ },
25
+ });
26
+ expect(onError).not.toHaveBeenCalled();
27
+ });
28
+ test('Should return an error if action fields are undefined', async () => {
29
+ await expect(divide_1.divide.onActivityCreated((0, tests_1.generateTestPayload)({
30
+ fields: {
31
+ dividend: undefined,
32
+ divisor: undefined,
33
+ },
34
+ settings: {},
35
+ }), onComplete, onError)).rejects.toThrow(zod_1.ZodError);
36
+ });
37
+ });
38
+ //# sourceMappingURL=divide.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divide.test.js","sourceRoot":"","sources":["../../../../../../extensions/math/v1/actions/divide/divide.test.ts"],"names":[],"mappings":";;AAAA,6BAA8B;AAC9B,oDAA8D;AAC9D,qCAAiC;AAEjC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,CAAC,SAAS,EAAE,CAAA;QACtB,OAAO,CAAC,SAAS,EAAE,CAAA;IACrB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE;QAC7B,MAAM,eAAM,CAAC,iBAAiB,CAC5B,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,QAAQ,EAAE,EAAE;gBACZ,OAAO,EAAE,CAAC;aACX;YACD,QAAQ,EAAE,EAAE;SACb,CAAC,EACF,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,QAAQ,EAAE,GAAG;aACd;SACF,CAAC,CAAA;QACF,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;QACvE,MAAM,MAAM,CACV,eAAM,CAAC,iBAAiB,CACtB,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,QAAQ,EAAE,SAAS;gBACnB,OAAO,EAAE,SAAS;aACnB;YACD,QAAQ,EAAE,EAAE;SACb,CAAC,EACF,UAAU,EACV,OAAO,CACR,CACF,CAAC,OAAO,CAAC,OAAO,CAAC,cAAQ,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { divide } from './divide';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.divide = void 0;
4
+ var divide_1 = require("./divide");
5
+ Object.defineProperty(exports, "divide", { enumerable: true, get: function () { return divide_1.divide; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/math/v1/actions/divide/index.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAAxB,gGAAA,MAAM,OAAA"}
@@ -1,2 +1,6 @@
1
1
  export { generateRandomNumber } from './generateRandomNumber';
2
2
  export { calculateDateDifference } from './calculateDateDifference';
3
+ export { sum } from './sum';
4
+ export { subtract } from './subtract';
5
+ export { divide } from './divide';
6
+ export { multiply } from './multiply';
@@ -1,8 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.calculateDateDifference = exports.generateRandomNumber = void 0;
3
+ exports.multiply = exports.divide = exports.subtract = exports.sum = exports.calculateDateDifference = exports.generateRandomNumber = void 0;
4
4
  var generateRandomNumber_1 = require("./generateRandomNumber");
5
5
  Object.defineProperty(exports, "generateRandomNumber", { enumerable: true, get: function () { return generateRandomNumber_1.generateRandomNumber; } });
6
6
  var calculateDateDifference_1 = require("./calculateDateDifference");
7
7
  Object.defineProperty(exports, "calculateDateDifference", { enumerable: true, get: function () { return calculateDateDifference_1.calculateDateDifference; } });
8
+ var sum_1 = require("./sum");
9
+ Object.defineProperty(exports, "sum", { enumerable: true, get: function () { return sum_1.sum; } });
10
+ var subtract_1 = require("./subtract");
11
+ Object.defineProperty(exports, "subtract", { enumerable: true, get: function () { return subtract_1.subtract; } });
12
+ var divide_1 = require("./divide");
13
+ Object.defineProperty(exports, "divide", { enumerable: true, get: function () { return divide_1.divide; } });
14
+ var multiply_1 = require("./multiply");
15
+ Object.defineProperty(exports, "multiply", { enumerable: true, get: function () { return multiply_1.multiply; } });
8
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/math/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/math/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,qEAAmE;AAA1D,kIAAA,uBAAuB,OAAA;AAChC,6BAA2B;AAAlB,0FAAA,GAAG,OAAA;AACZ,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AACjB,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ product: {
3
+ key: string;
4
+ valueType: "number";
5
+ };
6
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ product: {
6
+ key: 'product',
7
+ valueType: 'number',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../../extensions/math/v1/actions/multiply/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE;QACP,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,208 @@
1
+ import { z } from 'zod';
2
+ import { FieldType } from '@awell-health/extensions-core';
3
+ export declare const fields: {
4
+ factor_01: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ required: true;
9
+ type: FieldType.NUMERIC;
10
+ };
11
+ factor_02: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ required: true;
16
+ type: FieldType.NUMERIC;
17
+ };
18
+ factor_03: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ required: false;
23
+ type: FieldType.NUMERIC;
24
+ };
25
+ factor_04: {
26
+ id: string;
27
+ label: string;
28
+ description: string;
29
+ required: false;
30
+ type: FieldType.NUMERIC;
31
+ };
32
+ factor_05: {
33
+ id: string;
34
+ label: string;
35
+ description: string;
36
+ required: false;
37
+ type: FieldType.NUMERIC;
38
+ };
39
+ factor_06: {
40
+ id: string;
41
+ label: string;
42
+ description: string;
43
+ required: false;
44
+ type: FieldType.NUMERIC;
45
+ };
46
+ factor_07: {
47
+ id: string;
48
+ label: string;
49
+ description: string;
50
+ required: false;
51
+ type: FieldType.NUMERIC;
52
+ };
53
+ factor_08: {
54
+ id: string;
55
+ label: string;
56
+ description: string;
57
+ required: false;
58
+ type: FieldType.NUMERIC;
59
+ };
60
+ factor_09: {
61
+ id: string;
62
+ label: string;
63
+ description: string;
64
+ required: false;
65
+ type: FieldType.NUMERIC;
66
+ };
67
+ factor_10: {
68
+ id: string;
69
+ label: string;
70
+ description: string;
71
+ required: false;
72
+ type: FieldType.NUMERIC;
73
+ };
74
+ factor_11: {
75
+ id: string;
76
+ label: string;
77
+ description: string;
78
+ required: false;
79
+ type: FieldType.NUMERIC;
80
+ };
81
+ factor_12: {
82
+ id: string;
83
+ label: string;
84
+ description: string;
85
+ required: false;
86
+ type: FieldType.NUMERIC;
87
+ };
88
+ factor_13: {
89
+ id: string;
90
+ label: string;
91
+ description: string;
92
+ required: false;
93
+ type: FieldType.NUMERIC;
94
+ };
95
+ factor_14: {
96
+ id: string;
97
+ label: string;
98
+ description: string;
99
+ required: false;
100
+ type: FieldType.NUMERIC;
101
+ };
102
+ factor_15: {
103
+ id: string;
104
+ label: string;
105
+ description: string;
106
+ required: false;
107
+ type: FieldType.NUMERIC;
108
+ };
109
+ factor_16: {
110
+ id: string;
111
+ label: string;
112
+ description: string;
113
+ required: false;
114
+ type: FieldType.NUMERIC;
115
+ };
116
+ factor_17: {
117
+ id: string;
118
+ label: string;
119
+ description: string;
120
+ required: false;
121
+ type: FieldType.NUMERIC;
122
+ };
123
+ factor_18: {
124
+ id: string;
125
+ label: string;
126
+ description: string;
127
+ required: false;
128
+ type: FieldType.NUMERIC;
129
+ };
130
+ factor_19: {
131
+ id: string;
132
+ label: string;
133
+ description: string;
134
+ required: false;
135
+ type: FieldType.NUMERIC;
136
+ };
137
+ factor_20: {
138
+ id: string;
139
+ label: string;
140
+ description: string;
141
+ required: false;
142
+ type: FieldType.NUMERIC;
143
+ };
144
+ };
145
+ export declare const FieldsValidationSchema: z.ZodObject<{
146
+ factor_01: z.ZodNumber;
147
+ factor_02: z.ZodNumber;
148
+ factor_03: z.ZodOptional<z.ZodNumber>;
149
+ factor_04: z.ZodOptional<z.ZodNumber>;
150
+ factor_05: z.ZodOptional<z.ZodNumber>;
151
+ factor_06: z.ZodOptional<z.ZodNumber>;
152
+ factor_07: z.ZodOptional<z.ZodNumber>;
153
+ factor_08: z.ZodOptional<z.ZodNumber>;
154
+ factor_09: z.ZodOptional<z.ZodNumber>;
155
+ factor_10: z.ZodOptional<z.ZodNumber>;
156
+ factor_11: z.ZodOptional<z.ZodNumber>;
157
+ factor_12: z.ZodOptional<z.ZodNumber>;
158
+ factor_13: z.ZodOptional<z.ZodNumber>;
159
+ factor_14: z.ZodOptional<z.ZodNumber>;
160
+ factor_15: z.ZodOptional<z.ZodNumber>;
161
+ factor_16: z.ZodOptional<z.ZodNumber>;
162
+ factor_17: z.ZodOptional<z.ZodNumber>;
163
+ factor_18: z.ZodOptional<z.ZodNumber>;
164
+ factor_19: z.ZodOptional<z.ZodNumber>;
165
+ factor_20: z.ZodOptional<z.ZodNumber>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ factor_01: number;
168
+ factor_02: number;
169
+ factor_03?: number | undefined;
170
+ factor_04?: number | undefined;
171
+ factor_05?: number | undefined;
172
+ factor_06?: number | undefined;
173
+ factor_07?: number | undefined;
174
+ factor_08?: number | undefined;
175
+ factor_09?: number | undefined;
176
+ factor_10?: number | undefined;
177
+ factor_11?: number | undefined;
178
+ factor_12?: number | undefined;
179
+ factor_13?: number | undefined;
180
+ factor_14?: number | undefined;
181
+ factor_15?: number | undefined;
182
+ factor_16?: number | undefined;
183
+ factor_17?: number | undefined;
184
+ factor_18?: number | undefined;
185
+ factor_19?: number | undefined;
186
+ factor_20?: number | undefined;
187
+ }, {
188
+ factor_01: number;
189
+ factor_02: number;
190
+ factor_03?: number | undefined;
191
+ factor_04?: number | undefined;
192
+ factor_05?: number | undefined;
193
+ factor_06?: number | undefined;
194
+ factor_07?: number | undefined;
195
+ factor_08?: number | undefined;
196
+ factor_09?: number | undefined;
197
+ factor_10?: number | undefined;
198
+ factor_11?: number | undefined;
199
+ factor_12?: number | undefined;
200
+ factor_13?: number | undefined;
201
+ factor_14?: number | undefined;
202
+ factor_15?: number | undefined;
203
+ factor_16?: number | undefined;
204
+ factor_17?: number | undefined;
205
+ factor_18?: number | undefined;
206
+ factor_19?: number | undefined;
207
+ factor_20?: number | undefined;
208
+ }>;
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ 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
+ factor_01: {
8
+ id: 'factor_01',
9
+ label: 'Factor',
10
+ description: '',
11
+ required: true,
12
+ type: extensions_core_1.FieldType.NUMERIC,
13
+ },
14
+ factor_02: {
15
+ id: 'factor_02',
16
+ label: 'Factor',
17
+ description: '',
18
+ required: true,
19
+ type: extensions_core_1.FieldType.NUMERIC,
20
+ },
21
+ factor_03: {
22
+ id: 'factor_03',
23
+ label: 'Factor',
24
+ description: '',
25
+ required: false,
26
+ type: extensions_core_1.FieldType.NUMERIC,
27
+ },
28
+ factor_04: {
29
+ id: 'factor_04',
30
+ label: 'Factor',
31
+ description: '',
32
+ required: false,
33
+ type: extensions_core_1.FieldType.NUMERIC,
34
+ },
35
+ factor_05: {
36
+ id: 'factor_05',
37
+ label: 'Factor',
38
+ description: '',
39
+ required: false,
40
+ type: extensions_core_1.FieldType.NUMERIC,
41
+ },
42
+ factor_06: {
43
+ id: 'factor_06',
44
+ label: 'Factor',
45
+ description: '',
46
+ required: false,
47
+ type: extensions_core_1.FieldType.NUMERIC,
48
+ },
49
+ factor_07: {
50
+ id: 'factor_07',
51
+ label: 'Factor',
52
+ description: '',
53
+ required: false,
54
+ type: extensions_core_1.FieldType.NUMERIC,
55
+ },
56
+ factor_08: {
57
+ id: 'factor_08',
58
+ label: 'Factor',
59
+ description: '',
60
+ required: false,
61
+ type: extensions_core_1.FieldType.NUMERIC,
62
+ },
63
+ factor_09: {
64
+ id: 'factor_09',
65
+ label: 'Factor',
66
+ description: '',
67
+ required: false,
68
+ type: extensions_core_1.FieldType.NUMERIC,
69
+ },
70
+ factor_10: {
71
+ id: 'factor_10',
72
+ label: 'Factor',
73
+ description: '',
74
+ required: false,
75
+ type: extensions_core_1.FieldType.NUMERIC,
76
+ },
77
+ factor_11: {
78
+ id: 'factor_11',
79
+ label: 'Factor',
80
+ description: '',
81
+ required: false,
82
+ type: extensions_core_1.FieldType.NUMERIC,
83
+ },
84
+ factor_12: {
85
+ id: 'factor_12',
86
+ label: 'Factor',
87
+ description: '',
88
+ required: false,
89
+ type: extensions_core_1.FieldType.NUMERIC,
90
+ },
91
+ factor_13: {
92
+ id: 'factor_13',
93
+ label: 'Factor',
94
+ description: '',
95
+ required: false,
96
+ type: extensions_core_1.FieldType.NUMERIC,
97
+ },
98
+ factor_14: {
99
+ id: 'factor_14',
100
+ label: 'Factor',
101
+ description: '',
102
+ required: false,
103
+ type: extensions_core_1.FieldType.NUMERIC,
104
+ },
105
+ factor_15: {
106
+ id: 'factor_15',
107
+ label: 'Factor',
108
+ description: '',
109
+ required: false,
110
+ type: extensions_core_1.FieldType.NUMERIC,
111
+ },
112
+ factor_16: {
113
+ id: 'factor_16',
114
+ label: 'Factor',
115
+ description: '',
116
+ required: false,
117
+ type: extensions_core_1.FieldType.NUMERIC,
118
+ },
119
+ factor_17: {
120
+ id: 'factor_17',
121
+ label: 'Factor',
122
+ description: '',
123
+ required: false,
124
+ type: extensions_core_1.FieldType.NUMERIC,
125
+ },
126
+ factor_18: {
127
+ id: 'factor_18',
128
+ label: 'Factor',
129
+ description: '',
130
+ required: false,
131
+ type: extensions_core_1.FieldType.NUMERIC,
132
+ },
133
+ factor_19: {
134
+ id: 'factor_19',
135
+ label: 'Factor',
136
+ description: '',
137
+ required: false,
138
+ type: extensions_core_1.FieldType.NUMERIC,
139
+ },
140
+ factor_20: {
141
+ id: 'factor_20',
142
+ label: 'Factor',
143
+ description: '',
144
+ required: false,
145
+ type: extensions_core_1.FieldType.NUMERIC,
146
+ },
147
+ };
148
+ exports.FieldsValidationSchema = zod_1.z.object({
149
+ factor_01: zod_1.z.number(),
150
+ factor_02: zod_1.z.number(),
151
+ factor_03: zod_1.z.number().optional(),
152
+ factor_04: zod_1.z.number().optional(),
153
+ factor_05: zod_1.z.number().optional(),
154
+ factor_06: zod_1.z.number().optional(),
155
+ factor_07: zod_1.z.number().optional(),
156
+ factor_08: zod_1.z.number().optional(),
157
+ factor_09: zod_1.z.number().optional(),
158
+ factor_10: zod_1.z.number().optional(),
159
+ factor_11: zod_1.z.number().optional(),
160
+ factor_12: zod_1.z.number().optional(),
161
+ factor_13: zod_1.z.number().optional(),
162
+ factor_14: zod_1.z.number().optional(),
163
+ factor_15: zod_1.z.number().optional(),
164
+ factor_16: zod_1.z.number().optional(),
165
+ factor_17: zod_1.z.number().optional(),
166
+ factor_18: zod_1.z.number().optional(),
167
+ factor_19: zod_1.z.number().optional(),
168
+ factor_20: zod_1.z.number().optional(),
169
+ });
170
+ //# sourceMappingURL=fields.js.map