@tryvital/vital-node 3.1.301 → 3.1.303

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 (156) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +7 -2
  3. package/api/resources/activity/client/Client.js +2 -2
  4. package/api/resources/aggregate/client/Client.js +3 -3
  5. package/api/resources/body/client/Client.js +2 -2
  6. package/api/resources/devices/client/Client.js +1 -1
  7. package/api/resources/electrocardiogram/client/Client.js +1 -1
  8. package/api/resources/index.d.ts +2 -0
  9. package/api/resources/index.js +3 -1
  10. package/api/resources/insurance/client/Client.js +3 -3
  11. package/api/resources/introspect/client/Client.js +2 -2
  12. package/api/resources/labTests/client/Client.d.ts +1 -1
  13. package/api/resources/labTests/client/Client.js +42 -42
  14. package/api/resources/link/client/Client.js +19 -19
  15. package/api/resources/link/client/requests/IndividualProviderData.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/order/client/Client.js +1 -1
  19. package/api/resources/payor/client/Client.d.ts +46 -0
  20. package/api/resources/payor/client/Client.js +130 -0
  21. package/api/resources/payor/client/index.d.ts +1 -0
  22. package/api/resources/payor/client/index.js +17 -0
  23. package/api/resources/payor/client/requests/CreatePayorBody.d.ts +23 -0
  24. package/api/resources/payor/client/requests/CreatePayorBody.js +5 -0
  25. package/api/resources/payor/client/requests/index.d.ts +1 -0
  26. package/api/resources/payor/client/requests/index.js +2 -0
  27. package/api/resources/payor/index.d.ts +1 -0
  28. package/api/resources/payor/index.js +17 -0
  29. package/api/resources/profile/client/Client.js +2 -2
  30. package/api/resources/providers/client/Client.js +1 -1
  31. package/api/resources/sleep/client/Client.js +4 -4
  32. package/api/resources/sleepCycle/client/Client.js +1 -1
  33. package/api/resources/team/client/Client.js +7 -7
  34. package/api/resources/testkit/client/Client.js +2 -2
  35. package/api/resources/user/client/Client.js +16 -16
  36. package/api/resources/vitals/client/Client.js +78 -78
  37. package/api/resources/workouts/client/Client.js +3 -3
  38. package/api/types/ClientFacingConnectionErrorDetailsErrorType.d.ts +2 -1
  39. package/api/types/ClientFacingConnectionErrorDetailsErrorType.js +1 -0
  40. package/api/types/ClientFacingPayor.d.ts +14 -0
  41. package/api/types/ClientFacingPayor.js +5 -0
  42. package/api/types/ClientFacingSleepCycle.d.ts +1 -0
  43. package/api/types/ProviderConnectionErrorErrorType.d.ts +2 -1
  44. package/api/types/ProviderConnectionErrorErrorType.js +1 -0
  45. package/api/types/ProviderLinkResponse.d.ts +5 -1
  46. package/api/types/ProviderLinkResponseErrorType.d.ts +18 -0
  47. package/api/types/ProviderLinkResponseErrorType.js +20 -0
  48. package/api/types/ProviderMfaRequest.d.ts +2 -1
  49. package/api/types/ProviderMfaRequestMethod.d.ts +1 -1
  50. package/api/types/index.d.ts +2 -0
  51. package/api/types/index.js +2 -0
  52. package/dist/Client.d.ts +3 -0
  53. package/dist/Client.js +7 -2
  54. package/dist/api/resources/activity/client/Client.js +2 -2
  55. package/dist/api/resources/aggregate/client/Client.js +3 -3
  56. package/dist/api/resources/body/client/Client.js +2 -2
  57. package/dist/api/resources/devices/client/Client.js +1 -1
  58. package/dist/api/resources/electrocardiogram/client/Client.js +1 -1
  59. package/dist/api/resources/index.d.ts +2 -0
  60. package/dist/api/resources/index.js +3 -1
  61. package/dist/api/resources/insurance/client/Client.js +3 -3
  62. package/dist/api/resources/introspect/client/Client.js +2 -2
  63. package/dist/api/resources/labTests/client/Client.d.ts +1 -1
  64. package/dist/api/resources/labTests/client/Client.js +42 -42
  65. package/dist/api/resources/link/client/Client.js +19 -19
  66. package/dist/api/resources/link/client/requests/IndividualProviderData.d.ts +1 -0
  67. package/dist/api/resources/meal/client/Client.js +1 -1
  68. package/dist/api/resources/menstrualCycle/client/Client.js +1 -1
  69. package/dist/api/resources/order/client/Client.js +1 -1
  70. package/dist/api/resources/payor/client/Client.d.ts +46 -0
  71. package/dist/api/resources/payor/client/Client.js +130 -0
  72. package/dist/api/resources/payor/client/index.d.ts +1 -0
  73. package/dist/api/resources/payor/client/index.js +17 -0
  74. package/dist/api/resources/payor/client/requests/CreatePayorBody.d.ts +23 -0
  75. package/dist/api/resources/payor/client/requests/CreatePayorBody.js +5 -0
  76. package/dist/api/resources/payor/client/requests/index.d.ts +1 -0
  77. package/dist/api/resources/payor/client/requests/index.js +2 -0
  78. package/dist/api/resources/payor/index.d.ts +1 -0
  79. package/dist/api/resources/payor/index.js +17 -0
  80. package/dist/api/resources/profile/client/Client.js +2 -2
  81. package/dist/api/resources/providers/client/Client.js +1 -1
  82. package/dist/api/resources/sleep/client/Client.js +4 -4
  83. package/dist/api/resources/sleepCycle/client/Client.js +1 -1
  84. package/dist/api/resources/team/client/Client.js +7 -7
  85. package/dist/api/resources/testkit/client/Client.js +2 -2
  86. package/dist/api/resources/user/client/Client.js +16 -16
  87. package/dist/api/resources/vitals/client/Client.js +78 -78
  88. package/dist/api/resources/workouts/client/Client.js +3 -3
  89. package/dist/api/types/ClientFacingConnectionErrorDetailsErrorType.d.ts +2 -1
  90. package/dist/api/types/ClientFacingConnectionErrorDetailsErrorType.js +1 -0
  91. package/dist/api/types/ClientFacingPayor.d.ts +14 -0
  92. package/dist/api/types/ClientFacingPayor.js +5 -0
  93. package/dist/api/types/ClientFacingSleepCycle.d.ts +1 -0
  94. package/dist/api/types/ProviderConnectionErrorErrorType.d.ts +2 -1
  95. package/dist/api/types/ProviderConnectionErrorErrorType.js +1 -0
  96. package/dist/api/types/ProviderLinkResponse.d.ts +5 -1
  97. package/dist/api/types/ProviderLinkResponseErrorType.d.ts +18 -0
  98. package/dist/api/types/ProviderLinkResponseErrorType.js +20 -0
  99. package/dist/api/types/ProviderMfaRequest.d.ts +2 -1
  100. package/dist/api/types/ProviderMfaRequestMethod.d.ts +1 -1
  101. package/dist/api/types/index.d.ts +2 -0
  102. package/dist/api/types/index.js +2 -0
  103. package/dist/serialization/resources/index.d.ts +2 -0
  104. package/dist/serialization/resources/index.js +3 -1
  105. package/dist/serialization/resources/payor/client/index.d.ts +1 -0
  106. package/dist/serialization/resources/payor/client/index.js +17 -0
  107. package/dist/serialization/resources/payor/client/requests/CreatePayorBody.d.ts +17 -0
  108. package/dist/serialization/resources/payor/client/requests/CreatePayorBody.js +38 -0
  109. package/dist/serialization/resources/payor/client/requests/index.d.ts +1 -0
  110. package/dist/serialization/resources/payor/client/requests/index.js +5 -0
  111. package/dist/serialization/resources/payor/index.d.ts +1 -0
  112. package/dist/serialization/resources/payor/index.js +17 -0
  113. package/dist/serialization/types/ClientFacingConnectionErrorDetailsErrorType.d.ts +1 -1
  114. package/dist/serialization/types/ClientFacingConnectionErrorDetailsErrorType.js +1 -0
  115. package/dist/serialization/types/ClientFacingPayor.d.ts +16 -0
  116. package/dist/serialization/types/ClientFacingPayor.js +37 -0
  117. package/dist/serialization/types/ClientFacingSleepCycle.d.ts +1 -0
  118. package/dist/serialization/types/ClientFacingSleepCycle.js +1 -0
  119. package/dist/serialization/types/ProviderConnectionErrorErrorType.d.ts +1 -1
  120. package/dist/serialization/types/ProviderConnectionErrorErrorType.js +1 -0
  121. package/dist/serialization/types/ProviderLinkResponse.d.ts +2 -1
  122. package/dist/serialization/types/ProviderLinkResponse.js +2 -1
  123. package/dist/serialization/types/ProviderLinkResponseErrorType.d.ts +10 -0
  124. package/dist/serialization/types/ProviderLinkResponseErrorType.js +44 -0
  125. package/dist/serialization/types/index.d.ts +2 -0
  126. package/dist/serialization/types/index.js +2 -0
  127. package/dist/version.d.ts +1 -1
  128. package/dist/version.js +1 -1
  129. package/package.json +1 -1
  130. package/reference.md +59 -0
  131. package/serialization/resources/index.d.ts +2 -0
  132. package/serialization/resources/index.js +3 -1
  133. package/serialization/resources/payor/client/index.d.ts +1 -0
  134. package/serialization/resources/payor/client/index.js +17 -0
  135. package/serialization/resources/payor/client/requests/CreatePayorBody.d.ts +17 -0
  136. package/serialization/resources/payor/client/requests/CreatePayorBody.js +38 -0
  137. package/serialization/resources/payor/client/requests/index.d.ts +1 -0
  138. package/serialization/resources/payor/client/requests/index.js +5 -0
  139. package/serialization/resources/payor/index.d.ts +1 -0
  140. package/serialization/resources/payor/index.js +17 -0
  141. package/serialization/types/ClientFacingConnectionErrorDetailsErrorType.d.ts +1 -1
  142. package/serialization/types/ClientFacingConnectionErrorDetailsErrorType.js +1 -0
  143. package/serialization/types/ClientFacingPayor.d.ts +16 -0
  144. package/serialization/types/ClientFacingPayor.js +37 -0
  145. package/serialization/types/ClientFacingSleepCycle.d.ts +1 -0
  146. package/serialization/types/ClientFacingSleepCycle.js +1 -0
  147. package/serialization/types/ProviderConnectionErrorErrorType.d.ts +1 -1
  148. package/serialization/types/ProviderConnectionErrorErrorType.js +1 -0
  149. package/serialization/types/ProviderLinkResponse.d.ts +2 -1
  150. package/serialization/types/ProviderLinkResponse.js +2 -1
  151. package/serialization/types/ProviderLinkResponseErrorType.d.ts +10 -0
  152. package/serialization/types/ProviderLinkResponseErrorType.js +44 -0
  153. package/serialization/types/index.d.ts +2 -0
  154. package/serialization/types/index.js +2 -0
  155. package/version.d.ts +1 -1
  156. package/version.js +1 -1
