@tryvital/vital-node 3.1.151 → 3.1.170

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 (182) 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 +11 -1
  7. package/api/resources/insurance/client/Client.js +76 -3
  8. package/api/resources/insurance/client/requests/InsuranceSearchGetPayorInfoRequest.d.ts +13 -0
  9. package/api/{types/QueryConfigWeekStartsOn.js → resources/insurance/client/requests/InsuranceSearchGetPayorInfoRequest.js} +0 -5
  10. package/api/resources/insurance/client/requests/index.d.ts +1 -0
  11. package/api/resources/introspect/client/Client.js +2 -2
  12. package/api/resources/labTests/client/Client.js +34 -34
  13. package/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
  14. package/api/resources/link/client/Client.js +14 -14
  15. package/api/resources/link/client/requests/LinkTokenExchange.d.ts +1 -0
  16. package/api/resources/meal/client/Client.js +1 -1
  17. package/api/resources/menstrualCycle/client/Client.js +1 -1
  18. package/api/resources/profile/client/Client.js +2 -2
  19. package/api/resources/providers/client/Client.js +1 -1
  20. package/api/resources/sleep/client/Client.js +4 -4
  21. package/api/resources/sleepCycle/client/Client.js +1 -1
  22. package/api/resources/team/client/Client.js +7 -7
  23. package/api/resources/testkit/client/Client.d.ts +0 -1
  24. package/api/resources/testkit/client/Client.js +2 -3
  25. package/api/resources/testkit/client/requests/RegisterTestkitRequest.d.ts +2 -2
  26. package/api/resources/user/client/Client.js +16 -16
  27. package/api/resources/vitals/client/Client.js +58 -58
  28. package/api/resources/workouts/client/Client.js +3 -3
  29. package/api/types/BulkExportConnectionsBody.d.ts +8 -0
  30. package/{dist/api/types/QueryConfigWeekStartsOn.js → api/types/BulkExportConnectionsBody.js} +0 -5
  31. package/api/types/BulkExportConnectionsResponse.d.ts +8 -0
  32. package/api/types/BulkExportConnectionsResponse.js +5 -0
  33. package/api/types/BulkImportConnectionsBody.d.ts +8 -0
  34. package/api/types/BulkImportConnectionsBody.js +5 -0
  35. package/api/types/BulkPauseConnectionsBody.d.ts +8 -0
  36. package/api/types/BulkPauseConnectionsBody.js +5 -0
  37. package/api/types/BulkTriggerHistoricalPullBody.d.ts +8 -0
  38. package/api/types/BulkTriggerHistoricalPullBody.js +5 -0
  39. package/api/types/ClientFacingPayorSearchResponse.d.ts +1 -1
  40. package/api/types/ClientFacingPayorSearchResponseDeprecated.d.ts +14 -0
  41. package/api/types/ClientFacingPayorSearchResponseDeprecated.js +5 -0
  42. package/api/types/ClientFacingResource.d.ts +2 -2
  43. package/api/types/ClientFacingResource.js +1 -1
  44. package/api/types/ConnectionRecipe.d.ts +11 -0
  45. package/api/types/ConnectionRecipe.js +5 -0
  46. package/api/types/PatientAddressWithValidation.d.ts +13 -0
  47. package/api/types/PatientAddressWithValidation.js +5 -0
  48. package/api/types/QueryConfig.d.ts +0 -1
  49. package/api/types/index.d.ts +9 -2
  50. package/api/types/index.js +9 -2
  51. package/dist/api/resources/activity/client/Client.js +2 -2
  52. package/dist/api/resources/aggregate/client/Client.js +1 -1
  53. package/dist/api/resources/body/client/Client.js +2 -2
  54. package/dist/api/resources/devices/client/Client.js +1 -1
  55. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  56. package/dist/api/resources/insurance/client/Client.d.ts +11 -1
  57. package/dist/api/resources/insurance/client/Client.js +76 -3
  58. package/dist/api/resources/insurance/client/requests/InsuranceSearchGetPayorInfoRequest.d.ts +13 -0
  59. package/dist/api/resources/insurance/client/requests/InsuranceSearchGetPayorInfoRequest.js +5 -0
  60. package/dist/api/resources/insurance/client/requests/index.d.ts +1 -0
  61. package/dist/api/resources/introspect/client/Client.js +2 -2
  62. package/dist/api/resources/labTests/client/Client.js +34 -34
  63. package/dist/api/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +1 -1
  64. package/dist/api/resources/link/client/Client.js +14 -14
  65. package/dist/api/resources/link/client/requests/LinkTokenExchange.d.ts +1 -0
  66. package/dist/api/resources/meal/client/Client.js +1 -1
  67. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  68. package/dist/api/resources/profile/client/Client.js +2 -2
  69. package/dist/api/resources/providers/client/Client.js +1 -1
  70. package/dist/api/resources/sleep/client/Client.js +4 -4
  71. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  72. package/dist/api/resources/team/client/Client.js +7 -7
  73. package/dist/api/resources/testkit/client/Client.d.ts +0 -1
  74. package/dist/api/resources/testkit/client/Client.js +2 -3
  75. package/dist/api/resources/testkit/client/requests/RegisterTestkitRequest.d.ts +2 -2
  76. package/dist/api/resources/user/client/Client.js +16 -16
  77. package/dist/api/resources/vitals/client/Client.js +58 -58
  78. package/dist/api/resources/workouts/client/Client.js +3 -3
  79. package/dist/api/types/BulkExportConnectionsBody.d.ts +8 -0
  80. package/dist/api/types/BulkExportConnectionsBody.js +5 -0
  81. package/dist/api/types/BulkExportConnectionsResponse.d.ts +8 -0
  82. package/dist/api/types/BulkExportConnectionsResponse.js +5 -0
  83. package/dist/api/types/BulkImportConnectionsBody.d.ts +8 -0
  84. package/dist/api/types/BulkImportConnectionsBody.js +5 -0
  85. package/dist/api/types/BulkPauseConnectionsBody.d.ts +8 -0
  86. package/dist/api/types/BulkPauseConnectionsBody.js +5 -0
  87. package/dist/api/types/BulkTriggerHistoricalPullBody.d.ts +8 -0
  88. package/dist/api/types/BulkTriggerHistoricalPullBody.js +5 -0
  89. package/dist/api/types/ClientFacingPayorSearchResponse.d.ts +1 -1
  90. package/dist/api/types/ClientFacingPayorSearchResponseDeprecated.d.ts +14 -0
  91. package/dist/api/types/ClientFacingPayorSearchResponseDeprecated.js +5 -0
  92. package/dist/api/types/ClientFacingResource.d.ts +2 -2
  93. package/dist/api/types/ClientFacingResource.js +1 -1
  94. package/dist/api/types/ConnectionRecipe.d.ts +11 -0
  95. package/dist/api/types/ConnectionRecipe.js +5 -0
  96. package/dist/api/types/PatientAddressWithValidation.d.ts +13 -0
  97. package/dist/api/types/PatientAddressWithValidation.js +5 -0
  98. package/dist/api/types/QueryConfig.d.ts +0 -1
  99. package/dist/api/types/index.d.ts +9 -2
  100. package/dist/api/types/index.js +9 -2
  101. package/dist/serialization/resources/insurance/client/index.d.ts +1 -0
  102. package/dist/serialization/resources/insurance/client/index.js +2 -1
  103. package/dist/serialization/resources/insurance/client/searchGetPayorInfo.d.ts +11 -0
  104. package/dist/serialization/{types/QueryConfigWeekStartsOn.js → resources/insurance/client/searchGetPayorInfo.js} +4 -3
  105. package/dist/serialization/resources/insurance/client/searchPayorInfo.d.ts +3 -3
  106. package/dist/serialization/resources/insurance/client/searchPayorInfo.js +2 -2
  107. package/dist/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +2 -2
  108. package/dist/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.js +2 -2
  109. package/dist/serialization/resources/link/client/requests/LinkTokenExchange.d.ts +1 -0
  110. package/dist/serialization/resources/link/client/requests/LinkTokenExchange.js +1 -0
  111. package/dist/serialization/resources/testkit/client/requests/RegisterTestkitRequest.d.ts +1 -1
  112. package/dist/serialization/resources/testkit/client/requests/RegisterTestkitRequest.js +1 -1
  113. package/dist/serialization/types/BulkExportConnectionsBody.d.ts +14 -0
  114. package/dist/serialization/types/BulkExportConnectionsBody.js +35 -0
  115. package/dist/serialization/types/BulkExportConnectionsResponse.d.ts +14 -0
  116. package/dist/serialization/types/BulkExportConnectionsResponse.js +35 -0
  117. package/dist/serialization/types/BulkImportConnectionsBody.d.ts +15 -0
  118. package/dist/serialization/types/BulkImportConnectionsBody.js +36 -0
  119. package/dist/serialization/types/BulkPauseConnectionsBody.d.ts +14 -0
  120. package/dist/serialization/types/BulkPauseConnectionsBody.js +35 -0
  121. package/dist/serialization/types/BulkTriggerHistoricalPullBody.d.ts +14 -0
  122. package/dist/serialization/types/BulkTriggerHistoricalPullBody.js +35 -0
  123. package/dist/serialization/types/ClientFacingPayorSearchResponse.d.ts +1 -1
  124. package/dist/serialization/types/ClientFacingPayorSearchResponse.js +1 -1
  125. package/dist/serialization/types/ClientFacingPayorSearchResponseDeprecated.d.ts +16 -0
  126. package/dist/serialization/types/ClientFacingPayorSearchResponseDeprecated.js +37 -0
  127. package/dist/serialization/types/ClientFacingResource.d.ts +1 -1
  128. package/dist/serialization/types/ClientFacingResource.js +1 -1
  129. package/dist/serialization/types/ConnectionRecipe.d.ts +17 -0
  130. package/dist/serialization/types/ConnectionRecipe.js +38 -0
  131. package/dist/serialization/types/PatientAddressWithValidation.d.ts +19 -0
  132. package/dist/serialization/types/PatientAddressWithValidation.js +40 -0
  133. package/dist/serialization/types/QueryConfig.d.ts +0 -2
  134. package/dist/serialization/types/QueryConfig.js +0 -2
  135. package/dist/serialization/types/index.d.ts +9 -2
  136. package/dist/serialization/types/index.js +9 -2
  137. package/dist/version.d.ts +1 -1
  138. package/dist/version.js +1 -1
  139. package/package.json +1 -1
  140. package/reference.md +49 -2
  141. package/serialization/resources/insurance/client/index.d.ts +1 -0
  142. package/serialization/resources/insurance/client/index.js +2 -1
  143. package/serialization/resources/insurance/client/searchGetPayorInfo.d.ts +11 -0
  144. package/serialization/{types/QueryConfigWeekStartsOn.js → resources/insurance/client/searchGetPayorInfo.js} +4 -3
  145. package/serialization/resources/insurance/client/searchPayorInfo.d.ts +3 -3
  146. package/serialization/resources/insurance/client/searchPayorInfo.js +2 -2
  147. package/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.d.ts +2 -2
  148. package/serialization/resources/labTests/client/requests/CreateOrderRequestCompatible.js +2 -2
  149. package/serialization/resources/link/client/requests/LinkTokenExchange.d.ts +1 -0
  150. package/serialization/resources/link/client/requests/LinkTokenExchange.js +1 -0
  151. package/serialization/resources/testkit/client/requests/RegisterTestkitRequest.d.ts +1 -1
  152. package/serialization/resources/testkit/client/requests/RegisterTestkitRequest.js +1 -1
  153. package/serialization/types/BulkExportConnectionsBody.d.ts +14 -0
  154. package/serialization/types/BulkExportConnectionsBody.js +35 -0
  155. package/serialization/types/BulkExportConnectionsResponse.d.ts +14 -0
  156. package/serialization/types/BulkExportConnectionsResponse.js +35 -0
  157. package/serialization/types/BulkImportConnectionsBody.d.ts +15 -0
  158. package/serialization/types/BulkImportConnectionsBody.js +36 -0
  159. package/serialization/types/BulkPauseConnectionsBody.d.ts +14 -0
  160. package/serialization/types/BulkPauseConnectionsBody.js +35 -0
  161. package/serialization/types/BulkTriggerHistoricalPullBody.d.ts +14 -0
  162. package/serialization/types/BulkTriggerHistoricalPullBody.js +35 -0
  163. package/serialization/types/ClientFacingPayorSearchResponse.d.ts +1 -1
  164. package/serialization/types/ClientFacingPayorSearchResponse.js +1 -1
  165. package/serialization/types/ClientFacingPayorSearchResponseDeprecated.d.ts +16 -0
  166. package/serialization/types/ClientFacingPayorSearchResponseDeprecated.js +37 -0
  167. package/serialization/types/ClientFacingResource.d.ts +1 -1
  168. package/serialization/types/ClientFacingResource.js +1 -1
  169. package/serialization/types/ConnectionRecipe.d.ts +17 -0
  170. package/serialization/types/ConnectionRecipe.js +38 -0
  171. package/serialization/types/PatientAddressWithValidation.d.ts +19 -0
  172. package/serialization/types/PatientAddressWithValidation.js +40 -0
  173. package/serialization/types/QueryConfig.d.ts +0 -2
  174. package/serialization/types/QueryConfig.js +0 -2
  175. package/serialization/types/index.d.ts +9 -2
  176. package/serialization/types/index.js +9 -2
  177. package/version.d.ts +1 -1
  178. package/version.js +1 -1
  179. package/api/types/QueryConfigWeekStartsOn.d.ts +0 -8
  180. package/dist/api/types/QueryConfigWeekStartsOn.d.ts +0 -8
  181. package/dist/serialization/types/QueryConfigWeekStartsOn.d.ts +0 -10
  182. package/serialization/types/QueryConfigWeekStartsOn.d.ts +0 -10
