@tryvital/vital-node 3.1.491 → 3.1.492

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.
Files changed (166) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +7 -2
  3. package/api/resources/activity/client/Client.js +2 -2
  4. package/api/resources/aggregate/client/Client.js +3 -3
  5. package/api/resources/body/client/Client.js +2 -2
  6. package/api/resources/devices/client/Client.js +1 -1
  7. package/api/resources/electrocardiogram/client/Client.js +1 -1
  8. package/api/resources/index.d.ts +2 -0
  9. package/api/resources/index.js +3 -1
  10. package/api/resources/insurance/client/Client.js +3 -3
  11. package/api/resources/introspect/client/Client.js +2 -2
  12. package/api/resources/labReport/client/Client.d.ts +61 -0
  13. package/api/resources/labReport/client/Client.js +198 -0
  14. package/api/resources/labReport/client/index.d.ts +1 -0
  15. package/api/resources/labReport/client/index.js +17 -0
  16. package/api/resources/labReport/client/requests/BodyCreateLabReportParserJob.d.ts +10 -0
  17. package/api/resources/labReport/client/requests/BodyCreateLabReportParserJob.js +5 -0
  18. package/api/resources/labReport/client/requests/ParserGetJobLabReportRequest.d.ts +9 -0
  19. package/api/resources/labReport/client/requests/ParserGetJobLabReportRequest.js +5 -0
  20. package/api/resources/labReport/client/requests/index.d.ts +2 -0
  21. package/api/resources/labReport/client/requests/index.js +2 -0
  22. package/api/resources/labReport/index.d.ts +1 -0
  23. package/api/resources/labReport/index.js +17 -0
  24. package/api/resources/labTests/client/Client.js +42 -42
  25. package/api/resources/link/client/Client.js +19 -19
  26. package/api/resources/meal/client/Client.js +1 -1
  27. package/api/resources/menstrualCycle/client/Client.js +1 -1
  28. package/api/resources/order/client/Client.js +1 -1
  29. package/api/resources/payor/client/Client.js +1 -1
  30. package/api/resources/profile/client/Client.js +2 -2
  31. package/api/resources/providers/client/Client.js +1 -1
  32. package/api/resources/sleep/client/Client.js +3 -3
  33. package/api/resources/sleepCycle/client/Client.js +1 -1
  34. package/api/resources/team/client/Client.js +7 -7
  35. package/api/resources/testkit/client/Client.js +2 -2
  36. package/api/resources/user/client/Client.js +19 -19
  37. package/api/resources/vitals/client/Client.js +78 -78
  38. package/api/resources/workouts/client/Client.js +3 -3
  39. package/api/types/Interpretation.d.ts +2 -1
  40. package/api/types/Interpretation.js +1 -0
  41. package/api/types/LabReportResult.d.ts +17 -0
  42. package/api/types/LabReportResult.js +5 -0
  43. package/api/types/LabReportResultType.d.ts +16 -0
  44. package/api/types/LabReportResultType.js +15 -0
  45. package/api/types/LoincMatch.d.ts +10 -0
  46. package/api/types/LoincMatch.js +5 -0
  47. package/api/types/ParsedLabReportData.d.ts +8 -0
  48. package/api/types/ParsedLabReportData.js +5 -0
  49. package/api/types/ParsingJob.d.ts +11 -0
  50. package/api/types/ParsingJob.js +5 -0
  51. package/api/types/ParsingJobStatus.d.ts +13 -0
  52. package/api/types/ParsingJobStatus.js +12 -0
  53. package/api/types/ResultMetadata.d.ts +12 -0
  54. package/api/types/ResultMetadata.js +5 -0
  55. package/api/types/index.d.ts +7 -0
  56. package/api/types/index.js +7 -0
  57. package/core/form-data-utils/FormDataWrapper.d.ts +60 -0
  58. package/core/form-data-utils/FormDataWrapper.js +174 -0
  59. package/core/form-data-utils/index.d.ts +1 -0
  60. package/core/form-data-utils/index.js +17 -0
  61. package/core/index.d.ts +1 -0
  62. package/core/index.js +1 -0
  63. package/dist/Client.d.ts +3 -0
  64. package/dist/Client.js +7 -2
  65. package/dist/api/resources/activity/client/Client.js +2 -2
  66. package/dist/api/resources/aggregate/client/Client.js +3 -3
  67. package/dist/api/resources/body/client/Client.js +2 -2
  68. package/dist/api/resources/devices/client/Client.js +1 -1
  69. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  70. package/dist/api/resources/index.d.ts +2 -0
  71. package/dist/api/resources/index.js +3 -1
  72. package/dist/api/resources/insurance/client/Client.js +3 -3
  73. package/dist/api/resources/introspect/client/Client.js +2 -2
  74. package/dist/api/resources/labReport/client/Client.d.ts +61 -0
  75. package/dist/api/resources/labReport/client/Client.js +198 -0
  76. package/dist/api/resources/labReport/client/index.d.ts +1 -0
  77. package/dist/api/resources/labReport/client/index.js +17 -0
  78. package/dist/api/resources/labReport/client/requests/BodyCreateLabReportParserJob.d.ts +10 -0
  79. package/dist/api/resources/labReport/client/requests/BodyCreateLabReportParserJob.js +5 -0
  80. package/dist/api/resources/labReport/client/requests/ParserGetJobLabReportRequest.d.ts +9 -0
  81. package/dist/api/resources/labReport/client/requests/ParserGetJobLabReportRequest.js +5 -0
  82. package/dist/api/resources/labReport/client/requests/index.d.ts +2 -0
  83. package/dist/api/resources/labReport/client/requests/index.js +2 -0
  84. package/dist/api/resources/labReport/index.d.ts +1 -0
  85. package/dist/api/resources/labReport/index.js +17 -0
  86. package/dist/api/resources/labTests/client/Client.js +42 -42
  87. package/dist/api/resources/link/client/Client.js +19 -19
  88. package/dist/api/resources/meal/client/Client.js +1 -1
  89. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  90. package/dist/api/resources/order/client/Client.js +1 -1
  91. package/dist/api/resources/payor/client/Client.js +1 -1
  92. package/dist/api/resources/profile/client/Client.js +2 -2
  93. package/dist/api/resources/providers/client/Client.js +1 -1
  94. package/dist/api/resources/sleep/client/Client.js +3 -3
  95. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  96. package/dist/api/resources/team/client/Client.js +7 -7
  97. package/dist/api/resources/testkit/client/Client.js +2 -2
  98. package/dist/api/resources/user/client/Client.js +19 -19
  99. package/dist/api/resources/vitals/client/Client.js +78 -78
  100. package/dist/api/resources/workouts/client/Client.js +3 -3
  101. package/dist/api/types/Interpretation.d.ts +2 -1
  102. package/dist/api/types/Interpretation.js +1 -0
  103. package/dist/api/types/LabReportResult.d.ts +17 -0
  104. package/dist/api/types/LabReportResult.js +5 -0
  105. package/dist/api/types/LabReportResultType.d.ts +16 -0
  106. package/dist/api/types/LabReportResultType.js +15 -0
  107. package/dist/api/types/LoincMatch.d.ts +10 -0
  108. package/dist/api/types/LoincMatch.js +5 -0
  109. package/dist/api/types/ParsedLabReportData.d.ts +8 -0
  110. package/dist/api/types/ParsedLabReportData.js +5 -0
  111. package/dist/api/types/ParsingJob.d.ts +11 -0
  112. package/dist/api/types/ParsingJob.js +5 -0
  113. package/dist/api/types/ParsingJobStatus.d.ts +13 -0
  114. package/dist/api/types/ParsingJobStatus.js +12 -0
  115. package/dist/api/types/ResultMetadata.d.ts +12 -0
  116. package/dist/api/types/ResultMetadata.js +5 -0
  117. package/dist/api/types/index.d.ts +7 -0
  118. package/dist/api/types/index.js +7 -0
  119. package/dist/core/form-data-utils/FormDataWrapper.d.ts +60 -0
  120. package/dist/core/form-data-utils/FormDataWrapper.js +174 -0
  121. package/dist/core/form-data-utils/index.d.ts +1 -0
  122. package/dist/core/form-data-utils/index.js +17 -0
  123. package/dist/core/index.d.ts +1 -0
  124. package/dist/core/index.js +1 -0
  125. package/dist/serialization/types/Interpretation.d.ts +1 -1
  126. package/dist/serialization/types/Interpretation.js +1 -1
  127. package/dist/serialization/types/LabReportResult.d.ts +25 -0
  128. package/dist/serialization/types/LabReportResult.js +46 -0
  129. package/dist/serialization/types/LabReportResultType.d.ts +10 -0
  130. package/dist/serialization/types/LabReportResultType.js +31 -0
  131. package/dist/serialization/types/LoincMatch.d.ts +16 -0
  132. package/dist/serialization/types/LoincMatch.js +37 -0
  133. package/dist/serialization/types/ParsedLabReportData.d.ts +15 -0
  134. package/dist/serialization/types/ParsedLabReportData.js +36 -0
  135. package/dist/serialization/types/ParsingJob.d.ts +18 -0
  136. package/dist/serialization/types/ParsingJob.js +39 -0
  137. package/dist/serialization/types/ParsingJobStatus.d.ts +10 -0
  138. package/dist/serialization/types/ParsingJobStatus.js +31 -0
  139. package/dist/serialization/types/ResultMetadata.d.ts +18 -0
  140. package/dist/serialization/types/ResultMetadata.js +39 -0
  141. package/dist/serialization/types/index.d.ts +7 -0
  142. package/dist/serialization/types/index.js +7 -0
  143. package/dist/version.d.ts +1 -1
  144. package/dist/version.js +1 -1
  145. package/package.json +3 -2
  146. package/reference.md +148 -0
  147. package/serialization/types/Interpretation.d.ts +1 -1
  148. package/serialization/types/Interpretation.js +1 -1
  149. package/serialization/types/LabReportResult.d.ts +25 -0
  150. package/serialization/types/LabReportResult.js +46 -0
  151. package/serialization/types/LabReportResultType.d.ts +10 -0
  152. package/serialization/types/LabReportResultType.js +31 -0
  153. package/serialization/types/LoincMatch.d.ts +16 -0
  154. package/serialization/types/LoincMatch.js +37 -0
  155. package/serialization/types/ParsedLabReportData.d.ts +15 -0
  156. package/serialization/types/ParsedLabReportData.js +36 -0
  157. package/serialization/types/ParsingJob.d.ts +18 -0
  158. package/serialization/types/ParsingJob.js +39 -0
  159. package/serialization/types/ParsingJobStatus.d.ts +10 -0
  160. package/serialization/types/ParsingJobStatus.js +31 -0
  161. package/serialization/types/ResultMetadata.d.ts +18 -0
  162. package/serialization/types/ResultMetadata.js +39 -0
  163. package/serialization/types/index.d.ts +7 -0
  164. package/serialization/types/index.js +7 -0
  165. package/version.d.ts +1 -1
  166. package/version.js +1 -1
