@tryvital/vital-node 3.0.5 → 3.0.6

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 (133) hide show
  1. package/api/resources/activity/client/Client.js +2 -2
  2. package/api/resources/body/client/Client.js +2 -2
  3. package/api/resources/devices/client/Client.js +1 -1
  4. package/api/resources/insurance/client/Client.js +2 -2
  5. package/api/resources/introspect/client/Client.d.ts +4 -0
  6. package/api/resources/introspect/client/Client.js +73 -1
  7. package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +10 -0
  8. package/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.js +5 -0
  9. package/api/resources/introspect/client/requests/index.d.ts +1 -0
  10. package/api/resources/labTests/client/Client.d.ts +3 -2
  11. package/api/resources/labTests/client/Client.js +29 -57
  12. package/api/resources/link/client/Client.d.ts +3 -3
  13. package/api/resources/link/client/Client.js +23 -51
  14. package/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
  15. package/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
  16. package/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
  17. package/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +1 -1
  18. package/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +1 -1
  19. package/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +1 -1
  20. package/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
  21. package/api/resources/meal/client/Client.js +1 -1
  22. package/api/resources/profile/client/Client.js +2 -2
  23. package/api/resources/providers/client/Client.js +1 -1
  24. package/api/resources/sleep/client/Client.js +4 -4
  25. package/api/resources/team/client/Client.d.ts +1 -1
  26. package/api/resources/team/client/Client.js +9 -13
  27. package/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +1 -1
  28. package/api/resources/testkit/client/Client.js +2 -2
  29. package/api/resources/user/client/Client.js +11 -11
  30. package/api/resources/vitals/client/Client.js +23 -23
  31. package/api/resources/workouts/client/Client.js +3 -3
  32. package/api/types/HistoricalPullStatus.d.ts +12 -0
  33. package/api/types/HistoricalPullStatus.js +11 -0
  34. package/api/types/SingleHistoricalPullStatistics.d.ts +12 -0
  35. package/api/types/SingleHistoricalPullStatistics.js +5 -0
  36. package/api/types/SingleProviderHistoricalPullResponse.d.ts +8 -0
  37. package/api/types/SingleProviderHistoricalPullResponse.js +5 -0
  38. package/api/types/SingleUserHistoricalPullResponse.d.ts +8 -0
  39. package/api/types/SingleUserHistoricalPullResponse.js +5 -0
  40. package/api/types/SingleUserResourceResponse.d.ts +2 -0
  41. package/api/types/UserHistoricalPullsResponse.d.ts +8 -0
  42. package/api/types/UserHistoricalPullsResponse.js +5 -0
  43. package/api/types/index.d.ts +5 -0
  44. package/api/types/index.js +5 -0
  45. package/core/index.d.ts +1 -0
  46. package/core/index.js +1 -0
  47. package/core/streaming-fetcher/StreamingFetcher.d.ts +30 -0
  48. package/core/streaming-fetcher/StreamingFetcher.js +79 -0
  49. package/core/streaming-fetcher/getHeader.d.ts +2 -0
  50. package/core/streaming-fetcher/getHeader.js +12 -0
  51. package/core/streaming-fetcher/index.d.ts +3 -0
  52. package/core/streaming-fetcher/index.js +7 -0
  53. package/dist/api/resources/activity/client/Client.js +2 -2
  54. package/dist/api/resources/body/client/Client.js +2 -2
  55. package/dist/api/resources/devices/client/Client.js +1 -1
  56. package/dist/api/resources/insurance/client/Client.js +2 -2
  57. package/dist/api/resources/introspect/client/Client.d.ts +4 -0
  58. package/dist/api/resources/introspect/client/Client.js +73 -1
  59. package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.d.ts +10 -0
  60. package/dist/api/resources/introspect/client/requests/IntrospectGetUserHistoricalPullsRequest.js +5 -0
  61. package/dist/api/resources/introspect/client/requests/index.d.ts +1 -0
  62. package/dist/api/resources/labTests/client/Client.d.ts +3 -2
  63. package/dist/api/resources/labTests/client/Client.js +29 -57
  64. package/dist/api/resources/link/client/Client.d.ts +3 -3
  65. package/dist/api/resources/link/client/Client.js +23 -51
  66. package/dist/api/resources/link/client/requests/EmailAuthLink.d.ts +1 -1
  67. package/dist/api/resources/link/client/requests/EmailProviderAuthLink.d.ts +1 -1
  68. package/dist/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -1
  69. package/dist/api/resources/link/client/requests/LinkGenerateOauthLinkRequest.d.ts +1 -1
  70. package/dist/api/resources/link/client/requests/LinkGetAllProvidersRequest.d.ts +1 -1
  71. package/dist/api/resources/link/client/requests/LinkTokenStateRequest.d.ts +1 -1
  72. package/dist/api/resources/link/client/requests/PasswordAuthLink.d.ts +1 -1
  73. package/dist/api/resources/meal/client/Client.js +1 -1
  74. package/dist/api/resources/profile/client/Client.js +2 -2
  75. package/dist/api/resources/providers/client/Client.js +1 -1
  76. package/dist/api/resources/sleep/client/Client.js +4 -4
  77. package/dist/api/resources/team/client/Client.d.ts +1 -1
  78. package/dist/api/resources/team/client/Client.js +9 -13
  79. package/dist/api/resources/team/client/requests/TeamGetLinkConfigRequest.d.ts +1 -1
  80. package/dist/api/resources/testkit/client/Client.js +2 -2
  81. package/dist/api/resources/user/client/Client.js +11 -11
  82. package/dist/api/resources/vitals/client/Client.js +23 -23
  83. package/dist/api/resources/workouts/client/Client.js +3 -3
  84. package/dist/api/types/HistoricalPullStatus.d.ts +12 -0
  85. package/dist/api/types/HistoricalPullStatus.js +11 -0
  86. package/dist/api/types/SingleHistoricalPullStatistics.d.ts +12 -0
  87. package/dist/api/types/SingleHistoricalPullStatistics.js +5 -0
  88. package/dist/api/types/SingleProviderHistoricalPullResponse.d.ts +8 -0
  89. package/dist/api/types/SingleProviderHistoricalPullResponse.js +5 -0
  90. package/dist/api/types/SingleUserHistoricalPullResponse.d.ts +8 -0
  91. package/dist/api/types/SingleUserHistoricalPullResponse.js +5 -0
  92. package/dist/api/types/SingleUserResourceResponse.d.ts +2 -0
  93. package/dist/api/types/UserHistoricalPullsResponse.d.ts +8 -0
  94. package/dist/api/types/UserHistoricalPullsResponse.js +5 -0
  95. package/dist/api/types/index.d.ts +5 -0
  96. package/dist/api/types/index.js +5 -0
  97. package/dist/core/index.d.ts +1 -0
  98. package/dist/core/index.js +1 -0
  99. package/dist/core/streaming-fetcher/StreamingFetcher.d.ts +30 -0
  100. package/dist/core/streaming-fetcher/StreamingFetcher.js +79 -0
  101. package/dist/core/streaming-fetcher/getHeader.d.ts +2 -0
  102. package/dist/core/streaming-fetcher/getHeader.js +12 -0
  103. package/dist/core/streaming-fetcher/index.d.ts +3 -0
  104. package/dist/core/streaming-fetcher/index.js +7 -0
  105. package/dist/serialization/types/HistoricalPullStatus.d.ts +10 -0
  106. package/dist/serialization/types/HistoricalPullStatus.js +31 -0
  107. package/dist/serialization/types/SingleHistoricalPullStatistics.d.ts +17 -0
  108. package/dist/serialization/types/SingleHistoricalPullStatistics.js +47 -0
  109. package/dist/serialization/types/SingleProviderHistoricalPullResponse.d.ts +13 -0
  110. package/dist/serialization/types/SingleProviderHistoricalPullResponse.js +43 -0
  111. package/dist/serialization/types/SingleUserHistoricalPullResponse.d.ts +13 -0
  112. package/dist/serialization/types/SingleUserHistoricalPullResponse.js +43 -0
  113. package/dist/serialization/types/SingleUserResourceResponse.d.ts +1 -0
  114. package/dist/serialization/types/SingleUserResourceResponse.js +10 -0
  115. package/dist/serialization/types/UserHistoricalPullsResponse.d.ts +13 -0
  116. package/dist/serialization/types/UserHistoricalPullsResponse.js +43 -0
  117. package/dist/serialization/types/index.d.ts +5 -0
  118. package/dist/serialization/types/index.js +5 -0
  119. package/package.json +1 -1
  120. package/serialization/types/HistoricalPullStatus.d.ts +10 -0
  121. package/serialization/types/HistoricalPullStatus.js +31 -0
  122. package/serialization/types/SingleHistoricalPullStatistics.d.ts +17 -0
  123. package/serialization/types/SingleHistoricalPullStatistics.js +47 -0
  124. package/serialization/types/SingleProviderHistoricalPullResponse.d.ts +13 -0
  125. package/serialization/types/SingleProviderHistoricalPullResponse.js +43 -0
  126. package/serialization/types/SingleUserHistoricalPullResponse.d.ts +13 -0
  127. package/serialization/types/SingleUserHistoricalPullResponse.js +43 -0
  128. package/serialization/types/SingleUserResourceResponse.d.ts +1 -0
  129. package/serialization/types/SingleUserResourceResponse.js +10 -0
  130. package/serialization/types/UserHistoricalPullsResponse.d.ts +13 -0
  131. package/serialization/types/UserHistoricalPullsResponse.js +43 -0
  132. package/serialization/types/index.d.ts +5 -0
  133. package/serialization/types/index.js +5 -0
