@tryvital/vital-node 3.1.490 → 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.
- package/Client.d.ts +3 -0
- package/Client.js +7 -2
- package/api/resources/activity/client/Client.js +2 -2
- package/api/resources/aggregate/client/Client.js +3 -3
- package/api/resources/body/client/Client.js +2 -2
- package/api/resources/devices/client/Client.js +1 -1
- package/api/resources/electrocardiogram/client/Client.js +1 -1
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/insurance/client/Client.js +3 -3
- package/api/resources/introspect/client/Client.js +2 -2
- package/api/resources/labReport/client/Client.d.ts +61 -0
- package/api/resources/labReport/client/Client.js +198 -0
- package/api/resources/labReport/client/index.d.ts +1 -0
- package/api/resources/labReport/client/index.js +17 -0
- package/api/resources/labReport/client/requests/BodyCreateLabReportParserJob.d.ts +10 -0
- package/api/resources/labReport/client/requests/BodyCreateLabReportParserJob.js +5 -0
- package/api/resources/labReport/client/requests/ParserGetJobLabReportRequest.d.ts +9 -0
- package/api/resources/labReport/client/requests/ParserGetJobLabReportRequest.js +5 -0
- package/api/resources/labReport/client/requests/index.d.ts +2 -0
- package/api/resources/labReport/client/requests/index.js +2 -0
- package/api/resources/labReport/index.d.ts +1 -0
- package/api/resources/labReport/index.js +17 -0
- package/api/resources/labTests/client/Client.js +42 -42
- package/api/resources/link/client/Client.js +19 -19
- package/api/resources/meal/client/Client.js +1 -1
- package/api/resources/menstrualCycle/client/Client.js +1 -1
- package/api/resources/order/client/Client.js +1 -1
- package/api/resources/payor/client/Client.js +1 -1
- package/api/resources/profile/client/Client.js +2 -2
- package/api/resources/providers/client/Client.js +1 -1
- package/api/resources/sleep/client/Client.js +3 -3
- package/api/resources/sleepCycle/client/Client.js +1 -1
- package/api/resources/team/client/Client.js +7 -7
- package/api/resources/testkit/client/Client.js +2 -2
- package/api/resources/user/client/Client.js +19 -19
- package/api/resources/vitals/client/Client.js +78 -78
- package/api/resources/workouts/client/Client.js +3 -3
- package/api/types/Interpretation.d.ts +2 -1
- package/api/types/Interpretation.js +1 -0
- package/api/types/LabReportResult.d.ts +17 -0
- package/api/types/LabReportResult.js +5 -0
- package/api/types/LabReportResultType.d.ts +16 -0
- package/api/types/LabReportResultType.js +15 -0
- package/api/types/LoincMatch.d.ts +10 -0
- package/api/types/LoincMatch.js +5 -0
- package/api/types/ParsedLabReportData.d.ts +8 -0
- package/api/types/ParsedLabReportData.js +5 -0
- package/api/types/ParsingJob.d.ts +11 -0
- package/api/types/ParsingJob.js +5 -0
- package/api/types/ParsingJobStatus.d.ts +13 -0
- package/api/types/ParsingJobStatus.js +12 -0
- package/api/types/ResultMetadata.d.ts +12 -0
- package/api/types/ResultMetadata.js +5 -0
- package/api/types/index.d.ts +7 -0
- package/api/types/index.js +7 -0
- package/core/form-data-utils/FormDataWrapper.d.ts +60 -0
- package/core/form-data-utils/FormDataWrapper.js +174 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +17 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +7 -2
- package/dist/api/resources/activity/client/Client.js +2 -2
- package/dist/api/resources/aggregate/client/Client.js +3 -3
- package/dist/api/resources/body/client/Client.js +2 -2
- package/dist/api/resources/devices/client/Client.js +1 -1
- package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/insurance/client/Client.js +3 -3
- package/dist/api/resources/introspect/client/Client.js +2 -2
- package/dist/api/resources/labReport/client/Client.d.ts +61 -0
- package/dist/api/resources/labReport/client/Client.js +198 -0
- package/dist/api/resources/labReport/client/index.d.ts +1 -0
- package/dist/api/resources/labReport/client/index.js +17 -0
- package/dist/api/resources/labReport/client/requests/BodyCreateLabReportParserJob.d.ts +10 -0
- package/dist/api/resources/labReport/client/requests/BodyCreateLabReportParserJob.js +5 -0
- package/dist/api/resources/labReport/client/requests/ParserGetJobLabReportRequest.d.ts +9 -0
- package/dist/api/resources/labReport/client/requests/ParserGetJobLabReportRequest.js +5 -0
- package/dist/api/resources/labReport/client/requests/index.d.ts +2 -0
- package/dist/api/resources/labReport/client/requests/index.js +2 -0
- package/dist/api/resources/labReport/index.d.ts +1 -0
- package/dist/api/resources/labReport/index.js +17 -0
- package/dist/api/resources/labTests/client/Client.js +42 -42
- package/dist/api/resources/link/client/Client.js +19 -19
- package/dist/api/resources/meal/client/Client.js +1 -1
- package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
- package/dist/api/resources/order/client/Client.js +1 -1
- package/dist/api/resources/payor/client/Client.js +1 -1
- package/dist/api/resources/profile/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.js +1 -1
- package/dist/api/resources/sleep/client/Client.js +3 -3
- package/dist/api/resources/sleepCycle/client/Client.js +1 -1
- package/dist/api/resources/team/client/Client.js +7 -7
- package/dist/api/resources/testkit/client/Client.js +2 -2
- package/dist/api/resources/user/client/Client.js +19 -19
- package/dist/api/resources/vitals/client/Client.js +78 -78
- package/dist/api/resources/workouts/client/Client.js +3 -3
- package/dist/api/types/Interpretation.d.ts +2 -1
- package/dist/api/types/Interpretation.js +1 -0
- package/dist/api/types/LabReportResult.d.ts +17 -0
- package/dist/api/types/LabReportResult.js +5 -0
- package/dist/api/types/LabReportResultType.d.ts +16 -0
- package/dist/api/types/LabReportResultType.js +15 -0
- package/dist/api/types/LoincMatch.d.ts +10 -0
- package/dist/api/types/LoincMatch.js +5 -0
- package/dist/api/types/ParsedLabReportData.d.ts +8 -0
- package/dist/api/types/ParsedLabReportData.js +5 -0
- package/dist/api/types/ParsingJob.d.ts +11 -0
- package/dist/api/types/ParsingJob.js +5 -0
- package/dist/api/types/ParsingJobStatus.d.ts +13 -0
- package/dist/api/types/ParsingJobStatus.js +12 -0
- package/dist/api/types/ResultMetadata.d.ts +12 -0
- package/dist/api/types/ResultMetadata.js +5 -0
- package/dist/api/types/index.d.ts +7 -0
- package/dist/api/types/index.js +7 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +60 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +174 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +17 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/serialization/types/Interpretation.d.ts +1 -1
- package/dist/serialization/types/Interpretation.js +1 -1
- package/dist/serialization/types/LabReportResult.d.ts +25 -0
- package/dist/serialization/types/LabReportResult.js +46 -0
- package/dist/serialization/types/LabReportResultType.d.ts +10 -0
- package/dist/serialization/types/LabReportResultType.js +31 -0
- package/dist/serialization/types/LoincMatch.d.ts +16 -0
- package/dist/serialization/types/LoincMatch.js +37 -0
- package/dist/serialization/types/ParsedLabReportData.d.ts +15 -0
- package/dist/serialization/types/ParsedLabReportData.js +36 -0
- package/dist/serialization/types/ParsingJob.d.ts +18 -0
- package/dist/serialization/types/ParsingJob.js +39 -0
- package/dist/serialization/types/ParsingJobStatus.d.ts +10 -0
- package/dist/serialization/types/ParsingJobStatus.js +31 -0
- package/dist/serialization/types/ResultMetadata.d.ts +18 -0
- package/dist/serialization/types/ResultMetadata.js +39 -0
- package/dist/serialization/types/index.d.ts +7 -0
- package/dist/serialization/types/index.js +7 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/reference.md +148 -0
- package/serialization/types/Interpretation.d.ts +1 -1
- package/serialization/types/Interpretation.js +1 -1
- package/serialization/types/LabReportResult.d.ts +25 -0
- package/serialization/types/LabReportResult.js +46 -0
- package/serialization/types/LabReportResultType.d.ts +10 -0
- package/serialization/types/LabReportResultType.js +31 -0
- package/serialization/types/LoincMatch.d.ts +16 -0
- package/serialization/types/LoincMatch.js +37 -0
- package/serialization/types/ParsedLabReportData.d.ts +15 -0
- package/serialization/types/ParsedLabReportData.js +36 -0
- package/serialization/types/ParsingJob.d.ts +18 -0
- package/serialization/types/ParsingJob.js +39 -0
- package/serialization/types/ParsingJobStatus.d.ts +10 -0
- package/serialization/types/ParsingJobStatus.js +31 -0
- package/serialization/types/ResultMetadata.d.ts +18 -0
- package/serialization/types/ResultMetadata.js +39 -0
- package/serialization/types/index.d.ts +7 -0
- package/serialization/types/index.js +7 -0
- package/version.d.ts +1 -1
- 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.
|
|
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.
|
|
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.
|
|
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
|
};
|
|
@@ -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,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,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,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
|
+
}
|
|
@@ -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";
|
package/dist/api/types/index.js
CHANGED
|
@@ -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/dist/core/index.d.ts
CHANGED
package/dist/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"));
|
|
@@ -6,5 +6,5 @@ import * as Vital from "../../api/index";
|
|
|
6
6
|
import * as core from "../../core";
|
|
7
7
|
export declare const Interpretation: core.serialization.Schema<serializers.Interpretation.Raw, Vital.Interpretation>;
|
|
8
8
|
export declare namespace Interpretation {
|
|
9
|
-
type Raw = "normal" | "abnormal" | "critical";
|
|
9
|
+
type Raw = "normal" | "abnormal" | "critical" | "unknown";
|
|
10
10
|
}
|
|
@@ -28,4 +28,4 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Interpretation = void 0;
|
|
30
30
|
const core = __importStar(require("../../core"));
|
|
31
|
-
exports.Interpretation = core.serialization.enum_(["normal", "abnormal", "critical"]);
|
|
31
|
+
exports.Interpretation = core.serialization.enum_(["normal", "abnormal", "critical", "unknown"]);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Vital from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { LabReportResultType } from "./LabReportResultType";
|
|
8
|
+
import { LoincMatch } from "./LoincMatch";
|
|
9
|
+
import { Interpretation } from "./Interpretation";
|
|
10
|
+
export declare const LabReportResult: core.serialization.ObjectSchema<serializers.LabReportResult.Raw, Vital.LabReportResult>;
|
|
11
|
+
export declare namespace LabReportResult {
|
|
12
|
+
interface Raw {
|
|
13
|
+
test_name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
type?: LabReportResultType.Raw | null;
|
|
16
|
+
units?: string | null;
|
|
17
|
+
max_reference_range?: number | null;
|
|
18
|
+
min_reference_range?: number | null;
|
|
19
|
+
source_panel_name?: string | null;
|
|
20
|
+
loinc_matches?: LoincMatch.Raw[] | null;
|
|
21
|
+
interpretation?: Interpretation.Raw | null;
|
|
22
|
+
is_above_max_range?: boolean | null;
|
|
23
|
+
is_below_min_range?: boolean | null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.LabReportResult = void 0;
|
|
30
|
+
const core = __importStar(require("../../core"));
|
|
31
|
+
const LabReportResultType_1 = require("./LabReportResultType");
|
|
32
|
+
const LoincMatch_1 = require("./LoincMatch");
|
|
33
|
+
const Interpretation_1 = require("./Interpretation");
|
|
34
|
+
exports.LabReportResult = core.serialization.object({
|
|
35
|
+
testName: core.serialization.property("test_name", core.serialization.string()),
|
|
36
|
+
value: core.serialization.string(),
|
|
37
|
+
type: LabReportResultType_1.LabReportResultType.optional(),
|
|
38
|
+
units: core.serialization.string().optional(),
|
|
39
|
+
maxReferenceRange: core.serialization.property("max_reference_range", core.serialization.number().optional()),
|
|
40
|
+
minReferenceRange: core.serialization.property("min_reference_range", core.serialization.number().optional()),
|
|
41
|
+
sourcePanelName: core.serialization.property("source_panel_name", core.serialization.string().optional()),
|
|
42
|
+
loincMatches: core.serialization.property("loinc_matches", core.serialization.list(LoincMatch_1.LoincMatch).optional()),
|
|
43
|
+
interpretation: Interpretation_1.Interpretation.optional(),
|
|
44
|
+
isAboveMaxRange: core.serialization.property("is_above_max_range", core.serialization.boolean().optional()),
|
|
45
|
+
isBelowMinRange: core.serialization.property("is_below_min_range", core.serialization.boolean().optional()),
|
|
46
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Vital from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare const LabReportResultType: core.serialization.Schema<serializers.LabReportResultType.Raw, Vital.LabReportResultType>;
|
|
8
|
+
export declare namespace LabReportResultType {
|
|
9
|
+
type Raw = "numeric" | "range" | "comment" | "boolean" | "duration" | "percentage" | "ratio";
|
|
10
|
+
}
|