@icanbwell/bwell-sdk-ts 2.0.0-alpha.0-rc.1754330797 → 2.0.0-alpha.0-rc.1754488327

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 (292) hide show
  1. package/README.md +17 -1
  2. package/dist/__version__.d.ts +1 -1
  3. package/dist/__version__.js +1 -1
  4. package/dist/api/base/connection/connection-manager.d.ts +55 -49
  5. package/dist/api/base/connection/connection-manager.js +3 -0
  6. package/dist/api/base/connection/connection-request.d.ts +15 -1
  7. package/dist/api/base/connection/connection-request.js +8 -0
  8. package/dist/api/base/connection/index.d.ts +1 -2
  9. package/dist/api/base/health-data/health-data-request.d.ts +105 -0
  10. package/dist/api/base/health-data/health-data-request.js +81 -0
  11. package/dist/api/base/health-data/health-manager.d.ts +104 -64
  12. package/dist/api/base/health-data/index.d.ts +1 -1
  13. package/dist/api/base/health-data/lab-knowledge-request.d.ts +9 -0
  14. package/dist/api/base/health-data/lab-knowledge-request.js +3 -0
  15. package/dist/api/base/health-data/medication-knowledge-request.d.ts +9 -0
  16. package/dist/api/base/health-data/medication-knowledge-request.js +3 -0
  17. package/dist/api/base/health-data/medication-pricing-request.d.ts +9 -0
  18. package/dist/api/base/health-data/medication-pricing-request.js +3 -0
  19. package/dist/api/base/health-space/appointments-request.d.ts +9 -0
  20. package/dist/api/base/health-space/appointments-request.js +3 -0
  21. package/dist/api/base/health-space/cancel-appointment-request.d.ts +8 -1
  22. package/dist/api/base/health-space/cancel-appointment-request.js +4 -0
  23. package/dist/api/base/health-space/cancellation-reasons-request.d.ts +28 -0
  24. package/dist/api/base/health-space/{cancelationReasons-request.js → cancellation-reasons-request.js} +10 -4
  25. package/dist/api/base/health-space/health-space-manager.d.ts +33 -24
  26. package/dist/api/base/health-space/index.d.ts +2 -2
  27. package/dist/api/base/health-space/index.js +1 -1
  28. package/dist/api/base/identity/identity-manager.d.ts +97 -10
  29. package/dist/api/base/questionnaire/index.d.ts +1 -1
  30. package/dist/api/base/questionnaire/next-question-request.d.ts +8 -2
  31. package/dist/api/base/questionnaire/next-question-request.js +4 -1
  32. package/dist/api/base/questionnaire/questionnaire-manager.d.ts +16 -9
  33. package/dist/api/base/requests/search-date.d.ts +12 -0
  34. package/dist/api/base/requests/search-string.d.ts +6 -0
  35. package/dist/api/base/requests/search-token.d.ts +18 -0
  36. package/dist/api/base/user/create-consent-request.d.ts +13 -1
  37. package/dist/api/base/user/create-consent-request.js +8 -3
  38. package/dist/api/base/user/create-verification-url-request.d.ts +12 -0
  39. package/dist/api/base/user/create-verification-url-request.js +6 -0
  40. package/dist/api/base/user/get-consents-request.d.ts +19 -1
  41. package/dist/api/base/user/get-consents-request.js +13 -1
  42. package/dist/api/base/user/index.d.ts +1 -2
  43. package/dist/api/base/user/update-profile-request.d.ts +11 -3
  44. package/dist/api/base/user/update-profile-request.js +5 -3
  45. package/dist/api/base/user/user-manager.d.ts +50 -55
  46. package/dist/api/base/user/validators.d.ts +5 -0
  47. package/dist/api/base/user/validators.js +13 -0
  48. package/dist/api/graphql-api/connection/connection-response-factory.d.ts +1 -1
  49. package/dist/api/graphql-api/connection/connection-response-factory.js +1 -4
  50. package/dist/api/graphql-api/connection/graphql-connection-manager.d.ts +7 -6
  51. package/dist/api/graphql-api/connection/graphql-connection-manager.js +6 -3
  52. package/dist/api/graphql-api/errors/errors.js +1 -1
  53. package/dist/api/graphql-api/health-space/cancel-appointment-request-factory.js +1 -2
  54. package/dist/api/graphql-api/health-space/graphql-health-space-manager.d.ts +5 -4
  55. package/dist/api/graphql-api/health-space/graphql-health-space-manager.js +7 -6
  56. package/dist/api/graphql-api/healthdata/graphql-health-manager.d.ts +13 -12
  57. package/dist/api/graphql-api/identity/graphql-identity-manager.d.ts +2 -1
  58. package/dist/api/graphql-api/identity/graphql-identity-manager.js +4 -2
  59. package/dist/api/graphql-api/questionnaire/graphql-questionnaire-manager.d.ts +3 -2
  60. package/dist/api/graphql-api/questionnaire/graphql-questionnaire-manager.js +2 -1
  61. package/dist/api/graphql-api/user/graphql-user-manager.d.ts +7 -7
  62. package/dist/api/graphql-api/user/graphql-user-manager.js +7 -4
  63. package/dist/api/graphql-api/user/update-profile-request-factory.js +1 -2
  64. package/dist/auth/auth-code-strategy.d.ts +2 -1
  65. package/dist/auth/auth-strategy.d.ts +1 -1
  66. package/dist/auth/oauth-strategy.d.ts +2 -1
  67. package/dist/auth/username-password-strategy.d.ts +2 -1
  68. package/dist/bwell-sdk/bwell-sdk.d.ts +289 -33
  69. package/dist/bwell-sdk/bwell-sdk.js +294 -30
  70. package/dist/config/bwell-config.d.ts +8 -2
  71. package/dist/config/bwell-config.js +1 -3
  72. package/dist/config/sdk-config.d.ts +1 -1
  73. package/dist/errors/authentication-error.d.ts +7 -0
  74. package/dist/errors/authentication-error.js +7 -0
  75. package/dist/errors/bwell-error.d.ts +12 -2
  76. package/dist/errors/bwell-error.js +5 -2
  77. package/dist/errors/illegal-argument-error.d.ts +7 -0
  78. package/dist/errors/illegal-argument-error.js +7 -0
  79. package/dist/errors/illegal-state-error.d.ts +7 -0
  80. package/dist/errors/illegal-state-error.js +7 -0
  81. package/dist/errors/invalid-client-key-error.d.ts +7 -0
  82. package/dist/errors/invalid-client-key-error.js +7 -0
  83. package/dist/errors/invalid-credentials-type-error.d.ts +7 -0
  84. package/dist/errors/invalid-credentials-type-error.js +7 -0
  85. package/dist/errors/invalid-token-error.d.ts +4 -1
  86. package/dist/errors/invalid-token-error.js +4 -1
  87. package/dist/errors/network-error.d.ts +7 -0
  88. package/dist/errors/network-error.js +7 -0
  89. package/dist/errors/operation-outcome-error.d.ts +8 -1
  90. package/dist/errors/operation-outcome-error.js +7 -0
  91. package/dist/errors/unknown-error.d.ts +7 -0
  92. package/dist/errors/unknown-error.js +7 -0
  93. package/dist/errors/validation-error.d.ts +7 -0
  94. package/dist/errors/validation-error.js +7 -0
  95. package/dist/graphql/operations/index.d.ts +30 -30
  96. package/dist/graphql/operations/index.js +6 -4
  97. package/dist/graphql/operations/types.d.ts +242 -6
  98. package/dist/graphql/schema.d.ts +90 -277
  99. package/dist/graphql/schema.js +1 -369
  100. package/dist/index.d.ts +7 -5
  101. package/dist/index.js +5 -4
  102. package/dist/language/language-manager.d.ts +25 -10
  103. package/dist/language/language-manager.js +5 -0
  104. package/dist/models/common/address.d.ts +41 -0
  105. package/dist/models/common/annotation.d.ts +18 -0
  106. package/dist/models/common/attachment.d.ts +18 -0
  107. package/dist/models/common/bundle.d.ts +59 -0
  108. package/dist/models/common/codeable-concept.d.ts +17 -0
  109. package/dist/models/common/codeable-concept.js +1 -0
  110. package/dist/models/common/coding.d.ts +18 -0
  111. package/dist/models/common/coding.js +1 -0
  112. package/dist/models/common/component.d.ts +23 -0
  113. package/dist/models/common/component.js +1 -0
  114. package/dist/models/common/contact-point.d.ts +28 -0
  115. package/dist/models/common/contact-point.js +1 -0
  116. package/dist/models/common/expression.d.ts +20 -0
  117. package/dist/models/common/expression.js +1 -0
  118. package/dist/models/common/extension.d.ts +47 -0
  119. package/dist/models/common/extension.js +1 -0
  120. package/dist/models/common/fhir-error.d.ts +23 -0
  121. package/dist/models/common/fhir-error.js +1 -0
  122. package/dist/models/common/human-name.d.ts +20 -0
  123. package/dist/models/common/human-name.js +1 -0
  124. package/dist/models/common/identifier.d.ts +19 -0
  125. package/dist/models/common/identifier.js +1 -0
  126. package/dist/models/common/index.d.ts +23 -0
  127. package/dist/models/common/index.js +2 -0
  128. package/dist/models/common/location.d.ts +44 -0
  129. package/dist/models/common/location.js +1 -0
  130. package/dist/models/common/meta.d.ts +21 -0
  131. package/dist/models/common/meta.js +1 -0
  132. package/dist/models/common/narrative.d.ts +14 -0
  133. package/dist/models/common/narrative.js +1 -0
  134. package/dist/models/common/operation-outcome.d.ts +48 -0
  135. package/dist/models/common/operation-outcome.js +1 -0
  136. package/dist/models/common/paging-info.d.ts +18 -0
  137. package/dist/models/common/paging-info.js +1 -0
  138. package/dist/models/common/period.d.ts +14 -0
  139. package/dist/models/common/period.js +1 -0
  140. package/dist/models/common/quantity.d.ts +20 -0
  141. package/dist/models/common/quantity.js +1 -0
  142. package/dist/models/common/range.d.ts +15 -0
  143. package/dist/models/common/range.js +1 -0
  144. package/dist/models/common/ratio.d.ts +15 -0
  145. package/dist/models/common/ratio.js +1 -0
  146. package/dist/models/common/reference-range.d.ts +13 -0
  147. package/dist/models/common/reference-range.js +1 -0
  148. package/dist/models/common/reference.d.ts +26 -0
  149. package/dist/models/common/reference.js +1 -0
  150. package/dist/models/connection/base-connection.d.ts +27 -0
  151. package/dist/models/connection/base-connection.js +1 -0
  152. package/dist/models/connection/connection-status.d.ts +15 -0
  153. package/dist/models/connection/connection-status.js +1 -0
  154. package/dist/models/connection/connection.d.ts +32 -0
  155. package/dist/models/connection/connection.js +1 -0
  156. package/dist/models/connection/data-source.d.ts +27 -0
  157. package/dist/models/connection/data-source.js +1 -0
  158. package/dist/models/connection/index.d.ts +6 -0
  159. package/dist/models/connection/index.js +1 -0
  160. package/dist/models/connection/member-connection.d.ts +25 -0
  161. package/dist/models/connection/member-connection.js +1 -0
  162. package/dist/models/connection/oauth-url.d.ts +12 -0
  163. package/dist/models/connection/oauth-url.js +1 -0
  164. package/dist/models/enums/category-code.d.ts +11 -0
  165. package/dist/models/enums/category-code.js +13 -0
  166. package/dist/models/enums/connection-category.d.ts +9 -0
  167. package/dist/models/enums/connection-category.js +1 -0
  168. package/dist/models/enums/consent-provision-type.d.ts +11 -0
  169. package/dist/models/enums/consent-provision-type.js +2 -0
  170. package/dist/models/enums/consent-status.d.ts +11 -0
  171. package/dist/models/enums/consent-status.js +9 -0
  172. package/dist/models/enums/data-connection-status.d.ts +9 -0
  173. package/dist/models/enums/data-connection-status.js +1 -0
  174. package/dist/models/enums/data-connection-type.d.ts +9 -0
  175. package/dist/models/enums/data-connection-type.js +1 -0
  176. package/dist/models/enums/index.d.ts +9 -0
  177. package/dist/models/enums/index.js +4 -0
  178. package/dist/models/enums/log-level.d.ts +8 -0
  179. package/dist/models/enums/log-level.js +1 -0
  180. package/dist/models/enums/person-gender.d.ts +11 -0
  181. package/dist/models/enums/person-gender.js +7 -0
  182. package/dist/models/enums/sync-status.d.ts +9 -0
  183. package/dist/models/enums/sync-status.js +1 -0
  184. package/dist/models/health-data/allergy-intolerance-bundle.d.ts +11 -0
  185. package/dist/models/health-data/allergy-intolerance-bundle.js +1 -0
  186. package/dist/models/health-data/allergy-intolerance-entry.d.ts +11 -0
  187. package/dist/models/health-data/allergy-intolerance-entry.js +1 -0
  188. package/dist/models/health-data/allergy-intolerance-group.d.ts +36 -0
  189. package/dist/models/health-data/allergy-intolerance-group.js +1 -0
  190. package/dist/models/health-data/allergy-intolerance-reaction.d.ts +23 -0
  191. package/dist/models/health-data/allergy-intolerance-reaction.js +1 -0
  192. package/dist/models/health-data/allergy-intolerance.d.ts +46 -0
  193. package/dist/models/health-data/allergy-intolerance.js +1 -0
  194. package/dist/models/health-data/care-plan-group.d.ts +34 -0
  195. package/dist/models/health-data/care-plan-group.js +1 -0
  196. package/dist/models/health-data/condition-group.d.ts +34 -0
  197. package/dist/models/health-data/condition-group.js +1 -0
  198. package/dist/models/health-data/diagnostic-report-lab-group.d.ts +37 -0
  199. package/dist/models/health-data/diagnostic-report-lab-group.js +1 -0
  200. package/dist/models/health-data/encounter-group.d.ts +40 -0
  201. package/dist/models/health-data/encounter-group.js +1 -0
  202. package/dist/models/health-data/health-summary.d.ts +18 -0
  203. package/dist/models/health-data/health-summary.js +1 -0
  204. package/dist/models/health-data/immunization-group.d.ts +33 -0
  205. package/dist/models/health-data/immunization-group.js +1 -0
  206. package/dist/models/health-data/index.d.ts +15 -0
  207. package/dist/models/health-data/index.js +1 -0
  208. package/dist/models/health-data/lab-group.d.ts +43 -0
  209. package/dist/models/health-data/lab-group.js +1 -0
  210. package/dist/models/health-data/medication-group.d.ts +35 -0
  211. package/dist/models/health-data/medication-group.js +1 -0
  212. package/dist/models/health-data/procedure-group.d.ts +35 -0
  213. package/dist/models/health-data/procedure-group.js +1 -0
  214. package/dist/models/health-data/vital-sign-group.d.ts +43 -0
  215. package/dist/models/health-data/vital-sign-group.js +1 -0
  216. package/dist/models/health-space/appointment-bundle.d.ts +11 -0
  217. package/dist/models/health-space/appointment-bundle.js +1 -0
  218. package/dist/models/health-space/appointment-entry.d.ts +11 -0
  219. package/dist/models/health-space/appointment-entry.js +1 -0
  220. package/dist/models/health-space/appointment-participant.d.ts +17 -0
  221. package/dist/models/health-space/appointment-participant.js +1 -0
  222. package/dist/models/health-space/appointment-update.d.ts +14 -0
  223. package/dist/models/health-space/appointment-update.js +1 -0
  224. package/dist/models/health-space/appointment.d.ts +30 -0
  225. package/dist/models/health-space/appointment.js +1 -0
  226. package/dist/models/health-space/cancellation-reasons.d.ts +32 -0
  227. package/dist/models/health-space/cancellation-reasons.js +1 -0
  228. package/dist/models/health-space/index.d.ts +6 -0
  229. package/dist/models/health-space/index.js +1 -0
  230. package/dist/models/identity/auth-tokens.d.ts +25 -0
  231. package/dist/models/identity/auth-tokens.js +1 -0
  232. package/dist/models/identity/create-guest-access-token-results.d.ts +12 -0
  233. package/dist/models/identity/create-guest-access-token-results.js +1 -0
  234. package/dist/models/identity/index.d.ts +4 -0
  235. package/dist/models/identity/index.js +1 -0
  236. package/dist/models/identity/refresh-token-results.d.ts +8 -0
  237. package/dist/models/identity/refresh-token-results.js +1 -0
  238. package/dist/models/identity/sdk-configuration-result.d.ts +27 -0
  239. package/dist/models/identity/sdk-configuration-result.js +1 -0
  240. package/dist/models/index.d.ts +7 -4
  241. package/dist/models/index.js +7 -4
  242. package/dist/models/questionnaire/index.d.ts +5 -0
  243. package/dist/models/questionnaire/index.js +1 -0
  244. package/dist/models/questionnaire/questionnaire-item.d.ts +38 -0
  245. package/dist/models/questionnaire/questionnaire-item.js +1 -0
  246. package/dist/models/questionnaire/questionnaire-response-answer.d.ts +33 -0
  247. package/dist/models/questionnaire/questionnaire-response-answer.js +1 -0
  248. package/dist/models/questionnaire/questionnaire-response-item.d.ts +19 -0
  249. package/dist/models/questionnaire/questionnaire-response-item.js +1 -0
  250. package/dist/models/questionnaire/questionnaire-response.d.ts +29 -0
  251. package/dist/models/questionnaire/questionnaire-response.js +1 -0
  252. package/dist/models/questionnaire/questionnaire.d.ts +30 -0
  253. package/dist/models/questionnaire/questionnaire.js +1 -0
  254. package/dist/models/user/consent.d.ts +91 -0
  255. package/dist/models/user/consent.js +1 -0
  256. package/dist/models/user/index.d.ts +4 -0
  257. package/dist/models/user/index.js +1 -0
  258. package/dist/models/user/person.d.ts +43 -0
  259. package/dist/models/user/person.js +1 -0
  260. package/dist/models/user/user.d.ts +12 -0
  261. package/dist/models/user/user.js +1 -0
  262. package/dist/models/user/verification-result.d.ts +30 -0
  263. package/dist/models/user/verification-result.js +1 -0
  264. package/dist/requests/paged-request.d.ts +35 -0
  265. package/dist/requests/paged-request.js +22 -0
  266. package/dist/requests/request.d.ts +16 -0
  267. package/dist/requests/request.js +8 -0
  268. package/dist/requests/validator.d.ts +15 -0
  269. package/dist/requests/validator.js +7 -0
  270. package/dist/results/bwell-query-result.d.ts +5 -0
  271. package/dist/results/bwell-query-result.js +5 -0
  272. package/dist/results/bwell-transaction-result.d.ts +17 -3
  273. package/dist/results/bwell-transaction-result.js +15 -1
  274. package/dist/results/index.d.ts +1 -0
  275. package/dist/results/index.js +1 -0
  276. package/dist/tokens/load-auth-tokens.d.ts +1 -1
  277. package/dist/tokens/token-storage.d.ts +4 -0
  278. package/dist/tokens/token-storage.js +2 -0
  279. package/package.json +5 -2
  280. package/dist/api/base/connection/connection.d.ts +0 -19
  281. package/dist/api/base/health-space/cancelationReasons-request.d.ts +0 -16
  282. package/dist/api/base/user/types.d.ts +0 -9
  283. package/dist/api/base/user/types.js +0 -17
  284. package/dist/models/coding.d.ts +0 -5
  285. package/dist/models/fhir-error.d.ts +0 -9
  286. package/dist/models/user.d.ts +0 -4
  287. /package/dist/{api/base/connection/connection.js → models/common/address.js} +0 -0
  288. /package/dist/models/{coding.js → common/annotation.js} +0 -0
  289. /package/dist/models/{fhir-error.js → common/attachment.js} +0 -0
  290. /package/dist/models/{user.js → common/bundle.js} +0 -0
  291. /package/dist/{models → results}/operation-outcome.d.ts +0 -0
  292. /package/dist/{models → results}/operation-outcome.js +0 -0
