@icanbwell/bwell-sdk-ts 1.54.0 → 1.55.0

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 (597) hide show
  1. package/README.md +19 -3
  2. package/dist/__version__.d.ts +1 -1
  3. package/dist/__version__.js +1 -1
  4. package/dist/api/api-provider-factory.d.ts +1 -1
  5. package/dist/api/api-provider-factory.js +2 -1
  6. package/dist/api/base/activity/activity-manager.d.ts +18 -25
  7. package/dist/api/base/activity/get-tasks-request.d.ts +29 -49
  8. package/dist/api/base/activity/get-tasks-request.js +42 -15
  9. package/dist/api/base/activity/index.d.ts +2 -4
  10. package/dist/api/base/activity/index.js +0 -1
  11. package/dist/api/base/api-provider.d.ts +12 -14
  12. package/dist/api/base/connection/connection-manager.d.ts +68 -51
  13. package/dist/api/base/connection/connection-manager.js +3 -0
  14. package/dist/api/base/connection/connection-request.d.ts +15 -1
  15. package/dist/api/base/connection/connection-request.js +8 -0
  16. package/dist/api/base/connection/index.d.ts +1 -1
  17. package/dist/api/base/device/constants.d.ts +3 -0
  18. package/dist/api/base/device/constants.js +3 -0
  19. package/dist/api/base/device/device-manager.d.ts +34 -12
  20. package/dist/api/base/device/device-manager.js +1 -5
  21. package/dist/api/base/device/device-request.d.ts +35 -42
  22. package/dist/api/base/device/device-request.js +30 -42
  23. package/dist/api/base/device/index.d.ts +2 -2
  24. package/dist/api/base/device/index.js +2 -2
  25. package/dist/api/base/financial/coverage-request.d.ts +5 -6
  26. package/dist/api/base/financial/coverage-request.js +7 -7
  27. package/dist/api/base/financial/{explanation-of-benefit.d.ts → explanation-of-benefit-request.d.ts} +15 -9
  28. package/dist/api/base/financial/{explanation-of-benefit.js → explanation-of-benefit-request.js} +8 -18
  29. package/dist/api/base/financial/financial-manager.d.ts +46 -14
  30. package/dist/api/base/financial/index.d.ts +3 -2
  31. package/dist/api/base/financial/index.js +2 -2
  32. package/dist/api/base/health-data/health-data-request.d.ts +116 -8
  33. package/dist/api/base/health-data/health-data-request.js +83 -2
  34. package/dist/api/base/health-data/health-data-response-factory.d.ts +27 -0
  35. package/dist/api/base/health-data/health-manager.d.ts +293 -243
  36. package/dist/api/base/health-data/index.d.ts +2 -3
  37. package/dist/api/base/health-data/index.js +0 -2
  38. package/dist/api/base/health-data/lab-knowledge-request.d.ts +9 -0
  39. package/dist/api/base/health-data/lab-knowledge-request.js +3 -0
  40. package/dist/api/base/health-data/medication-knowledge-request.d.ts +9 -0
  41. package/dist/api/base/health-data/medication-knowledge-request.js +3 -0
  42. package/dist/api/base/health-space/appointments-request.d.ts +9 -0
  43. package/dist/api/base/health-space/appointments-request.js +3 -0
  44. package/dist/api/base/health-space/cancel-appointment-request.d.ts +8 -1
  45. package/dist/api/base/health-space/cancel-appointment-request.js +4 -0
  46. package/dist/api/base/health-space/cancellation-reasons-request.d.ts +28 -0
  47. package/dist/api/base/health-space/{cancelationReasons-request.js → cancellation-reasons-request.js} +10 -4
  48. package/dist/api/base/health-space/health-space-manager.d.ts +29 -116
  49. package/dist/api/base/health-space/index.d.ts +2 -7
  50. package/dist/api/base/health-space/index.js +1 -6
  51. package/dist/api/base/identity/identity-manager.d.ts +98 -11
  52. package/dist/api/base/index.d.ts +1 -3
  53. package/dist/api/base/index.js +2 -3
  54. package/dist/api/base/questionnaire/index.d.ts +1 -4
  55. package/dist/api/base/questionnaire/index.js +0 -3
  56. package/dist/api/base/questionnaire/next-question-request.d.ts +8 -2
  57. package/dist/api/base/questionnaire/next-question-request.js +4 -1
  58. package/dist/api/base/questionnaire/questionnaire-manager.d.ts +24 -42
  59. package/dist/api/base/requests/field-sort-order.d.ts +11 -0
  60. package/dist/api/base/requests/index.d.ts +2 -0
  61. package/dist/api/base/requests/search-date.d.ts +12 -0
  62. package/dist/api/base/requests/search-reference.d.ts +9 -1
  63. package/dist/api/base/requests/search-string.d.ts +6 -0
  64. package/dist/api/base/requests/search-token.d.ts +18 -0
  65. package/dist/api/base/requests/search-token.js +17 -17
  66. package/dist/api/base/search/index.d.ts +3 -5
  67. package/dist/api/base/search/index.js +1 -3
  68. package/dist/api/base/search/search-health-resources-request.d.ts +33 -36
  69. package/dist/api/base/search/search-health-resources-request.js +3 -0
  70. package/dist/api/base/search/search-manager.d.ts +39 -42
  71. package/dist/api/base/search/submit-provider-for-review-request.d.ts +33 -0
  72. package/dist/api/base/search/submit-provider-for-review-request.js +9 -0
  73. package/dist/api/base/user/create-consent-request.d.ts +13 -1
  74. package/dist/api/base/user/create-consent-request.js +10 -5
  75. package/dist/api/base/user/create-data-export-direct-download-url-request.d.ts +9 -0
  76. package/dist/api/base/user/create-data-export-direct-download-url-request.js +3 -0
  77. package/dist/api/base/user/create-verification-url-request.d.ts +12 -0
  78. package/dist/api/base/user/create-verification-url-request.js +6 -0
  79. package/dist/api/base/user/get-consents-request.d.ts +19 -1
  80. package/dist/api/base/user/get-consents-request.js +13 -1
  81. package/dist/api/base/user/index.d.ts +1 -2
  82. package/dist/api/base/user/update-profile-request.d.ts +11 -3
  83. package/dist/api/base/user/update-profile-request.js +5 -3
  84. package/dist/api/base/user/user-manager.d.ts +100 -49
  85. package/dist/api/base/user/validators.d.ts +5 -0
  86. package/dist/api/base/user/validators.js +13 -0
  87. package/dist/api/graphql-api/activity/{activity-request-factories.d.ts → get-tasks-request-factory.d.ts} +0 -7
  88. package/dist/api/graphql-api/activity/get-tasks-request-factory.js +56 -0
  89. package/dist/api/graphql-api/activity/graphql-activity-manager.d.ts +6 -8
  90. package/dist/api/graphql-api/activity/graphql-activity-manager.js +19 -30
  91. package/dist/api/graphql-api/activity/index.d.ts +1 -1
  92. package/dist/api/graphql-api/activity/index.js +1 -1
  93. package/dist/api/graphql-api/connection/connection-response-factory.d.ts +7 -0
  94. package/dist/api/graphql-api/connection/connection-response-factory.js +101 -0
  95. package/dist/api/graphql-api/connection/graphql-connection-manager.d.ts +9 -9
  96. package/dist/api/graphql-api/connection/graphql-connection-manager.js +7 -5
  97. package/dist/api/graphql-api/connection/index.d.ts +0 -1
  98. package/dist/api/graphql-api/connection/index.js +1 -1
  99. package/dist/api/graphql-api/device/graphql-device-manager.d.ts +2 -1
  100. package/dist/api/graphql-api/device/graphql-device-manager.js +4 -2
  101. package/dist/api/graphql-api/errors/errors.js +1 -1
  102. package/dist/api/graphql-api/financial/coverage-request-factory.d.ts +9 -0
  103. package/dist/api/graphql-api/financial/coverage-request-factory.js +19 -0
  104. package/dist/api/graphql-api/financial/{graphql-explanation-of-benefits-factory.d.ts → explanation-of-benefit-request-factory.d.ts} +3 -3
  105. package/dist/api/graphql-api/financial/explanation-of-benefit-request-factory.js +19 -0
  106. package/dist/api/graphql-api/financial/graphql-financial-manager.d.ts +4 -12
  107. package/dist/api/graphql-api/financial/graphql-financial-manager.js +32 -19
  108. package/dist/api/graphql-api/financial/index.d.ts +3 -1
  109. package/dist/api/graphql-api/financial/index.js +3 -1
  110. package/dist/api/graphql-api/graphql-api-provider.d.ts +6 -14
  111. package/dist/api/graphql-api/graphql-api-provider.js +6 -7
  112. package/dist/api/graphql-api/graphql-manager/graphql-manager.d.ts +1 -0
  113. package/dist/api/graphql-api/health-space/cancel-appointment-request-factory.js +1 -2
  114. package/dist/api/graphql-api/health-space/graphql-health-space-manager.d.ts +5 -62
  115. package/dist/api/graphql-api/health-space/graphql-health-space-manager.js +9 -163
  116. package/dist/api/graphql-api/health-space/index.d.ts +0 -4
  117. package/dist/api/graphql-api/health-space/index.js +0 -4
  118. package/dist/api/graphql-api/healthdata/get-encounters-request-factory.d.ts +7 -0
  119. package/dist/api/graphql-api/healthdata/get-encounters-request-factory.js +76 -0
  120. package/dist/api/graphql-api/healthdata/get-medication-dispenses-request-factory.d.ts +6 -0
  121. package/dist/api/graphql-api/healthdata/get-medication-dispenses-request-factory.js +25 -0
  122. package/dist/api/graphql-api/healthdata/graphql-health-manager.d.ts +30 -41
  123. package/dist/api/graphql-api/healthdata/graphql-health-manager.js +311 -256
  124. package/dist/api/graphql-api/healthdata/health-data-request-factory.d.ts +18 -0
  125. package/dist/api/graphql-api/healthdata/health-data-request-factory.js +25 -0
  126. package/dist/api/graphql-api/healthdata/health-data-response-factory.d.ts +8 -0
  127. package/dist/api/graphql-api/healthdata/health-data-response-factory.js +58 -0
  128. package/dist/api/graphql-api/identity/graphql-identity-manager.d.ts +2 -1
  129. package/dist/api/graphql-api/identity/graphql-identity-manager.js +5 -3
  130. package/dist/api/graphql-api/questionnaire/graphql-questionnaire-manager.d.ts +4 -22
  131. package/dist/api/graphql-api/questionnaire/graphql-questionnaire-manager.js +4 -69
  132. package/dist/api/graphql-api/questionnaire/index.d.ts +0 -2
  133. package/dist/api/graphql-api/questionnaire/index.js +0 -2
  134. package/dist/api/graphql-api/search/graphql-search-manager.d.ts +4 -6
  135. package/dist/api/graphql-api/search/graphql-search-manager.js +9 -71
  136. package/dist/api/graphql-api/search/search-health-resources-request-factory.js +12 -10
  137. package/dist/api/graphql-api/search/submit-provider-for-review-request-factory.d.ts +6 -0
  138. package/dist/api/graphql-api/search/{request-connection-request-factory.js → submit-provider-for-review-request-factory.js} +1 -1
  139. package/dist/api/graphql-api/user/get-consent-request-factory.d.ts +1 -2
  140. package/dist/api/graphql-api/user/get-consent-request-factory.js +5 -1
  141. package/dist/api/graphql-api/user/graphql-user-manager.d.ts +10 -11
  142. package/dist/api/graphql-api/user/graphql-user-manager.js +11 -10
  143. package/dist/api/graphql-api/user/update-profile-request-factory.js +1 -2
  144. package/dist/api/identity-manager-factory.js +1 -1
  145. package/dist/auth/auth-code-strategy.d.ts +2 -1
  146. package/dist/auth/auth-strategy.d.ts +1 -1
  147. package/dist/auth/credentials.d.ts +1 -1
  148. package/dist/auth/credentials.js +2 -2
  149. package/dist/auth/oauth-strategy.d.ts +2 -1
  150. package/dist/auth/username-password-strategy.d.ts +2 -1
  151. package/dist/auth/username-password-strategy.js +2 -2
  152. package/dist/bwell-sdk/bwell-sdk.d.ts +319 -48
  153. package/dist/bwell-sdk/bwell-sdk.js +368 -53
  154. package/dist/config/bwell-config.d.ts +12 -12
  155. package/dist/config/bwell-config.js +2 -5
  156. package/dist/config/sdk-config.d.ts +2 -3
  157. package/dist/config/sdk-config.js +4 -6
  158. package/dist/errors/authentication-error.d.ts +7 -0
  159. package/dist/errors/authentication-error.js +7 -0
  160. package/dist/errors/bwell-error.d.ts +12 -2
  161. package/dist/errors/bwell-error.js +5 -2
  162. package/dist/errors/illegal-argument-error.d.ts +7 -0
  163. package/dist/errors/illegal-argument-error.js +7 -0
  164. package/dist/errors/illegal-state-error.d.ts +7 -0
  165. package/dist/errors/illegal-state-error.js +7 -0
  166. package/dist/errors/invalid-client-key-error.d.ts +7 -0
  167. package/dist/errors/invalid-client-key-error.js +7 -0
  168. package/dist/errors/invalid-credentials-type-error.d.ts +7 -0
  169. package/dist/errors/invalid-credentials-type-error.js +7 -0
  170. package/dist/errors/invalid-token-error.d.ts +4 -1
  171. package/dist/errors/invalid-token-error.js +4 -1
  172. package/dist/errors/network-error.d.ts +7 -0
  173. package/dist/errors/network-error.js +7 -0
  174. package/dist/errors/operation-outcome-error.d.ts +8 -1
  175. package/dist/errors/operation-outcome-error.js +7 -0
  176. package/dist/errors/unknown-error.d.ts +7 -0
  177. package/dist/errors/unknown-error.js +7 -0
  178. package/dist/errors/validation-error.d.ts +7 -0
  179. package/dist/errors/validation-error.js +7 -0
  180. package/dist/graphql/operations/index.d.ts +116 -283
  181. package/dist/graphql/operations/index.js +1767 -2095
  182. package/dist/graphql/operations/types.d.ts +16471 -18430
  183. package/dist/graphql/schema.d.ts +68323 -5995
  184. package/dist/graphql/schema.js +1 -484
  185. package/dist/index.d.ts +7 -5
  186. package/dist/index.js +5 -4
  187. package/dist/language/language-manager.d.ts +25 -10
  188. package/dist/language/language-manager.js +5 -0
  189. package/dist/models/activity/index.d.ts +1 -0
  190. package/dist/models/activity/task.d.ts +77 -0
  191. package/dist/models/common/address.d.ts +41 -0
  192. package/dist/models/common/annotation.d.ts +18 -0
  193. package/dist/models/common/annotation.js +1 -0
  194. package/dist/models/common/attachment.d.ts +18 -0
  195. package/dist/models/common/attachment.js +1 -0
  196. package/dist/models/common/bundle.d.ts +83 -0
  197. package/dist/models/common/bundle.js +1 -0
  198. package/dist/models/common/codeable-concept.d.ts +17 -0
  199. package/dist/models/common/codeable-concept.js +1 -0
  200. package/dist/models/common/coding.d.ts +18 -0
  201. package/dist/models/common/coding.js +1 -0
  202. package/dist/models/common/component.d.ts +23 -0
  203. package/dist/models/common/component.js +1 -0
  204. package/dist/models/common/contact-point.d.ts +32 -0
  205. package/dist/models/common/contact-point.js +1 -0
  206. package/dist/models/common/dispense-request.d.ts +67 -0
  207. package/dist/models/common/dispense-request.js +1 -0
  208. package/dist/models/common/dosage.d.ts +68 -0
  209. package/dist/models/common/dosage.js +1 -0
  210. package/dist/models/common/endpoint.d.ts +23 -0
  211. package/dist/models/common/endpoint.js +1 -0
  212. package/dist/models/common/expression.d.ts +20 -0
  213. package/dist/models/common/expression.js +1 -0
  214. package/dist/models/common/extension.d.ts +49 -0
  215. package/dist/models/common/extension.js +1 -0
  216. package/dist/models/common/fhir-error.d.ts +23 -0
  217. package/dist/models/common/fhir-error.js +1 -0
  218. package/dist/models/common/human-name.d.ts +20 -0
  219. package/dist/models/common/human-name.js +1 -0
  220. package/dist/models/common/identifier.d.ts +19 -0
  221. package/dist/models/common/identifier.js +1 -0
  222. package/dist/models/common/index.d.ts +38 -0
  223. package/dist/models/common/index.js +2 -0
  224. package/dist/models/common/location.d.ts +51 -0
  225. package/dist/models/common/location.js +1 -0
  226. package/dist/models/common/medication.d.ts +42 -0
  227. package/dist/models/common/medication.js +1 -0
  228. package/dist/models/common/meta.d.ts +21 -0
  229. package/dist/models/common/meta.js +1 -0
  230. package/dist/models/common/money.d.ts +15 -0
  231. package/dist/models/common/money.js +1 -0
  232. package/dist/models/common/narrative.d.ts +14 -0
  233. package/dist/models/common/narrative.js +1 -0
  234. package/dist/models/common/operation-outcome.d.ts +48 -0
  235. package/dist/models/common/operation-outcome.js +1 -0
  236. package/dist/models/common/organization.d.ts +46 -0
  237. package/dist/models/common/organization.js +1 -0
  238. package/dist/models/common/paging-info.d.ts +18 -0
  239. package/dist/models/common/paging-info.js +1 -0
  240. package/dist/models/common/patient.d.ts +13 -0
  241. package/dist/models/common/patient.js +1 -0
  242. package/dist/models/common/period.d.ts +14 -0
  243. package/dist/models/common/period.js +1 -0
  244. package/dist/models/common/practitioner-role.d.ts +42 -0
  245. package/dist/models/common/practitioner-role.js +1 -0
  246. package/dist/models/common/practitioner.d.ts +17 -0
  247. package/dist/models/common/practitioner.js +1 -0
  248. package/dist/models/common/quantity.d.ts +20 -0
  249. package/dist/models/common/quantity.js +1 -0
  250. package/dist/models/common/range.d.ts +15 -0
  251. package/dist/models/common/range.js +1 -0
  252. package/dist/models/common/ratio.d.ts +15 -0
  253. package/dist/models/common/ratio.js +1 -0
  254. package/dist/models/common/reference-range.d.ts +13 -0
  255. package/dist/models/common/reference-range.js +1 -0
  256. package/dist/models/common/reference.d.ts +27 -0
  257. package/dist/models/common/reference.js +1 -0
  258. package/dist/models/common/related-person.d.ts +34 -0
  259. package/dist/models/common/related-person.js +1 -0
  260. package/dist/models/common/score.d.ts +16 -0
  261. package/dist/models/common/score.js +1 -0
  262. package/dist/models/common/service-request.d.ts +21 -0
  263. package/dist/models/common/service-request.js +1 -0
  264. package/dist/models/common/specimen.d.ts +30 -0
  265. package/dist/models/common/specimen.js +7 -0
  266. package/dist/models/common/timing.d.ts +107 -0
  267. package/dist/models/common/timing.js +1 -0
  268. package/dist/models/common/value.d.ts +22 -0
  269. package/dist/models/common/value.js +1 -0
  270. package/dist/models/connection/base-connection.d.ts +27 -0
  271. package/dist/models/connection/base-connection.js +1 -0
  272. package/dist/models/connection/connection-status.d.ts +15 -0
  273. package/dist/models/connection/connection-status.js +1 -0
  274. package/dist/models/connection/connection.d.ts +32 -0
  275. package/dist/models/connection/connection.js +1 -0
  276. package/dist/models/connection/data-source.d.ts +27 -0
  277. package/dist/models/connection/data-source.js +1 -0
  278. package/dist/models/connection/index.d.ts +6 -0
  279. package/dist/models/connection/index.js +1 -0
  280. package/dist/models/connection/member-connection.d.ts +37 -0
  281. package/dist/models/connection/member-connection.js +1 -0
  282. package/dist/models/connection/oauth-url.d.ts +12 -0
  283. package/dist/models/connection/oauth-url.js +1 -0
  284. package/dist/models/device/device-registration-results.d.ts +12 -0
  285. package/dist/models/device/device-registration-results.js +1 -0
  286. package/dist/models/device/index.d.ts +1 -0
  287. package/dist/models/device/index.js +1 -0
  288. package/dist/models/enums/category-code.d.ts +11 -0
  289. package/dist/models/enums/category-code.js +13 -0
  290. package/dist/models/enums/connection-category.d.ts +9 -0
  291. package/dist/models/enums/connection-category.js +1 -0
  292. package/dist/models/enums/consent-provision-type.d.ts +11 -0
  293. package/dist/models/enums/consent-provision-type.js +2 -0
  294. package/dist/models/enums/consent-status.d.ts +11 -0
  295. package/dist/models/enums/consent-status.js +9 -0
  296. package/dist/models/enums/data-connection-status.d.ts +9 -0
  297. package/dist/models/enums/data-connection-status.js +1 -0
  298. package/dist/models/enums/data-connection-type.d.ts +9 -0
  299. package/dist/models/enums/data-connection-type.js +1 -0
  300. package/dist/models/enums/data-set.d.ts +10 -0
  301. package/dist/models/enums/data-set.js +1 -0
  302. package/dist/models/enums/device-platform.d.ts +11 -0
  303. package/dist/models/enums/device-platform.js +2 -0
  304. package/dist/models/enums/endpoint-status.d.ts +9 -0
  305. package/dist/models/enums/endpoint-status.js +1 -0
  306. package/dist/models/enums/filter-field.d.ts +9 -0
  307. package/dist/models/enums/filter-field.js +1 -0
  308. package/dist/models/enums/gender.d.ts +9 -0
  309. package/dist/models/enums/gender.js +1 -0
  310. package/dist/models/enums/index.d.ts +18 -0
  311. package/dist/models/enums/index.js +5 -0
  312. package/dist/models/enums/log-level.d.ts +8 -0
  313. package/dist/models/enums/log-level.js +1 -0
  314. package/dist/models/enums/person-gender.d.ts +11 -0
  315. package/dist/models/enums/person-gender.js +7 -0
  316. package/dist/models/enums/search-context.d.ts +10 -0
  317. package/dist/models/enums/search-context.js +1 -0
  318. package/dist/models/enums/search-result-type.d.ts +9 -0
  319. package/dist/models/enums/search-result-type.js +1 -0
  320. package/dist/models/enums/sort-field.d.ts +10 -0
  321. package/dist/models/enums/sort-field.js +1 -0
  322. package/dist/models/enums/sort-order.d.ts +9 -0
  323. package/dist/models/enums/sort-order.js +1 -0
  324. package/dist/models/enums/sync-status.d.ts +9 -0
  325. package/dist/models/enums/sync-status.js +1 -0
  326. package/dist/models/financial/coverage-bundle.d.ts +18 -0
  327. package/dist/models/financial/coverage-bundle.js +1 -0
  328. package/dist/models/financial/coverage.d.ts +65 -0
  329. package/dist/models/financial/coverage.js +1 -0
  330. package/dist/models/financial/explanation-of-benefit-bundle.d.ts +26 -0
  331. package/dist/models/financial/explanation-of-benefit-bundle.js +1 -0
  332. package/dist/models/financial/explanation-of-benefit.d.ts +274 -0
  333. package/dist/models/financial/explanation-of-benefit.js +1 -0
  334. package/dist/models/financial/index.d.ts +4 -0
  335. package/dist/models/financial/index.js +4 -0
  336. package/dist/models/health-data/allergy-intolerance-bundle.d.ts +11 -0
  337. package/dist/models/health-data/allergy-intolerance-bundle.js +1 -0
  338. package/dist/models/health-data/allergy-intolerance-group.d.ts +44 -0
  339. package/dist/models/health-data/allergy-intolerance-group.js +1 -0
  340. package/dist/models/health-data/allergy-intolerance-reaction.d.ts +23 -0
  341. package/dist/models/health-data/allergy-intolerance-reaction.js +1 -0
  342. package/dist/models/health-data/allergy-intolerance.d.ts +54 -0
  343. package/dist/models/health-data/allergy-intolerance.js +1 -0
  344. package/dist/models/health-data/care-plan-group.d.ts +42 -0
  345. package/dist/models/health-data/care-plan-group.js +1 -0
  346. package/dist/models/health-data/care-plan.d.ts +134 -0
  347. package/dist/models/health-data/care-plan.js +1 -0
  348. package/dist/models/health-data/care-team.d.ts +77 -0
  349. package/dist/models/health-data/care-team.js +1 -0
  350. package/dist/models/health-data/condition-group.d.ts +42 -0
  351. package/dist/models/health-data/condition-group.js +1 -0
  352. package/dist/models/health-data/condition.d.ts +104 -0
  353. package/dist/models/health-data/condition.js +1 -0
  354. package/dist/models/health-data/diagnostic-report-lab-group.d.ts +45 -0
  355. package/dist/models/health-data/diagnostic-report-lab-group.js +1 -0
  356. package/dist/models/health-data/diagnostic-report.d.ts +90 -0
  357. package/dist/models/health-data/diagnostic-report.js +1 -0
  358. package/dist/models/health-data/encounter-group.d.ts +48 -0
  359. package/dist/models/health-data/encounter-group.js +1 -0
  360. package/dist/models/health-data/encounter.d.ts +79 -0
  361. package/dist/models/health-data/encounter.js +1 -0
  362. package/dist/models/health-data/health-summary.d.ts +18 -0
  363. package/dist/models/health-data/health-summary.js +1 -0
  364. package/dist/models/health-data/immunization-group.d.ts +41 -0
  365. package/dist/models/health-data/immunization-group.js +1 -0
  366. package/dist/models/health-data/immunization.d.ts +150 -0
  367. package/dist/models/health-data/immunization.js +1 -0
  368. package/dist/models/health-data/index.d.ts +30 -0
  369. package/dist/models/health-data/index.js +1 -0
  370. package/dist/models/health-data/lab-bundle.d.ts +26 -0
  371. package/dist/models/health-data/lab-bundle.js +1 -0
  372. package/dist/models/health-data/lab-group.d.ts +51 -0
  373. package/dist/models/health-data/lab-group.js +1 -0
  374. package/dist/models/health-data/lab-knowledge.d.ts +28 -0
  375. package/dist/models/health-data/lab-knowledge.js +1 -0
  376. package/dist/models/health-data/medication-dispense.d.ts +108 -0
  377. package/dist/models/health-data/medication-dispense.js +1 -0
  378. package/dist/models/health-data/medication-group.d.ts +43 -0
  379. package/dist/models/health-data/medication-group.js +1 -0
  380. package/dist/models/health-data/medication-knowledge.d.ts +30 -0
  381. package/dist/models/health-data/medication-knowledge.js +1 -0
  382. package/dist/models/health-data/medication-pricing.d.ts +28 -0
  383. package/dist/models/health-data/medication-pricing.js +1 -0
  384. package/dist/models/health-data/medication-request.d.ts +107 -0
  385. package/dist/models/health-data/medication-request.js +1 -0
  386. package/dist/models/health-data/medication-statement.d.ts +68 -0
  387. package/dist/models/health-data/medication-statement.js +1 -0
  388. package/dist/models/health-data/observation.d.ts +102 -0
  389. package/dist/models/health-data/observation.js +1 -0
  390. package/dist/models/health-data/procedure-group.d.ts +43 -0
  391. package/dist/models/health-data/procedure-group.js +1 -0
  392. package/dist/models/health-data/procedure.d.ts +84 -0
  393. package/dist/models/health-data/procedure.js +1 -0
  394. package/dist/models/health-data/vital-sign-bundle.d.ts +18 -0
  395. package/dist/models/health-data/vital-sign-bundle.js +1 -0
  396. package/dist/models/health-data/vital-sign-group.d.ts +51 -0
  397. package/dist/models/health-data/vital-sign-group.js +1 -0
  398. package/dist/models/health-space/appointment-bundle.d.ts +11 -0
  399. package/dist/models/health-space/appointment-bundle.js +1 -0
  400. package/dist/models/health-space/appointment-participant.d.ts +17 -0
  401. package/dist/models/health-space/appointment-participant.js +1 -0
  402. package/dist/models/health-space/appointment-update.d.ts +14 -0
  403. package/dist/models/health-space/appointment-update.js +1 -0
  404. package/dist/models/health-space/appointment.d.ts +30 -0
  405. package/dist/models/health-space/appointment.js +1 -0
  406. package/dist/models/health-space/cancellation-reasons.d.ts +32 -0
  407. package/dist/models/health-space/cancellation-reasons.js +1 -0
  408. package/dist/models/health-space/index.d.ts +5 -0
  409. package/dist/models/health-space/index.js +1 -0
  410. package/dist/models/identity/auth-tokens.d.ts +25 -0
  411. package/dist/models/identity/auth-tokens.js +1 -0
  412. package/dist/models/identity/create-guest-access-token-results.d.ts +12 -0
  413. package/dist/models/identity/create-guest-access-token-results.js +1 -0
  414. package/dist/models/identity/index.d.ts +4 -0
  415. package/dist/models/identity/index.js +1 -0
  416. package/dist/models/identity/refresh-token-results.d.ts +8 -0
  417. package/dist/models/identity/refresh-token-results.js +1 -0
  418. package/dist/models/identity/sdk-configuration-result.d.ts +26 -0
  419. package/dist/models/identity/sdk-configuration-result.js +1 -0
  420. package/dist/models/index.d.ts +12 -4
  421. package/dist/models/index.js +12 -4
  422. package/dist/models/questionnaire/index.d.ts +5 -0
  423. package/dist/models/questionnaire/index.js +1 -0
  424. package/dist/models/questionnaire/questionnaire-item.d.ts +38 -0
  425. package/dist/models/questionnaire/questionnaire-item.js +1 -0
  426. package/dist/models/questionnaire/questionnaire-response-answer.d.ts +33 -0
  427. package/dist/models/questionnaire/questionnaire-response-answer.js +1 -0
  428. package/dist/models/questionnaire/questionnaire-response-item.d.ts +19 -0
  429. package/dist/models/questionnaire/questionnaire-response-item.js +1 -0
  430. package/dist/models/questionnaire/questionnaire-response.d.ts +29 -0
  431. package/dist/models/questionnaire/questionnaire-response.js +1 -0
  432. package/dist/models/questionnaire/questionnaire.d.ts +30 -0
  433. package/dist/models/questionnaire/questionnaire.js +1 -0
  434. package/dist/models/search/health-resources.d.ts +133 -0
  435. package/dist/models/search/health-resources.js +1 -0
  436. package/dist/models/search/index.d.ts +2 -0
  437. package/dist/models/search/index.js +1 -0
  438. package/dist/models/search/provider-review-result.d.ts +15 -0
  439. package/dist/models/search/provider-review-result.js +1 -0
  440. package/dist/models/user/consent.d.ts +100 -0
  441. package/dist/models/user/consent.js +1 -0
  442. package/dist/models/user/index.d.ts +4 -0
  443. package/dist/models/user/index.js +1 -0
  444. package/dist/models/user/person.d.ts +43 -0
  445. package/dist/models/user/person.js +1 -0
  446. package/dist/models/user/user.d.ts +12 -0
  447. package/dist/models/user/user.js +1 -0
  448. package/dist/models/user/verification-result.d.ts +30 -0
  449. package/dist/models/user/verification-result.js +1 -0
  450. package/dist/requests/paged-request.d.ts +35 -0
  451. package/dist/requests/paged-request.js +22 -0
  452. package/dist/requests/request.d.ts +16 -0
  453. package/dist/requests/request.js +8 -0
  454. package/dist/requests/validator.d.ts +15 -0
  455. package/dist/requests/validator.js +7 -0
  456. package/dist/results/bwell-query-result.d.ts +5 -0
  457. package/dist/results/bwell-query-result.js +5 -0
  458. package/dist/results/bwell-transaction-result.d.ts +17 -3
  459. package/dist/results/bwell-transaction-result.js +15 -1
  460. package/dist/results/index.d.ts +1 -0
  461. package/dist/results/index.js +1 -0
  462. package/dist/telemetry/open-telemetry-instrumentation.js +1 -4
  463. package/dist/tokens/index.d.ts +2 -0
  464. package/dist/tokens/index.js +2 -0
  465. package/dist/tokens/jwt-token-manager.d.ts +3 -7
  466. package/dist/tokens/jwt-token-manager.js +9 -8
  467. package/dist/tokens/load-auth-tokens.d.ts +6 -0
  468. package/dist/tokens/load-auth-tokens.js +43 -0
  469. package/dist/tokens/token-manager.d.ts +12 -0
  470. package/dist/tokens/token-manager.js +5 -0
  471. package/dist/tokens/token-storage.d.ts +20 -0
  472. package/dist/tokens/token-storage.js +19 -0
  473. package/dist/utils/index.d.ts +1 -1
  474. package/dist/utils/index.js +1 -1
  475. package/dist/utils/parsing-utils.d.ts +11 -1
  476. package/dist/utils/parsing-utils.js +33 -1
  477. package/dist/utils/search-token-utils.d.ts +8 -0
  478. package/dist/utils/search-token-utils.js +23 -0
  479. package/package.json +24 -20
  480. package/dist/api/base/activity/types.d.ts +0 -3
  481. package/dist/api/base/activity/types.js +0 -5
  482. package/dist/api/base/activity/update-task-status-request.d.ts +0 -18
  483. package/dist/api/base/activity/update-task-status-request.js +0 -15
  484. package/dist/api/base/event/event-manager.d.ts +0 -16
  485. package/dist/api/base/event/event-request.d.ts +0 -35
  486. package/dist/api/base/event/event-request.js +0 -64
  487. package/dist/api/base/event/index.d.ts +0 -2
  488. package/dist/api/base/event/index.js +0 -1
  489. package/dist/api/base/health-data/medication-pricing-request.d.ts +0 -21
  490. package/dist/api/base/health-data/medication-pricing-request.js +0 -26
  491. package/dist/api/base/health-data/medication-statement-request.d.ts +0 -29
  492. package/dist/api/base/health-data/medication-statement-request.js +0 -35
  493. package/dist/api/base/health-space/add-care-team-member-request.d.ts +0 -33
  494. package/dist/api/base/health-space/add-care-team-member-request.js +0 -36
  495. package/dist/api/base/health-space/add-care-team-members-request.d.ts +0 -35
  496. package/dist/api/base/health-space/add-care-team-members-request.js +0 -61
  497. package/dist/api/base/health-space/cancelationReasons-request.d.ts +0 -16
  498. package/dist/api/base/health-space/care-team-members-request.d.ts +0 -31
  499. package/dist/api/base/health-space/care-team-members-request.js +0 -33
  500. package/dist/api/base/health-space/remove-care-team-member-request.d.ts +0 -34
  501. package/dist/api/base/health-space/remove-care-team-member-request.js +0 -36
  502. package/dist/api/base/health-space/update-care-team-member-request.d.ts +0 -55
  503. package/dist/api/base/health-space/update-care-team-member-request.js +0 -71
  504. package/dist/api/base/questionnaire/questionnaire-responses-request.d.ts +0 -30
  505. package/dist/api/base/questionnaire/questionnaire-responses-request.js +0 -49
  506. package/dist/api/base/questionnaire/questionnaires-request.d.ts +0 -18
  507. package/dist/api/base/questionnaire/questionnaires-request.js +0 -42
  508. package/dist/api/base/questionnaire/save-questionnaire-response-request.d.ts +0 -22
  509. package/dist/api/base/questionnaire/save-questionnaire-response-request.js +0 -33
  510. package/dist/api/base/search/request-connection-request.d.ts +0 -24
  511. package/dist/api/base/search/request-connection-request.js +0 -3
  512. package/dist/api/base/search/search-request.d.ts +0 -84
  513. package/dist/api/base/search/search-request.js +0 -78
  514. package/dist/api/base/support/create-support-request-request.d.ts +0 -22
  515. package/dist/api/base/support/create-support-request-request.js +0 -20
  516. package/dist/api/base/support/delete-support-attachment-request.d.ts +0 -11
  517. package/dist/api/base/support/delete-support-attachment-request.js +0 -14
  518. package/dist/api/base/support/get-support-requests-request.d.ts +0 -16
  519. package/dist/api/base/support/get-support-requests-request.js +0 -14
  520. package/dist/api/base/support/index.d.ts +0 -5
  521. package/dist/api/base/support/index.js +0 -5
  522. package/dist/api/base/support/support-manager.d.ts +0 -46
  523. package/dist/api/base/support/upload-support-attachment-request.d.ts +0 -25
  524. package/dist/api/base/support/upload-support-attachment-request.js +0 -27
  525. package/dist/api/base/user/types.d.ts +0 -9
  526. package/dist/api/base/user/types.js +0 -17
  527. package/dist/api/graphql-api/activity/activity-request-factories.js +0 -70
  528. package/dist/api/graphql-api/connection/graphql-get-member-connections-bwell-response-factory.d.ts +0 -18
  529. package/dist/api/graphql-api/connection/graphql-get-member-connections-bwell-response-factory.js +0 -40
  530. package/dist/api/graphql-api/event/event-request-factory.d.ts +0 -6
  531. package/dist/api/graphql-api/event/event-request-factory.js +0 -11
  532. package/dist/api/graphql-api/event/graphql-event-manager.d.ts +0 -15
  533. package/dist/api/graphql-api/event/graphql-event-manager.js +0 -65
  534. package/dist/api/graphql-api/event/index.d.ts +0 -1
  535. package/dist/api/graphql-api/event/index.js +0 -1
  536. package/dist/api/graphql-api/financial/graphql-coverages-bwell-request-factory.d.ts +0 -6
  537. package/dist/api/graphql-api/financial/graphql-coverages-bwell-request-factory.js +0 -17
  538. package/dist/api/graphql-api/financial/graphql-explanation-of-benefits-factory.js +0 -23
  539. package/dist/api/graphql-api/health-space/add-care-team-member-request-factory.d.ts +0 -20
  540. package/dist/api/graphql-api/health-space/add-care-team-member-request-factory.js +0 -29
  541. package/dist/api/graphql-api/health-space/add-care-team-members-request-factory.d.ts +0 -16
  542. package/dist/api/graphql-api/health-space/add-care-team-members-request-factory.js +0 -23
  543. package/dist/api/graphql-api/health-space/care-team-factory-utils.d.ts +0 -23
  544. package/dist/api/graphql-api/health-space/care-team-factory-utils.js +0 -30
  545. package/dist/api/graphql-api/health-space/care-team-members-request-factory.d.ts +0 -12
  546. package/dist/api/graphql-api/health-space/care-team-members-request-factory.js +0 -17
  547. package/dist/api/graphql-api/health-space/remove-care-team-member-request-factory.d.ts +0 -16
  548. package/dist/api/graphql-api/health-space/remove-care-team-member-request-factory.js +0 -24
  549. package/dist/api/graphql-api/health-space/update-care-team-member-request-factory.d.ts +0 -16
  550. package/dist/api/graphql-api/health-space/update-care-team-member-request-factory.js +0 -20
  551. package/dist/api/graphql-api/healthdata/graphql-diagnostic-reports-bwell-request-factory.d.ts +0 -6
  552. package/dist/api/graphql-api/healthdata/graphql-diagnostic-reports-bwell-request-factory.js +0 -12
  553. package/dist/api/graphql-api/healthdata/graphql-get-medication-dispense-bwell-response-factory.d.ts +0 -10
  554. package/dist/api/graphql-api/healthdata/graphql-get-medication-dispense-bwell-response-factory.js +0 -35
  555. package/dist/api/graphql-api/healthdata/graphql-get-medication-request-bwell-response-factory.d.ts +0 -10
  556. package/dist/api/graphql-api/healthdata/graphql-get-medication-request-bwell-response-factory.js +0 -35
  557. package/dist/api/graphql-api/healthdata/graphql-update-medication-statement-request-factory.d.ts +0 -6
  558. package/dist/api/graphql-api/healthdata/graphql-update-medication-statement-request-factory.js +0 -11
  559. package/dist/api/graphql-api/questionnaire/get-questionnaire-responses-request-factory.d.ts +0 -9
  560. package/dist/api/graphql-api/questionnaire/get-questionnaire-responses-request-factory.js +0 -22
  561. package/dist/api/graphql-api/questionnaire/get-questionnaires-request-factory.d.ts +0 -6
  562. package/dist/api/graphql-api/questionnaire/get-questionnaires-request-factory.js +0 -16
  563. package/dist/api/graphql-api/search/connection-search-request-factory.d.ts +0 -7
  564. package/dist/api/graphql-api/search/connection-search-request-factory.js +0 -21
  565. package/dist/api/graphql-api/search/index.d.ts +0 -1
  566. package/dist/api/graphql-api/search/index.js +0 -1
  567. package/dist/api/graphql-api/search/provider-search-request-factory.d.ts +0 -7
  568. package/dist/api/graphql-api/search/provider-search-request-factory.js +0 -21
  569. package/dist/api/graphql-api/search/request-connection-request-factory.d.ts +0 -6
  570. package/dist/api/graphql-api/search/search-request-factory.d.ts +0 -6
  571. package/dist/api/graphql-api/search/search-request-factory.js +0 -44
  572. package/dist/api/graphql-api/support/create-support-request-request-factory.d.ts +0 -6
  573. package/dist/api/graphql-api/support/create-support-request-request-factory.js +0 -19
  574. package/dist/api/graphql-api/support/delete-support-attachment-request-factory.d.ts +0 -6
  575. package/dist/api/graphql-api/support/delete-support-attachment-request-factory.js +0 -10
  576. package/dist/api/graphql-api/support/get-support-requests-bwell-request-factory.d.ts +0 -6
  577. package/dist/api/graphql-api/support/get-support-requests-bwell-request-factory.js +0 -16
  578. package/dist/api/graphql-api/support/graphql-support-manager.d.ts +0 -22
  579. package/dist/api/graphql-api/support/graphql-support-manager.js +0 -129
  580. package/dist/api/graphql-api/support/index.d.ts +0 -1
  581. package/dist/api/graphql-api/support/index.js +0 -1
  582. package/dist/api/graphql-api/support/upload-support-attachment-request-factory.d.ts +0 -6
  583. package/dist/api/graphql-api/support/upload-support-attachment-request-factory.js +0 -11
  584. package/dist/api/graphql-api/user/create-data-export-direct-download-url-request-factory.d.ts +0 -6
  585. package/dist/api/graphql-api/user/create-data-export-direct-download-url-request-factory.js +0 -9
  586. package/dist/models/coding.d.ts +0 -5
  587. package/dist/models/fhir-error.d.ts +0 -9
  588. package/dist/models/user.d.ts +0 -4
  589. package/dist/utils/date-utils.d.ts +0 -6
  590. package/dist/utils/date-utils.js +0 -8
  591. /package/dist/api/base/{event/event-manager.js → health-data/health-data-response-factory.js} +0 -0
  592. /package/dist/api/base/{support/support-manager.js → requests/field-sort-order.js} +0 -0
  593. /package/dist/models/{coding.js → activity/index.js} +0 -0
  594. /package/dist/models/{fhir-error.js → activity/task.js} +0 -0
  595. /package/dist/models/{user.js → common/address.js} +0 -0
  596. /package/dist/{models → results}/operation-outcome.d.ts +0 -0
  597. /package/dist/{models → results}/operation-outcome.js +0 -0
