phenoml 0.0.2 → 0.0.4

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 (300) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/Client.d.ts +10 -4
  3. package/dist/cjs/Client.js +17 -7
  4. package/dist/cjs/api/resources/agent/client/Client.d.ts +12 -8
  5. package/dist/cjs/api/resources/agent/client/Client.js +15 -7
  6. package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +0 -3
  7. package/dist/cjs/api/resources/agent/client/requests/index.d.ts +0 -2
  8. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +5 -5
  9. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +6 -2
  10. package/dist/cjs/api/resources/agent/{client/requests → types}/AgentCreateRequest.d.ts +14 -12
  11. package/dist/cjs/api/resources/agent/types/AgentTemplate.d.ts +14 -4
  12. package/dist/cjs/api/resources/agent/types/index.d.ts +1 -4
  13. package/dist/cjs/api/resources/agent/types/index.js +1 -4
  14. package/dist/cjs/api/resources/authtoken/client/Client.d.ts +3 -3
  15. package/dist/cjs/api/resources/authtoken/client/Client.js +1 -1
  16. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +2 -2
  17. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +1 -1
  18. package/dist/cjs/api/resources/cohort/client/Client.d.ts +5 -5
  19. package/dist/cjs/api/resources/cohort/client/Client.js +6 -2
  20. package/dist/cjs/api/resources/construe/client/Client.d.ts +5 -5
  21. package/dist/cjs/api/resources/construe/client/Client.js +6 -2
  22. package/dist/cjs/api/resources/fhir/client/Client.d.ts +293 -0
  23. package/dist/cjs/api/resources/fhir/client/Client.js +674 -0
  24. package/dist/cjs/api/resources/fhir/client/index.d.ts +2 -0
  25. package/dist/cjs/api/resources/fhir/client/index.js +17 -0
  26. package/dist/cjs/api/resources/fhir/client/requests/FhirCreateRequest.d.ts +18 -0
  27. package/dist/cjs/api/resources/fhir/client/requests/FhirDeleteRequest.d.ts +13 -0
  28. package/dist/cjs/api/resources/fhir/client/requests/FhirExecuteBundleRequest.d.ts +47 -0
  29. package/dist/cjs/api/resources/fhir/client/requests/FhirPatchRequest.d.ts +69 -0
  30. package/dist/cjs/api/resources/fhir/client/requests/FhirSearchRequest.d.ts +26 -0
  31. package/dist/cjs/api/resources/fhir/client/requests/FhirUpsertRequest.d.ts +19 -0
  32. package/dist/cjs/api/resources/fhir/client/requests/FhirUpsertRequest.js +5 -0
  33. package/dist/cjs/api/resources/fhir/client/requests/index.d.ts +6 -0
  34. package/dist/cjs/api/resources/fhir/client/requests/index.js +2 -0
  35. package/dist/cjs/api/resources/fhir/errors/BadRequestError.d.ts +8 -0
  36. package/dist/cjs/api/resources/fhir/errors/BadRequestError.js +52 -0
  37. package/dist/cjs/api/resources/fhir/errors/InternalServerError.d.ts +8 -0
  38. package/dist/cjs/api/resources/fhir/errors/InternalServerError.js +52 -0
  39. package/dist/cjs/api/resources/fhir/errors/NotFoundError.d.ts +8 -0
  40. package/dist/cjs/api/resources/fhir/errors/NotFoundError.js +52 -0
  41. package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.d.ts +8 -0
  42. package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.js +52 -0
  43. package/dist/cjs/api/resources/fhir/errors/index.d.ts +4 -0
  44. package/dist/cjs/api/resources/fhir/errors/index.js +20 -0
  45. package/dist/cjs/api/resources/fhir/index.d.ts +3 -0
  46. package/dist/cjs/api/resources/fhir/index.js +19 -0
  47. package/dist/cjs/api/resources/fhir/types/ErrorResponse.d.ts +14 -0
  48. package/dist/cjs/api/resources/fhir/types/ErrorResponse.js +5 -0
  49. package/dist/cjs/api/resources/fhir/types/FhirBundle.d.ts +57 -0
  50. package/dist/cjs/api/resources/fhir/types/FhirBundle.js +25 -0
  51. package/dist/cjs/api/resources/fhir/types/FhirPatchRequestBodyItem.d.ts +26 -0
  52. package/dist/cjs/api/resources/fhir/types/FhirPatchRequestBodyItem.js +17 -0
  53. package/dist/cjs/api/resources/fhir/types/FhirResource.d.ts +27 -0
  54. package/dist/cjs/api/resources/fhir/types/FhirResource.js +5 -0
  55. package/dist/cjs/api/resources/fhir/types/FhirSearchResponse.d.ts +5 -0
  56. package/dist/cjs/api/resources/fhir/types/FhirSearchResponse.js +5 -0
  57. package/dist/cjs/api/resources/fhir/types/index.d.ts +5 -0
  58. package/dist/cjs/api/resources/fhir/types/index.js +21 -0
  59. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +161 -0
  60. package/dist/cjs/api/resources/fhirProvider/client/Client.js +596 -0
  61. package/dist/cjs/api/resources/fhirProvider/client/index.d.ts +2 -0
  62. package/dist/cjs/api/resources/fhirProvider/client/index.js +17 -0
  63. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.d.ts +20 -0
  64. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.js +5 -0
  65. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.ts +30 -0
  66. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.js +5 -0
  67. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.ts +13 -0
  68. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.js +5 -0
  69. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.ts +13 -0
  70. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.js +5 -0
  71. package/dist/cjs/api/resources/fhirProvider/client/requests/index.d.ts +4 -0
  72. package/dist/cjs/api/resources/fhirProvider/client/requests/index.js +2 -0
  73. package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.d.ts +8 -0
  74. package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.js +52 -0
  75. package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.d.ts +8 -0
  76. package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.js +52 -0
  77. package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.d.ts +8 -0
  78. package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.js +52 -0
  79. package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.d.ts +8 -0
  80. package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.js +52 -0
  81. package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.d.ts +8 -0
  82. package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.js +52 -0
  83. package/dist/cjs/api/resources/fhirProvider/errors/index.d.ts +5 -0
  84. package/dist/cjs/api/resources/fhirProvider/errors/index.js +21 -0
  85. package/dist/cjs/api/resources/fhirProvider/index.d.ts +3 -0
  86. package/dist/cjs/api/resources/fhirProvider/index.js +19 -0
  87. package/dist/cjs/api/resources/fhirProvider/types/AuthMethod.d.ts +14 -0
  88. package/dist/cjs/api/resources/fhirProvider/types/AuthMethod.js +13 -0
  89. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.ts +22 -0
  90. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.js +5 -0
  91. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.ts +7 -0
  92. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.js +5 -0
  93. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.d.ts +9 -0
  94. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.js +5 -0
  95. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.ts +9 -0
  96. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.js +5 -0
  97. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.d.ts +9 -0
  98. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.js +5 -0
  99. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.ts +9 -0
  100. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.js +5 -0
  101. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +25 -0
  102. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.js +5 -0
  103. package/dist/cjs/api/resources/fhirProvider/types/FhirQueryResponse.d.ts +19 -0
  104. package/dist/cjs/api/resources/fhirProvider/types/FhirQueryResponse.js +5 -0
  105. package/dist/cjs/api/resources/fhirProvider/types/JsonWebKey.d.ts +20 -0
  106. package/dist/cjs/api/resources/fhirProvider/types/JsonWebKey.js +5 -0
  107. package/dist/cjs/api/resources/fhirProvider/types/Provider.d.ts +17 -0
  108. package/dist/cjs/api/resources/{agent/types/ProviderType.js → fhirProvider/types/Provider.js} +8 -4
  109. package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountKey.d.ts +19 -0
  110. package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountKey.js +5 -0
  111. package/dist/cjs/api/resources/fhirProvider/types/SmartConfiguration.d.ts +18 -0
  112. package/dist/cjs/api/resources/fhirProvider/types/SmartConfiguration.js +5 -0
  113. package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +13 -0
  114. package/dist/cjs/api/resources/fhirProvider/types/index.js +29 -0
  115. package/dist/cjs/api/resources/index.d.ts +2 -0
  116. package/dist/cjs/api/resources/index.js +3 -1
  117. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +5 -5
  118. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +6 -2
  119. package/dist/cjs/api/resources/tools/client/Client.d.ts +6 -6
  120. package/dist/cjs/api/resources/tools/client/Client.js +7 -3
  121. package/dist/cjs/api/resources/tools/client/requests/CohortRequest.d.ts +3 -17
  122. package/dist/cjs/api/resources/tools/client/requests/CohortRequest.js +0 -10
  123. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.ts +2 -14
  124. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.js +0 -6
  125. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +2 -16
  126. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.js +0 -10
  127. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.d.ts +5 -5
  128. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +6 -2
  129. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +5 -5
  130. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +6 -2
  131. package/dist/cjs/api/resources/tools/types/index.d.ts +0 -1
  132. package/dist/cjs/api/resources/tools/types/index.js +0 -1
  133. package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -1
  134. package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
  135. package/dist/cjs/core/headers.d.ts +2 -2
  136. package/dist/cjs/version.d.ts +1 -1
  137. package/dist/cjs/version.js +1 -1
  138. package/dist/esm/Client.d.mts +10 -4
  139. package/dist/esm/Client.mjs +13 -3
  140. package/dist/esm/api/resources/agent/client/Client.d.mts +12 -8
  141. package/dist/esm/api/resources/agent/client/Client.mjs +15 -7
  142. package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +0 -3
  143. package/dist/esm/api/resources/agent/client/requests/index.d.mts +0 -2
  144. package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +5 -5
  145. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +6 -2
  146. package/dist/esm/api/resources/agent/{client/requests → types}/AgentCreateRequest.d.mts +14 -12
  147. package/dist/esm/api/resources/agent/types/AgentTemplate.d.mts +14 -4
  148. package/dist/esm/api/resources/agent/types/index.d.mts +1 -4
  149. package/dist/esm/api/resources/agent/types/index.mjs +1 -4
  150. package/dist/esm/api/resources/authtoken/client/Client.d.mts +3 -3
  151. package/dist/esm/api/resources/authtoken/client/Client.mjs +1 -1
  152. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +2 -2
  153. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +1 -1
  154. package/dist/esm/api/resources/cohort/client/Client.d.mts +5 -5
  155. package/dist/esm/api/resources/cohort/client/Client.mjs +6 -2
  156. package/dist/esm/api/resources/construe/client/Client.d.mts +5 -5
  157. package/dist/esm/api/resources/construe/client/Client.mjs +6 -2
  158. package/dist/esm/api/resources/fhir/client/Client.d.mts +293 -0
  159. package/dist/esm/api/resources/fhir/client/Client.mjs +637 -0
  160. package/dist/esm/api/resources/fhir/client/index.d.mts +2 -0
  161. package/dist/esm/api/resources/fhir/client/index.mjs +1 -0
  162. package/dist/esm/api/resources/fhir/client/requests/FhirCreateRequest.d.mts +18 -0
  163. package/dist/esm/api/resources/fhir/client/requests/FhirDeleteRequest.d.mts +13 -0
  164. package/dist/esm/api/resources/fhir/client/requests/FhirExecuteBundleRequest.d.mts +47 -0
  165. package/dist/esm/api/resources/fhir/client/requests/FhirPatchRequest.d.mts +69 -0
  166. package/dist/esm/api/resources/fhir/client/requests/FhirSearchRequest.d.mts +26 -0
  167. package/dist/esm/api/resources/fhir/client/requests/FhirUpsertRequest.d.mts +19 -0
  168. package/dist/esm/api/resources/fhir/client/requests/FhirUpsertRequest.mjs +4 -0
  169. package/dist/esm/api/resources/fhir/client/requests/index.d.mts +6 -0
  170. package/dist/esm/api/resources/fhir/client/requests/index.mjs +1 -0
  171. package/dist/esm/api/resources/fhir/errors/BadRequestError.d.mts +8 -0
  172. package/dist/esm/api/resources/fhir/errors/BadRequestError.mjs +15 -0
  173. package/dist/esm/api/resources/fhir/errors/InternalServerError.d.mts +8 -0
  174. package/dist/esm/api/resources/fhir/errors/InternalServerError.mjs +15 -0
  175. package/dist/esm/api/resources/fhir/errors/NotFoundError.d.mts +8 -0
  176. package/dist/esm/api/resources/fhir/errors/NotFoundError.mjs +15 -0
  177. package/dist/esm/api/resources/fhir/errors/UnauthorizedError.d.mts +8 -0
  178. package/dist/esm/api/resources/fhir/errors/UnauthorizedError.mjs +15 -0
  179. package/dist/esm/api/resources/fhir/errors/index.d.mts +4 -0
  180. package/dist/esm/api/resources/fhir/errors/index.mjs +4 -0
  181. package/dist/esm/api/resources/fhir/index.d.mts +3 -0
  182. package/dist/esm/api/resources/fhir/index.mjs +3 -0
  183. package/dist/esm/api/resources/fhir/types/ErrorResponse.d.mts +14 -0
  184. package/dist/esm/api/resources/fhir/types/ErrorResponse.mjs +4 -0
  185. package/dist/esm/api/resources/fhir/types/FhirBundle.d.mts +57 -0
  186. package/dist/esm/api/resources/fhir/types/FhirBundle.mjs +22 -0
  187. package/dist/esm/api/resources/fhir/types/FhirPatchRequestBodyItem.d.mts +26 -0
  188. package/dist/esm/api/resources/fhir/types/FhirPatchRequestBodyItem.mjs +14 -0
  189. package/dist/esm/api/resources/fhir/types/FhirResource.d.mts +27 -0
  190. package/dist/esm/api/resources/fhir/types/FhirResource.mjs +4 -0
  191. package/dist/esm/api/resources/fhir/types/FhirSearchResponse.d.mts +5 -0
  192. package/dist/esm/api/resources/fhir/types/FhirSearchResponse.mjs +4 -0
  193. package/dist/esm/api/resources/fhir/types/index.d.mts +5 -0
  194. package/dist/esm/api/resources/fhir/types/index.mjs +5 -0
  195. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +161 -0
  196. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +559 -0
  197. package/dist/esm/api/resources/fhirProvider/client/index.d.mts +2 -0
  198. package/dist/esm/api/resources/fhirProvider/client/index.mjs +1 -0
  199. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.d.mts +20 -0
  200. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.mjs +4 -0
  201. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.mts +30 -0
  202. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.mjs +4 -0
  203. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.mts +13 -0
  204. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.mjs +4 -0
  205. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.mts +13 -0
  206. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.mjs +4 -0
  207. package/dist/esm/api/resources/fhirProvider/client/requests/index.d.mts +4 -0
  208. package/dist/esm/api/resources/fhirProvider/client/requests/index.mjs +1 -0
  209. package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.d.mts +8 -0
  210. package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.mjs +15 -0
  211. package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.d.mts +8 -0
  212. package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.mjs +15 -0
  213. package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.d.mts +8 -0
  214. package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.mjs +15 -0
  215. package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.d.mts +8 -0
  216. package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.mjs +15 -0
  217. package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.d.mts +8 -0
  218. package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.mjs +15 -0
  219. package/dist/esm/api/resources/fhirProvider/errors/index.d.mts +5 -0
  220. package/dist/esm/api/resources/fhirProvider/errors/index.mjs +5 -0
  221. package/dist/esm/api/resources/fhirProvider/index.d.mts +3 -0
  222. package/dist/esm/api/resources/fhirProvider/index.mjs +3 -0
  223. package/dist/esm/api/resources/fhirProvider/types/AuthMethod.d.mts +14 -0
  224. package/dist/esm/api/resources/fhirProvider/types/AuthMethod.mjs +10 -0
  225. package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.mts +22 -0
  226. package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.mjs +4 -0
  227. package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.mts +7 -0
  228. package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.mjs +4 -0
  229. package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.d.mts +9 -0
  230. package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.mjs +4 -0
  231. package/dist/esm/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.mts +9 -0
  232. package/dist/esm/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.mjs +4 -0
  233. package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.d.mts +9 -0
  234. package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.mjs +4 -0
  235. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.mts +9 -0
  236. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.mjs +4 -0
  237. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +25 -0
  238. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.mjs +4 -0
  239. package/dist/esm/api/resources/fhirProvider/types/FhirQueryResponse.d.mts +19 -0
  240. package/dist/esm/api/resources/fhirProvider/types/FhirQueryResponse.mjs +4 -0
  241. package/dist/esm/api/resources/fhirProvider/types/JsonWebKey.d.mts +20 -0
  242. package/dist/esm/api/resources/fhirProvider/types/JsonWebKey.mjs +4 -0
  243. package/dist/esm/api/resources/fhirProvider/types/Provider.d.mts +17 -0
  244. package/dist/esm/api/resources/{agent/types/ProviderType.mjs → fhirProvider/types/Provider.mjs} +7 -3
  245. package/dist/esm/api/resources/fhirProvider/types/ServiceAccountKey.d.mts +19 -0
  246. package/dist/esm/api/resources/fhirProvider/types/ServiceAccountKey.mjs +4 -0
  247. package/dist/esm/api/resources/fhirProvider/types/SmartConfiguration.d.mts +18 -0
  248. package/dist/esm/api/resources/fhirProvider/types/SmartConfiguration.mjs +4 -0
  249. package/dist/esm/api/resources/fhirProvider/types/index.d.mts +13 -0
  250. package/dist/esm/api/resources/fhirProvider/types/index.mjs +13 -0
  251. package/dist/esm/api/resources/index.d.mts +2 -0
  252. package/dist/esm/api/resources/index.mjs +2 -0
  253. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +5 -5
  254. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +6 -2
  255. package/dist/esm/api/resources/tools/client/Client.d.mts +6 -6
  256. package/dist/esm/api/resources/tools/client/Client.mjs +7 -3
  257. package/dist/esm/api/resources/tools/client/requests/CohortRequest.d.mts +3 -17
  258. package/dist/esm/api/resources/tools/client/requests/CohortRequest.mjs +1 -9
  259. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.mts +2 -14
  260. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.mjs +0 -6
  261. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +2 -16
  262. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.mjs +1 -9
  263. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.d.mts +5 -5
  264. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +6 -2
  265. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +5 -5
  266. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +6 -2
  267. package/dist/esm/api/resources/tools/types/index.d.mts +0 -1
  268. package/dist/esm/api/resources/tools/types/index.mjs +0 -1
  269. package/dist/esm/core/fetcher/Fetcher.d.mts +1 -1
  270. package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
  271. package/dist/esm/core/headers.d.mts +2 -2
  272. package/dist/esm/version.d.mts +1 -1
  273. package/dist/esm/version.mjs +1 -1
  274. package/package.json +2 -3
  275. package/reference.md +1090 -4
  276. package/LICENSE +0 -21
  277. package/dist/cjs/api/resources/agent/client/requests/AgentUpdateRequest.d.ts +0 -25
  278. package/dist/cjs/api/resources/agent/types/AgentFhirConfig.d.ts +0 -12
  279. package/dist/cjs/api/resources/agent/types/AgentProvider.d.ts +0 -11
  280. package/dist/cjs/api/resources/agent/types/ChatFhirClientConfig.d.ts +0 -12
  281. package/dist/cjs/api/resources/agent/types/ProviderType.d.ts +0 -13
  282. package/dist/cjs/api/resources/tools/types/FhirClientConfig.d.ts +0 -12
  283. package/dist/esm/api/resources/agent/client/requests/AgentUpdateRequest.d.mts +0 -25
  284. package/dist/esm/api/resources/agent/types/AgentFhirConfig.d.mts +0 -12
  285. package/dist/esm/api/resources/agent/types/AgentProvider.d.mts +0 -11
  286. package/dist/esm/api/resources/agent/types/ChatFhirClientConfig.d.mts +0 -12
  287. package/dist/esm/api/resources/agent/types/ProviderType.d.mts +0 -13
  288. package/dist/esm/api/resources/tools/types/FhirClientConfig.d.mts +0 -12
  289. /package/dist/cjs/api/resources/agent/{client/requests → types}/AgentCreateRequest.js +0 -0
  290. /package/dist/cjs/api/resources/{agent/client/requests/AgentUpdateRequest.js → fhir/client/requests/FhirCreateRequest.js} +0 -0
  291. /package/dist/cjs/api/resources/{agent/types/AgentFhirConfig.js → fhir/client/requests/FhirDeleteRequest.js} +0 -0
  292. /package/dist/cjs/api/resources/{agent/types/AgentProvider.js → fhir/client/requests/FhirExecuteBundleRequest.js} +0 -0
  293. /package/dist/cjs/api/resources/{agent/types/ChatFhirClientConfig.js → fhir/client/requests/FhirPatchRequest.js} +0 -0
  294. /package/dist/cjs/api/resources/{tools/types/FhirClientConfig.js → fhir/client/requests/FhirSearchRequest.js} +0 -0
  295. /package/dist/esm/api/resources/agent/{client/requests → types}/AgentCreateRequest.mjs +0 -0
  296. /package/dist/esm/api/resources/{agent/client/requests/AgentUpdateRequest.mjs → fhir/client/requests/FhirCreateRequest.mjs} +0 -0
  297. /package/dist/esm/api/resources/{agent/types/AgentFhirConfig.mjs → fhir/client/requests/FhirDeleteRequest.mjs} +0 -0
  298. /package/dist/esm/api/resources/{agent/types/AgentProvider.mjs → fhir/client/requests/FhirExecuteBundleRequest.mjs} +0 -0
  299. /package/dist/esm/api/resources/{agent/types/ChatFhirClientConfig.mjs → fhir/client/requests/FhirPatchRequest.mjs} +0 -0
  300. /package/dist/esm/api/resources/{tools/types/FhirClientConfig.mjs → fhir/client/requests/FhirSearchRequest.mjs} +0 -0