@@ -78,7 +78,7 @@ class Workouts {
78
78
  const _response = yield core.fetcher({
79
79
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}`),
80
80
  method: "GET",
81
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.491", "User-Agent": "@tryvital/vital-node/3.1.491", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
81
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.492", "User-Agent": "@tryvital/vital-node/3.1.492", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
82
  contentType: "application/json",
83
83
  queryParameters: _queryParams,
84
84
  requestType: "json",
@@ -154,7 +154,7 @@ class Workouts {
154
154
  const _response = yield core.fetcher({
155
155
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/workouts/${encodeURIComponent(userId)}/raw`),
156
156
  method: "GET",
157
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.491", "User-Agent": "@tryvital/vital-node/3.1.491", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
157
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.492", "User-Agent": "@tryvital/vital-node/3.1.492", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
158
158
  contentType: "application/json",
159
159
  queryParameters: _queryParams,
160
160
  requestType: "json",
@@ -217,7 +217,7 @@ class Workouts {
217
217
  const _response = yield core.fetcher({
218
218
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/workouts/${encodeURIComponent(workoutId)}/stream`),
219
219
  method: "GET",
220
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.491", "User-Agent": "@tryvital/vital-node/3.1.491", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
220
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.492", "User-Agent": "@tryvital/vital-node/3.1.492", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
221
221
  contentType: "application/json",
222
222
  requestType: "json",
223
223
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -4,9 +4,10 @@
4
4
  /**
5
5
  * ℹ️ This enum is non-exhaustive.
6
6
  */
7
- export declare type Interpretation = "normal" | "abnormal" | "critical";
7
+ export declare type Interpretation = "normal" | "abnormal" | "critical" | "unknown";
8
8
  export declare const Interpretation: {
9
9
  readonly Normal: "normal";
10
10
  readonly Abnormal: "abnormal";
11
11
  readonly Critical: "critical";
12
+ readonly Unknown: "unknown";
12
13
  };
@@ -8,4 +8,5 @@ exports.Interpretation = {
8
8
  Normal: "normal",
9
9
  Abnormal: "abnormal",
10
10
  Critical: "critical",
11
+ Unknown: "unknown",
11
12
  };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "../index";
5
+ export interface LabReportResult {
6
+ testName: string;
7
+ value: string;
8
+ type?: Vital.LabReportResultType;
9
+ units?: string;
10
+ maxReferenceRange?: number;
11
+ minReferenceRange?: number;
12
+ sourcePanelName?: string;
13
+ loincMatches?: Vital.LoincMatch[];
14
+ interpretation?: Vital.Interpretation;
15
+ isAboveMaxRange?: boolean;
16
+ isBelowMinRange?: boolean;
17
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * ℹ️ This enum is non-exhaustive.
6
+ */
7
+ export declare type LabReportResultType = "numeric" | "range" | "comment" | "boolean" | "duration" | "percentage" | "ratio";
8
+ export declare const LabReportResultType: {
9
+ readonly Numeric: "numeric";
10
+ readonly Range: "range";
11
+ readonly Comment: "comment";
12
+ readonly Boolean: "boolean";
13
+ readonly Duration: "duration";
14
+ readonly Percentage: "percentage";
15
+ readonly Ratio: "ratio";
16
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LabReportResultType = void 0;
7
+ exports.LabReportResultType = {
8
+ Numeric: "numeric",
9
+ Range: "range",
10
+ Comment: "comment",
11
+ Boolean: "boolean",
12
+ Duration: "duration",
13
+ Percentage: "percentage",
14
+ Ratio: "ratio",
15
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface LoincMatch {
5
+ loincCode: string;
6
+ loincName: string;
7
+ loincComponent: string;
8
+ sampleType?: string[];
9
+ confidenceScore: number;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "../index";
5
+ export interface ParsedLabReportData {
6
+ metadata: Vital.ResultMetadata;
7
+ results: Vital.LabReportResult[];
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "../index";
5
+ export interface ParsingJob {
6
+ jobId: string;
7
+ status: Vital.ParsingJobStatus;
8
+ data?: Vital.ParsedLabReportData;
9
+ needsHumanReview: boolean;
10
+ isReviewed: boolean;
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * ℹ️ This enum is non-exhaustive.
6
+ */
7
+ export declare type ParsingJobStatus = "upload_pending" | "started" | "completed" | "failed";
8
+ export declare const ParsingJobStatus: {
9
+ readonly UploadPending: "upload_pending";
10
+ readonly Started: "started";
11
+ readonly Completed: "completed";
12
+ readonly Failed: "failed";
13
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ParsingJobStatus = void 0;
7
+ exports.ParsingJobStatus = {
8
+ UploadPending: "upload_pending",
9
+ Started: "started",
10
+ Completed: "completed",
11
+ Failed: "failed",
12
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ResultMetadata {
5
+ patientFirstName: string;
6
+ patientLastName: string;
7
+ dob: string;
8
+ labName: string;
9
+ dateReported?: string;
10
+ dateCollected?: string;
11
+ specimenNumber?: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -452,6 +452,8 @@ export * from "./IntervalTimeseriesExpr";
452
452
  export * from "./Jpeg";
453
453
  export * from "./LabLocationCapability";
454
454
  export * from "./LabLocationMetadata";
455
+ export * from "./LabReportResult";
456
+ export * from "./LabReportResultType";
455
457
  export * from "./LabResultsMetadata";
456
458
  export * from "./LabResultsRawResults";
457
459
  export * from "./LabResultsRaw";
@@ -465,6 +467,7 @@ export * from "./LastAttempt";
465
467
  export * from "./LibreConfig";
466
468
  export * from "./LinkTokenExchangeResponse";
467
469
  export * from "./LngLat";
470
+ export * from "./LoincMatch";
468
471
  export * from "./Macros";
469
472
  export * from "./ManualProviders";
470
473
  export * from "./MarkerType";
@@ -493,6 +496,9 @@ export * from "./PscAreaInfoDetails";
493
496
  export * from "./PscInfo";
494
497
  export * from "./PaginatedUsersResponse";
495
498
  export * from "./ParentBiomarkerData";
499
+ export * from "./ParsedLabReportData";
500
+ export * from "./ParsingJob";
501
+ export * from "./ParsingJobStatus";
496
502
  export * from "./PasswordProviders";
497
503
  export * from "./PatientAddress";
498
504
  export * from "./PatientAddressCompatible";
@@ -541,6 +547,7 @@ export * from "./ResendWebhookResponse";
541
547
  export * from "./ClientFacingResource";
542
548
  export * from "./ResourceAvailability";
543
549
  export * from "./ResponsibleRelationship";
550
+ export * from "./ResultMetadata";
544
551
  export * from "./ResultType";
545
552
  export * from "./SampleDataDateCollected";
546
553
  export * from "./SampleDataDateReceived";
@@ -468,6 +468,8 @@ __exportStar(require("./IntervalTimeseriesExpr"), exports);
468
468
  __exportStar(require("./Jpeg"), exports);
469
469
  __exportStar(require("./LabLocationCapability"), exports);
470
470
  __exportStar(require("./LabLocationMetadata"), exports);
471
+ __exportStar(require("./LabReportResult"), exports);
472
+ __exportStar(require("./LabReportResultType"), exports);
471
473
  __exportStar(require("./LabResultsMetadata"), exports);
472
474
  __exportStar(require("./LabResultsRawResults"), exports);
473
475
  __exportStar(require("./LabResultsRaw"), exports);
@@ -481,6 +483,7 @@ __exportStar(require("./LastAttempt"), exports);
481
483
  __exportStar(require("./LibreConfig"), exports);
482
484
  __exportStar(require("./LinkTokenExchangeResponse"), exports);
483
485
  __exportStar(require("./LngLat"), exports);
486
+ __exportStar(require("./LoincMatch"), exports);
484
487
  __exportStar(require("./Macros"), exports);
485
488
  __exportStar(require("./ManualProviders"), exports);
486
489
  __exportStar(require("./MarkerType"), exports);
@@ -509,6 +512,9 @@ __exportStar(require("./PscAreaInfoDetails"), exports);
509
512
  __exportStar(require("./PscInfo"), exports);
510
513
  __exportStar(require("./PaginatedUsersResponse"), exports);
511
514
  __exportStar(require("./ParentBiomarkerData"), exports);
515
+ __exportStar(require("./ParsedLabReportData"), exports);
516
+ __exportStar(require("./ParsingJob"), exports);
517
+ __exportStar(require("./ParsingJobStatus"), exports);
512
518
  __exportStar(require("./PasswordProviders"), exports);
513
519
  __exportStar(require("./PatientAddress"), exports);
514
520
  __exportStar(require("./PatientAddressCompatible"), exports);
@@ -557,6 +563,7 @@ __exportStar(require("./ResendWebhookResponse"), exports);
557
563
  __exportStar(require("./ClientFacingResource"), exports);
558
564
  __exportStar(require("./ResourceAvailability"), exports);
559
565
  __exportStar(require("./ResponsibleRelationship"), exports);
566
+ __exportStar(require("./ResultMetadata"), exports);
560
567
  __exportStar(require("./ResultType"), exports);
561
568
  __exportStar(require("./SampleDataDateCollected"), exports);
562
569
  __exportStar(require("./SampleDataDateReceived"), exports);
@@ -0,0 +1,60 @@
1
+ export declare type MaybePromise<T> = Promise<T> | T;
2
+ interface FormDataRequest<Body> {
3
+ body: Body;
4
+ headers: Record<string, string>;
5
+ duplex?: "half";
6
+ }
7
+ export interface CrossPlatformFormData {
8
+ setup(): Promise<void>;
9
+ append(key: string, value: unknown): void;
10
+ appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
11
+ getRequest(): MaybePromise<FormDataRequest<unknown>>;
12
+ }
13
+ export declare function newFormData(): Promise<CrossPlatformFormData>;
14
+ export declare type Node18FormDataFd = {
15
+ append(name: string, value: unknown, fileName?: string): void;
16
+ } | undefined;
17
+ /**
18
+ * Form Data Implementation for Node.js 18+
19
+ */
20
+ export declare class Node18FormData implements CrossPlatformFormData {
21
+ private fd;
22
+ setup(): Promise<void>;
23
+ append(key: string, value: any): void;
24
+ appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
25
+ getRequest(): Promise<FormDataRequest<unknown>>;
26
+ }
27
+ export declare type Node16FormDataFd = {
28
+ append(name: string, value: unknown, options?: string | {
29
+ header?: string | Headers;
30
+ knownLength?: number;
31
+ filename?: string;
32
+ filepath?: string;
33
+ contentType?: string;
34
+ }): void;
35
+ getHeaders(): Record<string, string>;
36
+ } | undefined;
37
+ /**
38
+ * Form Data Implementation for Node.js 16-18
39
+ */
40
+ export declare class Node16FormData implements CrossPlatformFormData {
41
+ private fd;
42
+ setup(): Promise<void>;
43
+ append(key: string, value: any): void;
44
+ appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
45
+ getRequest(): FormDataRequest<Node16FormDataFd>;
46
+ }
47
+ export declare type WebFormDataFd = {
48
+ append(name: string, value: string | Blob, fileName?: string): void;
49
+ } | undefined;
50
+ /**
51
+ * Form Data Implementation for Web
52
+ */
53
+ export declare class WebFormData implements CrossPlatformFormData {
54
+ protected fd: WebFormDataFd;
55
+ setup(): Promise<void>;
56
+ append(key: string, value: any): void;
57
+ appendFile(key: string, value: any, fileName?: string): Promise<void>;
58
+ getRequest(): FormDataRequest<WebFormDataFd>;
59
+ }
60
+ export {};
@@ -0,0 +1,174 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.WebFormData = exports.Node16FormData = exports.Node18FormData = exports.newFormData = void 0;
36
+ const runtime_1 = require("../runtime");
37
+ function isNamedValue(value) {
38
+ return typeof value === "object" && value != null && "name" in value;
39
+ }
40
+ function newFormData() {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ let formdata;
43
+ if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
44
+ formdata = new Node18FormData();
45
+ }
46
+ else if (runtime_1.RUNTIME.type === "node") {
47
+ formdata = new Node16FormData();
48
+ }
49
+ else {
50
+ formdata = new WebFormData();
51
+ }
52
+ yield formdata.setup();
53
+ return formdata;
54
+ });
55
+ }
56
+ exports.newFormData = newFormData;
57
+ /**
58
+ * Form Data Implementation for Node.js 18+
59
+ */
60
+ class Node18FormData {
61
+ setup() {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ this.fd = new (yield Promise.resolve().then(() => __importStar(require("formdata-node")))).FormData();
64
+ });
65
+ }
66
+ append(key, value) {
67
+ var _a;
68
+ (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
69
+ }
70
+ appendFile(key, value, fileName) {
71
+ var _a, _b;
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ if (fileName == null && isNamedValue(value)) {
74
+ fileName = value.name;
75
+ }
76
+ if (value instanceof Blob) {
77
+ (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value, fileName);
78
+ }
79
+ else {
80
+ (_b = this.fd) === null || _b === void 0 ? void 0 : _b.append(key, {
81
+ type: undefined,
82
+ name: fileName,
83
+ [Symbol.toStringTag]: "File",
84
+ stream() {
85
+ return value;
86
+ },
87
+ });
88
+ }
89
+ });
90
+ }
91
+ getRequest() {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ const encoder = new (yield Promise.resolve().then(() => __importStar(require("form-data-encoder")))).FormDataEncoder(this.fd);
94
+ return {
95
+ body: (yield Promise.resolve().then(() => __importStar(require("readable-stream")))).Readable.from(encoder),
96
+ headers: encoder.headers,
97
+ duplex: "half",
98
+ };
99
+ });
100
+ }
101
+ }
102
+ exports.Node18FormData = Node18FormData;
103
+ /**
104
+ * Form Data Implementation for Node.js 16-18
105
+ */
106
+ class Node16FormData {
107
+ setup() {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ this.fd = new (yield Promise.resolve().then(() => __importStar(require("form-data")))).default();
110
+ });
111
+ }
112
+ append(key, value) {
113
+ var _a;
114
+ (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
115
+ }
116
+ appendFile(key, value, fileName) {
117
+ var _a, _b;
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ if (fileName == null && isNamedValue(value)) {
120
+ fileName = value.name;
121
+ }
122
+ let bufferedValue;
123
+ if (value instanceof Blob) {
124
+ bufferedValue = Buffer.from(yield value.arrayBuffer());
125
+ }
126
+ else {
127
+ bufferedValue = value;
128
+ }
129
+ if (fileName == null) {
130
+ (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, bufferedValue);
131
+ }
132
+ else {
133
+ (_b = this.fd) === null || _b === void 0 ? void 0 : _b.append(key, bufferedValue, { filename: fileName });
134
+ }
135
+ });
136
+ }
137
+ getRequest() {
138
+ return {
139
+ body: this.fd,
140
+ headers: this.fd ? this.fd.getHeaders() : {},
141
+ };
142
+ }
143
+ }
144
+ exports.Node16FormData = Node16FormData;
145
+ /**
146
+ * Form Data Implementation for Web
147
+ */
148
+ class WebFormData {
149
+ setup() {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ this.fd = new FormData();
152
+ });
153
+ }
154
+ append(key, value) {
155
+ var _a;
156
+ (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value);
157
+ }
158
+ appendFile(key, value, fileName) {
159
+ var _a;
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ if (fileName == null && isNamedValue(value)) {
162
+ fileName = value.name;
163
+ }
164
+ (_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, new Blob([value]), fileName);
165
+ });
166
+ }
167
+ getRequest() {
168
+ return {
169
+ body: this.fd,
170
+ headers: {},
171
+ };
172
+ }
173
+ }
174
+ exports.WebFormData = WebFormData;
@@ -0,0 +1 @@
1
+ export * from "./FormDataWrapper";
@@ -0,0 +1,17 @@
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("./FormDataWrapper"), exports);
package/core/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./fetcher";
2
2
  export * from "./runtime";
3
+ export * from "./form-data-utils";
3
4
  export * as serialization from "./schemas";
package/core/index.js CHANGED
@@ -29,4 +29,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.serialization = void 0;
30
30
  __exportStar(require("./fetcher"), exports);
31
31
  __exportStar(require("./runtime"), exports);
32
+ __exportStar(require("./form-data-utils"), exports);
32
33
  exports.serialization = __importStar(require("./schemas"));
package/dist/Client.d.ts CHANGED
@@ -24,6 +24,7 @@ import { Testkit } from "./api/resources/testkit/client/Client";
24
24
  import { Order } from "./api/resources/order/client/Client";
25
25
  import { Insurance } from "./api/resources/insurance/client/Client";
26
26
  import { Payor } from "./api/resources/payor/client/Client";
27
+ import { LabReport } from "./api/resources/labReport/client/Client";
27
28
  import { Aggregate } from "./api/resources/aggregate/client/Client";
28
29
  export declare namespace VitalClient {
29
30
  interface Options {
@@ -84,6 +85,8 @@ export declare class VitalClient {
84
85
  get insurance(): Insurance;
85
86
  protected _payor: Payor | undefined;
86
87
  get payor(): Payor;
88
+ protected _labReport: LabReport | undefined;
89
+ get labReport(): LabReport;
87
90
  protected _aggregate: Aggregate | undefined;
88
91
  get aggregate(): Aggregate;
89
92
  }
package/dist/Client.js CHANGED
@@ -25,7 +25,8 @@ const Client_18 = require("./api/resources/testkit/client/Client");
25
25
  const Client_19 = require("./api/resources/order/client/Client");
26
26
  const Client_20 = require("./api/resources/insurance/client/Client");
27
27
  const Client_21 = require("./api/resources/payor/client/Client");
28
- const Client_22 = require("./api/resources/aggregate/client/Client");
28
+ const Client_22 = require("./api/resources/labReport/client/Client");
29
+ const Client_23 = require("./api/resources/aggregate/client/Client");
29
30
  class VitalClient {
30
31
  constructor(_options = {}) {
31
32
  this._options = _options;
@@ -114,9 +115,13 @@ class VitalClient {
114
115
  var _a;
115
116
  return ((_a = this._payor) !== null && _a !== void 0 ? _a : (this._payor = new Client_21.Payor(this._options)));
116
117
  }
118
+ get labReport() {
119
+ var _a;
120
+ return ((_a = this._labReport) !== null && _a !== void 0 ? _a : (this._labReport = new Client_22.LabReport(this._options)));
121
+ }
117
122
  get aggregate() {
118
123
  var _a;
119
- return ((_a = this._aggregate) !== null && _a !== void 0 ? _a : (this._aggregate = new Client_22.Aggregate(this._options)));
124
+ return ((_a = this._aggregate) !== null && _a !== void 0 ? _a : (this._aggregate = new Client_23.Aggregate(this._options)));
120
125
  }
121
126
  }
122
127
  exports.VitalClient = VitalClient;
@@ -78,7 +78,7 @@ class Activity {
78
78
  const _response = yield core.fetcher({
79
79
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${encodeURIComponent(userId)}`),
80
80
  method: "GET",
81
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.491", "User-Agent": "@tryvital/vital-node/3.1.491", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
81
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.492", "User-Agent": "@tryvital/vital-node/3.1.492", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
82
  contentType: "application/json",
83
83
  queryParameters: _queryParams,
84
84
  requestType: "json",
@@ -154,7 +154,7 @@ class Activity {
154
154
  const _response = yield core.fetcher({
155
155
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${encodeURIComponent(userId)}/raw`),
156
156
  method: "GET",
157
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.491", "User-Agent": "@tryvital/vital-node/3.1.491", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
157
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.492", "User-Agent": "@tryvital/vital-node/3.1.492", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
158
158
  contentType: "application/json",
159
159
  queryParameters: _queryParams,
160
160
  requestType: "json",
@@ -81,7 +81,7 @@ class Aggregate {
81
81
  const _response = yield core.fetcher({
82
82
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/query`),
83
83
  method: "POST",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.491", "User-Agent": "@tryvital/vital-node/3.1.491", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.492", "User-Agent": "@tryvital/vital-node/3.1.492", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  requestType: "json",
87
87
  body: serializers.QueryBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -145,7 +145,7 @@ class Aggregate {
145
145
  const _response = yield core.fetcher({
146
146
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/continuous_query/${encodeURIComponent(queryIdOrSlug)}/result_table`),
147
147
  method: "GET",
148
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.491", "User-Agent": "@tryvital/vital-node/3.1.491", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
148
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.492", "User-Agent": "@tryvital/vital-node/3.1.492", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
149
149
  contentType: "application/json",
150
150
  requestType: "json",
151
151
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -216,7 +216,7 @@ class Aggregate {
216
216
  const _response = yield core.fetcher({
217
217
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/continuous_query/${encodeURIComponent(queryIdOrSlug)}/task_history`),
218
218
  method: "GET",
219
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.491", "User-Agent": "@tryvital/vital-node/3.1.491", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
219
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.492", "User-Agent": "@tryvital/vital-node/3.1.492", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
220
220
  contentType: "application/json",
221
221
  queryParameters: _queryParams,
222
222
  requestType: "json",