@@ -1,14 +1,45 @@
1
1
  import { ValidationRequest } from "./request.js";
2
2
  import { ErrorsCollector, Validator } from "./validator.js";
3
+ /**
4
+ * Input type for paged requests. Specifies pagination parameters.
5
+ * @category Inputs
6
+ * @title PagedRequestInput
7
+ * @excerpt Input type for paged requests
8
+ */
3
9
  export type PagedRequestInput = {
4
10
  page: number;
5
11
  pageSize?: number;
6
12
  };
13
+ /**
14
+ * Request data type for paged requests
15
+ * @private
16
+ * @title PagedRequestRequestData
17
+ * @excerpt Request data type for paged requests
18
+
19
+ */
7
20
  export type PagedRequestRequestData = Required<PagedRequestInput>;
21
+ /**
22
+ * Maximum page size for paged requests
23
+ * @private
24
+ * @title MAX_PAGE_SIZE
25
+ * @excerpt Maximum page size for paged requests
26
+
27
+ */
8
28
  export declare const MAX_PAGE_SIZE = 100;
29
+ /**
30
+ * Default page size for paged requests
31
+ * @private
32
+ * @title DEFAULT_PAGE_SIZE
33
+ * @excerpt Default page size for paged requests
34
+
35
+ */
9
36
  export declare const DEFAULT_PAGE_SIZE = 20;