@@ -0,0 +1,91 @@
1
+ import type { CodeableConcept, Meta, Period, Reference } from "../common/index.js";
2
+ /**
3
+ * A record of a healthcare consumer's choices or choices made on their behalf by a third party.
4
+ * Captures permissions, prohibitions and obligations with respect to access to or use of a resource.
5
+ *
6
+ * @category Models
7
+ * @title Consent
8
+ * @excerpt Healthcare consumer consent permissions and obligations
9
+ */
10
+ export type Consent = {
11
+ /**
12
+ * The logical id of the resource, as used in the URL for the resource.
13
+ */
14
+ id: string;
15
+ /**
16
+ * Indicates the current state of this consent.
17
+ */
18
+ status: string | null;
19
+ /**
20
+ * When this Consent was created or indexed.
21
+ */
22
+ dateTime: string | null;
23
+ /**
24
+ * Metadata about the resource.
25
+ */
26
+ meta: Meta | null;
27
+ /**
28
+ * A selector of the type of consent being presented.
29
+ */
30
+ scope: CodeableConcept | null;
31
+ /**
32
+ * A classification of the type of consents found in the statement.
33
+ */
34
+ category: (CodeableConcept | null)[] | null;
35
+ /**
36
+ * The patient/healthcare consumer to whom this consent applies.
37
+ */
38
+ patient: Reference | null;
39
+ /**
40
+ * Who is agreeing to the policy and rules.
41
+ */
42
+ performer: (Reference | null)[] | null;
43
+ /**
44
+ * The organization that manages the consent.
45
+ */
46
+ organization: (Reference | null)[] | null;
47
+ /**
48
+ * The references to the policies that are included in this consent scope.
49
+ */
50
+ policy: (ConsentPolicy | null)[] | null;
51
+ /**
52
+ * A reference to the specific base computable regulation or policy.
53
+ */
54
+ policyRule: CodeableConcept | null;
55
+ /**
56
+ * An exception to the base policy of this consent.
57
+ */
58
+ provision: ConsentProvision | null;
59
+ };
60
+ /**
61
+ * The references to the policies that are included in this consent scope.
62
+ *
63
+ * @title ConsentPolicy
64
+ * @excerpt Policy references included in consent scope
65
+ */
66
+ export type ConsentPolicy = {
67
+ /**
68
+ * Entity or Organization having regulatory jurisdiction or accountability for enforcing policies.
69
+ */
70
+ authority: string | null;
71
+ /**
72
+ * The references to the policies that are included in this consent scope.
73
+ */
74
+ uri: string | null;
75
+ };
76
+ /**
77
+ * An exception to the base policy of this consent.
78
+ *
79
+ * @title ConsentProvision
80
+ * @excerpt Exception to the base consent policy
81
+ */
82
+ export type ConsentProvision = {
83
+ /**
84
+ * Action to take - permit or deny.
85
+ */
86
+ type: string | null;
87
+ /**
88
+ * Timeframe for this rule.
89
+ */
90
+ period: Period | null;
91
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type { User } from "./user.js";
2
+ export type { Person } from "./person.js";
3
+ export type { Consent } from "./consent.js";
4
+ export type { VerificationResult } from "./verification-result.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ import { Address, ContactPoint, HumanName } from "../common/index.js";
2
+ /**
3
+ * Person model representing demographics and administrative information about a person
4
+ * independent of a specific health-related context.
5
+ *
6
+ * @category Models
7
+ * @title Person
8
+ * @excerpt Demographics and administrative information about a person
9
+ */
10
+ export type Person = {
11
+ /**
12
+ * The logical id of the resource, as used in the URL for the resource. Once
13
+ * assigned, this value never changes.
14
+ */
15
+ id: string;
16
+ /**
17
+ * Administrative Gender.
18
+ * Uses the Code scalar type from the GraphQL schema.
19
+ */
20
+ gender: string | null;
21
+ /**
22
+ * The birth date for the person.
23
+ * Uses the Date scalar type from the GraphQL schema.
24
+ */
25
+ birthDate: string | null;
26
+ /**
27
+ * The base language in which the resource is written.
28
+ * Uses the Code scalar type from the GraphQL schema.
29
+ */
30
+ language: string | null;
31
+ /**
32
+ * One or more addresses for the person.
33
+ */
34
+ address: (Address | null)[] | null;
35
+ /**
36
+ * A contact detail for the person, e.g. a telephone number or an email address.
37
+ */
38
+ telecom: (ContactPoint | null)[] | null;
39
+ /**
40
+ * A name associated with the person.
41
+ */
42
+ name: (HumanName | null)[] | null;
43
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * User model representing the relationship between bWell and client FHIR person identifiers.
3
+ * Used to link user identities across different systems.
4
+ *
5
+ * @category Models
6
+ * @title User
7
+ * @excerpt User identity mapping between bWell and client systems
8
+ */
9
+ export type User = {
10
+ bwellFhirPersonId: string;
11
+ clientFhirPersonId: string;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Describes validation requirements, source(s), status and dates for one or more elements.
3
+ * Used to track the verification status of identity and other validation processes.
4
+ *
5
+ * @category Models
6
+ * @title VerificationResult
7
+ * @excerpt Validation requirements and status tracking for identity verification
8
+ */
9
+ export type VerificationResult = {
10
+ /**
11
+ * The type of resource being returned.
12
+ */
13
+ resourceType: string | null;
14
+ /**
15
+ * The logical id of the resource, as used in the URL for the resource.
16
+ */
17
+ id: string;
18
+ /**
19
+ * The validation status of the target.
20
+ */
21
+ status: string | null;
22
+ /**
23
+ * When the validation status was updated.
24
+ */
25
+ statusDate: string | null;
26
+ /**
27
+ * The date the validation was last performed.
28
+ */
29
+ lastPerformed: string | null;
30
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -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";
@@ -1,6 +1,6 @@
1
- import { AuthTokens } from "../api/base/identity/identity-manager.js";
2
1
  import { BWellError } from "../errors/bwell-error.js";
3
2
  import { InvalidTokenError } from "../errors/invalid-token-error.js";
3
+ import { AuthTokens } from "../models/identity/index.js";
4
4
  import { BWellTransactionResult } from "../results/index.js";
5
5
  import { TokenStorage } from "./token-storage.js";
6
6
  export declare function loadAuthTokens(storage: TokenStorage): Promise<BWellTransactionResult<AuthTokens, InvalidTokenError | BWellError>>;
@@ -3,6 +3,8 @@ export type GetManyResult = [string, string | undefined];
3
3
  * Interface for storing tokens.
4
4
  * We might want to store more than one kind of token, so the interface is for a key-value store.
5
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
6
8
  */
7
9
  export interface TokenStorage {
8
10
  /**
@@ -37,6 +39,8 @@ export interface TokenStorage {
37
39
  }
38
40
  /**
39
41
  * Default token storage implementation that stores tokens in memory.
42
+ * @title InMemoryTokenStorage
43
+ * @excerpt Default token storage implementation that stores tokens in memory
40
44
  */
41
45
  export declare class InMemoryTokenStorage {
42
46
  private storage;
@@ -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()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/bwell-sdk-ts",
3
- "version": "2.0.0-alpha.0-rc.1754330797",
3
+ "version": "2.0.0-alpha.0-rc.1754488327",
4
4
  "description": "b.well TypeScript SDK",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -27,7 +27,8 @@
27
27
  "gen:clean": "rimraf ./src/graphql",
28
28
  "generate": "npm run generate:sdl && npm run generate:types && npm run generate:version",
29
29
  "generate:v2": "npm run generate:sdl:v2 && npm run generate:types && npm run generate:version",
30
- "generate:docs": "typedoc --tsconfig tsconfig.json && npm run format",
30
+ "generate:docs:html": "typedoc --options typedoc/typedoc.html.mjs",
31
+ "generate:docs:readme": "typedoc --options typedoc/typedoc.readme.mjs",
31
32
  "generate:types": "graphql-codegen --config ./codegen/codegen.ts",
32
33
  "generate:version": "node ./scripts/generate-version-file.js",
33
34
  "generate:sdl": "npm run --prefix ../graphql generate:sdl",
@@ -77,6 +78,8 @@
77
78
  "rimraf": "^5.0.10",
78
79
  "ts-jest": "^29.2.4",
79
80
  "typedoc": "^0.28.7",
81
+ "typedoc-plugin-frontmatter": "^1.3.0",
82
+ "typedoc-plugin-markdown": "^4.7.0",
80
83
  "typescript": "^5.8.3",
81
84
  "typescript-eslint": "^8.36.0"
82
85
  },
@@ -1,19 +0,0 @@
1
- import { CodeableConceptFieldsFragment } from "../../../graphql/operations/types.js";
2
- import { ConnectionCategory, DataConnectionStatus, DataConnectionType, SyncStatus } from "../../../graphql/schema.js";
3
- /**
4
- * @property {string} id - The connection ID (service_slug).
5
- * @property {DataConnectionStatus} status - The auth token status.
6
- * @property {string} name - The name of the connection.
7
- * @property {ConnectionCategory} category - Either Basic ('hapi') or OAuth.
8
- * @property {DataConnectionType} type - Data type of the data source connection.
9
- * @property {SyncStatus} syncStatus - The status of the data ingest pipeline.
10
- */
11
- export type MemberConnection = {
12
- id: string;
13
- status: DataConnectionStatus;
14
- name: string;
15
- category: ConnectionCategory;
16
- type: DataConnectionType;
17
- syncStatus: SyncStatus;
18
- syncError: Array<CodeableConceptFieldsFragment | null> | null;
19
- };
@@ -1,16 +0,0 @@
1
- import { SearchReference } from "../../../graphql/schema.js";
2
- import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
3
- export type CancelationReasonsRequestInput = {
4
- organization: SearchReference;
5
- };
6
- /**
7
- * Validator for CancelationReasonsRequestInput.
8
- * Ensures that organization is present and has a non-empty value.
9
- */
10
- declare class CancelationReasonsRequestValidator implements Validator<CancelationReasonsRequestInput> {
11
- validate(data: CancelationReasonsRequestInput, errors: ErrorsCollector): void;
12
- }
13
- export declare class CancelationReasonsRequest extends ValidationRequest<CancelationReasonsRequestInput> {
14
- protected validator: CancelationReasonsRequestValidator;
15
- }
16
- export {};
@@ -1,9 +0,0 @@
1
- import { CategoryCode as GraphQLCategoryCode, ConsentProvisionType as GraphQLConsentProvisionType, ConsentStatus as GraphQLConsentStatus, FhirPersonGender as GraphQLFhirPersonGender } from "../../../graphql/schema.js";
2
- export type PersonGender = `${GraphQLFhirPersonGender}`;
3
- export type ConsentStatus = `${GraphQLConsentStatus}`;
4
- export type CategoryCode = `${GraphQLCategoryCode}`;
5
- export type ConsentProvisionType = `${GraphQLConsentProvisionType}`;
6
- export declare function isValidPersonGender(gender: string): gender is GraphQLFhirPersonGender;
7
- export declare function isValidConsentStatus(status: string): status is GraphQLConsentStatus;
8
- export declare function isValidCategoryCode(categoryCode: string): categoryCode is GraphQLCategoryCode;
9
- export declare function isValidConsentProvisionType(type: string): type is GraphQLConsentProvisionType;