@@ -86,7 +86,7 @@ class Link {
86
86
  const _response = yield core.fetcher({
87
87
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_op"),
88
88
  method: "GET",
89
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
89
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
90
90
  contentType: "application/json",
91
91
  queryParameters: _queryParams,
92
92
  requestType: "json",
@@ -162,7 +162,7 @@ class Link {
162
162
  const _response = yield core.fetcher({
163
163
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_import"),
164
164
  method: "POST",
165
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
165
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
166
166
  contentType: "application/json",
167
167
  queryParameters: _queryParams,
168
168
  requestType: "json",
@@ -233,7 +233,7 @@ class Link {
233
233
  const _response = yield core.fetcher({
234
234
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_trigger_historical_pull"),
235
235
  method: "POST",
236
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
236
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
237
237
  contentType: "application/json",
238
238
  queryParameters: _queryParams,
239
239
  requestType: "json",
@@ -298,7 +298,7 @@ class Link {
298
298
  const _response = yield core.fetcher({
299
299
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_export"),
300
300
  method: "POST",
301
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
301
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
302
302
  contentType: "application/json",
303
303
  queryParameters: _queryParams,
304
304
  requestType: "json",
@@ -369,7 +369,7 @@ class Link {
369
369
  const _response = yield core.fetcher({
370
370
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/bulk_pause"),
371
371
  method: "POST",
372
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
372
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
373
373
  contentType: "application/json",
374
374
  queryParameters: _queryParams,
375
375
  requestType: "json",
@@ -436,7 +436,7 @@ class Link {
436
436
  const _response = yield core.fetcher({
437
437
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/token"),
438
438
  method: "POST",
439
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
439
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
440
440
  contentType: "application/json",
441
441
  requestType: "json",
442
442
  body: serializers.LinkTokenExchange.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -500,7 +500,7 @@ class Link {
500
500
  const _response = yield core.fetcher({
501
501
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/token/isValid"),
502
502
  method: "POST",
503
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
503
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
504
504
  contentType: "application/json",
505
505
  requestType: "json",
506
506
  body: serializers.LinkTokenValidationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -572,7 +572,7 @@ class Link {
572
572
  const _response = yield core.fetcher({
573
573
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/code/create"),
574
574
  method: "POST",
575
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
575
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
576
576
  contentType: "application/json",
577
577
  queryParameters: _queryParams,
578
578
  requestType: "json",
@@ -640,7 +640,7 @@ class Link {
640
640
  const _response = yield core.fetcher({
641
641
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/start"),
642
642
  method: "POST",
643
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
643
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
644
644
  contentType: "application/json",
645
645
  requestType: "json",
646
646
  body: serializers.BeginLinkTokenRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -706,7 +706,7 @@ class Link {
706
706
  const _response = yield core.fetcher({
707
707
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/state"),
708
708
  method: "GET",
709
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
709
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
710
710
  contentType: "application/json",
711
711
  requestType: "json",
712
712
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -774,7 +774,7 @@ class Link {
774
774
  const _response = yield core.fetcher({
775
775
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/auth/email"),
776
776
  method: "POST",
777
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
777
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
778
778
  contentType: "application/json",
779
779
  requestType: "json",
780
780
  body: serializers.EmailAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -839,7 +839,7 @@ class Link {
839
839
  const _response = yield core.fetcher({
840
840
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/auth"),
841
841
  method: "POST",
842
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
842
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
843
843
  contentType: "application/json",
844
844
  requestType: "json",
845
845
  body: serializers.PasswordAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -900,7 +900,7 @@ class Link {
900
900
  const _response = yield core.fetcher({
901
901
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/oauth/${encodeURIComponent(serializers.OAuthProviders.jsonOrThrow(oauthProvider))}`),
902
902
  method: "GET",
903
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
903
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
904
904
  contentType: "application/json",
905
905
  requestType: "json",
906
906
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -968,7 +968,7 @@ class Link {
968
968
  const _response = yield core.fetcher({
969
969
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/password/${encodeURIComponent(serializers.PasswordProviders.jsonOrThrow(provider))}`),
970
970
  method: "POST",
971
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
971
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
972
972
  contentType: "application/json",
973
973
  requestType: "json",
974
974
  body: serializers.IndividualProviderData.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1036,7 +1036,7 @@ class Link {
1036
1036
  const _response = yield core.fetcher({
1037
1037
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/password/${encodeURIComponent(serializers.PasswordProviders.jsonOrThrow(provider))}/complete_mfa`),
1038
1038
  method: "POST",
1039
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1039
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1040
1040
  contentType: "application/json",
1041
1041
  requestType: "json",
1042
1042
  body: serializers.CompletePasswordProviderMfaBody.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1104,7 +1104,7 @@ class Link {
1104
1104
  const _response = yield core.fetcher({
1105
1105
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/email/${encodeURIComponent(serializers.EmailProviders.jsonOrThrow(provider))}`),
1106
1106
  method: "POST",
1107
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1107
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1108
1108
  contentType: "application/json",
1109
1109
  requestType: "json",
1110
1110
  body: serializers.EmailProviderAuthLink.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -1164,7 +1164,7 @@ class Link {
1164
1164
  const _response = yield core.fetcher({
1165
1165
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/providers"),
1166
1166
  method: "GET",
1167
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1167
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-vital-link-token": vitalLinkToken != null ? vitalLinkToken : undefined }, (yield this._getCustomAuthorizationHeaders())),
1168
1168
  contentType: "application/json",
1169
1169
  requestType: "json",
1170
1170
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1228,7 +1228,7 @@ class Link {
1228
1228
  const _response = yield core.fetcher({
1229
1229
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/link/provider/manual/${encodeURIComponent(serializers.ManualProviders.jsonOrThrow(provider))}`),
1230
1230
  method: "POST",
1231
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1231
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1232
1232
  contentType: "application/json",
1233
1233
  requestType: "json",
1234
1234
  body: serializers.ManualConnectionData.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -1295,7 +1295,7 @@ class Link {
1295
1295
  const _response = yield core.fetcher({
1296
1296
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/link/connect/demo"),
1297
1297
  method: "POST",
1298
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1298
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
1299
1299
  contentType: "application/json",
1300
1300
  requestType: "json",
1301
1301
  body: serializers.DemoConnectionCreationPayload.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -15,5 +15,6 @@ export interface IndividualProviderData {
15
15
  username: string;
16
16
  /** Password for provider */
17
17
  password: string;
18
+ /** Provider region to authenticate against. Only applicable to specific providers. */
18
19
  region?: Vital.Region;
19
20
  }
@@ -78,7 +78,7 @@ class Meal {
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/meal/${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.301", "User-Agent": "@tryvital/vital-node/3.1.301", "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.303", "User-Agent": "@tryvital/vital-node/3.1.303", "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",
@@ -76,7 +76,7 @@ class MenstrualCycle {
76
76
  const _response = yield core.fetcher({
77
77
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/menstrual_cycle/${encodeURIComponent(userId)}`),
78
78
  method: "GET",
79
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
80
80
  contentType: "application/json",
81
81
  queryParameters: _queryParams,
82
82
  requestType: "json",
@@ -66,7 +66,7 @@ class Order {
66
66
  const _response = yield core.fetcher({
67
67
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/order/resend_events"),
68
68
  method: "POST",
69
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
69
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  body: serializers.ResendWebhookBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -0,0 +1,46 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Vital from "../../../index";
7
+ export declare namespace Payor {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.VitalEnvironment | string>;
10
+ apiKey?: core.Supplier<string | undefined>;
11
+ }
12
+ interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
14
+ timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
16
+ maxRetries?: number;
17
+ /** A hook to abort the request. */
18
+ abortSignal?: AbortSignal;
19
+ }
20
+ }
21
+ export declare class Payor {
22
+ protected readonly _options: Payor.Options;
23
+ constructor(_options?: Payor.Options);
24
+ /**
25
+ * @param {Vital.CreatePayorBody} request
26
+ * @param {Payor.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Vital.UnprocessableEntityError}
29
+ *
30
+ * @example
31
+ * await client.payor.createPayor({
32
+ * name: "name",
33
+ * address: {
34
+ * firstLine: "first_line",
35
+ * country: "country",
36
+ * zip: "zip",
37
+ * city: "city",
38
+ * state: "state"
39
+ * }
40
+ * })
41
+ */
42
+ createPayor(request: Vital.CreatePayorBody, requestOptions?: Payor.RequestOptions): Promise<Vital.ClientFacingPayor>;
43
+ protected _getCustomAuthorizationHeaders(): Promise<{
44
+ "x-vital-api-key": string | undefined;
45
+ }>;
46
+ }
@@ -0,0 +1,130 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Payor = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const Vital = __importStar(require("../../../index"));
45
+ const serializers = __importStar(require("../../../../serialization/index"));
46
+ const url_join_1 = __importDefault(require("url-join"));
47
+ const errors = __importStar(require("../../../../errors/index"));
48
+ class Payor {
49
+ constructor(_options = {}) {
50
+ this._options = _options;
51
+ }
52
+ /**
53
+ * @param {Vital.CreatePayorBody} request
54
+ * @param {Payor.RequestOptions} requestOptions - Request-specific configuration.
55
+ *
56
+ * @throws {@link Vital.UnprocessableEntityError}
57
+ *
58
+ * @example
59
+ * await client.payor.createPayor({
60
+ * name: "name",
61
+ * address: {
62
+ * firstLine: "first_line",
63
+ * country: "country",
64
+ * zip: "zip",
65
+ * city: "city",
66
+ * state: "state"
67
+ * }
68
+ * })
69
+ */
70
+ createPayor(request, requestOptions) {
71
+ var _a;
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ const _response = yield core.fetcher({
74
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v3/payor"),
75
+ method: "POST",
76
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
77
+ contentType: "application/json",
78
+ requestType: "json",
79
+ body: serializers.CreatePayorBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
80
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
81
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
82
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
83
+ });
84
+ if (_response.ok) {
85
+ return serializers.ClientFacingPayor.parseOrThrow(_response.body, {
86
+ unrecognizedObjectKeys: "passthrough",
87
+ allowUnrecognizedUnionMembers: true,
88
+ allowUnrecognizedEnumValues: true,
89
+ breadcrumbsPrefix: ["response"],
90
+ });
91
+ }
92
+ if (_response.error.reason === "status-code") {
93
+ switch (_response.error.statusCode) {
94
+ case 422:
95
+ throw new Vital.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
96
+ unrecognizedObjectKeys: "passthrough",
97
+ allowUnrecognizedUnionMembers: true,
98
+ allowUnrecognizedEnumValues: true,
99
+ breadcrumbsPrefix: ["response"],
100
+ }));
101
+ default:
102
+ throw new errors.VitalError({
103
+ statusCode: _response.error.statusCode,
104
+ body: _response.error.body,
105
+ });
106
+ }
107
+ }
108
+ switch (_response.error.reason) {
109
+ case "non-json":
110
+ throw new errors.VitalError({
111
+ statusCode: _response.error.statusCode,
112
+ body: _response.error.rawBody,
113
+ });
114
+ case "timeout":
115
+ throw new errors.VitalTimeoutError();
116
+ case "unknown":
117
+ throw new errors.VitalError({
118
+ message: _response.error.errorMessage,
119
+ });
120
+ }
121
+ });
122
+ }
123
+ _getCustomAuthorizationHeaders() {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
126
+ return { "x-vital-api-key": apiKeyValue };
127
+ });
128
+ }
129
+ }
130
+ exports.Payor = Payor;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,23 @@
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
+ * name: "name",
9
+ * address: {
10
+ * firstLine: "first_line",
11
+ * country: "country",
12
+ * zip: "zip",
13
+ * city: "city",
14
+ * state: "state"
15
+ * }
16
+ * }
17
+ */
18
+ export interface CreatePayorBody {
19
+ name: string;
20
+ address: Vital.Address;
21
+ provider?: Vital.PayorCodeExternalProvider;
22
+ providerPayorId?: string;
23
+ }
@@ -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 @@
1
+ export { type CreatePayorBody } from "./CreatePayorBody";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -72,7 +72,7 @@ class Profile {
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/profile/${encodeURIComponent(userId)}`),
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.301", "User-Agent": "@tryvital/vital-node/3.1.301", "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.303", "User-Agent": "@tryvital/vital-node/3.1.303", "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",
@@ -142,7 +142,7 @@ class Profile {
142
142
  const _response = yield core.fetcher({
143
143
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/profile/${encodeURIComponent(userId)}/raw`),
144
144
  method: "GET",
145
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
145
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
146
146
  contentType: "application/json",
147
147
  queryParameters: _queryParams,
148
148
  requestType: "json",
@@ -71,7 +71,7 @@ class Providers {
71
71
  const _response = yield core.fetcher({
72
72
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, "v2/providers"),
73
73
  method: "GET",
74
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
74
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
75
75
  contentType: "application/json",
76
76
  queryParameters: _queryParams,
77
77
  requestType: "json",
@@ -78,7 +78,7 @@ class Sleep {
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/sleep/${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.301", "User-Agent": "@tryvital/vital-node/3.1.301", "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.303", "User-Agent": "@tryvital/vital-node/3.1.303", "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 Sleep {
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/sleep/${encodeURIComponent(userId)}/stream`),
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.301", "User-Agent": "@tryvital/vital-node/3.1.301", "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.303", "User-Agent": "@tryvital/vital-node/3.1.303", "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",
@@ -230,7 +230,7 @@ class Sleep {
230
230
  const _response = yield core.fetcher({
231
231
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/summary/sleep/${encodeURIComponent(userId)}/raw`),
232
232
  method: "GET",
233
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
233
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
234
234
  contentType: "application/json",
235
235
  queryParameters: _queryParams,
236
236
  requestType: "json",
@@ -294,7 +294,7 @@ class Sleep {
294
294
  const _response = yield core.fetcher({
295
295
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VitalEnvironment.Production, `v2/timeseries/sleep/${encodeURIComponent(sleepId)}/stream`),
296
296
  method: "GET",
297
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.301", "User-Agent": "@tryvital/vital-node/3.1.301", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
297
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@tryvital/vital-node", "X-Fern-SDK-Version": "3.1.303", "User-Agent": "@tryvital/vital-node/3.1.303", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
298
298
  contentType: "application/json",
299
299
  requestType: "json",
300
300
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -78,7 +78,7 @@ class SleepCycle {
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/sleep_cycle/${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.301", "User-Agent": "@tryvital/vital-node/3.1.301", "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.303", "User-Agent": "@tryvital/vital-node/3.1.303", "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",