@@ -78,7 +78,7 @@ class Activity {
78
78
  const _response = yield core.fetcher({
79
79
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${encodeURIComponent(userId)}`),
80
80
  method: "GET",
81
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.151", "User-Agent": "@tryvital/vital-node/3.1.151", "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.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
82
82
  contentType: "application/json",
83
83
  queryParameters: _queryParams,
84
84
  requestType: "json",
@@ -154,7 +154,7 @@ class Activity {
154
154
  const _response = yield core.fetcher({
155
155
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/activity/${encodeURIComponent(userId)}/raw`),
156
156
  method: "GET",
157
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.151", "User-Agent": "@tryvital/vital-node/3.1.151", "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.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
158
158
  contentType: "application/json",
159
159
  queryParameters: _queryParams,
160
160
  requestType: "json",
@@ -81,7 +81,7 @@ class Aggregate {
81
81
  const _response = yield core.fetcher({
82
82
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `aggregate/v1/user/${encodeURIComponent(userId)}/query`),
83
83
  method: "POST",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.151", "User-Agent": "@tryvital/vital-node/3.1.151", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, accept: "*/*" }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  requestType: "json",
87
87
  body: serializers.QueryBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -78,7 +78,7 @@ class Body {
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/body/${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.151", "User-Agent": "@tryvital/vital-node/3.1.151", "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.170", "User-Agent": "@tryvital/vital-node/3.1.170", "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 Body {
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/body/${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.151", "User-Agent": "@tryvital/vital-node/3.1.151", "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.170", "User-Agent": "@tryvital/vital-node/3.1.170", "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",
@@ -72,7 +72,7 @@ class Devices {
72
72
  const _response = yield core.fetcher({
73
73
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/devices/${encodeURIComponent(userId)}/raw`),
74
74
  method: "GET",
75
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.151", "User-Agent": "@tryvital/vital-node/3.1.151", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
76
76
  contentType: "application/json",
77
77
  queryParameters: _queryParams,
78
78
  requestType: "json",
@@ -78,7 +78,7 @@ class Electrocardiogram {
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/electrocardiogram/${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.151", "User-Agent": "@tryvital/vital-node/3.1.151", "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.170", "User-Agent": "@tryvital/vital-node/3.1.170", "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",
@@ -21,6 +21,16 @@ export declare namespace Insurance {
21
21
  export declare class Insurance {
22
22
  protected readonly _options: Insurance.Options;
23
23
  constructor(_options?: Insurance.Options);
24
+ /**
25
+ * @param {Vital.InsuranceSearchGetPayorInfoRequest} request
26
+ * @param {Insurance.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Vital.UnprocessableEntityError}
29
+ *
30
+ * @example
31
+ * await client.insurance.searchGetPayorInfo()
32
+ */
33
+ searchGetPayorInfo(request?: Vital.InsuranceSearchGetPayorInfoRequest, requestOptions?: Insurance.RequestOptions): Promise<Vital.ClientFacingPayorSearchResponse[]>;
24
34
  /**
25
35
  * @param {Vital.PayorSearchRequest} request
26
36
  * @param {Insurance.RequestOptions} requestOptions - Request-specific configuration.
@@ -30,7 +40,7 @@ export declare class Insurance {
30
40
  * @example
31
41
  * await client.insurance.searchPayorInfo()
32
42
  */
33
- searchPayorInfo(request?: Vital.PayorSearchRequest, requestOptions?: Insurance.RequestOptions): Promise<Vital.ClientFacingPayorSearchResponse[]>;
43
+ searchPayorInfo(request?: Vital.PayorSearchRequest, requestOptions?: Insurance.RequestOptions): Promise<Vital.ClientFacingPayorSearchResponseDeprecated[]>;
34
44
  /**
35
45
  * @param {Vital.InsuranceSearchDiagnosisRequest} request
36
46
  * @param {Insurance.RequestOptions} requestOptions - Request-specific configuration.
@@ -42,13 +42,86 @@ exports.Insurance = void 0;
42
42
  const environments = __importStar(require("../../../../environments"));
43
43
  const core = __importStar(require("../../../../core"));
44
44
  const Vital = __importStar(require("../../../index"));
45
- const serializers = __importStar(require("../../../../serialization/index"));
46
45
  const url_join_1 = __importDefault(require("url-join"));
46
+ const serializers = __importStar(require("../../../../serialization/index"));
47
47
  const errors = __importStar(require("../../../../errors/index"));
48
48
  class Insurance {
49
49
  constructor(_options = {}) {
50
50
  this._options = _options;
51
51
  }
52
+ /**
53
+ * @param {Vital.InsuranceSearchGetPayorInfoRequest} request
54
+ * @param {Insurance.RequestOptions} requestOptions - Request-specific configuration.
55
+ *
56
+ * @throws {@link Vital.UnprocessableEntityError}
57
+ *
58
+ * @example
59
+ * await client.insurance.searchGetPayorInfo()
60
+ */
61
+ searchGetPayorInfo(request = {}, requestOptions) {
62
+ var _a;
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ const { insuranceName, provider, providerPayorId } = request;
65
+ const _queryParams = {};
66
+ if (insuranceName != null) {
67
+ _queryParams["insurance_name"] = insuranceName;
68
+ }
69
+ if (provider != null) {
70
+ _queryParams["provider"] = provider;
71
+ }
72
+ if (providerPayorId != null) {
73
+ _queryParams["provider_payor_id"] = providerPayorId;
74
+ }
75
+ const _response = yield core.fetcher({
76
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/insurance/search/payor"),
77
+ method: "GET",
78
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
+ contentType: "application/json",
80
+ queryParameters: _queryParams,
81
+ requestType: "json",
82
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
83
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
84
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
+ });
86
+ if (_response.ok) {
87
+ return serializers.insurance.searchGetPayorInfo.Response.parseOrThrow(_response.body, {
88
+ unrecognizedObjectKeys: "passthrough",
89
+ allowUnrecognizedUnionMembers: true,
90
+ allowUnrecognizedEnumValues: true,
91
+ breadcrumbsPrefix: ["response"],
92
+ });
93
+ }
94
+ if (_response.error.reason === "status-code") {
95
+ switch (_response.error.statusCode) {
96
+ case 422:
97
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
98
+ unrecognizedObjectKeys: "passthrough",
99
+ allowUnrecognizedUnionMembers: true,
100
+ allowUnrecognizedEnumValues: true,
101
+ breadcrumbsPrefix: ["response"],
102
+ }));
103
+ default:
104
+ throw new errors.VitalError({
105
+ statusCode: _response.error.statusCode,
106
+ body: _response.error.body,
107
+ });
108
+ }
109
+ }
110
+ switch (_response.error.reason) {
111
+ case "non-json":
112
+ throw new errors.VitalError({
113
+ statusCode: _response.error.statusCode,
114
+ body: _response.error.rawBody,
115
+ });
116
+ case "timeout":
117
+ throw new errors.VitalTimeoutError();
118
+ case "unknown":
119
+ throw new errors.VitalError({
120
+ message: _response.error.errorMessage,
121
+ });
122
+ }
123
+ });
124
+ }
52
125
  /**
53
126
  * @param {Vital.PayorSearchRequest} request
54
127
  * @param {Insurance.RequestOptions} requestOptions - Request-specific configuration.
@@ -64,7 +137,7 @@ class Insurance {
64
137
  const _response = yield core.fetcher({
65
138
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/insurance/search/payor"),
66
139
  method: "POST",
67
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.151", "User-Agent": "@tryvital/vital-node/3.1.151", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
140
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
68
141
  contentType: "application/json",
69
142
  requestType: "json",
70
143
  body: serializers.PayorSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -131,7 +204,7 @@ class Insurance {
131
204
  const _response = yield core.fetcher({
132
205
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/insurance/search/diagnosis"),
133
206
  method: "GET",
134
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.151", "User-Agent": "@tryvital/vital-node/3.1.151", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
207
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
135
208
  contentType: "application/json",
136
209
  queryParameters: _queryParams,
137
210
  requestType: "json",
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vital from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface InsuranceSearchGetPayorInfoRequest {
10
+ insuranceName?: string;
11
+ provider?: Vital.PayorCodeExternalProvider;
12
+ providerPayorId?: string;
13
+ }
@@ -3,8 +3,3 @@
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.QueryConfigWeekStartsOn = void 0;
7
- exports.QueryConfigWeekStartsOn = {
8
- Sunday: "sunday",
9
- Monday: "monday",
10
- };
@@ -1,2 +1,3 @@
1
+ export { type InsuranceSearchGetPayorInfoRequest } from "./InsuranceSearchGetPayorInfoRequest";
1
2
  export { type PayorSearchRequest } from "./PayorSearchRequest";
2
3
  export { type InsuranceSearchDiagnosisRequest } from "./InsuranceSearchDiagnosisRequest";
@@ -81,7 +81,7 @@ class Introspect {
81
81
  const _response = yield core.fetcher({
82
82
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/introspect/resources"),
83
83
  method: "GET",
84
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.151", "User-Agent": "@tryvital/vital-node/3.1.151", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
84
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
85
85
  contentType: "application/json",
86
86
  queryParameters: _queryParams,
87
87
  requestType: "json",
@@ -160,7 +160,7 @@ class Introspect {
160
160
  const _response = yield core.fetcher({
161
161
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/introspect/historical_pull"),
162
162
  method: "GET",
163
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.151", "User-Agent": "@tryvital/vital-node/3.1.151", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
163
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.170", "User-Agent": "@tryvital/vital-node/3.1.170", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
164
164
  contentType: "application/json",
165
165
  queryParameters: _queryParams,
166
166
  requestType: "json",