10
37
  /**
11
38
  * Validator for paged requests. Ensures that the page is a positive number and the page size is a positive number less than or equal to MAX_PAGE_SIZE.
39
+ * @private
40
+ * @title PagedRequestValidator
41
+ * @excerpt Validator for paged requests. Ensures that the page is a positive number and the page size is a positive number less than or equal to MAX_PAGE_SIZE
42
+
12
43
  */
13
44
  export declare class PagedRequestValidator<T extends PagedRequestInput> implements Validator<T> {
14
45
  #private;
@@ -21,6 +52,10 @@ export declare class PagedRequestValidator<T extends PagedRequestInput> implemen
21
52
  }
22
53
  /**
23
54
  * Base request object for fetching paged data.
55
+ * @category Requests
56
+ * @title PagedRequest
57
+ * @excerpt Base request object for fetching paged data
58
+
24
59
  */
25
60
  export declare class PagedRequest<I extends PagedRequestInput = PagedRequestInput, T extends Required<PagedRequestInput> = I & Required<PagedRequestInput>> extends ValidationRequest<I, T & Required<PagedRequestInput>> {
26
61
  protected validator: PagedRequestValidator<I>;
@@ -5,10 +5,28 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
5
5
  };
6
6
  var _PagedRequestValidator_instances, _PagedRequestValidator_validatePage, _PagedRequestValidator_validatePageSize;
7
7
  import { ValidationRequest } from "./request.js";
8
+ /**
9
+ * Maximum page size for paged requests
10
+ * @private
11
+ * @title MAX_PAGE_SIZE
12
+ * @excerpt Maximum page size for paged requests
13
+
14
+ */
8
15
  export const MAX_PAGE_SIZE = 100;
16
+ /**
17
+ * Default page size for paged requests
18
+ * @private
19
+ * @title DEFAULT_PAGE_SIZE
20
+ * @excerpt Default page size for paged requests
21
+
22
+ */
9
23
  export const DEFAULT_PAGE_SIZE = 20;
10
24
  /**
11
25
  * Validator for paged requests. Ensures that the page is a positive number and the page size is a positive number less than or equal to MAX_PAGE_SIZE.
26
+ * @private
27
+ * @title PagedRequestValidator
28
+ * @excerpt Validator for paged requests. Ensures that the page is a positive number and the page size is a positive number less than or equal to MAX_PAGE_SIZE
29
+
12
30
  */
13
31
  export class PagedRequestValidator {
14
32
  constructor() {
@@ -41,6 +59,10 @@ _PagedRequestValidator_instances = new WeakSet(), _PagedRequestValidator_validat
41
59
  };
42
60
  /**
43
61
  * Base request object for fetching paged data.
62
+ * @category Requests
63
+ * @title PagedRequest
64
+ * @excerpt Base request object for fetching paged data
65
+
44
66
  */
45
67
  export class PagedRequest extends ValidationRequest {
46
68
  constructor() {
@@ -4,6 +4,10 @@ import { Validator } from "./validator.js";
4
4
  /**
5
5
  * The Request interface provides a set of methods to be used for serializing,
6
6
  * validating, and accessing data Request data
7
+ * @private
8
+ * @title Request
9
+ * @excerpt The Request interface provides a set of methods to be used for serializing, validating, and accessing data Request data
10
+
7
11
  */
8
12
  export interface Request<T> {
9
13
  /**
@@ -31,6 +35,10 @@ export interface Request<T> {
31
35
  * I is the input type of the Request class.
32
36
  * T is the output type of the request class and is defaulted to I. T should
33
37
  * be the result of the trasnformInput method.
38
+ * @private
39
+ * @title BaseRequest
40
+ * @excerpt BaseRequest is the class to be extended when building a request input class which does not require any validation logic
41
+
34
42
  */
35
43
  export declare abstract class BaseRequest<I, T = I> implements Request<T> {
36
44
  #private;
@@ -56,6 +64,10 @@ export declare abstract class BaseRequest<I, T = I> implements Request<T> {
56
64
  }
57
65
  /**
58
66
  * Class to extend for building request objects that require data validation
67
+ * @private
68
+ * @title ValidationRequest
69
+ * @excerpt Class to extend for building request objects that require data validation
70
+
59
71
  */
60
72
  export declare abstract class ValidationRequest<I, T = I> extends BaseRequest<I, T> {
61
73
  /**
@@ -71,6 +83,10 @@ export declare abstract class ValidationRequest<I, T = I> extends BaseRequest<I,
71
83
  /**
72
84
  * Interface to implement when bulding classes that transform an abstract request
73
85
  * to a provider specific request object like GraphQL
86
+ * @private
87
+ * @title RequestFactory
88
+ * @excerpt Interface to implement when bulding classes that transform an abstract request to a provider specific request object like GraphQL
89
+
74
90
  */
75
91
  export interface RequestFactory<R extends Request<unknown>, Output> {
76
92
  /**
@@ -21,6 +21,10 @@ import { ValidationErrorsCollector } from "./validator.js";
21
21
  * I is the input type of the Request class.
22
22
  * T is the output type of the request class and is defaulted to I. T should
23
23
  * be the result of the trasnformInput method.
24
+ * @private
25
+ * @title BaseRequest
26
+ * @excerpt BaseRequest is the class to be extended when building a request input class which does not require any validation logic
27
+
24
28
  */
25
29
  export class BaseRequest {
26
30
  constructor(data) {
@@ -62,6 +66,10 @@ export class BaseRequest {
62
66
  _BaseRequest_data = new WeakMap(), _BaseRequest_input = new WeakMap();
63
67
  /**
64
68
  * Class to extend for building request objects that require data validation
69
+ * @private
70
+ * @title ValidationRequest
71
+ * @excerpt Class to extend for building request objects that require data validation
72
+
65
73
  */
66
74
  export class ValidationRequest extends BaseRequest {
67
75
  /**
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * Validator is an interface which only implements a `validate` method which
3
3
  * validates some data and collects the validation errors into an error collector
4
+ * @private
5
+ * @title Validator
6
+ * @excerpt Validator is an interface which only implements a `validate` method which validates some data and collects the validation errors into an error collector
7
+
4
8
  */
5
9
  export interface Validator<T> {
6
10
  /**
@@ -27,6 +31,10 @@ export interface Validator<T> {
27
31
  }
28
32
  /**
29
33
  * Interface for collecting errors during data validation
34
+ * @private
35
+ * @title ErrorsCollector
36
+ * @excerpt Interface for collecting errors during data validation
37
+
30
38
  */
31
39
  export interface ErrorsCollector {
32
40
  /**
@@ -46,6 +54,13 @@ export interface ErrorsCollector {
46
54
  */
47
55
  hasErrors(): boolean;
48
56
  }
57
+ /**
58
+ * Implementation of ErrorsCollector for collecting validation errors
59
+ * @private
60
+ * @title ValidationErrorsCollector
61
+ * @excerpt Implementation of ErrorsCollector for collecting validation errors
62
+
63
+ */
49
64
  export declare class ValidationErrorsCollector implements ErrorsCollector {
50
65
  #private;
51
66
  add(error: string): void;
@@ -4,6 +4,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _ValidationErrorsCollector_errors;
7
+ /**
8
+ * Implementation of ErrorsCollector for collecting validation errors
9
+ * @private
10
+ * @title ValidationErrorsCollector
11
+ * @excerpt Implementation of ErrorsCollector for collecting validation errors
12
+
13
+ */
7
14
  export class ValidationErrorsCollector {
8
15
  constructor() {
9
16
  _ValidationErrorsCollector_errors.set(this, []);
@@ -2,6 +2,11 @@ import { type BWellError } from "../errors/index.js";
2
2
  /**
3
3
  * Used when just querying for data.
4
4
  * Can have data AND errors
5
+ *
6
+ * @typeParam T - The type of the data being queried
7
+ * @typeParam E - The type of the error, must extend BWellError (defaults to BWellError)
8
+ * @title BWellQueryResult
9
+ * @excerpt Used when just querying for data
5
10
  */
6
11
  export declare class BWellQueryResult<T, E extends BWellError = BWellError> {
7
12
  readonly data: T | undefined;
@@ -1,6 +1,11 @@
1
1
  /**
2
2
  * Used when just querying for data.
3
3
  * Can have data AND errors
4
+ *
5
+ * @typeParam T - The type of the data being queried
6
+ * @typeParam E - The type of the error, must extend BWellError (defaults to BWellError)
7
+ * @title BWellQueryResult
8
+ * @excerpt Used when just querying for data
4
9
  */
5
10
  export class BWellQueryResult {
6
11
  constructor(data, error) {
@@ -3,6 +3,11 @@ import { BWellQueryResult } from "./bwell-query-result.js";
3
3
  /**
4
4
  * Class representing a successful operation whose result can only be a success
5
5
  * or a failure.
6
+ *
7
+ * @typeParam T - The type of the successful result value
8
+ * @typeParam E - The type of the error, must extend BWellError (defaults to BWellError)
9
+ * @title BWellTransactionResult
10
+ * @excerpt Class representing a successful operation whose result can only be a success or a failure
6
11
  */
7
12
  export declare abstract class BWellTransactionResult<T, E extends BWellError = BWellError> {
8
13
  /**
@@ -25,10 +30,10 @@ export declare abstract class BWellTransactionResult<T, E extends BWellError = B
25
30
  abstract data(): T;
26
31
  /**
27
32
  * If Result is a `BWellTransactionFailure` returns `E`;
28
- * Throws `E` if result is `BWellTransactionSuccess`
33
+ * Throws `T` if result is `BWellTransactionSuccess`
29
34
  *
30
35
  * @returns {E}
31
- * @throw {T}
36
+ * @throws {T}
32
37
  */
33
38
  abstract error(): E;
34
39
  /**
@@ -49,6 +54,10 @@ export declare abstract class BWellTransactionResult<T, E extends BWellError = B
49
54
  /**
50
55
  * Class representing a successful operation whose result can only be a success
51
56
  * and never a failure
57
+ *
58
+ * @typeParam T - The type of the successful result value
59
+ * @title BWellTransactionSuccess
60
+ * @excerpt Class representing a successful operation whose result can only be a success and never a failure
52
61
  */
53
62
  export declare class BWellTransactionSuccess<T> extends BWellTransactionResult<T, never> {
54
63
  #private;
@@ -61,7 +70,12 @@ export declare class BWellTransactionSuccess<T> extends BWellTransactionResult<T
61
70
  }
62
71
  /**
63
72
  * Class representing a failed operation whose result can only be a failure
64
- * and never a failure
73
+ * and never a success
74
+ *
75
+ * @typeParam T - The type of the successful result value (unused in failure)
76
+ * @typeParam E - The type of the error, must extend BWellError (defaults to BWellError)
77
+ * @title BWellTransactionFailure
78
+ * @excerpt Class representing a failed operation whose result can only be a failure and never a success
65
79
  */
66
80
  export declare class BWellTransactionFailure<T, E extends BWellError = BWellError> extends BWellTransactionResult<T, E> {
67
81
  #private;
@@ -14,6 +14,11 @@ import { BWellQueryResult } from "./bwell-query-result.js";
14
14
  /**
15
15
  * Class representing a successful operation whose result can only be a success
16
16
  * or a failure.
17
+ *
18
+ * @typeParam T - The type of the successful result value
19
+ * @typeParam E - The type of the error, must extend BWellError (defaults to BWellError)
20
+ * @title BWellTransactionResult
21
+ * @excerpt Class representing a successful operation whose result can only be a success or a failure
17
22
  */
18
23
  export class BWellTransactionResult {
19
24
  /**
@@ -32,6 +37,10 @@ export class BWellTransactionResult {
32
37
  /**
33
38
  * Class representing a successful operation whose result can only be a success
34
39
  * and never a failure
40
+ *
41
+ * @typeParam T - The type of the successful result value
42
+ * @title BWellTransactionSuccess
43
+ * @excerpt Class representing a successful operation whose result can only be a success and never a failure
35
44
  */
36
45
  export class BWellTransactionSuccess extends BWellTransactionResult {
37
46
  constructor(data) {
@@ -58,7 +67,12 @@ export class BWellTransactionSuccess extends BWellTransactionResult {
58
67
  _BWellTransactionSuccess_data = new WeakMap();
59
68
  /**
60
69
  * Class representing a failed operation whose result can only be a failure
61
- * and never a failure
70
+ * and never a success
71
+ *
72
+ * @typeParam T - The type of the successful result value (unused in failure)
73
+ * @typeParam E - The type of the error, must extend BWellError (defaults to BWellError)
74
+ * @title BWellTransactionFailure
75
+ * @excerpt Class representing a failed operation whose result can only be a failure and never a success
62
76
  */
63
77
  export class BWellTransactionFailure extends BWellTransactionResult {
64
78
  constructor(error) {
@@ -1,3 +1,4 @@
1
1
  export * from "./bwell-query-result.js";
2
2
  export * from "./bwell-transaction-result.js";
3
3
  export * from "./bwell-query-result-factory.js";
4
+ export * from "./operation-outcome.js";
@@ -1,3 +1,4 @@
1
1
  export * from "./bwell-query-result.js";
2
2
  export * from "./bwell-transaction-result.js";
3
3
  export * from "./bwell-query-result-factory.js";
4
+ export * from "./operation-outcome.js";
@@ -31,10 +31,7 @@ export function getRuntimeInstrumentation(config) {
31
31
  browser: () => {
32
32
  return new XMLHttpRequestInstrumentation({
33
33
  ignoreUrls: [IGNORE_URL_REGEX],
34
- propagateTraceHeaderCorsUrls: [
35
- config.graphQL.apiUrl,
36
- config.graphQL.unauthApiUrl,
37
- ],
34
+ propagateTraceHeaderCorsUrls: [config.graphQL.apiUrl],
38
35
  });
39
36
  },
40
37
  });
@@ -1,2 +1,4 @@
1
1
  export * from "./jwt-token-manager.js";
2
2
  export * from "./token-storage.js";
3
+ export * from "./token-manager.js";
4
+ export { loadAuthTokens } from "./load-auth-tokens.js";
@@ -1,2 +1,4 @@
1
1
  export * from "./jwt-token-manager.js";
2
2
  export * from "./token-storage.js";
3
+ export * from "./token-manager.js";
4
+ export { loadAuthTokens } from "./load-auth-tokens.js";
@@ -1,7 +1,8 @@
1
1
  import { IdentityManager } from "../api/base/identity/index.js";
2
- import { InvalidTokenError, OperationOutcomeError } from "../errors/index.js";
2
+ import { BWellError, InvalidTokenError, OperationOutcomeError } from "../errors/index.js";
3
3
  import { LoggerProvider } from "../logger/index.js";
4
4
  import { BWellTransactionResult } from "../results/index.js";
5
+ import { TokenManager } from "./token-manager.js";
5
6
  import { TokenStorage } from "./token-storage.js";
6
7
  export type TokenManagerConfig = {
7
8
  accessToken: string;
@@ -9,11 +10,6 @@ export type TokenManagerConfig = {
9
10
  clientKey: string;
10
11
  refreshToken: string;
11
12
  };
12
- export interface TokenManager {
13
- getAccessToken(): Promise<BWellTransactionResult<string, OperationOutcomeError | InvalidTokenError>>;
14
- refreshAccessToken(): Promise<BWellTransactionResult<null, OperationOutcomeError | InvalidTokenError>>;
15
- getIdToken(): Promise<string | undefined>;
16
- }
17
13
  export declare class JWTTokenManager implements TokenManager {
18
14
  #private;
19
15
  private constructor();
@@ -27,7 +23,7 @@ export declare class JWTTokenManager implements TokenManager {
27
23
  *
28
24
  * @returns {BWellTransactionResult<JWTTokenManager, InvalidTokenError>}
29
25
  */
30
- static initialize(config: TokenManagerConfig, identManager: IdentityManager, loggerProvider?: LoggerProvider, tokenStorage?: TokenStorage): Promise<BWellTransactionResult<JWTTokenManager, InvalidTokenError>>;
26
+ static initialize(config: TokenManagerConfig, identManager: IdentityManager, loggerProvider?: LoggerProvider, tokenStorage?: TokenStorage): Promise<BWellTransactionResult<JWTTokenManager, InvalidTokenError | BWellError>>;
31
27
  getAccessToken(): Promise<BWellTransactionResult<string, OperationOutcomeError | InvalidTokenError>>;
32
28
  getIdToken(): Promise<string | undefined>;
33
29
  refreshAccessToken(): Promise<BWellTransactionResult<null, OperationOutcomeError | InvalidTokenError>>;
@@ -23,6 +23,7 @@ import { BWellError, InvalidTokenError, } from "../errors/index.js";
23
23
  import { ConsoleLoggerProvider, } from "../logger/index.js";
24
24
  import { BWellTransactionResult } from "../results/index.js";
25
25
  import { isUndefined, parseTokenExpiration } from "../utils/index.js";
26
+ import { ACCESS_TOKEN_STORAGE_KEY, CLIENT_KEY_STORAGE_KEY, EXPRIATION_TOKEN_STORAGE_KEY, ID_TOKEN_STORAGE_KEY, REFRESH_TOKEN_STORAGE_KEY, } from "./token-manager.js";
26
27
  import { InMemoryTokenStorage } from "./token-storage.js";
27
28
  export class JWTTokenManager {
28
29
  constructor(config, identManager, loggerProvider, tokenStorage) {
@@ -52,16 +53,16 @@ export class JWTTokenManager {
52
53
  }
53
54
  const tokenManager = new _a(Object.assign(Object.assign({}, config), { expiration: expirationResult.data() }), identManager, loggerProvider, tokenStorage);
54
55
  try {
55
- yield Promise.all([
56
- tokenStorage.set("idToken", config.idToken),
57
- tokenStorage.set("clientKey", config.clientKey),
58
- tokenStorage.set("accessToken", config.accessToken),
59
- tokenStorage.set("refreshToken", config.refreshToken),
60
- tokenStorage.set("expiration", expirationResult.data().toISOString()),
56
+ yield tokenStorage.setMany([
57
+ [ID_TOKEN_STORAGE_KEY, config.idToken],
58
+ [CLIENT_KEY_STORAGE_KEY, config.clientKey],
59
+ [ACCESS_TOKEN_STORAGE_KEY, config.accessToken],
60
+ [REFRESH_TOKEN_STORAGE_KEY, config.refreshToken],
61
+ [EXPRIATION_TOKEN_STORAGE_KEY, expirationResult.data().toISOString()],
61
62
  ]);
62
63
  }
63
- catch (_b) {
64
- return BWellTransactionResult.failure(new InvalidTokenError("Failed to set tokens in token storage"));
64
+ catch (e) {
65
+ return BWellTransactionResult.failure(new BWellError("Failed to set tokens in token storage", { cause: e }));
65
66
  }
66
67
  return BWellTransactionResult.success(tokenManager);
67
68
  });
@@ -0,0 +1,6 @@
1
+ import { BWellError } from "../errors/bwell-error.js";
2
+ import { InvalidTokenError } from "../errors/invalid-token-error.js";
3
+ import { AuthTokens } from "../models/identity/index.js";
4
+ import { BWellTransactionResult } from "../results/index.js";
5
+ import { TokenStorage } from "./token-storage.js";
6
+ export declare function loadAuthTokens(storage: TokenStorage): Promise<BWellTransactionResult<AuthTokens, InvalidTokenError | BWellError>>;
@@ -0,0 +1,43 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { BWellError } from "../errors/bwell-error.js";
11
+ import { InvalidTokenError } from "../errors/invalid-token-error.js";
12
+ import { BWellTransactionResult } from "../results/index.js";
13
+ import { isNullOrUndefinedOrEmptyString } from "../utils/type-utils.js";
14
+ import * as tm from "./token-manager.js";
15
+ export function loadAuthTokens(storage) {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ let results;
18
+ try {
19
+ results = yield storage.getMany([
20
+ tm.ACCESS_TOKEN_STORAGE_KEY,
21
+ tm.ID_TOKEN_STORAGE_KEY,
22
+ tm.REFRESH_TOKEN_STORAGE_KEY,
23
+ ]);
24
+ }
25
+ catch (e) {
26
+ return BWellTransactionResult.failure(new BWellError("Error loading credentials froms torage", { cause: e }));
27
+ }
28
+ const [accessTokenKV = [], idTokenKV = [], refreshTokenKV = []] = results;
29
+ const [, accessToken] = accessTokenKV;
30
+ const [, idToken] = idTokenKV;
31
+ const [, refreshToken] = refreshTokenKV;
32
+ if (isNullOrUndefinedOrEmptyString(accessToken) ||
33
+ isNullOrUndefinedOrEmptyString(idToken) ||
34
+ isNullOrUndefinedOrEmptyString(refreshToken)) {
35
+ return BWellTransactionResult.failure(new InvalidTokenError("Credentials could not be loaded from token storage"));
36
+ }
37
+ return BWellTransactionResult.success({
38
+ accessToken,
39
+ idToken,
40
+ refreshToken,
41
+ });
42
+ });
43
+ }
@@ -0,0 +1,12 @@
1
+ import { InvalidTokenError, OperationOutcomeError } from "../errors/index.js";
2
+ import { BWellTransactionResult } from "../results/index.js";
3
+ export declare const ID_TOKEN_STORAGE_KEY = "idToken";
4
+ export declare const CLIENT_KEY_STORAGE_KEY = "clientKey";
5
+ export declare const ACCESS_TOKEN_STORAGE_KEY = "accessToken";
6
+ export declare const REFRESH_TOKEN_STORAGE_KEY = "refreshToken";
7
+ export declare const EXPRIATION_TOKEN_STORAGE_KEY = "expiration";
8
+ export interface TokenManager {
9
+ getAccessToken(): Promise<BWellTransactionResult<string, OperationOutcomeError | InvalidTokenError>>;
10
+ refreshAccessToken(): Promise<BWellTransactionResult<null, OperationOutcomeError | InvalidTokenError>>;
11
+ getIdToken(): Promise<string | undefined>;
12
+ }
@@ -0,0 +1,5 @@
1
+ export const ID_TOKEN_STORAGE_KEY = "idToken";
2
+ export const CLIENT_KEY_STORAGE_KEY = "clientKey";
3
+ export const ACCESS_TOKEN_STORAGE_KEY = "accessToken";
4
+ export const REFRESH_TOKEN_STORAGE_KEY = "refreshToken";
5
+ export const EXPRIATION_TOKEN_STORAGE_KEY = "expiration";
@@ -1,7 +1,10 @@
1
+ export type GetManyResult = [string, string | undefined];
1
2
  /**
2
3
  * Interface for storing tokens.
3
4
  * We might want to store more than one kind of token, so the interface is for a key-value store.
4
5
  * All methods are asynchronous, in cases of storage in the cloud, over the network, in a multi-step process, etc.
6
+ * @title TokenStorage
7
+ * @excerpt Interface for storing tokens
5
8
  */
6
9
  export interface TokenStorage {
7
10
  /**
@@ -9,12 +12,25 @@ export interface TokenStorage {
9
12
  * @param key The key to look up the value.
10
13
  */
11
14
  get(key: string): Promise<string | undefined>;
15
+ /**
16
+ * Gets all keys at once. Returns list of key value pairs where the value is
17
+ * `undefined` if not found.
18
+ *
19
+ * @param keys - List of keys to fetch.
20
+ */
21
+ getMany(keys: string[]): Promise<GetManyResult[]>;
12
22
  /**
13
23
  * Set the value for a key.
14
24
  * @param key The key to set the value.
15
25
  * @param value The value to set.
16
26
  */
17
27
  set(key: string, value: string): Promise<void>;
28
+ /**
29
+ * Sets many values at once.
30
+ *
31
+ * @param keyValues - List of key value pairs to set
32
+ */
33
+ setMany(keyValues: [string, string][]): Promise<void>;
18
34
  /**
19
35
  * Delete the value for a key.
20
36
  * @param key The key to delete the value.
@@ -23,11 +39,15 @@ export interface TokenStorage {
23
39
  }
24
40
  /**
25
41
  * Default token storage implementation that stores tokens in memory.
42
+ * @title InMemoryTokenStorage
43
+ * @excerpt Default token storage implementation that stores tokens in memory
26
44
  */
27
45
  export declare class InMemoryTokenStorage {
28
46
  private storage;
29
47
  constructor(storage?: Map<string, string>);
30
48
  get(key: string): Promise<string | undefined>;
49
+ getMany(keys: string[]): Promise<GetManyResult[]>;
31
50
  set(key: string, value: string): Promise<void>;
51
+ setMany(keyValues: [string, string][]): Promise<void>;
32
52
  delete(key: string): Promise<boolean>;
33
53
  }
@@ -9,6 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  /**
11
11
  * Default token storage implementation that stores tokens in memory.
12
+ * @title InMemoryTokenStorage
13
+ * @excerpt Default token storage implementation that stores tokens in memory
12
14
  */
13
15
  export class InMemoryTokenStorage {
14
16
  constructor(storage = new Map()) {
@@ -19,11 +21,28 @@ export class InMemoryTokenStorage {
19
21
  return this.storage.get(key);
20
22
  });
21
23
  }
24
+ getMany(keys) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ const results = [];
27
+ for (let i = 0; i < keys.length; i++) {
28
+ const key = keys[i];
29
+ results[i] = [key, this.storage.get(key)];
30
+ }
31
+ return results;
32
+ });
33
+ }
22
34
  set(key, value) {
23
35
  return __awaiter(this, void 0, void 0, function* () {
24
36
  this.storage.set(key, value);
25
37
  });
26
38
  }
39
+ setMany(keyValues) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ for (const [k, v] of keyValues) {
42
+ this.storage.set(k, v);
43
+ }
44
+ });
45
+ }
27
46
  delete(key) {
28
47
  return __awaiter(this, void 0, void 0, function* () {
29
48
  return this.storage.delete(key);
@@ -1,7 +1,7 @@
1
1
  export * from "./base64.js";
2
- export * from "./date-utils.js";
3
2
  export * from "./parsing-utils.js";
4
3
  export * from "./runtime.js";
5
4
  export * from "./string-utils.js";
6
5
  export * from "./type-utils.js";
7
6
  export * from "./version.js";
7
+ export * from "./search-token-utils.js";
@@ -1,7 +1,7 @@
1
1
  export * from "./base64.js";
2
- export * from "./date-utils.js";
3
2
  export * from "./parsing-utils.js";
4
3
  export * from "./runtime.js";
5
4
  export * from "./string-utils.js";
6
5
  export * from "./type-utils.js";
7
6
  export * from "./version.js";
7
+ export * from "./search-token-utils.js";
@@ -1,4 +1,6 @@
1
- import type { User } from "../models/index.js";
1
+ import { IllegalArgumentError } from "../errors/index.js";
2
+ import { BWellTransactionResult } from "../index.js";
3
+ import type { Coding, User } from "../models/index.js";
2
4
  export declare function retrieveEnvironmentFromClientKey(clientKey: string): string;
3
5
  /**
4
6
  * Returns the JSON parsed payload section of a JWT
@@ -24,3 +26,11 @@ export declare function parseTokenExpiration(token: string): number;
24
26
  * @throws {InvalidTokenError} if token is invalid base64, JWT or JSON payload
25
27
  */
26
28
  export declare function parseUserFromIdToken(token: string): User | null;
29
+ /**
30
+ * Parse string to JSON array of coding objects.
31
+ * @param {string} json - JSON array string
32
+ * @returns {Coding[]} parsed coding objects
33
+ * @throws {BWellError} If parsing fails
34
+ * @throw {BWellError} If coding is missing code or system
35
+ */
36
+ export declare function parseJSONCodings(json: string): BWellTransactionResult<Coding[], IllegalArgumentError>;