@@ -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 });
@@ -101,6 +101,7 @@ export * from "./HealthInsuranceCreateRequest";
101
101
  export * from "./HealthInsuranceCreateRequestFrontImage";
102
102
  export * from "./HealthInsuranceCreateRequestBackImage";
103
103
  export * from "./HealthInsuranceCreateRequestPatientSignatureImage";
104
+ export * from "./HistoricalPullStatus";
104
105
  export * from "./Jpeg";
105
106
  export * from "./LabResultsMetadata";
106
107
  export * from "./LabResultsRaw";
@@ -145,7 +146,10 @@ export * from "./Region";
145
146
  export * from "./ResponsibleRelationship";
146
147
  export * from "./ResultType";
147
148
  export * from "./ShippingAddress";
149
+ export * from "./SingleHistoricalPullStatistics";
150
+ export * from "./SingleProviderHistoricalPullResponse";
148
151
  export * from "./SingleResourceStatistics";
152
+ export * from "./SingleUserHistoricalPullResponse";
149
153
  export * from "./SingleUserResourceResponse";
150
154
  export * from "./SleepV2InDb";
151
155
  export * from "./Source";
@@ -156,6 +160,7 @@ export * from "./TeamConfig";
156
160
  export * from "./TimeSlot";
157
161
  export * from "./TimeseriesMetricPoint";
158
162
  export * from "./TimeseriesResource";
163
+ export * from "./UserHistoricalPullsResponse";
159
164
  export * from "./UserRefreshErrorResponse";
160
165
  export * from "./UserRefreshSuccessResponse";
161
166
  export * from "./UserResourcesResponse";
@@ -117,6 +117,7 @@ __exportStar(require("./HealthInsuranceCreateRequest"), exports);
117
117
  __exportStar(require("./HealthInsuranceCreateRequestFrontImage"), exports);
118
118
  __exportStar(require("./HealthInsuranceCreateRequestBackImage"), exports);
119
119
  __exportStar(require("./HealthInsuranceCreateRequestPatientSignatureImage"), exports);
120
+ __exportStar(require("./HistoricalPullStatus"), exports);
120
121
  __exportStar(require("./Jpeg"), exports);
121
122
  __exportStar(require("./LabResultsMetadata"), exports);
122
123
  __exportStar(require("./LabResultsRaw"), exports);
@@ -161,7 +162,10 @@ __exportStar(require("./Region"), exports);
161
162
  __exportStar(require("./ResponsibleRelationship"), exports);
162
163
  __exportStar(require("./ResultType"), exports);
163
164
  __exportStar(require("./ShippingAddress"), exports);
165
+ __exportStar(require("./SingleHistoricalPullStatistics"), exports);
166
+ __exportStar(require("./SingleProviderHistoricalPullResponse"), exports);
164
167
  __exportStar(require("./SingleResourceStatistics"), exports);
168
+ __exportStar(require("./SingleUserHistoricalPullResponse"), exports);
165
169
  __exportStar(require("./SingleUserResourceResponse"), exports);
166
170
  __exportStar(require("./SleepV2InDb"), exports);
167
171
  __exportStar(require("./Source"), exports);
@@ -172,6 +176,7 @@ __exportStar(require("./TeamConfig"), exports);
172
176
  __exportStar(require("./TimeSlot"), exports);
173
177
  __exportStar(require("./TimeseriesMetricPoint"), exports);
174
178
  __exportStar(require("./TimeseriesResource"), exports);
179
+ __exportStar(require("./UserHistoricalPullsResponse"), exports);
175
180
  __exportStar(require("./UserRefreshErrorResponse"), exports);
176
181
  __exportStar(require("./UserRefreshSuccessResponse"), exports);
177
182
  __exportStar(require("./UserResourcesResponse"), exports);
@@ -1,2 +1,3 @@
1
1
  export * from "./fetcher";
2
+ export * from "./streaming-fetcher";
2
3
  export * as serialization from "./schemas";
@@ -28,4 +28,5 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.serialization = void 0;
30
30
  __exportStar(require("./fetcher"), exports);
31
+ __exportStar(require("./streaming-fetcher"), exports);
31
32
  exports.serialization = __importStar(require("./schemas"));
@@ -0,0 +1,30 @@
1
+ /// <reference types="node" />
2
+ import { default as URLSearchParams } from "@ungap/url-search-params";
3
+ import { AxiosAdapter } from "axios";
4
+ import { Readable } from "stream";
5
+ export declare type StreamingFetchFunction = (args: StreamingFetcher.Args) => Promise<StreamingFetcher.Response>;
6
+ export declare namespace StreamingFetcher {
7
+ interface Args {
8
+ url: string;
9
+ method: string;
10
+ headers?: Record<string, string | undefined>;
11
+ queryParameters?: URLSearchParams;
12
+ body?: unknown;
13
+ timeoutMs?: number;
14
+ withCredentials?: boolean;
15
+ adapter?: AxiosAdapter;
16
+ onUploadProgress?: (event: ProgressEvent) => void;
17
+ onDownloadProgress?: (event: ProgressEvent) => void;
18
+ onData?: (data: unknown) => void;
19
+ onError?: (err: unknown) => void;
20
+ onFinish?: () => void;
21
+ abortController?: AbortController;
22
+ responseChunkPrefix?: string;
23
+ terminator?: string;
24
+ }
25
+ interface Response {
26
+ data: Readable;
27
+ headers: Record<string, any>;
28
+ }
29
+ }
30
+ export declare const streamingFetcher: StreamingFetchFunction;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.streamingFetcher = void 0;
16
+ const axios_1 = __importDefault(require("axios"));
17
+ const streamingFetcher = (args) => __awaiter(void 0, void 0, void 0, function* () {
18
+ var _a;
19
+ const headers = {};
20
+ if (args.body !== undefined) {
21
+ headers["Content-Type"] = "application/json";
22
+ }
23
+ if (args.headers != null) {
24
+ for (const [key, value] of Object.entries(args.headers)) {
25
+ if (value != null) {
26
+ headers[key] = value;
27
+ }
28
+ }
29
+ }
30
+ const response = yield (0, axios_1.default)({
31
+ url: args.url,
32
+ params: args.queryParameters,
33
+ method: args.method,
34
+ headers,
35
+ data: args.body,
36
+ timeout: args.timeoutMs,
37
+ transitional: {
38
+ clarifyTimeoutError: true,
39
+ },
40
+ withCredentials: args.withCredentials,
41
+ maxBodyLength: Infinity,
42
+ maxContentLength: Infinity,
43
+ onUploadProgress: args.onUploadProgress,
44
+ onDownloadProgress: args.onDownloadProgress,
45
+ signal: (_a = args.abortController) === null || _a === void 0 ? void 0 : _a.signal,
46
+ responseType: "stream",
47
+ adapter: args.adapter,
48
+ });
49
+ if (args.onData != null) {
50
+ const { onData } = args;
51
+ response.data.on("data", (data) => {
52
+ var _a;
53
+ for (const line of data.toString().split("\n")) {
54
+ let data = line;
55
+ if (args.responseChunkPrefix != null) {
56
+ if (!data.startsWith(args.responseChunkPrefix)) {
57
+ continue;
58
+ }
59
+ data = data.substring(args.responseChunkPrefix.length);
60
+ }
61
+ try {
62
+ const parsed = JSON.parse(data);
63
+ onData(parsed);
64
+ }
65
+ catch (error) {
66
+ (_a = args.onError) === null || _a === void 0 ? void 0 : _a.call(args, error);
67
+ }
68
+ }
69
+ });
70
+ }
71
+ if (args.onFinish != null) {
72
+ response.data.on("end", args.onFinish);
73
+ }
74
+ return {
75
+ data: response.data,
76
+ headers: response.headers,
77
+ };
78
+ });
79
+ exports.streamingFetcher = streamingFetcher;
@@ -0,0 +1,2 @@
1
+ import { StreamingFetcher } from "./StreamingFetcher";
2
+ export declare function getHeader(response: StreamingFetcher.Response, header: string): string | undefined;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getHeader = void 0;
4
+ function getHeader(response, header) {
5
+ for (const [headerKey, headerValue] of Object.entries(response.headers)) {
6
+ if (headerKey.toLowerCase() === header.toLowerCase()) {
7
+ return headerValue;
8
+ }
9
+ }
10
+ return undefined;
11
+ }
12
+ exports.getHeader = getHeader;
@@ -0,0 +1,3 @@
1
+ export { getHeader } from "./getHeader";
2
+ export { streamingFetcher } from "./StreamingFetcher";
3
+ export type { StreamingFetcher, StreamingFetchFunction } from "./StreamingFetcher";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.streamingFetcher = exports.getHeader = void 0;
4
+ var getHeader_1 = require("./getHeader");
5
+ Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_1.getHeader; } });
6
+ var StreamingFetcher_1 = require("./StreamingFetcher");
7
+ Object.defineProperty(exports, "streamingFetcher", { enumerable: true, get: function () { return StreamingFetcher_1.streamingFetcher; } });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "..";
5
+ import * as Vital from "../../api";
6
+ import * as core from "../../core";
7
+ export declare const HistoricalPullStatus: core.serialization.Schema<serializers.HistoricalPullStatus.Raw, Vital.HistoricalPullStatus>;
8
+ export declare namespace HistoricalPullStatus {
9
+ type Raw = "success" | "failure" | "in_progress";
10
+ }
@@ -0,0 +1,31 @@
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.HistoricalPullStatus = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.HistoricalPullStatus = core.serialization.enum_(["success", "failure", "in_progress"]);
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "..";
5
+ import * as Vital from "../../api";
6
+ import * as core from "../../core";
7
+ export declare const SingleHistoricalPullStatistics: core.serialization.ObjectSchema<serializers.SingleHistoricalPullStatistics.Raw, Vital.SingleHistoricalPullStatistics>;
8
+ export declare namespace SingleHistoricalPullStatistics {
9
+ interface Raw {
10
+ status: serializers.HistoricalPullStatus.Raw;
11
+ range_start?: string | null;
12
+ range_end?: string | null;
13
+ days_with_data?: number | null;
14
+ release: string;
15
+ trace_id?: string | null;
16
+ }
17
+ }
@@ -0,0 +1,47 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.SingleHistoricalPullStatistics = void 0;
39
+ const core = __importStar(require("../../core"));
40
+ exports.SingleHistoricalPullStatistics = core.serialization.object({
41
+ status: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).HistoricalPullStatus; })),
42
+ rangeStart: core.serialization.property("range_start", core.serialization.date().optional()),
43
+ rangeEnd: core.serialization.property("range_end", core.serialization.date().optional()),
44
+ daysWithData: core.serialization.property("days_with_data", core.serialization.number().optional()),
45
+ release: core.serialization.string(),
46
+ traceId: core.serialization.property("trace_id", core.serialization.string().optional()),
47
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "..";
5
+ import * as Vital from "../../api";
6
+ import * as core from "../../core";
7
+ export declare const SingleProviderHistoricalPullResponse: core.serialization.ObjectSchema<serializers.SingleProviderHistoricalPullResponse.Raw, Vital.SingleProviderHistoricalPullResponse>;
8
+ export declare namespace SingleProviderHistoricalPullResponse {
9
+ interface Raw {
10
+ pulled: Record<string, serializers.SingleHistoricalPullStatistics.Raw>;
11
+ not_pulled: serializers.ClientFacingResource.Raw[];
12
+ }
13
+ }
@@ -0,0 +1,43 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.SingleProviderHistoricalPullResponse = void 0;
39
+ const core = __importStar(require("../../core"));
40
+ exports.SingleProviderHistoricalPullResponse = core.serialization.object({
41
+ pulled: core.serialization.record(core.serialization.string(), core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).SingleHistoricalPullStatistics; }))),
42
+ notPulled: core.serialization.property("not_pulled", core.serialization.list(core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).ClientFacingResource; })))),
43
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "..";
5
+ import * as Vital from "../../api";
6
+ import * as core from "../../core";
7
+ export declare const SingleUserHistoricalPullResponse: core.serialization.ObjectSchema<serializers.SingleUserHistoricalPullResponse.Raw, Vital.SingleUserHistoricalPullResponse>;
8
+ export declare namespace SingleUserHistoricalPullResponse {
9
+ interface Raw {
10
+ user_id: string;
11
+ provider: Record<string, serializers.SingleProviderHistoricalPullResponse.Raw>;
12
+ }
13
+ }
@@ -0,0 +1,43 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.SingleUserHistoricalPullResponse = void 0;
39
+ const core = __importStar(require("../../core"));
40
+ exports.SingleUserHistoricalPullResponse = core.serialization.object({
41
+ userId: core.serialization.property("user_id", core.serialization.string()),
42
+ provider: core.serialization.record(core.serialization.string(), core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).SingleProviderHistoricalPullResponse; }))),
43
+ });
@@ -8,5 +8,6 @@ export declare const SingleUserResourceResponse: core.serialization.ObjectSchema
8
8
  export declare namespace SingleUserResourceResponse {
9
9
  interface Raw {
10
10
  user_id: string;
11
+ provider: Record<string, Record<string, serializers.SingleResourceStatistics.Raw>>;
11
12
  }
12
13
  }
