@awell-health/awell-extensions 2.1.94 → 2.1.96

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.
@@ -0,0 +1,30 @@
1
+ export declare const mockFormDefinitionOneResponse: {
2
+ form: {
3
+ title: string;
4
+ questions: {
5
+ id: string;
6
+ definition_id: string;
7
+ title: string;
8
+ key: string;
9
+ dataPointValueType: string;
10
+ questionType: string;
11
+ userQuestionType: string;
12
+ options: never[];
13
+ }[];
14
+ };
15
+ };
16
+ export declare const mockFormDefinitionTwoResponse: {
17
+ form: {
18
+ title: string;
19
+ questions: {
20
+ id: string;
21
+ definition_id: string;
22
+ title: string;
23
+ key: string;
24
+ dataPointValueType: string;
25
+ questionType: string;
26
+ userQuestionType: string;
27
+ options: never[];
28
+ }[];
29
+ };
30
+ };
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockFormDefinitionTwoResponse = exports.mockFormDefinitionOneResponse = void 0;
4
+ exports.mockFormDefinitionOneResponse = {
5
+ form: {
6
+ title: 'Screening Form',
7
+ questions: [
8
+ {
9
+ id: 'short_text',
10
+ definition_id: 'qiIFXlNLUVzN',
11
+ title: 'Question that collects a string value',
12
+ key: 'questionThatCollectsAStringValue',
13
+ dataPointValueType: 'STRING',
14
+ questionType: 'INPUT',
15
+ userQuestionType: 'SHORT_TEXT',
16
+ options: [],
17
+ },
18
+ ],
19
+ },
20
+ };
21
+ exports.mockFormDefinitionTwoResponse = {
22
+ form: {
23
+ title: 'Intake Form',
24
+ questions: [
25
+ {
26
+ id: 'long_text',
27
+ definition_id: 'tSFHKGROz6Zm',
28
+ title: 'Question that collects a long-form answer',
29
+ key: 'questionThatCollectsALongFormAnswer',
30
+ dataPointValueType: 'STRING',
31
+ questionType: 'INPUT',
32
+ userQuestionType: 'LONG_TEXT',
33
+ options: [],
34
+ },
35
+ ],
36
+ },
37
+ };
38
+ //# sourceMappingURL=formDefinitionResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formDefinitionResponse.js","sourceRoot":"","sources":["../../../../../../src/lib/awell/getFormsInTrack/__testdata__/formDefinitionResponse.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG;IAC3C,IAAI,EAAE;QACJ,KAAK,EAAE,gBAAgB;QACvB,SAAS,EAAE;YACT;gBACE,EAAE,EAAE,YAAY;gBAChB,aAAa,EAAE,cAAc;gBAC7B,KAAK,EAAE,uCAAuC;gBAC9C,GAAG,EAAE,kCAAkC;gBACvC,kBAAkB,EAAE,QAAQ;gBAC5B,YAAY,EAAE,OAAO;gBACrB,gBAAgB,EAAE,YAAY;gBAC9B,OAAO,EAAE,EAAE;aACZ;SACF;KACF;CACF,CAAA;AAEY,QAAA,6BAA6B,GAAG;IAC3C,IAAI,EAAE;QACJ,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE;YACT;gBACE,EAAE,EAAE,WAAW;gBACf,aAAa,EAAE,cAAc;gBAC7B,KAAK,EAAE,2CAA2C;gBAClD,GAAG,EAAE,qCAAqC;gBAC1C,kBAAkB,EAAE,QAAQ;gBAC5B,YAAY,EAAE,OAAO;gBACrB,gBAAgB,EAAE,WAAW;gBAC7B,OAAO,EAAE,EAAE;aACZ;SACF;KACF;CACF,CAAA"}
@@ -0,0 +1,20 @@
1
+ export declare const mockFormResponseOneResponse: {
2
+ response: {
3
+ answers: {
4
+ question_id: string;
5
+ value: string;
6
+ value_type: string;
7
+ label: null;
8
+ }[];
9
+ };
10
+ };
11
+ export declare const mockFormResponseTwoResponse: {
12
+ response: {
13
+ answers: {
14
+ question_id: string;
15
+ value: string;
16
+ value_type: string;
17
+ label: null;
18
+ }[];
19
+ };
20
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockFormResponseTwoResponse = exports.mockFormResponseOneResponse = void 0;
4
+ exports.mockFormResponseOneResponse = {
5
+ response: {
6
+ answers: [
7
+ {
8
+ question_id: 'short_text',
9
+ value: 'A short answer',
10
+ value_type: 'STRING',
11
+ label: null,
12
+ },
13
+ ],
14
+ },
15
+ };
16
+ exports.mockFormResponseTwoResponse = {
17
+ response: {
18
+ answers: [
19
+ {
20
+ question_id: 'long_text',
21
+ value: 'A long text answer',
22
+ value_type: 'STRING',
23
+ label: null,
24
+ },
25
+ ],
26
+ },
27
+ };
28
+ //# sourceMappingURL=formResponseResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formResponseResponse.js","sourceRoot":"","sources":["../../../../../../src/lib/awell/getFormsInTrack/__testdata__/formResponseResponse.ts"],"names":[],"mappings":";;;AAAa,QAAA,2BAA2B,GAAG;IACzC,QAAQ,EAAE;QACR,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,YAAY;gBACzB,KAAK,EAAE,gBAAgB;gBACvB,UAAU,EAAE,QAAQ;gBACpB,KAAK,EAAE,IAAI;aACZ;SACF;KACF;CACF,CAAA;AAEY,QAAA,2BAA2B,GAAG;IACzC,QAAQ,EAAE;QACR,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,WAAW;gBACxB,KAAK,EAAE,oBAAoB;gBAC3B,UAAU,EAAE,QAAQ;gBACpB,KAAK,EAAE,IAAI;aACZ;SACF;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './formDefinitionResponse';
2
+ export * from './formResponseResponse';
3
+ export * from './pathwayActivitiesResponse';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./formDefinitionResponse"), exports);
18
+ __exportStar(require("./formResponseResponse"), exports);
19
+ __exportStar(require("./pathwayActivitiesResponse"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/awell/getFormsInTrack/__testdata__/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,yDAAsC;AACtC,8DAA2C"}
@@ -0,0 +1,13 @@
1
+ export declare const mockTrackActivitiesResponse: {
2
+ success: boolean;
3
+ activities: {
4
+ id: string;
5
+ status: string;
6
+ date: string;
7
+ object: {
8
+ id: string;
9
+ name: string;
10
+ type: string;
11
+ };
12
+ }[];
13
+ };
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockTrackActivitiesResponse = void 0;
4
+ exports.mockTrackActivitiesResponse = {
5
+ success: true,
6
+ activities: [
7
+ // Non-form activities should be filtered out
8
+ {
9
+ id: 'step_activity',
10
+ status: 'DONE',
11
+ date: '2024-09-11T22:56:07.000Z',
12
+ object: {
13
+ id: 'step_1',
14
+ name: 'Some Step',
15
+ type: 'STEP',
16
+ },
17
+ },
18
+ // Note: form_activity_2 appears BEFORE form_activity_1 in the array,
19
+ // but has a LATER date — tests that ascending sort returns form_activity_1 first
20
+ {
21
+ id: 'form_activity_2',
22
+ status: 'DONE',
23
+ date: '2024-09-11T22:56:10.000Z', // Later (newer)
24
+ object: {
25
+ id: 'form_2',
26
+ name: 'Intake Form',
27
+ type: 'FORM',
28
+ },
29
+ },
30
+ {
31
+ id: 'form_activity_1',
32
+ status: 'DONE',
33
+ date: '2024-09-11T22:56:08.315Z', // Earlier (older)
34
+ object: {
35
+ id: 'form_1',
36
+ name: 'Screening Form',
37
+ type: 'FORM',
38
+ },
39
+ },
40
+ // A form that is not DONE should be filtered out
41
+ {
42
+ id: 'form_activity_3',
43
+ status: 'ACTIVE',
44
+ date: '2024-09-11T22:56:05.000Z',
45
+ object: {
46
+ id: 'form_3',
47
+ name: 'Pending Form',
48
+ type: 'FORM',
49
+ },
50
+ },
51
+ // A form with a date after the current activity should be filtered out
52
+ {
53
+ id: 'form_activity_future',
54
+ status: 'DONE',
55
+ date: '2024-09-11T23:00:00.000Z', // After current activity date
56
+ object: {
57
+ id: 'form_future',
58
+ name: 'Future Form',
59
+ type: 'FORM',
60
+ },
61
+ },
62
+ ],
63
+ };
64
+ //# sourceMappingURL=pathwayActivitiesResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathwayActivitiesResponse.js","sourceRoot":"","sources":["../../../../../../src/lib/awell/getFormsInTrack/__testdata__/pathwayActivitiesResponse.ts"],"names":[],"mappings":";;;AAAa,QAAA,2BAA2B,GAAG;IACzC,OAAO,EAAE,IAAI;IACb,UAAU,EAAE;QACV,6CAA6C;QAC7C;YACE,EAAE,EAAE,eAAe;YACnB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B;YAChC,MAAM,EAAE;gBACN,EAAE,EAAE,QAAQ;gBACZ,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,MAAM;aACb;SACF;QACD,qEAAqE;QACrE,iFAAiF;QACjF;YACE,EAAE,EAAE,iBAAiB;YACrB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B,EAAE,gBAAgB;YAClD,MAAM,EAAE;gBACN,EAAE,EAAE,QAAQ;gBACZ,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,MAAM;aACb;SACF;QACD;YACE,EAAE,EAAE,iBAAiB;YACrB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B,EAAE,kBAAkB;YACpD,MAAM,EAAE;gBACN,EAAE,EAAE,QAAQ;gBACZ,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,MAAM;aACb;SACF;QACD,iDAAiD;QACjD;YACE,EAAE,EAAE,iBAAiB;YACrB,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,0BAA0B;YAChC,MAAM,EAAE;gBACN,EAAE,EAAE,QAAQ;gBACZ,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,MAAM;aACb;SACF;QACD,uEAAuE;QACvE;YACE,EAAE,EAAE,sBAAsB;YAC1B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B,EAAE,8BAA8B;YAChE,MAAM,EAAE;gBACN,EAAE,EAAE,aAAa;gBACjB,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,MAAM;aACb;SACF;KACF;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.1.94",
3
+ "version": "2.1.96",
4
4
  "packageManager": "yarn@4.5.3",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {