@tryvital/vital-node 3.1.148 → 3.1.150

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 (100) hide show
  1. package/api/resources/activity/client/Client.js +2 -2
  2. package/api/resources/aggregate/client/Client.js +1 -1
  3. package/api/resources/body/client/Client.js +2 -2
  4. package/api/resources/devices/client/Client.js +1 -1
  5. package/api/resources/electrocardiogram/client/Client.js +1 -1
  6. package/api/resources/insurance/client/Client.d.ts +2 -4
  7. package/api/resources/insurance/client/Client.js +4 -6
  8. package/api/resources/insurance/client/requests/PayorSearchRequest.d.ts +5 -4
  9. package/api/resources/introspect/client/Client.js +2 -2
  10. package/api/resources/labTests/client/Client.js +34 -34
  11. package/api/resources/link/client/Client.js +14 -14
  12. package/api/resources/link/client/requests/LinkCodeCreateRequest.d.ts +3 -0
  13. package/api/resources/meal/client/Client.js +1 -1
  14. package/api/resources/menstrualCycle/client/Client.js +1 -1
  15. package/api/resources/profile/client/Client.js +2 -2
  16. package/api/resources/providers/client/Client.js +1 -1
  17. package/api/resources/sleep/client/Client.js +4 -4
  18. package/api/resources/sleepCycle/client/Client.js +1 -1
  19. package/api/resources/team/client/Client.js +7 -7
  20. package/api/resources/testkit/client/Client.js +2 -2
  21. package/api/resources/user/client/Client.js +16 -16
  22. package/api/resources/vitals/client/Client.js +58 -58
  23. package/api/resources/workouts/client/Client.js +3 -3
  24. package/api/types/ClientFacingConnectionErrorDetails.d.ts +9 -0
  25. package/api/types/ClientFacingConnectionErrorDetails.js +5 -0
  26. package/api/types/ClientFacingConnectionErrorDetailsErrorType.d.ts +13 -0
  27. package/api/types/ClientFacingConnectionErrorDetailsErrorType.js +15 -0
  28. package/api/types/ClientFacingProviderWithStatus.d.ts +3 -0
  29. package/api/types/PayorCodeExternalProvider.d.ts +8 -0
  30. package/api/types/PayorCodeExternalProvider.js +10 -0
  31. package/api/types/VitalTokenCreatedResponse.d.ts +1 -0
  32. package/api/types/index.d.ts +3 -0
  33. package/api/types/index.js +3 -0
  34. package/dist/api/resources/activity/client/Client.js +2 -2
  35. package/dist/api/resources/aggregate/client/Client.js +1 -1
  36. package/dist/api/resources/body/client/Client.js +2 -2
  37. package/dist/api/resources/devices/client/Client.js +1 -1
  38. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  39. package/dist/api/resources/insurance/client/Client.d.ts +2 -4
  40. package/dist/api/resources/insurance/client/Client.js +4 -6
  41. package/dist/api/resources/insurance/client/requests/PayorSearchRequest.d.ts +5 -4
  42. package/dist/api/resources/introspect/client/Client.js +2 -2
  43. package/dist/api/resources/labTests/client/Client.js +34 -34
  44. package/dist/api/resources/link/client/Client.js +14 -14
  45. package/dist/api/resources/link/client/requests/LinkCodeCreateRequest.d.ts +3 -0
  46. package/dist/api/resources/meal/client/Client.js +1 -1
  47. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  48. package/dist/api/resources/profile/client/Client.js +2 -2
  49. package/dist/api/resources/providers/client/Client.js +1 -1
  50. package/dist/api/resources/sleep/client/Client.js +4 -4
  51. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  52. package/dist/api/resources/team/client/Client.js +7 -7
  53. package/dist/api/resources/testkit/client/Client.js +2 -2
  54. package/dist/api/resources/user/client/Client.js +16 -16
  55. package/dist/api/resources/vitals/client/Client.js +58 -58
  56. package/dist/api/resources/workouts/client/Client.js +3 -3
  57. package/dist/api/types/ClientFacingConnectionErrorDetails.d.ts +9 -0
  58. package/dist/api/types/ClientFacingConnectionErrorDetails.js +5 -0
  59. package/dist/api/types/ClientFacingConnectionErrorDetailsErrorType.d.ts +13 -0
  60. package/dist/api/types/ClientFacingConnectionErrorDetailsErrorType.js +15 -0
  61. package/dist/api/types/ClientFacingProviderWithStatus.d.ts +3 -0
  62. package/dist/api/types/PayorCodeExternalProvider.d.ts +8 -0
  63. package/dist/api/types/PayorCodeExternalProvider.js +10 -0
  64. package/dist/api/types/VitalTokenCreatedResponse.d.ts +1 -0
  65. package/dist/api/types/index.d.ts +3 -0
  66. package/dist/api/types/index.js +3 -0
  67. package/dist/serialization/resources/insurance/client/requests/PayorSearchRequest.d.ts +4 -1
  68. package/dist/serialization/resources/insurance/client/requests/PayorSearchRequest.js +4 -1
  69. package/dist/serialization/types/ClientFacingConnectionErrorDetails.d.ts +15 -0
  70. package/dist/serialization/types/ClientFacingConnectionErrorDetails.js +36 -0
  71. package/dist/serialization/types/ClientFacingConnectionErrorDetailsErrorType.d.ts +10 -0
  72. package/dist/serialization/types/ClientFacingConnectionErrorDetailsErrorType.js +39 -0
  73. package/dist/serialization/types/ClientFacingProviderWithStatus.d.ts +3 -0
  74. package/dist/serialization/types/ClientFacingProviderWithStatus.js +3 -0
  75. package/dist/serialization/types/PayorCodeExternalProvider.d.ts +10 -0
  76. package/dist/serialization/types/PayorCodeExternalProvider.js +31 -0
  77. package/dist/serialization/types/VitalTokenCreatedResponse.d.ts +1 -0
  78. package/dist/serialization/types/VitalTokenCreatedResponse.js +1 -0
  79. package/dist/serialization/types/index.d.ts +3 -0
  80. package/dist/serialization/types/index.js +3 -0
  81. package/dist/version.d.ts +1 -1
  82. package/dist/version.js +1 -1
  83. package/package.json +1 -1
  84. package/reference.md +1 -3
  85. package/serialization/resources/insurance/client/requests/PayorSearchRequest.d.ts +4 -1
  86. package/serialization/resources/insurance/client/requests/PayorSearchRequest.js +4 -1
  87. package/serialization/types/ClientFacingConnectionErrorDetails.d.ts +15 -0
  88. package/serialization/types/ClientFacingConnectionErrorDetails.js +36 -0
  89. package/serialization/types/ClientFacingConnectionErrorDetailsErrorType.d.ts +10 -0
  90. package/serialization/types/ClientFacingConnectionErrorDetailsErrorType.js +39 -0
  91. package/serialization/types/ClientFacingProviderWithStatus.d.ts +3 -0
  92. package/serialization/types/ClientFacingProviderWithStatus.js +3 -0
  93. package/serialization/types/PayorCodeExternalProvider.d.ts +10 -0
  94. package/serialization/types/PayorCodeExternalProvider.js +31 -0
  95. package/serialization/types/VitalTokenCreatedResponse.d.ts +1 -0
  96. package/serialization/types/VitalTokenCreatedResponse.js +1 -0
  97. package/serialization/types/index.d.ts +3 -0
  98. package/serialization/types/index.js +3 -0
  99. package/version.d.ts +1 -1
  100. 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.148", "User-Agent": "@tryvital/vital-node/3.1.148", "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.150", "User-Agent": "@tryvital/vital-node/3.1.150", "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.148", "User-Agent": "@tryvital/vital-node/3.1.148", "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.150", "User-Agent": "@tryvital/vital-node/3.1.150", "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",