@@ -25,9 +25,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  __setModuleDefault(result, mod);
26
26
  return result;
27
27
  };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
28
37
  Object.defineProperty(exports, "__esModule", { value: true });
29
38
  exports.SingleUserResourceResponse = void 0;
30
39
  const core = __importStar(require("../../core"));
31
40
  exports.SingleUserResourceResponse = core.serialization.object({
32
41
  userId: core.serialization.property("user_id", core.serialization.string()),
42
+ provider: core.serialization.record(core.serialization.string(), core.serialization.record(core.serialization.string(), core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).SingleResourceStatistics; })))),
33
43
  });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "..";
5
+ import * as Vital from "../../api";
6
+ import * as core from "../../core";
7
+ export declare const UserHistoricalPullsResponse: core.serialization.ObjectSchema<serializers.UserHistoricalPullsResponse.Raw, Vital.UserHistoricalPullsResponse>;
8
+ export declare namespace UserHistoricalPullsResponse {
9
+ interface Raw {
10
+ data: serializers.SingleUserHistoricalPullResponse.Raw[];
11
+ next?: string | null;
12
+ }
13
+ }
@@ -0,0 +1,43 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.UserHistoricalPullsResponse = void 0;
39
+ const core = __importStar(require("../../core"));
40
+ exports.UserHistoricalPullsResponse = core.serialization.object({
41
+ data: core.serialization.list(core.serialization.lazyObject(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).SingleUserHistoricalPullResponse; }))),
42
+ next: core.serialization.string().optional(),
43
+ });
@@ -101,6 +101,7 @@ export * from "./HealthInsuranceCreateRequest";
101
101
  export * from "./HealthInsuranceCreateRequestFrontImage";
102
102
  export * from "./HealthInsuranceCreateRequestBackImage";