package/README.md CHANGED
@@ -13,7 +13,7 @@ npm i -s phenoml
13
13
 
14
14
  ## Reference
15
15
 
16
- A full reference for this library is available [here](https://github.com/fern-demo/phenoml-ts-sdk/blob/HEAD/./reference.md).
16
+ A full reference for this library is available [here](https://github.com/phenoml/phenoml-ts-sdk/blob/HEAD/./reference.md).
17
17
 
18
18
  ## Usage
19
19
 
@@ -7,6 +7,8 @@ import { Agent } from "./api/resources/agent/client/Client.js";
7
7
  import { Authtoken } from "./api/resources/authtoken/client/Client.js";
8
8
  import { Cohort } from "./api/resources/cohort/client/Client.js";
9
9
  import { Construe } from "./api/resources/construe/client/Client.js";
10
+ import { Fhir } from "./api/resources/fhir/client/Client.js";
11
+ import { FhirProvider } from "./api/resources/fhirProvider/client/Client.js";
10
12
  import { Lang2Fhir } from "./api/resources/lang2Fhir/client/Client.js";
11
13
  import { Tools } from "./api/resources/tools/client/Client.js";
12
14
  export declare namespace phenomlClient {
@@ -14,9 +16,9 @@ export declare namespace phenomlClient {
14
16
  environment?: core.Supplier<environments.phenomlEnvironment | string>;
15
17
  /** Specify a custom URL to connect the client to. */
16
18
  baseUrl?: core.Supplier<string>;
17
- token: core.Supplier<core.BearerToken>;
19
+ token?: core.Supplier<core.BearerToken | undefined>;
18
20
  /** Additional headers to include in requests. */
19
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
21
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
20
22
  fetcher?: core.FetchFunction;
21
23
  }
22
24
  interface RequestOptions {
@@ -29,7 +31,7 @@ export declare namespace phenomlClient {
29
31
  /** Additional query string parameters to include in the request. */
30
32
  queryParams?: Record<string, unknown>;
31
33
  /** Additional headers to include in the request. */
32
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
34
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
33
35
  }
34
36
  }
35
37
  export declare class phenomlClient {
@@ -38,13 +40,17 @@ export declare class phenomlClient {
38
40
  protected _authtoken: Authtoken | undefined;
39
41
  protected _cohort: Cohort | undefined;
40
42
  protected _construe: Construe | undefined;
43
+ protected _fhir: Fhir | undefined;
44
+ protected _fhirProvider: FhirProvider | undefined;
41
45
  protected _lang2Fhir: Lang2Fhir | undefined;
42
46
  protected _tools: Tools | undefined;
43
- constructor(_options: phenomlClient.Options);
47
+ constructor(_options?: phenomlClient.Options);
44
48
  get agent(): Agent;
45
49
  get authtoken(): Authtoken;
46
50
  get cohort(): Cohort;
47
51
  get construe(): Construe;
52
+ get fhir(): Fhir;
53
+ get fhirProvider(): FhirProvider;
48
54
  get lang2Fhir(): Lang2Fhir;
49
55
  get tools(): Tools;
50
56
  }
@@ -43,15 +43,17 @@ const Client_js_1 = require("./api/resources/agent/client/Client.js");
43
43
  const Client_js_2 = require("./api/resources/authtoken/client/Client.js");
44
44
  const Client_js_3 = require("./api/resources/cohort/client/Client.js");
45
45
  const Client_js_4 = require("./api/resources/construe/client/Client.js");
46
- const Client_js_5 = require("./api/resources/lang2Fhir/client/Client.js");
47
- const Client_js_6 = require("./api/resources/tools/client/Client.js");
46
+ const Client_js_5 = require("./api/resources/fhir/client/Client.js");
47
+ const Client_js_6 = require("./api/resources/fhirProvider/client/Client.js");
48
+ const Client_js_7 = require("./api/resources/lang2Fhir/client/Client.js");
49
+ const Client_js_8 = require("./api/resources/tools/client/Client.js");
48
50
  class phenomlClient {
49
- constructor(_options) {
51
+ constructor(_options = {}) {
50
52
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
51
53
  "X-Fern-Language": "JavaScript",
52
54
  "X-Fern-SDK-Name": "phenoml",
53
- "X-Fern-SDK-Version": "0.0.2",
54
- "User-Agent": "phenoml/0.0.2",
55
+ "X-Fern-SDK-Version": "0.0.4",
56
+ "User-Agent": "phenoml/0.0.4",
55
57
  "X-Fern-Runtime": core.RUNTIME.type,
56
58
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
59
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -72,13 +74,21 @@ class phenomlClient {
72
74
  var _a;
73
75
  return ((_a = this._construe) !== null && _a !== void 0 ? _a : (this._construe = new Client_js_4.Construe(this._options)));
74
76
  }
77
+ get fhir() {
78
+ var _a;
79
+ return ((_a = this._fhir) !== null && _a !== void 0 ? _a : (this._fhir = new Client_js_5.Fhir(this._options)));
80
+ }
81
+ get fhirProvider() {
82
+ var _a;
83
+ return ((_a = this._fhirProvider) !== null && _a !== void 0 ? _a : (this._fhirProvider = new Client_js_6.FhirProvider(this._options)));
84
+ }
75
85
  get lang2Fhir() {
76
86
  var _a;
77
- return ((_a = this._lang2Fhir) !== null && _a !== void 0 ? _a : (this._lang2Fhir = new Client_js_5.Lang2Fhir(this._options)));
87
+ return ((_a = this._lang2Fhir) !== null && _a !== void 0 ? _a : (this._lang2Fhir = new Client_js_7.Lang2Fhir(this._options)));
78
88
  }
79
89
  get tools() {
80
90
  var _a;
81
- return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_6.Tools(this._options)));
91
+ return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_8.Tools(this._options)));
82
92
  }
83
93
  }
84
94
  exports.phenomlClient = phenomlClient;
@@ -10,9 +10,9 @@ export declare namespace Agent {
10
10
  environment?: core.Supplier<environments.phenomlEnvironment | string>;
11
11
  /** Specify a custom URL to connect the client to. */
12
12
  baseUrl?: core.Supplier<string>;
13
- token: core.Supplier<core.BearerToken>;
13
+ token?: core.Supplier<core.BearerToken | undefined>;
14
14
  /** Additional headers to include in requests. */
15
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
15
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
16
16
  fetcher?: core.FetchFunction;
17
17
  }
18
18
  interface RequestOptions {
@@ -25,13 +25,13 @@ export declare namespace Agent {
25
25
  /** Additional query string parameters to include in the request. */
26
26
  queryParams?: Record<string, unknown>;
27
27
  /** Additional headers to include in the request. */
28
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
28
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
29
29
  }
30
30
  }
31
31
  export declare class Agent {
32
32
  protected readonly _options: Agent.Options;
33
33
  protected _prompts: Prompts | undefined;
34
- constructor(_options: Agent.Options);
34
+ constructor(_options?: Agent.Options);
35
35
  get prompts(): Prompts;
36
36
  /**
37
37
  * Creates a new PhenoAgent with specified configuration
@@ -88,7 +88,7 @@ export declare class Agent {
88
88
  * Updates an existing agent's configuration
89
89
  *
90
90
  * @param {string} id - Agent ID
91
- * @param {phenoml.agent.AgentUpdateRequest} request
91
+ * @param {phenoml.agent.AgentCreateRequest} request
92
92
  * @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
93
93
  *
94
94
  * @throws {@link phenoml.agent.BadRequestError}
@@ -98,9 +98,13 @@ export declare class Agent {
98
98
  * @throws {@link phenoml.agent.InternalServerError}
99
99
  *
100
100
  * @example
101
- * await client.agent.update("id")
101
+ * await client.agent.update("id", {
102
+ * name: "name",
103
+ * prompts: ["prompt_123", "prompt_456"],
104
+ * is_active: true
105
+ * })
102
106
  */
103
- update(id: string, request?: phenoml.agent.AgentUpdateRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentResponse>;
107
+ update(id: string, request: phenoml.agent.AgentCreateRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentResponse>;
104
108
  private __update;
105
109
  /**
106
110
  * Deletes an existing agent
@@ -183,5 +187,5 @@ export declare class Agent {
183
187
  */
184
188
  getChatMessages(request: phenoml.agent.AgentGetChatMessagesRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentGetChatMessagesResponse>;
185
189
  private __getChatMessages;
186
- protected _getAuthorizationHeader(): Promise<string>;
190
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
187
191
  }
@@ -53,7 +53,7 @@ const headers_js_1 = require("../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../errors/index.js"));
54
54
  const Client_js_1 = require("../resources/prompts/client/Client.js");
55
55
  class Agent {
56
- constructor(_options) {
56
+ constructor(_options = {}) {
57
57
  this._options = _options;
58
58
  }
59
59
  get prompts() {
@@ -280,7 +280,7 @@ class Agent {
280
280
  * Updates an existing agent's configuration
281
281
  *
282
282
  * @param {string} id - Agent ID
283
- * @param {phenoml.agent.AgentUpdateRequest} request
283
+ * @param {phenoml.agent.AgentCreateRequest} request
284
284
  * @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
285
285
  *
286
286
  * @throws {@link phenoml.agent.BadRequestError}
@@ -290,13 +290,17 @@ class Agent {
290
290
  * @throws {@link phenoml.agent.InternalServerError}
291
291
  *
292
292
  * @example
293
- * await client.agent.update("id")
293
+ * await client.agent.update("id", {
294
+ * name: "name",
295
+ * prompts: ["prompt_123", "prompt_456"],
296
+ * is_active: true
297
+ * })
294
298
  */
295
- update(id, request = {}, requestOptions) {
299
+ update(id, request, requestOptions) {
296
300
  return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
297
301
  }
298
- __update(id_1) {
299
- return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
302
+ __update(id, request, requestOptions) {
303
+ return __awaiter(this, void 0, void 0, function* () {
300
304
  var _a, _b, _c, _d;
301
305
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
302
306
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -663,7 +667,11 @@ class Agent {
663
667
  }
664
668
  _getAuthorizationHeader() {
665
669
  return __awaiter(this, void 0, void 0, function* () {
666
- return `Bearer ${yield core.Supplier.get(this._options.token)}`;
670
+ const bearer = yield core.Supplier.get(this._options.token);
671
+ if (bearer != null) {
672
+ return `Bearer ${bearer}`;
673
+ }
674
+ return undefined;
667
675
  });
668
676
  }
669
677
  }
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as phenoml from "../../../../index.js";
5
4
  /**
6
5
  * @example
7
6
  * {
@@ -18,6 +17,4 @@ export interface AgentChatRequest {
18
17
  session_id?: string;
19
18
  /** The ID of the agent to chat with */
20
19
  agent_id: string;
21
- /** Optional user-specific FHIR configuration overrides */
22
- meta?: phenoml.agent.ChatFhirClientConfig;
23
20
  }
@@ -1,5 +1,3 @@
1
- export { type AgentCreateRequest } from "./AgentCreateRequest.js";
2
1
  export { type AgentListRequest } from "./AgentListRequest.js";
3
- export { type AgentUpdateRequest } from "./AgentUpdateRequest.js";
4
2
  export { type AgentChatRequest } from "./AgentChatRequest.js";
5
3
  export { type AgentGetChatMessagesRequest } from "./AgentGetChatMessagesRequest.js";
@@ -9,9 +9,9 @@ export declare namespace Prompts {
9
9
  environment?: core.Supplier<environments.phenomlEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- token: core.Supplier<core.BearerToken>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
13
  /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
15
  fetcher?: core.FetchFunction;
16
16
  }
17
17
  interface RequestOptions {
@@ -24,12 +24,12 @@ export declare namespace Prompts {
24
24
  /** Additional query string parameters to include in the request. */
25
25
  queryParams?: Record<string, unknown>;
26
26
  /** Additional headers to include in the request. */
27
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
28
  }
29
29
  }
30
30
  export declare class Prompts {
31
31
  protected readonly _options: Prompts.Options;
32
- constructor(_options: Prompts.Options);
32
+ constructor(_options?: Prompts.Options);
33
33
  /**
34
34
  * Creates a new agent prompt
35
35
  *
@@ -157,5 +157,5 @@ export declare class Prompts {
157
157
  */
158
158
  loadDefaults(requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<phenoml.agent.SuccessResponse>;
159
159
  private __loadDefaults;
160
- protected _getAuthorizationHeader(): Promise<string>;
160
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
161
161
  }
@@ -52,7 +52,7 @@ const phenoml = __importStar(require("../../../../../index.js"));
52
52
  const headers_js_1 = require("../../../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../../../errors/index.js"));
54
54
  class Prompts {
55
- constructor(_options) {
55
+ constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -557,7 +557,11 @@ class Prompts {
557
557
  }
558
558
  _getAuthorizationHeader() {
559
559
  return __awaiter(this, void 0, void 0, function* () {
560
- return `Bearer ${yield core.Supplier.get(this._options.token)}`;
560
+ const bearer = yield core.Supplier.get(this._options.token);
561
+ if (bearer != null) {
562
+ return `Bearer ${bearer}`;
563
+ }
564
+ return undefined;
561
565
  });
562
566
  }
563
567
  }
@@ -1,15 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as phenoml from "../../../../index.js";
5
- /**
6
- * @example
7
- * {
8
- * name: "name",
9
- * prompts: ["prompt_123", "prompt_456"],
10
- * is_active: true
11
- * }
12
- */
13
4
  export interface AgentCreateRequest {
14
5
  /** Agent name */
15
6
  name: string;
@@ -23,7 +14,18 @@ export interface AgentCreateRequest {
23
14
  is_active: boolean;
24
15
  /** Tags for categorizing the agent */
25
16
  tags?: string[];
26
- /** FHIR provider type - can be a single provider or array of providers */
27
- provider?: phenoml.agent.AgentProvider;
28
- meta?: phenoml.agent.AgentFhirConfig;
17
+ /** FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers */
18
+ provider?: AgentCreateRequest.Provider;
19
+ }
20
+ export declare namespace AgentCreateRequest {
21
+ /**
22
+ * FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers
23
+ */
24
+ type Provider =
25
+ /**
26
+ * Single FHIR provider ID */
27
+ string
28
+ /**
29
+ * Array of FHIR provider IDs */
30
+ | string[];
29
31
  }
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as phenoml from "../../../index.js";
5
4
  export interface AgentTemplate {
6
5
  /** Agent ID */
7
6
  id?: string;
@@ -17,7 +16,18 @@ export interface AgentTemplate {
17
16
  is_active?: boolean;
18
17
  /** Tags for categorizing the agent */
19
18
  tags?: string[];
20
- /** FHIR provider type - can be a single provider or array of providers */
21
- provider?: phenoml.agent.AgentProvider;
22
- meta?: phenoml.agent.AgentFhirConfig;
19
+ /** FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers */
20
+ provider?: AgentTemplate.Provider;
21
+ }
22
+ export declare namespace AgentTemplate {
23
+ /**
24
+ * FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers
25
+ */
26
+ type Provider =
27
+ /**
28
+ * Single FHIR provider ID */
29
+ string
30
+ /**
31
+ * Array of FHIR provider IDs */
32
+ | string[];
23
33
  }
@@ -2,17 +2,14 @@ export * from "./AgentListResponse.js";
2
2
  export * from "./AgentDeleteResponse.js";
3
3
  export * from "./AgentGetChatMessagesRequestOrder.js";
4
4
  export * from "./AgentGetChatMessagesResponse.js";
5
+ export * from "./AgentCreateRequest.js";
5
6
  export * from "./AgentTemplate.js";
6
7
  export * from "./AgentResponse.js";
7
8
  export * from "./AgentChatResponse.js";
8
9
  export * from "./PromptTemplate.js";
9
10
  export * from "./AgentPromptsResponse.js";
10
- export * from "./AgentFhirConfig.js";
11
- export * from "./ChatFhirClientConfig.js";
12
11
  export * from "./ChatMessageTemplate.js";
13
12
  export * from "./ChatSessionTemplate.js";
14
13
  export * from "./SuccessResponse.js";
15
14
  export * from "./JsonPatch.js";
16
15
  export * from "./JsonPatchOperation.js";
17
- export * from "./ProviderType.js";
18
- export * from "./AgentProvider.js";
@@ -18,17 +18,14 @@ __exportStar(require("./AgentListResponse.js"), exports);
18
18
  __exportStar(require("./AgentDeleteResponse.js"), exports);
19
19
  __exportStar(require("./AgentGetChatMessagesRequestOrder.js"), exports);
20
20
  __exportStar(require("./AgentGetChatMessagesResponse.js"), exports);
21
+ __exportStar(require("./AgentCreateRequest.js"), exports);
21
22
  __exportStar(require("./AgentTemplate.js"), exports);
22
23
  __exportStar(require("./AgentResponse.js"), exports);
23
24
  __exportStar(require("./AgentChatResponse.js"), exports);
24
25
  __exportStar(require("./PromptTemplate.js"), exports);
25
26
  __exportStar(require("./AgentPromptsResponse.js"), exports);
26
- __exportStar(require("./AgentFhirConfig.js"), exports);
27
- __exportStar(require("./ChatFhirClientConfig.js"), exports);
28
27
  __exportStar(require("./ChatMessageTemplate.js"), exports);
29
28
  __exportStar(require("./ChatSessionTemplate.js"), exports);
30
29
  __exportStar(require("./SuccessResponse.js"), exports);
31
30
  __exportStar(require("./JsonPatch.js"), exports);
32
31
  __exportStar(require("./JsonPatchOperation.js"), exports);
33
- __exportStar(require("./ProviderType.js"), exports);
34
- __exportStar(require("./AgentProvider.js"), exports);
@@ -9,15 +9,15 @@ export declare namespace Authtoken {
9
9
  environment?: core.Supplier<environments.phenomlEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- token: core.Supplier<core.BearerToken>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
13
  /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
15
  fetcher?: core.FetchFunction;
16
16
  }
17
17
  }
18
18
  export declare class Authtoken {
19
19
  protected readonly _options: Authtoken.Options;
20
20
  protected _auth: Auth | undefined;
21
- constructor(_options: Authtoken.Options);
21
+ constructor(_options?: Authtoken.Options);
22
22
  get auth(): Auth;
23
23
  }
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Authtoken = void 0;
7
7
  const Client_js_1 = require("../resources/auth/client/Client.js");
8
8
  class Authtoken {
9
- constructor(_options) {
9
+ constructor(_options = {}) {
10
10
  this._options = _options;
11
11
  }
12
12
  get auth() {
@@ -10,7 +10,7 @@ export declare namespace Auth {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  /** Additional headers to include in requests. */
13
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
13
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
14
14
  fetcher?: core.FetchFunction;
15
15
  }
16
16
  interface RequestOptions {
@@ -23,7 +23,7 @@ export declare namespace Auth {
23
23
  /** Additional query string parameters to include in the request. */
24
24
  queryParams?: Record<string, unknown>;
25
25
  /** Additional headers to include in the request. */
26
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
27
27
  }
28
28
  }
29
29
  export declare class Auth {
@@ -133,7 +133,7 @@ class Auth {
133
133
  }
134
134
  const basicAuthHeader = core.BasicAuth.toAuthorizationHeader({
135
135
  username: request.username,
136
- password: request.password
136
+ password: request.password,
137
137
  });
138
138
  if (!basicAuthHeader) {
139
139
  throw new Error("Failed to create basic auth header from username/password");
@@ -9,9 +9,9 @@ export declare namespace Cohort {
9
9
  environment?: core.Supplier<environments.phenomlEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- token: core.Supplier<core.BearerToken>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
13
  /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
15
  fetcher?: core.FetchFunction;
16
16
  }
17
17
  interface RequestOptions {
@@ -24,12 +24,12 @@ export declare namespace Cohort {
24
24
  /** Additional query string parameters to include in the request. */
25
25
  queryParams?: Record<string, unknown>;
26
26
  /** Additional headers to include in the request. */
27
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
28
  }
29
29
  }
30
30
  export declare class Cohort {
31
31
  protected readonly _options: Cohort.Options;
32
- constructor(_options: Cohort.Options);
32
+ constructor(_options?: Cohort.Options);
33
33
  /**
34
34
  * Converts natural language text into structured FHIR search queries for patient cohort analysis
35
35
  *
@@ -47,5 +47,5 @@ export declare class Cohort {
47
47
  */
48
48
  analyze(request: phenoml.cohort.CohortRequest, requestOptions?: Cohort.RequestOptions): core.HttpResponsePromise<phenoml.cohort.CohortResponse>;
49
49
  private __analyze;
50
- protected _getAuthorizationHeader(): Promise<string>;
50
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
51
51
  }
@@ -52,7 +52,7 @@ const phenoml = __importStar(require("../../../index.js"));
52
52
  const headers_js_1 = require("../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../errors/index.js"));
54
54
  class Cohort {
55
- constructor(_options) {
55
+ constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -127,7 +127,11 @@ class Cohort {
127
127
  }
128
128
  _getAuthorizationHeader() {
129
129
  return __awaiter(this, void 0, void 0, function* () {
130
- return `Bearer ${yield core.Supplier.get(this._options.token)}`;
130
+ const bearer = yield core.Supplier.get(this._options.token);
131
+ if (bearer != null) {
132
+ return `Bearer ${bearer}`;
133
+ }
134
+ return undefined;
131
135
  });
132
136
  }
133
137
  }
@@ -9,9 +9,9 @@ export declare namespace Construe {
9
9
  environment?: core.Supplier<environments.phenomlEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- token: core.Supplier<core.BearerToken>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
13
  /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
15
  fetcher?: core.FetchFunction;
16
16
  }
17
17
  interface RequestOptions {
@@ -24,12 +24,12 @@ export declare namespace Construe {
24
24
  /** Additional query string parameters to include in the request. */
25
25
  queryParams?: Record<string, unknown>;
26
26
  /** Additional headers to include in the request. */
27
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
28
  }
29
29
  }
30
30
  export declare class Construe {
31
31
  protected readonly _options: Construe.Options;
32
- constructor(_options: Construe.Options);
32
+ constructor(_options?: Construe.Options);
33
33
  /**
34
34
  * Upload a custom medical code system with codes and descriptions for use in code extraction.
35
35
  * Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
@@ -90,5 +90,5 @@ export declare class Construe {
90
90
  */
91
91
  cohort(request: phenoml.construe.ConstrueCohortRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ConstrueCohortResponse>;
92
92
  private __cohort;
93
- protected _getAuthorizationHeader(): Promise<string>;
93
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
94
94
  }
@@ -52,7 +52,7 @@ const phenoml = __importStar(require("../../../index.js"));
52
52
  const headers_js_1 = require("../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../errors/index.js"));
54
54
  class Construe {
55
- constructor(_options) {
55
+ constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -288,7 +288,11 @@ class Construe {
288
288
  }
289
289
  _getAuthorizationHeader() {
290
290
  return __awaiter(this, void 0, void 0, function* () {
291
- return `Bearer ${yield core.Supplier.get(this._options.token)}`;
291
+ const bearer = yield core.Supplier.get(this._options.token);
292
+ if (bearer != null) {
293
+ return `Bearer ${bearer}`;
294
+ }
295
+ return undefined;
292
296
  });
293
297
  }
294
298
  }