@@ -216,7 +216,7 @@ class Workouts {
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, `v2/timeseries/workouts/${encodeURIComponent(workoutId)}/stream`),
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.148", "User-Agent": "@tryvital/vital-node/3.1.148", "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.150", "User-Agent": "@tryvital/vital-node/3.1.150", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
220
220
  contentType: "application/json",
221
221
  requestType: "json",
222
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "../index";
5
+ export interface ClientFacingConnectionErrorDetails {
6
+ errorType: Vital.ClientFacingConnectionErrorDetailsErrorType;
7
+ errorMessage: string;
8
+ erroredAt: string;
9
+ }
@@ -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
+ export declare type ClientFacingConnectionErrorDetailsErrorType = "token_refresh_failed" | "webhook_registration_failed" | "user_not_found" | "deregistered_per_provider" | "required_scopes_not_granted" | "provider_credential_error" | "unknown";
5
+ export declare const ClientFacingConnectionErrorDetailsErrorType: {
6
+ readonly TokenRefreshFailed: "token_refresh_failed";
7
+ readonly WebhookRegistrationFailed: "webhook_registration_failed";
8
+ readonly UserNotFound: "user_not_found";
9
+ readonly DeregisteredPerProvider: "deregistered_per_provider";
10
+ readonly RequiredScopesNotGranted: "required_scopes_not_granted";
11
+ readonly ProviderCredentialError: "provider_credential_error";
12
+ readonly Unknown: "unknown";
13
+ };
@@ -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.ClientFacingConnectionErrorDetailsErrorType = void 0;
7
+ exports.ClientFacingConnectionErrorDetailsErrorType = {
8
+ TokenRefreshFailed: "token_refresh_failed",
9
+ WebhookRegistrationFailed: "webhook_registration_failed",
10
+ UserNotFound: "user_not_found",
11
+ DeregisteredPerProvider: "deregistered_per_provider",
12
+ RequiredScopesNotGranted: "required_scopes_not_granted",
13
+ ProviderCredentialError: "provider_credential_error",
14
+ Unknown: "unknown",
15
+ };
@@ -9,7 +9,10 @@ export interface ClientFacingProviderWithStatus {
9
9
  slug: string;
10
10
  /** URL for source logo */
11
11
  logo: string;
12
+ createdOn: string;
12
13
  /** Status of source, either error or connected */
13
14
  status: string;
15
+ /** Details of the terminal connection error — populated only when the status is `error`. */
16
+ errorDetails?: Vital.ClientFacingConnectionErrorDetails;
14
17
  resourceAvailability: Record<string, Vital.ResourceAvailability>;
15
18
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type PayorCodeExternalProvider = "change_healthcare" | "availity";
5
+ export declare const PayorCodeExternalProvider: {
6
+ readonly ChangeHealthcare: "change_healthcare";
7
+ readonly Availity: "availity";
8
+ };
@@ -0,0 +1,10 @@
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.PayorCodeExternalProvider = void 0;
7
+ exports.PayorCodeExternalProvider = {
8
+ ChangeHealthcare: "change_healthcare",
9
+ Availity: "availity",
10
+ };
@@ -4,4 +4,5 @@
4
4
  export interface VitalTokenCreatedResponse {
5
5
  code: string;
6
6
  exchangeUrl: string;
7
+ expiresAt: string;
7
8
  }
@@ -59,6 +59,8 @@ export * from "./ClientFacingCaloriesActiveTimeseries";
59
59
  export * from "./ClientFacingCaloriesBasalTimeseries";
60
60
  export * from "./ClientFacingCarbohydratesSample";
61
61
  export * from "./ClientFacingCholesterolTimeseries";
62
+ export * from "./ClientFacingConnectionErrorDetailsErrorType";
63
+ export * from "./ClientFacingConnectionErrorDetails";
62
64
  export * from "./ClientFacingDiagnosisInformation";
63
65
  export * from "./ClientFacingDistanceTimeseries";
64
66
  export * from "./ClientFacingElectrocardiogramClassification";
@@ -250,6 +252,7 @@ export * from "./PasswordProviders";
250
252
  export * from "./PatientAddressCompatible";
251
253
  export * from "./PatientDetails";
252
254
  export * from "./PatientDetailsWithValidation";
255
+ export * from "./PayorCodeExternalProvider";
253
256
  export * from "./PeriodUnit";
254
257
  export * from "./Period";
255
258
  export * from "./PersonDetailsOutput";
@@ -75,6 +75,8 @@ __exportStar(require("./ClientFacingCaloriesActiveTimeseries"), exports);
75
75
  __exportStar(require("./ClientFacingCaloriesBasalTimeseries"), exports);
76
76
  __exportStar(require("./ClientFacingCarbohydratesSample"), exports);
77
77
  __exportStar(require("./ClientFacingCholesterolTimeseries"), exports);
78
+ __exportStar(require("./ClientFacingConnectionErrorDetailsErrorType"), exports);
79
+ __exportStar(require("./ClientFacingConnectionErrorDetails"), exports);
78
80
  __exportStar(require("./ClientFacingDiagnosisInformation"), exports);
79
81
  __exportStar(require("./ClientFacingDistanceTimeseries"), exports);
80
82
  __exportStar(require("./ClientFacingElectrocardiogramClassification"), exports);
@@ -266,6 +268,7 @@ __exportStar(require("./PasswordProviders"), exports);
266
268
  __exportStar(require("./PatientAddressCompatible"), exports);
267
269
  __exportStar(require("./PatientDetails"), exports);
268
270
  __exportStar(require("./PatientDetailsWithValidation"), exports);
271
+ __exportStar(require("./PayorCodeExternalProvider"), exports);
269
272
  __exportStar(require("./PeriodUnit"), exports);
270
273
  __exportStar(require("./Period"), exports);
271
274
  __exportStar(require("./PersonDetailsOutput"), exports);
@@ -4,9 +4,12 @@
4
4
  import * as serializers from "../../../../index";
5
5
  import * as Vital from "../../../../../api/index";
6
6
  import * as core from "../../../../../core";
7
+ import { PayorCodeExternalProvider } from "../../../../types/PayorCodeExternalProvider";
7
8
  export declare const PayorSearchRequest: core.serialization.Schema<serializers.PayorSearchRequest.Raw, Vital.PayorSearchRequest>;
8
9
  export declare namespace PayorSearchRequest {
9
10
  interface Raw {
10
- insurance_name: string;
11
+ insurance_name?: string | null;
12
+ provider?: PayorCodeExternalProvider.Raw | null;
13
+ provider_id?: string | null;
11
14
  }
12
15
  }
@@ -28,6 +28,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.PayorSearchRequest = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
+ const PayorCodeExternalProvider_1 = require("../../../../types/PayorCodeExternalProvider");
31
32
  exports.PayorSearchRequest = core.serialization.object({
32
- insuranceName: core.serialization.property("insurance_name", core.serialization.string()),
33
+ insuranceName: core.serialization.property("insurance_name", core.serialization.string().optional()),
34
+ provider: PayorCodeExternalProvider_1.PayorCodeExternalProvider.optional(),
35
+ providerId: core.serialization.property("provider_id", core.serialization.string().optional()),
33
36
  });
@@ -0,0 +1,15 @@
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 { ClientFacingConnectionErrorDetailsErrorType } from "./ClientFacingConnectionErrorDetailsErrorType";
8
+ export declare const ClientFacingConnectionErrorDetails: core.serialization.ObjectSchema<serializers.ClientFacingConnectionErrorDetails.Raw, Vital.ClientFacingConnectionErrorDetails>;
9
+ export declare namespace ClientFacingConnectionErrorDetails {
10
+ interface Raw {
11
+ error_type: ClientFacingConnectionErrorDetailsErrorType.Raw;
12
+ error_message: string;
13
+ errored_at: string;
14
+ }
15
+ }
@@ -0,0 +1,36 @@
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.ClientFacingConnectionErrorDetails = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ const ClientFacingConnectionErrorDetailsErrorType_1 = require("./ClientFacingConnectionErrorDetailsErrorType");
32
+ exports.ClientFacingConnectionErrorDetails = core.serialization.object({
33
+ errorType: core.serialization.property("error_type", ClientFacingConnectionErrorDetailsErrorType_1.ClientFacingConnectionErrorDetailsErrorType),
34
+ errorMessage: core.serialization.property("error_message", core.serialization.string()),
35
+ erroredAt: core.serialization.property("errored_at", core.serialization.string()),
36
+ });
@@ -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 ClientFacingConnectionErrorDetailsErrorType: core.serialization.Schema<serializers.ClientFacingConnectionErrorDetailsErrorType.Raw, Vital.ClientFacingConnectionErrorDetailsErrorType>;
8
+ export declare namespace ClientFacingConnectionErrorDetailsErrorType {
9
+ type Raw = "token_refresh_failed" | "webhook_registration_failed" | "user_not_found" | "deregistered_per_provider" | "required_scopes_not_granted" | "provider_credential_error" | "unknown";
10
+ }
@@ -0,0 +1,39 @@
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.ClientFacingConnectionErrorDetailsErrorType = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.ClientFacingConnectionErrorDetailsErrorType = core.serialization.enum_([
32
+ "token_refresh_failed",
33
+ "webhook_registration_failed",
34
+ "user_not_found",
35
+ "deregistered_per_provider",
36
+ "required_scopes_not_granted",
37
+ "provider_credential_error",
38
+ "unknown",
39
+ ]);
@@ -4,6 +4,7 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Vital from "../../api/index";
6
6
  import * as core from "../../core";
7
+ import { ClientFacingConnectionErrorDetails } from "./ClientFacingConnectionErrorDetails";
7
8
  import { ResourceAvailability } from "./ResourceAvailability";
8
9
  export declare const ClientFacingProviderWithStatus: core.serialization.ObjectSchema<serializers.ClientFacingProviderWithStatus.Raw, Vital.ClientFacingProviderWithStatus>;
9
10
  export declare namespace ClientFacingProviderWithStatus {
@@ -11,7 +12,9 @@ export declare namespace ClientFacingProviderWithStatus {
11
12
  name: string;
12
13
  slug: string;
13
14
  logo: string;
15
+ created_on: string;
14
16
  status: string;
17
+ error_details?: ClientFacingConnectionErrorDetails.Raw | null;
15
18
  resource_availability: Record<string, ResourceAvailability.Raw>;
16
19
  }
17
20
  }
@@ -28,11 +28,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ClientFacingProviderWithStatus = void 0;
30
30
  const core = __importStar(require("../../core"));
31
+ const ClientFacingConnectionErrorDetails_1 = require("./ClientFacingConnectionErrorDetails");
31
32
  const ResourceAvailability_1 = require("./ResourceAvailability");
32
33
  exports.ClientFacingProviderWithStatus = core.serialization.object({
33
34
  name: core.serialization.string(),
34
35
  slug: core.serialization.string(),
35
36
  logo: core.serialization.string(),
37
+ createdOn: core.serialization.property("created_on", core.serialization.string()),
36
38
  status: core.serialization.string(),
39
+ errorDetails: core.serialization.property("error_details", ClientFacingConnectionErrorDetails_1.ClientFacingConnectionErrorDetails.optional()),
37
40
  resourceAvailability: core.serialization.property("resource_availability", core.serialization.record(core.serialization.string(), ResourceAvailability_1.ResourceAvailability)),
38
41
  });
@@ -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 PayorCodeExternalProvider: core.serialization.Schema<serializers.PayorCodeExternalProvider.Raw, Vital.PayorCodeExternalProvider>;
8
+ export declare namespace PayorCodeExternalProvider {
9
+ type Raw = "change_healthcare" | "availity";
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.PayorCodeExternalProvider = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.PayorCodeExternalProvider = core.serialization.enum_(["change_healthcare", "availity"]);
@@ -9,5 +9,6 @@ export declare namespace VitalTokenCreatedResponse {
9
9
  interface Raw {
10
10
  code: string;
11
11
  exchange_url: string;
12
+ expires_at: string;
12
13
  }
13
14
  }
@@ -31,4 +31,5 @@ const core = __importStar(require("../../core"));
31
31
  exports.VitalTokenCreatedResponse = core.serialization.object({
32
32
  code: core.serialization.string(),
33
33
  exchangeUrl: core.serialization.property("exchange_url", core.serialization.string()),
34
+ expiresAt: core.serialization.property("expires_at", core.serialization.string()),
34
35
  });
@@ -59,6 +59,8 @@ export * from "./ClientFacingCaloriesActiveTimeseries";
59
59
  export * from "./ClientFacingCaloriesBasalTimeseries";
60
60
  export * from "./ClientFacingCarbohydratesSample";
61
61
  export * from "./ClientFacingCholesterolTimeseries";
62
+ export * from "./ClientFacingConnectionErrorDetailsErrorType";
63
+ export * from "./ClientFacingConnectionErrorDetails";
62
64
  export * from "./ClientFacingDiagnosisInformation";
63
65
  export * from "./ClientFacingDistanceTimeseries";
64
66
  export * from "./ClientFacingElectrocardiogramClassification";
@@ -250,6 +252,7 @@ export * from "./PasswordProviders";
250
252
  export * from "./PatientAddressCompatible";
251
253
  export * from "./PatientDetails";
252
254
  export * from "./PatientDetailsWithValidation";
255
+ export * from "./PayorCodeExternalProvider";
253
256
  export * from "./PeriodUnit";
254
257
  export * from "./Period";
255
258
  export * from "./PersonDetailsOutput";
@@ -75,6 +75,8 @@ __exportStar(require("./ClientFacingCaloriesActiveTimeseries"), exports);
75
75
  __exportStar(require("./ClientFacingCaloriesBasalTimeseries"), exports);
76
76
  __exportStar(require("./ClientFacingCarbohydratesSample"), exports);
77
77
  __exportStar(require("./ClientFacingCholesterolTimeseries"), exports);
78
+ __exportStar(require("./ClientFacingConnectionErrorDetailsErrorType"), exports);
79
+ __exportStar(require("./ClientFacingConnectionErrorDetails"), exports);
78
80
  __exportStar(require("./ClientFacingDiagnosisInformation"), exports);
79
81
  __exportStar(require("./ClientFacingDistanceTimeseries"), exports);
80
82
  __exportStar(require("./ClientFacingElectrocardiogramClassification"), exports);
@@ -266,6 +268,7 @@ __exportStar(require("./PasswordProviders"), exports);
266
268
  __exportStar(require("./PatientAddressCompatible"), exports);
267
269
  __exportStar(require("./PatientDetails"), exports);
268
270
  __exportStar(require("./PatientDetailsWithValidation"), exports);
271
+ __exportStar(require("./PayorCodeExternalProvider"), exports);
269
272
  __exportStar(require("./PeriodUnit"), exports);
270
273
  __exportStar(require("./Period"), exports);
271
274
  __exportStar(require("./PersonDetailsOutput"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.1.148";
1
+ export declare const SDK_VERSION = "3.1.150";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "3.1.148";
4
+ exports.SDK_VERSION = "3.1.150";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-node",
3
- "version": "3.1.148",
3
+ "version": "3.1.150",
4
4
  "private": false,
5
5
  "repository": "https://github.com/tryVital/vital-node",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -9359,9 +9359,7 @@ await client.testkit.createOrder({
9359
9359
  <dd>
9360
9360
 
9361
9361
  ```typescript
9362
- await client.insurance.searchPayorInfo({
9363
- insuranceName: "insurance_name",
9364
- });
9362
+ await client.insurance.searchPayorInfo();
9365
9363
  ```
9366
9364
 
9367
9365
  </dd>
@@ -4,9 +4,12 @@
4
4
  import * as serializers from "../../../../index";
5
5
  import * as Vital from "../../../../../api/index";
6
6
  import * as core from "../../../../../core";
7
+ import { PayorCodeExternalProvider } from "../../../../types/PayorCodeExternalProvider";
7
8
  export declare const PayorSearchRequest: core.serialization.Schema<serializers.PayorSearchRequest.Raw, Vital.PayorSearchRequest>;
8
9
  export declare namespace PayorSearchRequest {
9
10
  interface Raw {
10
- insurance_name: string;
11
+ insurance_name?: string | null;
12
+ provider?: PayorCodeExternalProvider.Raw | null;
13
+ provider_id?: string | null;
11
14
  }
12
15
  }
@@ -28,6 +28,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.PayorSearchRequest = void 0;
30
30
  const core = __importStar(require("../../../../../core"));
31
+ const PayorCodeExternalProvider_1 = require("../../../../types/PayorCodeExternalProvider");
31
32
  exports.PayorSearchRequest = core.serialization.object({
32
- insuranceName: core.serialization.property("insurance_name", core.serialization.string()),
33
+ insuranceName: core.serialization.property("insurance_name", core.serialization.string().optional()),
34
+ provider: PayorCodeExternalProvider_1.PayorCodeExternalProvider.optional(),
35
+ providerId: core.serialization.property("provider_id", core.serialization.string().optional()),
33
36
  });
@@ -0,0 +1,15 @@
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 { ClientFacingConnectionErrorDetailsErrorType } from "./ClientFacingConnectionErrorDetailsErrorType";
8
+ export declare const ClientFacingConnectionErrorDetails: core.serialization.ObjectSchema<serializers.ClientFacingConnectionErrorDetails.Raw, Vital.ClientFacingConnectionErrorDetails>;
9
+ export declare namespace ClientFacingConnectionErrorDetails {
10
+ interface Raw {
11
+ error_type: ClientFacingConnectionErrorDetailsErrorType.Raw;
12
+ error_message: string;
13
+ errored_at: string;
14
+ }
15
+ }
@@ -0,0 +1,36 @@
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.ClientFacingConnectionErrorDetails = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ const ClientFacingConnectionErrorDetailsErrorType_1 = require("./ClientFacingConnectionErrorDetailsErrorType");
32
+ exports.ClientFacingConnectionErrorDetails = core.serialization.object({
33
+ errorType: core.serialization.property("error_type", ClientFacingConnectionErrorDetailsErrorType_1.ClientFacingConnectionErrorDetailsErrorType),
34
+ errorMessage: core.serialization.property("error_message", core.serialization.string()),
35
+ erroredAt: core.serialization.property("errored_at", core.serialization.string()),
36
+ });
@@ -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 ClientFacingConnectionErrorDetailsErrorType: core.serialization.Schema<serializers.ClientFacingConnectionErrorDetailsErrorType.Raw, Vital.ClientFacingConnectionErrorDetailsErrorType>;
8
+ export declare namespace ClientFacingConnectionErrorDetailsErrorType {
9
+ type Raw = "token_refresh_failed" | "webhook_registration_failed" | "user_not_found" | "deregistered_per_provider" | "required_scopes_not_granted" | "provider_credential_error" | "unknown";
10
+ }
@@ -0,0 +1,39 @@
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.ClientFacingConnectionErrorDetailsErrorType = void 0;
30
+ const core = __importStar(require("../../core"));
31
+ exports.ClientFacingConnectionErrorDetailsErrorType = core.serialization.enum_([
32
+ "token_refresh_failed",
33
+ "webhook_registration_failed",
34
+ "user_not_found",
35
+ "deregistered_per_provider",
36
+ "required_scopes_not_granted",
37
+ "provider_credential_error",
38
+ "unknown",
39
+ ]);
@@ -4,6 +4,7 @@
4
4
  import * as serializers from "../index";
5
5
  import * as Vital from "../../api/index";
6
6
  import * as core from "../../core";
7
+ import { ClientFacingConnectionErrorDetails } from "./ClientFacingConnectionErrorDetails";
7
8
  import { ResourceAvailability } from "./ResourceAvailability";
8
9
  export declare const ClientFacingProviderWithStatus: core.serialization.ObjectSchema<serializers.ClientFacingProviderWithStatus.Raw, Vital.ClientFacingProviderWithStatus>;
9
10
  export declare namespace ClientFacingProviderWithStatus {
@@ -11,7 +12,9 @@ export declare namespace ClientFacingProviderWithStatus {
11
12
  name: string;
12
13
  slug: string;
13
14
  logo: string;
15
+ created_on: string;
14
16
  status: string;
17
+ error_details?: ClientFacingConnectionErrorDetails.Raw | null;
15
18
  resource_availability: Record<string, ResourceAvailability.Raw>;
16
19
  }
17
20
  }
@@ -28,11 +28,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ClientFacingProviderWithStatus = void 0;
30
30
  const core = __importStar(require("../../core"));
31
+ const ClientFacingConnectionErrorDetails_1 = require("./ClientFacingConnectionErrorDetails");
31
32
  const ResourceAvailability_1 = require("./ResourceAvailability");
32
33
  exports.ClientFacingProviderWithStatus = core.serialization.object({
33
34
  name: core.serialization.string(),
34
35
  slug: core.serialization.string(),
35
36
  logo: core.serialization.string(),
37
+ createdOn: core.serialization.property("created_on", core.serialization.string()),
36
38
  status: core.serialization.string(),
39
+ errorDetails: core.serialization.property("error_details", ClientFacingConnectionErrorDetails_1.ClientFacingConnectionErrorDetails.optional()),
37
40
  resourceAvailability: core.serialization.property("resource_availability", core.serialization.record(core.serialization.string(), ResourceAvailability_1.ResourceAvailability)),
38
41
  });