103
103
  export * from "./HealthInsuranceCreateRequestPatientSignatureImage";
104
+ export * from "./HistoricalPullStatus";
104
105
  export * from "./Jpeg";
105
106
  export * from "./LabResultsMetadata";
106
107
  export * from "./LabResultsRaw";
@@ -145,7 +146,10 @@ export * from "./Region";
145
146
  export * from "./ResponsibleRelationship";
146
147
  export * from "./ResultType";
147
148
  export * from "./ShippingAddress";
149
+ export * from "./SingleHistoricalPullStatistics";
150
+ export * from "./SingleProviderHistoricalPullResponse";
148
151
  export * from "./SingleResourceStatistics";
152
+ export * from "./SingleUserHistoricalPullResponse";
149
153
  export * from "./SingleUserResourceResponse";
150
154
  export * from "./SleepV2InDb";
151
155
  export * from "./Source";
@@ -156,6 +160,7 @@ export * from "./TeamConfig";
156
160
  export * from "./TimeSlot";
157
161
  export * from "./TimeseriesMetricPoint";
158
162
  export * from "./TimeseriesResource";
163
+ export * from "./UserHistoricalPullsResponse";
159
164
  export * from "./UserRefreshErrorResponse";
160
165
  export * from "./UserRefreshSuccessResponse";
161
166
  export * from "./UserResourcesResponse";
@@ -117,6 +117,7 @@ __exportStar(require("./HealthInsuranceCreateRequest"), exports);
117
117
  __exportStar(require("./HealthInsuranceCreateRequestFrontImage"), exports);
118
118
  __exportStar(require("./HealthInsuranceCreateRequestBackImage"), exports);
119
119
  __exportStar(require("./HealthInsuranceCreateRequestPatientSignatureImage"), exports);
120
+ __exportStar(require("./HistoricalPullStatus"), exports);
120
121
  __exportStar(require("./Jpeg"), exports);
121
122
  __exportStar(require("./LabResultsMetadata"), exports);
122
123
  __exportStar(require("./LabResultsRaw"), exports);
@@ -161,7 +162,10 @@ __exportStar(require("./Region"), exports);
161
162
  __exportStar(require("./ResponsibleRelationship"), exports);
162
163
  __exportStar(require("./ResultType"), exports);
163
164
  __exportStar(require("./ShippingAddress"), exports);
165
+ __exportStar(require("./SingleHistoricalPullStatistics"), exports);
166
+ __exportStar(require("./SingleProviderHistoricalPullResponse"), exports);
164
167
  __exportStar(require("./SingleResourceStatistics"), exports);
168
+ __exportStar(require("./SingleUserHistoricalPullResponse"), exports);
165
169
  __exportStar(require("./SingleUserResourceResponse"), exports);
166
170
  __exportStar(require("./SleepV2InDb"), exports);
167
171
  __exportStar(require("./Source"), exports);
@@ -172,6 +176,7 @@ __exportStar(require("./TeamConfig"), exports);
172
176
  __exportStar(require("./TimeSlot"), exports);
173
177
  __exportStar(require("./TimeseriesMetricPoint"), exports);
174
178
  __exportStar(require("./TimeseriesResource"), exports);
179
+ __exportStar(require("./UserHistoricalPullsResponse"), exports);
175
180
  __exportStar(require("./UserRefreshErrorResponse"), exports);
176
181
  __exportStar(require("./UserRefreshSuccessResponse"), exports);
177
182
  __exportStar(require("./UserResourcesResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-node",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "private": false,
5
5
  "repository": "https://github.com/tryVital/vital-node",
6
6
  "main": "./index.js",
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "..";
5
+ import * as Vital from "../../api";
6
+ import * as core from "../../core";
7
+ export declare const HistoricalPullStatus: core.serialization.Schema<serializers.HistoricalPullStatus.Raw, Vital.HistoricalPullStatus>;
8
+ export declare namespace HistoricalPullStatus {
9
+ type Raw = "success" | "failure" | "in_progress";
10
+ }
@@ -0,0 +1,31 @@
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.HistoricalPullStatus = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.HistoricalPullStatus = core.serialization.enum_(["success", "failure", "in_progress"]);