phenoml 15.0.0 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (590) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agent/client/Client.d.ts +6 -62
  3. package/dist/cjs/api/resources/agent/client/Client.js +8 -233
  4. package/dist/cjs/api/resources/agent/client/requests/{AgentListRequest.d.ts → ListRequest.d.ts} +1 -1
  5. package/dist/cjs/api/resources/agent/client/requests/index.d.ts +1 -4
  6. package/dist/cjs/api/resources/{fhir/errors/InternalServerError.d.ts → agent/errors/GatewayTimeoutError.d.ts} +1 -1
  7. package/dist/cjs/api/resources/{fhir/errors/BadRequestError.js → agent/errors/GatewayTimeoutError.js} +5 -5
  8. package/dist/cjs/api/resources/agent/errors/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/agent/errors/index.js +1 -0
  10. package/dist/cjs/api/resources/agent/resources/chat/client/Client.d.ts +79 -0
  11. package/dist/cjs/api/resources/agent/resources/chat/client/Client.js +305 -0
  12. package/dist/cjs/api/resources/agent/{client/requests/AgentGetChatMessagesRequest.d.ts → resources/chat/client/requests/ListMessagesRequest.d.ts} +4 -4
  13. package/dist/cjs/api/resources/agent/resources/chat/client/requests/index.d.ts +3 -0
  14. package/dist/cjs/api/resources/agent/resources/chat/exports.d.ts +2 -0
  15. package/dist/cjs/api/resources/{authtoken/resources/auth → agent/resources/chat}/exports.js +2 -2
  16. package/dist/cjs/api/resources/agent/resources/chat/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/{tools/resources/mcpServer → agent/resources/chat}/index.js +1 -1
  18. package/dist/cjs/api/resources/agent/resources/chat/types/ListMessagesRequestOrder.d.ts +5 -0
  19. package/dist/cjs/api/resources/agent/{types/AgentGetChatMessagesRequestOrder.js → resources/chat/types/ListMessagesRequestOrder.js} +2 -2
  20. package/dist/cjs/api/resources/agent/resources/chat/types/ListMessagesRequestRole.d.ts +7 -0
  21. package/dist/cjs/api/resources/agent/{types/AgentGetChatMessagesRequestRole.js → resources/chat/types/ListMessagesRequestRole.js} +2 -2
  22. package/dist/cjs/api/resources/agent/{types/AgentGetChatMessagesResponse.d.ts → resources/chat/types/ListMessagesResponse.d.ts} +2 -2
  23. package/dist/cjs/api/resources/agent/resources/chat/types/index.d.ts +3 -0
  24. package/dist/cjs/api/resources/agent/resources/chat/types/index.js +19 -0
  25. package/dist/cjs/api/resources/agent/resources/index.d.ts +3 -0
  26. package/dist/cjs/api/resources/agent/resources/index.js +4 -1
  27. package/dist/cjs/api/resources/agent/types/{AgentDeleteResponse.d.ts → DeleteResponse.d.ts} +1 -1
  28. package/dist/cjs/api/resources/agent/types/{AgentListResponse.d.ts → ListResponse.d.ts} +1 -1
  29. package/dist/cjs/api/resources/agent/types/index.d.ts +2 -5
  30. package/dist/cjs/api/resources/agent/types/index.js +2 -5
  31. package/dist/cjs/api/resources/authtoken/client/Client.d.ts +26 -4
  32. package/dist/cjs/api/resources/authtoken/client/Client.js +109 -4
  33. package/dist/cjs/api/resources/authtoken/client/index.d.ts +1 -1
  34. package/dist/cjs/api/resources/authtoken/client/index.js +15 -0
  35. package/dist/cjs/api/resources/authtoken/exports.d.ts +0 -1
  36. package/dist/cjs/api/resources/authtoken/exports.js +0 -1
  37. package/dist/cjs/api/resources/authtoken/index.d.ts +0 -1
  38. package/dist/cjs/api/resources/authtoken/index.js +0 -1
  39. package/dist/cjs/api/resources/construe/client/Client.d.ts +9 -333
  40. package/dist/cjs/api/resources/construe/client/Client.js +12 -842
  41. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +0 -9
  42. package/dist/cjs/api/resources/construe/client/requests/index.js +0 -3
  43. package/dist/cjs/api/resources/construe/exports.d.ts +1 -0
  44. package/dist/cjs/api/resources/construe/exports.js +1 -0
  45. package/dist/cjs/api/resources/construe/index.d.ts +1 -0
  46. package/dist/cjs/api/resources/construe/index.js +1 -0
  47. package/dist/cjs/api/resources/construe/resources/codeSystems/client/Client.d.ts +135 -0
  48. package/dist/cjs/api/resources/construe/resources/codeSystems/client/Client.js +433 -0
  49. package/dist/{esm/api/resources/construe/client/requests/DeleteConstrueCodesSystemsCodesystemRequest.d.mts → cjs/api/resources/construe/resources/codeSystems/client/requests/DeleteRequest.d.ts} +1 -1
  50. package/dist/cjs/api/resources/construe/{client/requests/DeleteConstrueCodesSystemsCodesystemRequest.d.ts → resources/codeSystems/client/requests/ExportRequest.d.ts} +1 -1
  51. package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesSystemsCodesystemRequest.d.ts → resources/codeSystems/client/requests/FindRequest.d.ts} +1 -1
  52. package/dist/cjs/api/resources/construe/{client → resources/codeSystems/client}/requests/UploadRequest.d.ts +1 -1
  53. package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/index.d.ts +4 -0
  54. package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/index.js +5 -0
  55. package/dist/cjs/api/resources/construe/resources/codeSystems/exports.d.ts +2 -0
  56. package/dist/cjs/api/resources/construe/resources/codeSystems/exports.js +21 -0
  57. package/dist/cjs/api/resources/construe/resources/codeSystems/index.d.ts +2 -0
  58. package/dist/cjs/api/resources/construe/resources/codeSystems/index.js +18 -0
  59. package/dist/{esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.mts → cjs/api/resources/construe/resources/codeSystems/types/UploadResponse.d.ts} +1 -1
  60. package/dist/cjs/api/resources/construe/resources/codeSystems/types/index.d.ts +1 -0
  61. package/dist/cjs/api/resources/construe/resources/codeSystems/types/index.js +17 -0
  62. package/dist/cjs/api/resources/construe/resources/codes/client/Client.d.ts +227 -0
  63. package/dist/cjs/api/resources/construe/resources/codes/client/Client.js +528 -0
  64. package/dist/cjs/api/resources/construe/resources/codes/client/index.d.ts +1 -0
  65. package/dist/cjs/api/resources/construe/resources/codes/client/index.js +17 -0
  66. package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesCodesystemRequest.d.ts → resources/codes/client/requests/CodesListRequest.d.ts} +1 -1
  67. package/dist/cjs/api/resources/construe/{client → resources/codes/client}/requests/ExtractRequest.d.ts +1 -1
  68. package/dist/{esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.mts → cjs/api/resources/construe/resources/codes/client/requests/LookupRequest.d.ts} +1 -1
  69. package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.d.ts → resources/codes/client/requests/SearchSemanticRequest.d.ts} +1 -1
  70. package/dist/{esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.mts → cjs/api/resources/construe/resources/codes/client/requests/SearchTextRequest.d.ts} +1 -1
  71. package/dist/cjs/api/resources/construe/resources/codes/client/requests/index.d.ts +5 -0
  72. package/dist/cjs/api/resources/construe/resources/codes/exports.d.ts +2 -0
  73. package/dist/cjs/api/resources/{tools/resources/mcpServer/resources/tools → construe/resources/codes}/exports.js +2 -2
  74. package/dist/cjs/api/resources/construe/resources/index.d.ts +5 -0
  75. package/dist/cjs/api/resources/construe/resources/index.js +44 -0
  76. package/dist/cjs/api/resources/construe/types/index.d.ts +0 -1
  77. package/dist/cjs/api/resources/construe/types/index.js +0 -1
  78. package/dist/cjs/api/resources/fhir/client/Client.d.ts +56 -81
  79. package/dist/cjs/api/resources/fhir/client/Client.js +81 -211
  80. package/dist/cjs/api/resources/fhir/client/requests/{FhirCreateRequest.d.ts → CreateRequest.d.ts} +3 -4
  81. package/dist/{esm/api/resources/fhir/client/requests/FhirDeleteRequest.d.mts → cjs/api/resources/fhir/client/requests/DeleteRequest.d.ts} +1 -1
  82. package/dist/{esm/api/resources/fhir/client/requests/FhirExecuteBundleRequest.d.mts → cjs/api/resources/fhir/client/requests/ExecuteBundleRequest.d.ts} +20 -17
  83. package/dist/cjs/api/resources/fhir/client/requests/{FhirPatchRequest.d.ts → PatchRequest.d.ts} +2 -2
  84. package/dist/cjs/api/resources/fhir/client/requests/{FhirDeleteRequest.d.ts → SearchRequest.d.ts} +1 -1
  85. package/dist/{esm/api/resources/fhir/client/requests/FhirCreateRequest.d.mts → cjs/api/resources/fhir/client/requests/UpsertRequest.d.ts} +4 -4
  86. package/dist/cjs/api/resources/fhir/client/requests/index.d.ts +6 -6
  87. package/dist/cjs/api/resources/fhir/index.d.ts +0 -1
  88. package/dist/cjs/api/resources/fhir/index.js +0 -1
  89. package/dist/cjs/api/resources/fhir/types/{FhirPatchRequestBodyItem.d.ts → PatchRequestBodyItem.d.ts} +3 -3
  90. package/dist/cjs/api/resources/fhir/types/{FhirPatchRequestBodyItem.js → PatchRequestBodyItem.js} +5 -5
  91. package/dist/cjs/api/resources/fhir/types/index.d.ts +1 -5
  92. package/dist/cjs/api/resources/fhir/types/index.js +1 -5
  93. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +4 -75
  94. package/dist/cjs/api/resources/fhirProvider/client/Client.js +6 -225
  95. package/dist/cjs/api/resources/fhirProvider/client/requests/index.d.ts +0 -2
  96. package/dist/cjs/api/resources/fhirProvider/exports.d.ts +1 -0
  97. package/dist/cjs/api/resources/fhirProvider/exports.js +1 -0
  98. package/dist/cjs/api/resources/fhirProvider/index.d.ts +1 -0
  99. package/dist/cjs/api/resources/fhirProvider/index.js +1 -0
  100. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/Client.d.ts +90 -0
  101. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/Client.js +280 -0
  102. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/index.d.ts +1 -0
  103. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/index.js +17 -0
  104. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/requests/index.d.ts +2 -0
  105. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/requests/index.js +2 -0
  106. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/exports.d.ts +2 -0
  107. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/exports.js +21 -0
  108. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/index.d.ts +2 -0
  109. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/index.js +18 -0
  110. package/dist/cjs/api/resources/fhirProvider/{types/FhirProviderRemoveAuthConfigResponse.d.ts → resources/authConfig/types/RemoveResponse.d.ts} +2 -2
  111. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/types/index.d.ts +1 -0
  112. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/types/index.js +17 -0
  113. package/dist/cjs/api/resources/fhirProvider/resources/index.d.ts +3 -0
  114. package/dist/cjs/api/resources/{tools/resources/mcpServer → fhirProvider}/resources/index.js +7 -2
  115. package/dist/{esm/api/resources/agent/types/AgentDeleteResponse.d.mts → cjs/api/resources/fhirProvider/types/DeleteResponse.d.ts} +1 -1
  116. package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +1 -2
  117. package/dist/cjs/api/resources/fhirProvider/types/index.js +1 -2
  118. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +15 -5
  119. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +37 -7
  120. package/dist/cjs/api/resources/{fhir/errors/ServiceUnavailableError.d.ts → lang2Fhir/errors/ClientClosedRequestError.d.ts} +1 -1
  121. package/dist/cjs/api/resources/lang2Fhir/errors/ClientClosedRequestError.js +54 -0
  122. package/dist/cjs/api/resources/{fhir/errors/UnauthorizedError.d.ts → lang2Fhir/errors/GatewayTimeoutError.d.ts} +1 -1
  123. package/dist/cjs/api/resources/{fhir/errors/InternalServerError.js → lang2Fhir/errors/GatewayTimeoutError.js} +5 -5
  124. package/dist/cjs/api/resources/lang2Fhir/errors/index.d.ts +3 -1
  125. package/dist/cjs/api/resources/lang2Fhir/errors/index.js +3 -1
  126. package/dist/{esm/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.d.mts → cjs/api/resources/lang2Fhir/types/UploadProfileResponse.d.ts} +1 -1
  127. package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +1 -1
  128. package/dist/cjs/api/resources/lang2Fhir/types/index.js +1 -1
  129. package/dist/cjs/api/resources/summary/client/Client.d.ts +3 -88
  130. package/dist/cjs/api/resources/summary/client/Client.js +4 -309
  131. package/dist/cjs/api/resources/summary/client/requests/index.d.ts +0 -2
  132. package/dist/cjs/api/resources/summary/exports.d.ts +1 -0
  133. package/dist/cjs/api/resources/summary/exports.js +1 -0
  134. package/dist/cjs/api/resources/summary/index.d.ts +1 -0
  135. package/dist/cjs/api/resources/summary/index.js +1 -0
  136. package/dist/cjs/api/resources/summary/resources/index.d.ts +3 -0
  137. package/dist/cjs/api/resources/{authtoken → summary}/resources/index.js +4 -3
  138. package/dist/cjs/api/resources/summary/resources/templates/client/Client.d.ts +104 -0
  139. package/dist/cjs/api/resources/summary/resources/templates/client/Client.js +360 -0
  140. package/dist/cjs/api/resources/summary/resources/templates/client/index.d.ts +1 -0
  141. package/dist/cjs/api/resources/summary/resources/templates/client/index.js +17 -0
  142. package/dist/cjs/api/resources/summary/resources/templates/client/requests/index.d.ts +2 -0
  143. package/dist/cjs/api/resources/summary/resources/templates/client/requests/index.js +2 -0
  144. package/dist/cjs/api/resources/summary/resources/templates/exports.d.ts +2 -0
  145. package/dist/cjs/api/resources/{tools/resources/mcpServer → summary/resources/templates}/exports.js +2 -3
  146. package/dist/cjs/api/resources/summary/resources/templates/index.d.ts +2 -0
  147. package/dist/cjs/api/resources/summary/resources/templates/index.js +18 -0
  148. package/dist/cjs/api/resources/{workflows/types/WorkflowsDeleteResponse.d.ts → summary/resources/templates/types/DeleteResponse.d.ts} +1 -1
  149. package/dist/cjs/api/resources/summary/{types/SummaryGetTemplateResponse.d.ts → resources/templates/types/GetResponse.d.ts} +2 -2
  150. package/dist/cjs/api/resources/summary/{types/SummaryListTemplatesResponse.d.ts → resources/templates/types/ListResponse.d.ts} +2 -2
  151. package/dist/cjs/api/resources/summary/{types/SummaryUpdateTemplateResponse.d.ts → resources/templates/types/UpdateResponse.d.ts} +2 -2
  152. package/dist/cjs/api/resources/summary/resources/templates/types/index.d.ts +4 -0
  153. package/dist/cjs/api/resources/summary/resources/templates/types/index.js +20 -0
  154. package/dist/cjs/api/resources/summary/types/index.d.ts +0 -4
  155. package/dist/cjs/api/resources/summary/types/index.js +0 -4
  156. package/dist/cjs/api/resources/tools/client/Client.d.ts +6 -6
  157. package/dist/cjs/api/resources/tools/client/Client.js +8 -12
  158. package/dist/cjs/api/resources/{fhir/errors/BadRequestError.d.ts → tools/errors/NotFoundError.d.ts} +1 -1
  159. package/dist/cjs/api/resources/{fhir/errors/BadGatewayError.js → tools/errors/NotFoundError.js} +5 -5
  160. package/dist/cjs/api/resources/tools/errors/index.d.ts +1 -1
  161. package/dist/cjs/api/resources/tools/errors/index.js +1 -1
  162. package/dist/cjs/api/resources/tools/resources/index.d.ts +3 -2
  163. package/dist/cjs/api/resources/tools/resources/index.js +4 -3
  164. package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/Client.d.ts +21 -19
  165. package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/Client.js +20 -16
  166. package/dist/cjs/api/resources/tools/resources/mcpServers/client/index.d.ts +1 -0
  167. package/dist/cjs/api/resources/tools/resources/mcpServers/client/index.js +17 -0
  168. package/dist/cjs/api/resources/tools/resources/mcpServers/client/requests/index.js +2 -0
  169. package/dist/cjs/api/resources/tools/resources/mcpServers/exports.d.ts +2 -0
  170. package/dist/cjs/api/resources/tools/resources/mcpServers/exports.js +21 -0
  171. package/dist/cjs/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/Client.d.ts +19 -17
  172. package/dist/cjs/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/Client.js +22 -16
  173. package/dist/cjs/api/resources/tools/resources/mcpTools/client/index.js +2 -0
  174. package/dist/cjs/api/resources/tools/resources/mcpTools/exports.d.ts +2 -0
  175. package/dist/cjs/api/resources/tools/resources/mcpTools/exports.js +21 -0
  176. package/dist/cjs/api/resources/tools/resources/mcpTools/index.d.ts +1 -0
  177. package/dist/cjs/api/resources/tools/resources/mcpTools/index.js +17 -0
  178. package/dist/cjs/api/resources/workflows/client/Client.d.ts +10 -6
  179. package/dist/cjs/api/resources/workflows/client/Client.js +17 -14
  180. package/dist/{esm/api/resources/workflows/client/requests/WorkflowsGetRequest.d.mts → cjs/api/resources/workflows/client/requests/GetRequest.d.ts} +1 -1
  181. package/dist/cjs/api/resources/workflows/client/requests/{WorkflowsGetRequest.d.ts → ListRequest.d.ts} +1 -1
  182. package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +2 -2
  183. package/dist/cjs/api/resources/workflows/errors/GatewayTimeoutError.d.ts +5 -0
  184. package/dist/cjs/api/resources/workflows/errors/GatewayTimeoutError.js +54 -0
  185. package/dist/cjs/api/resources/workflows/errors/index.d.ts +1 -0
  186. package/dist/cjs/api/resources/workflows/errors/index.js +1 -0
  187. package/dist/{esm/api/resources/workflows/types/WorkflowsDeleteResponse.d.mts → cjs/api/resources/workflows/types/DeleteResponse.d.ts} +1 -1
  188. package/dist/cjs/api/resources/workflows/types/{WorkflowsGetResponse.d.ts → GetResponse.d.ts} +1 -1
  189. package/dist/cjs/api/resources/workflows/types/{WorkflowsUpdateResponse.d.ts → UpdateResponse.d.ts} +1 -1
  190. package/dist/cjs/api/resources/workflows/types/index.d.ts +3 -3
  191. package/dist/cjs/api/resources/workflows/types/index.js +3 -3
  192. package/dist/cjs/auth/OAuthAuthProvider.js +2 -2
  193. package/dist/cjs/version.d.ts +1 -1
  194. package/dist/cjs/version.js +1 -1
  195. package/dist/esm/BaseClient.mjs +2 -2
  196. package/dist/esm/api/resources/agent/client/Client.d.mts +6 -62
  197. package/dist/esm/api/resources/agent/client/Client.mjs +7 -232
  198. package/dist/esm/api/resources/agent/client/requests/{AgentListRequest.d.mts → ListRequest.d.mts} +1 -1
  199. package/dist/esm/api/resources/agent/client/requests/index.d.mts +1 -4
  200. package/dist/esm/api/resources/{fhir/errors/InternalServerError.d.mts → agent/errors/GatewayTimeoutError.d.mts} +1 -1
  201. package/dist/esm/api/resources/{fhir/errors/InternalServerError.mjs → agent/errors/GatewayTimeoutError.mjs} +3 -3
  202. package/dist/esm/api/resources/agent/errors/index.d.mts +1 -0
  203. package/dist/esm/api/resources/agent/errors/index.mjs +1 -0
  204. package/dist/esm/api/resources/agent/resources/chat/client/Client.d.mts +79 -0
  205. package/dist/esm/api/resources/agent/resources/chat/client/Client.mjs +268 -0
  206. package/dist/esm/api/resources/agent/{client/requests/AgentGetChatMessagesRequest.d.mts → resources/chat/client/requests/ListMessagesRequest.d.mts} +4 -4
  207. package/dist/esm/api/resources/agent/resources/chat/client/requests/index.d.mts +3 -0
  208. package/dist/esm/api/resources/agent/resources/chat/exports.d.mts +2 -0
  209. package/dist/esm/api/resources/{authtoken/resources/auth → agent/resources/chat}/exports.mjs +1 -1
  210. package/dist/esm/api/resources/agent/resources/chat/index.d.mts +2 -0
  211. package/dist/esm/api/resources/agent/resources/chat/index.mjs +2 -0
  212. package/dist/esm/api/resources/agent/resources/chat/types/ListMessagesRequestOrder.d.mts +5 -0
  213. package/dist/esm/api/resources/agent/{types/AgentGetChatMessagesRequestOrder.mjs → resources/chat/types/ListMessagesRequestOrder.mjs} +1 -1
  214. package/dist/esm/api/resources/agent/resources/chat/types/ListMessagesRequestRole.d.mts +7 -0
  215. package/dist/esm/api/resources/agent/{types/AgentGetChatMessagesRequestRole.mjs → resources/chat/types/ListMessagesRequestRole.mjs} +1 -1
  216. package/dist/esm/api/resources/agent/{types/AgentGetChatMessagesResponse.d.mts → resources/chat/types/ListMessagesResponse.d.mts} +2 -2
  217. package/dist/esm/api/resources/agent/resources/chat/types/index.d.mts +3 -0
  218. package/dist/esm/api/resources/agent/resources/chat/types/index.mjs +3 -0
  219. package/dist/esm/api/resources/agent/resources/index.d.mts +3 -0
  220. package/dist/esm/api/resources/agent/resources/index.mjs +3 -0
  221. package/dist/esm/api/resources/agent/types/DeleteResponse.d.mts +4 -0
  222. package/dist/esm/api/resources/agent/types/{AgentListResponse.d.mts → ListResponse.d.mts} +1 -1
  223. package/dist/esm/api/resources/agent/types/index.d.mts +2 -5
  224. package/dist/esm/api/resources/agent/types/index.mjs +2 -5
  225. package/dist/esm/api/resources/authtoken/client/Client.d.mts +26 -4
  226. package/dist/esm/api/resources/authtoken/client/Client.mjs +76 -4
  227. package/dist/esm/api/resources/authtoken/client/index.d.mts +1 -1
  228. package/dist/esm/api/resources/authtoken/client/index.mjs +1 -1
  229. package/dist/esm/api/resources/authtoken/exports.d.mts +0 -1
  230. package/dist/esm/api/resources/authtoken/exports.mjs +0 -1
  231. package/dist/esm/api/resources/authtoken/index.d.mts +0 -1
  232. package/dist/esm/api/resources/authtoken/index.mjs +0 -1
  233. package/dist/esm/api/resources/construe/client/Client.d.mts +9 -333
  234. package/dist/esm/api/resources/construe/client/Client.mjs +12 -842
  235. package/dist/esm/api/resources/construe/client/requests/index.d.mts +0 -9
  236. package/dist/esm/api/resources/construe/client/requests/index.mjs +1 -1
  237. package/dist/esm/api/resources/construe/exports.d.mts +1 -0
  238. package/dist/esm/api/resources/construe/exports.mjs +1 -0
  239. package/dist/esm/api/resources/construe/index.d.mts +1 -0
  240. package/dist/esm/api/resources/construe/index.mjs +1 -0
  241. package/dist/esm/api/resources/construe/resources/codeSystems/client/Client.d.mts +135 -0
  242. package/dist/esm/api/resources/construe/resources/codeSystems/client/Client.mjs +396 -0
  243. package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesSystemsCodesystemExportRequest.d.mts → resources/codeSystems/client/requests/DeleteRequest.d.mts} +1 -1
  244. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesSystemsCodesystemExportRequest.d.ts → esm/api/resources/construe/resources/codeSystems/client/requests/ExportRequest.d.mts} +1 -1
  245. package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesSystemsCodesystemRequest.d.mts → resources/codeSystems/client/requests/FindRequest.d.mts} +1 -1
  246. package/dist/esm/api/resources/construe/{client → resources/codeSystems/client}/requests/UploadRequest.d.mts +1 -1
  247. package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/index.d.mts +4 -0
  248. package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/index.mjs +1 -0
  249. package/dist/esm/api/resources/construe/resources/codeSystems/exports.d.mts +2 -0
  250. package/dist/esm/api/resources/{tools/resources/mcpServer → construe/resources/codeSystems}/exports.mjs +1 -2
  251. package/dist/esm/api/resources/construe/resources/codeSystems/index.d.mts +2 -0
  252. package/dist/esm/api/resources/construe/resources/codeSystems/index.mjs +2 -0
  253. package/dist/{cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.ts → esm/api/resources/construe/resources/codeSystems/types/UploadResponse.d.mts} +1 -1
  254. package/dist/esm/api/resources/construe/resources/codeSystems/types/index.d.mts +1 -0
  255. package/dist/esm/api/resources/construe/resources/codeSystems/types/index.mjs +1 -0
  256. package/dist/esm/api/resources/construe/resources/codes/client/Client.d.mts +227 -0
  257. package/dist/esm/api/resources/construe/resources/codes/client/Client.mjs +491 -0
  258. package/dist/esm/api/resources/construe/resources/codes/client/index.d.mts +1 -0
  259. package/dist/esm/api/resources/construe/resources/codes/client/index.mjs +1 -0
  260. package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesCodesystemRequest.d.mts → resources/codes/client/requests/CodesListRequest.d.mts} +1 -1
  261. package/dist/esm/api/resources/construe/{client → resources/codes/client}/requests/ExtractRequest.d.mts +1 -1
  262. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.ts → esm/api/resources/construe/resources/codes/client/requests/LookupRequest.d.mts} +1 -1
  263. package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.d.mts → resources/codes/client/requests/SearchSemanticRequest.d.mts} +1 -1
  264. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.ts → esm/api/resources/construe/resources/codes/client/requests/SearchTextRequest.d.mts} +1 -1
  265. package/dist/esm/api/resources/construe/resources/codes/client/requests/index.d.mts +5 -0
  266. package/dist/esm/api/resources/construe/resources/codes/exports.d.mts +2 -0
  267. package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools → construe/resources/codes}/exports.mjs +1 -1
  268. package/dist/esm/api/resources/construe/resources/index.d.mts +5 -0
  269. package/dist/esm/api/resources/construe/resources/index.mjs +5 -0
  270. package/dist/esm/api/resources/construe/types/index.d.mts +0 -1
  271. package/dist/esm/api/resources/construe/types/index.mjs +0 -1
  272. package/dist/esm/api/resources/fhir/client/Client.d.mts +56 -81
  273. package/dist/esm/api/resources/fhir/client/Client.mjs +81 -211
  274. package/dist/esm/api/resources/fhir/client/requests/CreateRequest.d.mts +23 -0
  275. package/dist/esm/api/resources/fhir/client/requests/DeleteRequest.d.mts +19 -0
  276. package/dist/{cjs/api/resources/fhir/client/requests/FhirExecuteBundleRequest.d.ts → esm/api/resources/fhir/client/requests/ExecuteBundleRequest.d.mts} +20 -17
  277. package/dist/esm/api/resources/fhir/client/requests/{FhirPatchRequest.d.mts → PatchRequest.d.mts} +2 -2
  278. package/dist/esm/api/resources/fhir/client/requests/SearchRequest.d.mts +19 -0
  279. package/dist/{cjs/api/resources/fhir/client/requests/FhirUpsertRequest.d.ts → esm/api/resources/fhir/client/requests/UpsertRequest.d.mts} +4 -5
  280. package/dist/esm/api/resources/fhir/client/requests/index.d.mts +6 -6
  281. package/dist/esm/api/resources/fhir/index.d.mts +0 -1
  282. package/dist/esm/api/resources/fhir/index.mjs +0 -1
  283. package/dist/esm/api/resources/fhir/types/{FhirPatchRequestBodyItem.d.mts → PatchRequestBodyItem.d.mts} +3 -3
  284. package/dist/esm/api/resources/fhir/types/{FhirPatchRequestBodyItem.mjs → PatchRequestBodyItem.mjs} +4 -4
  285. package/dist/esm/api/resources/fhir/types/index.d.mts +1 -5
  286. package/dist/esm/api/resources/fhir/types/index.mjs +1 -5
  287. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +4 -75
  288. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +6 -225
  289. package/dist/esm/api/resources/fhirProvider/client/requests/index.d.mts +0 -2
  290. package/dist/esm/api/resources/fhirProvider/exports.d.mts +1 -0
  291. package/dist/esm/api/resources/fhirProvider/exports.mjs +1 -0
  292. package/dist/esm/api/resources/fhirProvider/index.d.mts +1 -0
  293. package/dist/esm/api/resources/fhirProvider/index.mjs +1 -0
  294. package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/Client.d.mts +90 -0
  295. package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/Client.mjs +243 -0
  296. package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/index.d.mts +1 -0
  297. package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/index.mjs +1 -0
  298. package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/requests/index.d.mts +2 -0
  299. package/dist/esm/api/resources/fhirProvider/resources/authConfig/exports.d.mts +2 -0
  300. package/dist/esm/api/resources/fhirProvider/resources/authConfig/exports.mjs +3 -0
  301. package/dist/esm/api/resources/fhirProvider/resources/authConfig/index.d.mts +2 -0
  302. package/dist/esm/api/resources/fhirProvider/resources/authConfig/index.mjs +2 -0
  303. package/dist/esm/api/resources/fhirProvider/{types/FhirProviderRemoveAuthConfigResponse.d.mts → resources/authConfig/types/RemoveResponse.d.mts} +2 -2
  304. package/dist/esm/api/resources/fhirProvider/resources/authConfig/types/index.d.mts +1 -0
  305. package/dist/esm/api/resources/fhirProvider/resources/authConfig/types/index.mjs +1 -0
  306. package/dist/esm/api/resources/fhirProvider/resources/index.d.mts +3 -0
  307. package/dist/esm/api/resources/fhirProvider/resources/index.mjs +3 -0
  308. package/dist/esm/api/resources/fhirProvider/types/DeleteResponse.d.mts +4 -0
  309. package/dist/esm/api/resources/fhirProvider/types/index.d.mts +1 -2
  310. package/dist/esm/api/resources/fhirProvider/types/index.mjs +1 -2
  311. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +15 -5
  312. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +37 -7
  313. package/dist/esm/api/resources/{fhir/errors/ServiceUnavailableError.d.mts → lang2Fhir/errors/ClientClosedRequestError.d.mts} +1 -1
  314. package/dist/esm/api/resources/lang2Fhir/errors/ClientClosedRequestError.mjs +17 -0
  315. package/dist/esm/api/resources/{fhir/errors/UnauthorizedError.d.mts → lang2Fhir/errors/GatewayTimeoutError.d.mts} +1 -1
  316. package/dist/esm/api/resources/{fhir/errors/BadGatewayError.mjs → lang2Fhir/errors/GatewayTimeoutError.mjs} +3 -3
  317. package/dist/esm/api/resources/lang2Fhir/errors/index.d.mts +3 -1
  318. package/dist/esm/api/resources/lang2Fhir/errors/index.mjs +3 -1
  319. package/dist/{cjs/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.d.ts → esm/api/resources/lang2Fhir/types/UploadProfileResponse.d.mts} +1 -1
  320. package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +1 -1
  321. package/dist/esm/api/resources/lang2Fhir/types/index.mjs +1 -1
  322. package/dist/esm/api/resources/summary/client/Client.d.mts +3 -88
  323. package/dist/esm/api/resources/summary/client/Client.mjs +4 -309
  324. package/dist/esm/api/resources/summary/client/requests/index.d.mts +0 -2
  325. package/dist/esm/api/resources/summary/exports.d.mts +1 -0
  326. package/dist/esm/api/resources/summary/exports.mjs +1 -0
  327. package/dist/esm/api/resources/summary/index.d.mts +1 -0
  328. package/dist/esm/api/resources/summary/index.mjs +1 -0
  329. package/dist/esm/api/resources/summary/resources/index.d.mts +3 -0
  330. package/dist/esm/api/resources/summary/resources/index.mjs +3 -0
  331. package/dist/esm/api/resources/summary/resources/templates/client/Client.d.mts +104 -0
  332. package/dist/esm/api/resources/summary/resources/templates/client/Client.mjs +323 -0
  333. package/dist/esm/api/resources/summary/resources/templates/client/index.d.mts +1 -0
  334. package/dist/esm/api/resources/summary/resources/templates/client/index.mjs +1 -0
  335. package/dist/esm/api/resources/summary/resources/templates/client/requests/index.d.mts +2 -0
  336. package/dist/esm/api/resources/summary/resources/templates/client/requests/index.mjs +1 -0
  337. package/dist/esm/api/resources/summary/resources/templates/exports.d.mts +2 -0
  338. package/dist/esm/api/resources/summary/resources/templates/exports.mjs +3 -0
  339. package/dist/esm/api/resources/summary/resources/templates/index.d.mts +2 -0
  340. package/dist/esm/api/resources/summary/resources/templates/index.mjs +2 -0
  341. package/dist/esm/api/resources/summary/resources/templates/types/DeleteResponse.d.mts +4 -0
  342. package/dist/esm/api/resources/summary/resources/templates/types/GetResponse.d.mts +5 -0
  343. package/dist/esm/api/resources/summary/{types/SummaryListTemplatesResponse.d.mts → resources/templates/types/ListResponse.d.mts} +2 -2
  344. package/dist/esm/api/resources/summary/{types/SummaryUpdateTemplateResponse.d.mts → resources/templates/types/UpdateResponse.d.mts} +2 -2
  345. package/dist/esm/api/resources/summary/resources/templates/types/index.d.mts +4 -0
  346. package/dist/esm/api/resources/summary/resources/templates/types/index.mjs +4 -0
  347. package/dist/esm/api/resources/summary/types/index.d.mts +0 -4
  348. package/dist/esm/api/resources/summary/types/index.mjs +0 -4
  349. package/dist/esm/api/resources/tools/client/Client.d.mts +6 -6
  350. package/dist/esm/api/resources/tools/client/Client.mjs +8 -12
  351. package/dist/esm/api/resources/{fhir/errors/BadRequestError.d.mts → tools/errors/NotFoundError.d.mts} +1 -1
  352. package/dist/esm/api/resources/{fhir/errors/BadRequestError.mjs → tools/errors/NotFoundError.mjs} +3 -3
  353. package/dist/esm/api/resources/tools/errors/index.d.mts +1 -1
  354. package/dist/esm/api/resources/tools/errors/index.mjs +1 -1
  355. package/dist/esm/api/resources/tools/resources/index.d.mts +3 -2
  356. package/dist/esm/api/resources/tools/resources/index.mjs +3 -2
  357. package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/Client.d.mts +21 -19
  358. package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/Client.mjs +18 -14
  359. package/dist/esm/api/resources/tools/resources/mcpServers/client/index.d.mts +1 -0
  360. package/dist/esm/api/resources/tools/resources/mcpServers/client/index.mjs +1 -0
  361. package/dist/esm/api/resources/tools/resources/mcpServers/client/requests/index.mjs +1 -0
  362. package/dist/esm/api/resources/tools/resources/mcpServers/exports.d.mts +2 -0
  363. package/dist/esm/api/resources/tools/resources/mcpServers/exports.mjs +3 -0
  364. package/dist/esm/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/Client.d.mts +19 -17
  365. package/dist/esm/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/Client.mjs +20 -14
  366. package/dist/esm/api/resources/tools/resources/mcpTools/client/index.d.mts +1 -0
  367. package/dist/esm/api/resources/tools/resources/mcpTools/client/index.mjs +1 -0
  368. package/dist/esm/api/resources/tools/resources/mcpTools/exports.d.mts +2 -0
  369. package/dist/esm/api/resources/tools/resources/mcpTools/exports.mjs +3 -0
  370. package/dist/esm/api/resources/tools/resources/mcpTools/index.d.mts +1 -0
  371. package/dist/esm/api/resources/tools/resources/mcpTools/index.mjs +1 -0
  372. package/dist/esm/api/resources/workflows/client/Client.d.mts +10 -6
  373. package/dist/esm/api/resources/workflows/client/Client.mjs +17 -14
  374. package/dist/esm/api/resources/workflows/client/requests/{WorkflowsListRequest.d.mts → GetRequest.d.mts} +1 -1
  375. package/dist/{cjs/api/resources/workflows/client/requests/WorkflowsListRequest.d.ts → esm/api/resources/workflows/client/requests/ListRequest.d.mts} +1 -1
  376. package/dist/esm/api/resources/workflows/client/requests/index.d.mts +2 -2
  377. package/dist/esm/api/resources/workflows/errors/GatewayTimeoutError.d.mts +5 -0
  378. package/dist/esm/api/resources/workflows/errors/GatewayTimeoutError.mjs +17 -0
  379. package/dist/esm/api/resources/workflows/errors/index.d.mts +1 -0
  380. package/dist/esm/api/resources/workflows/errors/index.mjs +1 -0
  381. package/dist/esm/api/resources/workflows/types/DeleteResponse.d.mts +4 -0
  382. package/dist/esm/api/resources/workflows/types/{WorkflowsGetResponse.d.mts → GetResponse.d.mts} +1 -1
  383. package/dist/esm/api/resources/workflows/types/{WorkflowsUpdateResponse.d.mts → UpdateResponse.d.mts} +1 -1
  384. package/dist/esm/api/resources/workflows/types/index.d.mts +3 -3
  385. package/dist/esm/api/resources/workflows/types/index.mjs +3 -3
  386. package/dist/esm/auth/OAuthAuthProvider.mjs +2 -2
  387. package/dist/esm/version.d.mts +1 -1
  388. package/dist/esm/version.mjs +1 -1
  389. package/openapi/openapi.json +11090 -0
  390. package/package.json +70 -24
  391. package/reference.md +341 -316
  392. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestOrder.d.ts +0 -5
  393. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.ts +0 -7
  394. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +0 -34
  395. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +0 -121
  396. package/dist/cjs/api/resources/authtoken/resources/auth/exports.d.ts +0 -2
  397. package/dist/cjs/api/resources/authtoken/resources/index.d.ts +0 -2
  398. package/dist/cjs/api/resources/fhir/client/requests/FhirSearchRequest.d.ts +0 -27
  399. package/dist/cjs/api/resources/fhir/errors/BadGatewayError.d.ts +0 -6
  400. package/dist/cjs/api/resources/fhir/errors/ServiceUnavailableError.js +0 -54
  401. package/dist/cjs/api/resources/fhir/errors/TooManyRequestsError.d.ts +0 -6
  402. package/dist/cjs/api/resources/fhir/errors/TooManyRequestsError.js +0 -54
  403. package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.js +0 -54
  404. package/dist/cjs/api/resources/fhir/errors/index.d.ts +0 -7
  405. package/dist/cjs/api/resources/fhir/errors/index.js +0 -23
  406. package/dist/cjs/api/resources/fhir/types/ErrorResponse.d.ts +0 -11
  407. package/dist/cjs/api/resources/fhir/types/FhirBundle.d.ts +0 -54
  408. package/dist/cjs/api/resources/fhir/types/FhirBundle.js +0 -23
  409. package/dist/cjs/api/resources/fhir/types/FhirResource.d.ts +0 -24
  410. package/dist/cjs/api/resources/fhir/types/FhirSearchResponse.d.ts +0 -2
  411. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.ts +0 -4
  412. package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.d.ts +0 -5
  413. package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.js +0 -54
  414. package/dist/cjs/api/resources/summary/types/SummaryDeleteTemplateResponse.d.ts +0 -4
  415. package/dist/cjs/api/resources/tools/errors/FailedDependencyError.d.ts +0 -5
  416. package/dist/cjs/api/resources/tools/errors/FailedDependencyError.js +0 -54
  417. package/dist/cjs/api/resources/tools/resources/mcpServer/exports.d.ts +0 -3
  418. package/dist/cjs/api/resources/tools/resources/mcpServer/index.d.ts +0 -2
  419. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/index.d.ts +0 -1
  420. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/exports.d.ts +0 -2
  421. package/dist/cjs/api/resources/workflows/types/WorkflowsDeleteResponse.js +0 -3
  422. package/dist/cjs/api/resources/workflows/types/WorkflowsGetResponse.js +0 -3
  423. package/dist/cjs/api/resources/workflows/types/WorkflowsUpdateResponse.js +0 -3
  424. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestOrder.d.mts +0 -5
  425. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.mts +0 -7
  426. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +0 -34
  427. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +0 -84
  428. package/dist/esm/api/resources/authtoken/resources/auth/exports.d.mts +0 -2
  429. package/dist/esm/api/resources/authtoken/resources/index.d.mts +0 -2
  430. package/dist/esm/api/resources/authtoken/resources/index.mjs +0 -2
  431. package/dist/esm/api/resources/fhir/client/requests/FhirSearchRequest.d.mts +0 -27
  432. package/dist/esm/api/resources/fhir/client/requests/FhirUpsertRequest.d.mts +0 -25
  433. package/dist/esm/api/resources/fhir/errors/BadGatewayError.d.mts +0 -6
  434. package/dist/esm/api/resources/fhir/errors/ServiceUnavailableError.mjs +0 -17
  435. package/dist/esm/api/resources/fhir/errors/TooManyRequestsError.d.mts +0 -6
  436. package/dist/esm/api/resources/fhir/errors/TooManyRequestsError.mjs +0 -17
  437. package/dist/esm/api/resources/fhir/errors/UnauthorizedError.mjs +0 -17
  438. package/dist/esm/api/resources/fhir/errors/index.d.mts +0 -7
  439. package/dist/esm/api/resources/fhir/errors/index.mjs +0 -7
  440. package/dist/esm/api/resources/fhir/types/ErrorResponse.d.mts +0 -11
  441. package/dist/esm/api/resources/fhir/types/FhirBundle.d.mts +0 -54
  442. package/dist/esm/api/resources/fhir/types/FhirBundle.mjs +0 -20
  443. package/dist/esm/api/resources/fhir/types/FhirResource.d.mts +0 -24
  444. package/dist/esm/api/resources/fhir/types/FhirSearchResponse.d.mts +0 -2
  445. package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.mts +0 -4
  446. package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.d.mts +0 -5
  447. package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.mjs +0 -17
  448. package/dist/esm/api/resources/summary/types/SummaryDeleteTemplateResponse.d.mts +0 -4
  449. package/dist/esm/api/resources/summary/types/SummaryGetTemplateResponse.d.mts +0 -5
  450. package/dist/esm/api/resources/tools/errors/FailedDependencyError.d.mts +0 -5
  451. package/dist/esm/api/resources/tools/errors/FailedDependencyError.mjs +0 -17
  452. package/dist/esm/api/resources/tools/resources/mcpServer/exports.d.mts +0 -3
  453. package/dist/esm/api/resources/tools/resources/mcpServer/index.d.mts +0 -2
  454. package/dist/esm/api/resources/tools/resources/mcpServer/index.mjs +0 -2
  455. package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.d.mts +0 -1
  456. package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.mjs +0 -1
  457. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/exports.d.mts +0 -2
  458. package/dist/esm/api/resources/workflows/types/WorkflowsDeleteResponse.mjs +0 -2
  459. package/dist/esm/api/resources/workflows/types/WorkflowsGetResponse.mjs +0 -2
  460. package/dist/esm/api/resources/workflows/types/WorkflowsUpdateResponse.mjs +0 -2
  461. /package/dist/cjs/api/resources/agent/client/requests/{AgentChatRequest.js → ListRequest.js} +0 -0
  462. /package/dist/cjs/api/resources/{authtoken/resources/auth → agent/resources/chat}/client/index.d.ts +0 -0
  463. /package/dist/cjs/api/resources/{authtoken/resources/auth → agent/resources/chat}/client/index.js +0 -0
  464. /package/dist/cjs/api/resources/agent/{client → resources/chat/client}/requests/AgentChatRequest.d.ts +0 -0
  465. /package/dist/cjs/api/resources/agent/{client/requests/AgentGetChatMessagesRequest.js → resources/chat/client/requests/AgentChatRequest.js} +0 -0
  466. /package/dist/cjs/api/resources/agent/{client → resources/chat/client}/requests/AgentStreamChatRequest.d.ts +0 -0
  467. /package/dist/cjs/api/resources/agent/{client → resources/chat/client}/requests/AgentStreamChatRequest.js +0 -0
  468. /package/dist/cjs/api/resources/agent/{client/requests/AgentListRequest.js → resources/chat/client/requests/ListMessagesRequest.js} +0 -0
  469. /package/dist/cjs/api/resources/{authtoken/resources/auth → agent/resources/chat}/client/requests/index.js +0 -0
  470. /package/dist/cjs/api/resources/agent/{types/AgentDeleteResponse.js → resources/chat/types/ListMessagesResponse.js} +0 -0
  471. /package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesResponse.js → DeleteResponse.js} +0 -0
  472. /package/dist/cjs/api/resources/agent/types/{AgentListResponse.js → ListResponse.js} +0 -0
  473. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.d.ts +0 -0
  474. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.js +0 -0
  475. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/index.d.ts +0 -0
  476. /package/dist/cjs/api/resources/{tools/resources/mcpServer → authtoken}/client/requests/index.js +0 -0
  477. /package/dist/cjs/api/resources/{tools/resources/mcpServer → construe/resources/codeSystems}/client/index.d.ts +0 -0
  478. /package/dist/cjs/api/resources/{tools/resources/mcpServer → construe/resources/codeSystems}/client/index.js +0 -0
  479. /package/dist/cjs/api/resources/construe/{client/requests/DeleteConstrueCodesSystemsCodesystemRequest.js → resources/codeSystems/client/requests/DeleteRequest.js} +0 -0
  480. /package/dist/cjs/api/resources/construe/{client/requests/ExtractRequest.js → resources/codeSystems/client/requests/ExportRequest.js} +0 -0
  481. /package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesCodesystemCodeIdRequest.js → resources/codeSystems/client/requests/FindRequest.js} +0 -0
  482. /package/dist/cjs/api/resources/construe/{client → resources/codeSystems/client}/requests/UploadRequest.js +0 -0
  483. /package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesCodesystemRequest.js → resources/codeSystems/types/UploadResponse.js} +0 -0
  484. /package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.js → resources/codes/client/requests/CodesListRequest.js} +0 -0
  485. /package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesCodesystemSearchTextRequest.js → resources/codes/client/requests/ExtractRequest.js} +0 -0
  486. /package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesSystemsCodesystemExportRequest.js → resources/codes/client/requests/LookupRequest.js} +0 -0
  487. /package/dist/cjs/api/resources/construe/{client/requests/GetConstrueCodesSystemsCodesystemRequest.js → resources/codes/client/requests/SearchSemanticRequest.js} +0 -0
  488. /package/dist/cjs/api/resources/construe/{types/ConstrueUploadCodeSystemResponse.js → resources/codes/client/requests/SearchTextRequest.js} +0 -0
  489. /package/dist/cjs/api/resources/{tools/resources/mcpServer/resources/tools/client → construe/resources/codes/client/requests}/index.js +0 -0
  490. /package/dist/cjs/api/resources/{authtoken/resources/auth → construe/resources/codes}/index.d.ts +0 -0
  491. /package/dist/cjs/api/resources/{authtoken/resources/auth → construe/resources/codes}/index.js +0 -0
  492. /package/dist/cjs/api/resources/fhir/client/requests/{FhirCreateRequest.js → CreateRequest.js} +0 -0
  493. /package/dist/cjs/api/resources/fhir/client/requests/{FhirDeleteRequest.js → DeleteRequest.js} +0 -0
  494. /package/dist/cjs/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.js → ExecuteBundleRequest.js} +0 -0
  495. /package/dist/cjs/api/resources/fhir/client/requests/{FhirPatchRequest.js → PatchRequest.js} +0 -0
  496. /package/dist/cjs/api/resources/fhir/client/requests/{FhirSearchRequest.js → SearchRequest.js} +0 -0
  497. /package/dist/cjs/api/resources/fhir/client/requests/{FhirUpsertRequest.js → UpsertRequest.js} +0 -0
  498. /package/dist/cjs/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderRemoveAuthConfigRequest.d.ts +0 -0
  499. /package/dist/cjs/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderRemoveAuthConfigRequest.js +0 -0
  500. /package/dist/cjs/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderSetActiveAuthConfigRequest.d.ts +0 -0
  501. /package/dist/cjs/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderSetActiveAuthConfigRequest.js +0 -0
  502. /package/dist/cjs/api/resources/{fhir/types/ErrorResponse.js → fhirProvider/resources/authConfig/types/RemoveResponse.js} +0 -0
  503. /package/dist/cjs/api/resources/{fhir/types/FhirResource.js → fhirProvider/types/DeleteResponse.js} +0 -0
  504. /package/dist/cjs/api/resources/{fhir → lang2Fhir}/errors/NotFoundError.d.ts +0 -0
  505. /package/dist/cjs/api/resources/{fhir → lang2Fhir}/errors/NotFoundError.js +0 -0
  506. /package/dist/cjs/api/resources/{fhir/types/FhirSearchResponse.js → lang2Fhir/types/UploadProfileResponse.js} +0 -0
  507. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.d.ts +0 -0
  508. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.js +0 -0
  509. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.d.ts +0 -0
  510. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.js +0 -0
  511. /package/dist/cjs/api/resources/{fhirProvider/types/FhirProviderDeleteResponse.js → summary/resources/templates/types/DeleteResponse.js} +0 -0
  512. /package/dist/cjs/api/resources/{fhirProvider/types/FhirProviderRemoveAuthConfigResponse.js → summary/resources/templates/types/GetResponse.js} +0 -0
  513. /package/dist/cjs/api/resources/{lang2Fhir/types/Lang2FhirUploadProfileResponse.js → summary/resources/templates/types/ListResponse.js} +0 -0
  514. /package/dist/cjs/api/resources/summary/{types/SummaryDeleteTemplateResponse.js → resources/templates/types/UpdateResponse.js} +0 -0
  515. /package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/McpServerCreateRequest.d.ts +0 -0
  516. /package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/McpServerCreateRequest.js +0 -0
  517. /package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/index.d.ts +0 -0
  518. /package/dist/cjs/api/resources/tools/resources/{mcpServer/resources/tools → mcpServers}/index.d.ts +0 -0
  519. /package/dist/cjs/api/resources/tools/resources/{mcpServer/resources/tools → mcpServers}/index.js +0 -0
  520. /package/dist/cjs/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/index.d.ts +0 -0
  521. /package/dist/cjs/api/resources/{summary/types/SummaryGetTemplateResponse.js → workflows/client/requests/GetRequest.js} +0 -0
  522. /package/dist/cjs/api/resources/{summary/types/SummaryListTemplatesResponse.js → workflows/client/requests/ListRequest.js} +0 -0
  523. /package/dist/cjs/api/resources/{summary/types/SummaryUpdateTemplateResponse.js → workflows/types/DeleteResponse.js} +0 -0
  524. /package/dist/cjs/api/resources/workflows/{client/requests/WorkflowsGetRequest.js → types/GetResponse.js} +0 -0
  525. /package/dist/cjs/api/resources/workflows/{client/requests/WorkflowsListRequest.js → types/UpdateResponse.js} +0 -0
  526. /package/dist/esm/api/resources/agent/client/requests/{AgentChatRequest.mjs → ListRequest.mjs} +0 -0
  527. /package/dist/esm/api/resources/{authtoken/resources/auth → agent/resources/chat}/client/index.d.mts +0 -0
  528. /package/dist/esm/api/resources/{authtoken/resources/auth → agent/resources/chat}/client/index.mjs +0 -0
  529. /package/dist/esm/api/resources/agent/{client → resources/chat/client}/requests/AgentChatRequest.d.mts +0 -0
  530. /package/dist/esm/api/resources/agent/{client/requests/AgentGetChatMessagesRequest.mjs → resources/chat/client/requests/AgentChatRequest.mjs} +0 -0
  531. /package/dist/esm/api/resources/agent/{client → resources/chat/client}/requests/AgentStreamChatRequest.d.mts +0 -0
  532. /package/dist/esm/api/resources/agent/{client → resources/chat/client}/requests/AgentStreamChatRequest.mjs +0 -0
  533. /package/dist/esm/api/resources/agent/{client/requests/AgentListRequest.mjs → resources/chat/client/requests/ListMessagesRequest.mjs} +0 -0
  534. /package/dist/esm/api/resources/{authtoken/resources/auth → agent/resources/chat}/client/requests/index.mjs +0 -0
  535. /package/dist/esm/api/resources/agent/{types/AgentDeleteResponse.mjs → resources/chat/types/ListMessagesResponse.mjs} +0 -0
  536. /package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesResponse.mjs → DeleteResponse.mjs} +0 -0
  537. /package/dist/esm/api/resources/agent/types/{AgentListResponse.mjs → ListResponse.mjs} +0 -0
  538. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.d.mts +0 -0
  539. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.mjs +0 -0
  540. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/index.d.mts +0 -0
  541. /package/dist/esm/api/resources/{tools/resources/mcpServer → authtoken}/client/requests/index.mjs +0 -0
  542. /package/dist/esm/api/resources/{tools/resources/mcpServer → construe/resources/codeSystems}/client/index.d.mts +0 -0
  543. /package/dist/esm/api/resources/{tools/resources/mcpServer → construe/resources/codeSystems}/client/index.mjs +0 -0
  544. /package/dist/esm/api/resources/construe/{client/requests/DeleteConstrueCodesSystemsCodesystemRequest.mjs → resources/codeSystems/client/requests/DeleteRequest.mjs} +0 -0
  545. /package/dist/esm/api/resources/construe/{client/requests/ExtractRequest.mjs → resources/codeSystems/client/requests/ExportRequest.mjs} +0 -0
  546. /package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesCodesystemCodeIdRequest.mjs → resources/codeSystems/client/requests/FindRequest.mjs} +0 -0
  547. /package/dist/esm/api/resources/construe/{client → resources/codeSystems/client}/requests/UploadRequest.mjs +0 -0
  548. /package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesCodesystemRequest.mjs → resources/codeSystems/types/UploadResponse.mjs} +0 -0
  549. /package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.mjs → resources/codes/client/requests/CodesListRequest.mjs} +0 -0
  550. /package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesCodesystemSearchTextRequest.mjs → resources/codes/client/requests/ExtractRequest.mjs} +0 -0
  551. /package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesSystemsCodesystemExportRequest.mjs → resources/codes/client/requests/LookupRequest.mjs} +0 -0
  552. /package/dist/esm/api/resources/construe/{client/requests/GetConstrueCodesSystemsCodesystemRequest.mjs → resources/codes/client/requests/SearchSemanticRequest.mjs} +0 -0
  553. /package/dist/esm/api/resources/construe/{types/ConstrueUploadCodeSystemResponse.mjs → resources/codes/client/requests/SearchTextRequest.mjs} +0 -0
  554. /package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools/client → construe/resources/codes/client/requests}/index.mjs +0 -0
  555. /package/dist/esm/api/resources/{authtoken/resources/auth → construe/resources/codes}/index.d.mts +0 -0
  556. /package/dist/esm/api/resources/{authtoken/resources/auth → construe/resources/codes}/index.mjs +0 -0
  557. /package/dist/esm/api/resources/fhir/client/requests/{FhirCreateRequest.mjs → CreateRequest.mjs} +0 -0
  558. /package/dist/esm/api/resources/fhir/client/requests/{FhirDeleteRequest.mjs → DeleteRequest.mjs} +0 -0
  559. /package/dist/esm/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.mjs → ExecuteBundleRequest.mjs} +0 -0
  560. /package/dist/esm/api/resources/fhir/client/requests/{FhirPatchRequest.mjs → PatchRequest.mjs} +0 -0
  561. /package/dist/esm/api/resources/fhir/client/requests/{FhirSearchRequest.mjs → SearchRequest.mjs} +0 -0
  562. /package/dist/esm/api/resources/fhir/client/requests/{FhirUpsertRequest.mjs → UpsertRequest.mjs} +0 -0
  563. /package/dist/esm/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderRemoveAuthConfigRequest.d.mts +0 -0
  564. /package/dist/esm/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderRemoveAuthConfigRequest.mjs +0 -0
  565. /package/dist/esm/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderSetActiveAuthConfigRequest.d.mts +0 -0
  566. /package/dist/esm/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderSetActiveAuthConfigRequest.mjs +0 -0
  567. /package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools/client/index.d.mts → fhirProvider/resources/authConfig/client/requests/index.mjs} +0 -0
  568. /package/dist/esm/api/resources/{fhir/types/ErrorResponse.mjs → fhirProvider/resources/authConfig/types/RemoveResponse.mjs} +0 -0
  569. /package/dist/esm/api/resources/{fhir/types/FhirResource.mjs → fhirProvider/types/DeleteResponse.mjs} +0 -0
  570. /package/dist/esm/api/resources/{fhir → lang2Fhir}/errors/NotFoundError.d.mts +0 -0
  571. /package/dist/esm/api/resources/{fhir → lang2Fhir}/errors/NotFoundError.mjs +0 -0
  572. /package/dist/esm/api/resources/{fhir/types/FhirSearchResponse.mjs → lang2Fhir/types/UploadProfileResponse.mjs} +0 -0
  573. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.d.mts +0 -0
  574. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.mjs +0 -0
  575. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.d.mts +0 -0
  576. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.mjs +0 -0
  577. /package/dist/esm/api/resources/{fhirProvider/types/FhirProviderDeleteResponse.mjs → summary/resources/templates/types/DeleteResponse.mjs} +0 -0
  578. /package/dist/esm/api/resources/{fhirProvider/types/FhirProviderRemoveAuthConfigResponse.mjs → summary/resources/templates/types/GetResponse.mjs} +0 -0
  579. /package/dist/esm/api/resources/{lang2Fhir/types/Lang2FhirUploadProfileResponse.mjs → summary/resources/templates/types/ListResponse.mjs} +0 -0
  580. /package/dist/esm/api/resources/summary/{types/SummaryDeleteTemplateResponse.mjs → resources/templates/types/UpdateResponse.mjs} +0 -0
  581. /package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/McpServerCreateRequest.d.mts +0 -0
  582. /package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/McpServerCreateRequest.mjs +0 -0
  583. /package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/index.d.mts +0 -0
  584. /package/dist/esm/api/resources/tools/resources/{mcpServer/resources/tools → mcpServers}/index.d.mts +0 -0
  585. /package/dist/esm/api/resources/tools/resources/{mcpServer/resources/tools → mcpServers}/index.mjs +0 -0
  586. /package/dist/esm/api/resources/{summary/types/SummaryGetTemplateResponse.mjs → workflows/client/requests/GetRequest.mjs} +0 -0
  587. /package/dist/esm/api/resources/{summary/types/SummaryListTemplatesResponse.mjs → workflows/client/requests/ListRequest.mjs} +0 -0
  588. /package/dist/esm/api/resources/{summary/types/SummaryUpdateTemplateResponse.mjs → workflows/types/DeleteResponse.mjs} +0 -0
  589. /package/dist/esm/api/resources/workflows/{client/requests/WorkflowsGetRequest.mjs → types/GetResponse.mjs} +0 -0
  590. /package/dist/esm/api/resources/workflows/{client/requests/WorkflowsListRequest.mjs → types/UpdateResponse.mjs} +0 -0
@@ -15,751 +15,19 @@ import * as environments from "../../../../environments.mjs";
15
15
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
16
  import * as errors from "../../../../errors/index.mjs";
17
17
  import * as phenoml from "../../../index.mjs";
18
+ import { CodeSystemsClient } from "../resources/codeSystems/client/Client.mjs";
19
+ import { CodesClient } from "../resources/codes/client/Client.mjs";
18
20
  export class ConstrueClient {
19
21
  constructor(options = {}) {
20
22
  this._options = normalizeClientOptionsWithAuth(options);
21
23
  }
22
- /**
23
- * Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
24
- * Returns 202 immediately; embedding generation runs asynchronously. Poll
25
- * GET /construe/codes/systems/{codesystem}?version={version} to check when status
26
- * transitions from "processing" to "ready" or "failed".
27
- *
28
- * @param {phenoml.construe.UploadRequest} request
29
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
30
- *
31
- * @throws {@link phenoml.construe.BadRequestError}
32
- * @throws {@link phenoml.construe.UnauthorizedError}
33
- * @throws {@link phenoml.construe.ForbiddenError}
34
- * @throws {@link phenoml.construe.ConflictError}
35
- * @throws {@link phenoml.construe.FailedDependencyError}
36
- * @throws {@link phenoml.construe.InternalServerError}
37
- *
38
- * @example
39
- * await client.construe.uploadCodeSystem({
40
- * name: "CUSTOM_CODES",
41
- * version: "1.0",
42
- * format: "json",
43
- * codes: [{
44
- * code: "X001",
45
- * description: "Example custom code 1"
46
- * }, {
47
- * code: "X002",
48
- * description: "Example custom code 2"
49
- * }]
50
- * })
51
- *
52
- * @example
53
- * await client.construe.uploadCodeSystem({
54
- * name: "CUSTOM_CODES",
55
- * version: "1.0",
56
- * format: "csv",
57
- * file: "Y29kZSxkZXNjcmlwdGlvbgpYMDAxLEV4YW1wbGUgY3VzdG9tIGNvZGUgMQo=",
58
- * code_col: "code",
59
- * desc_col: "description"
60
- * })
61
- */
62
- uploadCodeSystem(request, requestOptions) {
63
- return core.HttpResponsePromise.fromPromise(this.__uploadCodeSystem(request, requestOptions));
64
- }
65
- __uploadCodeSystem(request, requestOptions) {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
68
- const _authRequest = yield this._options.authProvider.getAuthRequest();
69
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
70
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
71
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/upload"),
72
- method: "POST",
73
- headers: _headers,
74
- contentType: "application/json",
75
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
76
- requestType: "json",
77
- body: request,
78
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
79
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
80
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
82
- logging: this._options.logging,
83
- });
84
- if (_response.ok) {
85
- return {
86
- data: _response.body,
87
- rawResponse: _response.rawResponse,
88
- };
89
- }
90
- if (_response.error.reason === "status-code") {
91
- switch (_response.error.statusCode) {
92
- case 400:
93
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
94
- case 401:
95
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
96
- case 403:
97
- throw new phenoml.construe.ForbiddenError(_response.error.body, _response.rawResponse);
98
- case 409:
99
- throw new phenoml.construe.ConflictError(_response.error.body, _response.rawResponse);
100
- case 424:
101
- throw new phenoml.construe.FailedDependencyError(_response.error.body, _response.rawResponse);
102
- case 500:
103
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
104
- default:
105
- throw new errors.phenomlError({
106
- statusCode: _response.error.statusCode,
107
- body: _response.error.body,
108
- rawResponse: _response.rawResponse,
109
- });
110
- }
111
- }
112
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/construe/upload");
113
- });
114
- }
115
- /**
116
- * Converts natural language text into structured medical codes.
117
- *
118
- * Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
119
- *
120
- * @param {phenoml.construe.ExtractRequest} request
121
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
122
- *
123
- * @throws {@link phenoml.construe.BadRequestError}
124
- * @throws {@link phenoml.construe.UnauthorizedError}
125
- * @throws {@link phenoml.construe.NotFoundError}
126
- * @throws {@link phenoml.construe.InternalServerError}
127
- * @throws {@link phenoml.construe.ServiceUnavailableError}
128
- * @throws {@link phenoml.construe.GatewayTimeoutError}
129
- *
130
- * @example
131
- * await client.construe.extractCodes({
132
- * text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney.",
133
- * system: {
134
- * name: "ICD-10-CM",
135
- * version: "2025"
136
- * }
137
- * })
138
- *
139
- * @example
140
- * await client.construe.extractCodes({
141
- * text: "45-year-old male presents with chest pain radiating to left arm, shortness of breath, and diaphoresis. ECG shows ST elevation in leads II, III, and aVF.",
142
- * system: {
143
- * name: "SNOMED_CT_US_LITE",
144
- * version: "20240901"
145
- * },
146
- * config: {
147
- * chunking_method: "sentences",
148
- * validation_method: "simple",
149
- * include_rationale: true,
150
- * include_citations: true
151
- * }
152
- * })
153
- *
154
- * @example
155
- * await client.construe.extractCodes({
156
- * text: "Start Metformin 500mg twice daily for type 2 diabetes. Continue Lisinopril 10mg daily for hypertension. Add Atorvastatin 20mg at bedtime.",
157
- * system: {
158
- * name: "RXNORM",
159
- * version: "11042024"
160
- * },
161
- * config: {
162
- * validation_method: "medication_search",
163
- * include_rationale: true
164
- * }
165
- * })
166
- *
167
- * @example
168
- * await client.construe.extractCodes({
169
- * text: "Patient diagnosed with Type 2 diabetes mellitus with diabetic chronic kidney disease, stage 3.",
170
- * system: {
171
- * name: "ICD-10-CM",
172
- * version: "2025"
173
- * },
174
- * config: {
175
- * validation_method: "simple",
176
- * include_ancestors: true
177
- * }
178
- * })
179
- *
180
- * @example
181
- * await client.construe.extractCodes({
182
- * text: "5-year-old male with seizures, severe intellectual disability, microcephaly, and hypotonia.",
183
- * system: {
184
- * name: "HPO",
185
- * version: "2025"
186
- * },
187
- * config: {
188
- * chunking_method: "fasthpocr",
189
- * validation_method: "none",
190
- * include_rationale: false
191
- * }
192
- * })
193
- */
194
- extractCodes(request, requestOptions) {
195
- return core.HttpResponsePromise.fromPromise(this.__extractCodes(request, requestOptions));
196
- }
197
- __extractCodes(request, requestOptions) {
198
- return __awaiter(this, void 0, void 0, function* () {
199
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
200
- const _authRequest = yield this._options.authProvider.getAuthRequest();
201
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
202
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
203
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/extract"),
204
- method: "POST",
205
- headers: _headers,
206
- contentType: "application/json",
207
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
208
- requestType: "json",
209
- body: request,
210
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
211
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
212
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
213
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
214
- logging: this._options.logging,
215
- });
216
- if (_response.ok) {
217
- return { data: _response.body, rawResponse: _response.rawResponse };
218
- }
219
- if (_response.error.reason === "status-code") {
220
- switch (_response.error.statusCode) {
221
- case 400:
222
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
223
- case 401:
224
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
225
- case 404:
226
- throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
227
- case 500:
228
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
229
- case 503:
230
- throw new phenoml.construe.ServiceUnavailableError(_response.error.body, _response.rawResponse);
231
- case 504:
232
- throw new phenoml.construe.GatewayTimeoutError(_response.error.body, _response.rawResponse);
233
- default:
234
- throw new errors.phenomlError({
235
- statusCode: _response.error.statusCode,
236
- body: _response.error.body,
237
- rawResponse: _response.rawResponse,
238
- });
239
- }
240
- }
241
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/construe/extract");
242
- });
243
- }
244
- /**
245
- * Returns the terminology server's catalog of available code systems, including both built-in standard terminologies and custom uploaded systems.
246
- *
247
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
248
- *
249
- * @throws {@link phenoml.construe.UnauthorizedError}
250
- * @throws {@link phenoml.construe.InternalServerError}
251
- *
252
- * @example
253
- * await client.construe.listAvailableCodeSystems()
254
- */
255
- listAvailableCodeSystems(requestOptions) {
256
- return core.HttpResponsePromise.fromPromise(this.__listAvailableCodeSystems(requestOptions));
257
- }
258
- __listAvailableCodeSystems(requestOptions) {
259
- return __awaiter(this, void 0, void 0, function* () {
260
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
261
- const _authRequest = yield this._options.authProvider.getAuthRequest();
262
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
263
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
264
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/codes/systems"),
265
- method: "GET",
266
- headers: _headers,
267
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
268
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
269
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
270
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
271
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
272
- logging: this._options.logging,
273
- });
274
- if (_response.ok) {
275
- return {
276
- data: _response.body,
277
- rawResponse: _response.rawResponse,
278
- };
279
- }
280
- if (_response.error.reason === "status-code") {
281
- switch (_response.error.statusCode) {
282
- case 401:
283
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
284
- case 500:
285
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
286
- default:
287
- throw new errors.phenomlError({
288
- statusCode: _response.error.statusCode,
289
- body: _response.error.body,
290
- rawResponse: _response.rawResponse,
291
- });
292
- }
293
- }
294
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/systems");
295
- });
296
- }
297
- /**
298
- * Returns full metadata for a single code system, including timestamps and builtin status.
299
- *
300
- * @param {string} codesystem - Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
301
- * @param {phenoml.construe.GetConstrueCodesSystemsCodesystemRequest} request
302
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
303
- *
304
- * @throws {@link phenoml.construe.BadRequestError}
305
- * @throws {@link phenoml.construe.UnauthorizedError}
306
- * @throws {@link phenoml.construe.NotFoundError}
307
- * @throws {@link phenoml.construe.InternalServerError}
308
- *
309
- * @example
310
- * await client.construe.getCodeSystemDetail("ICD-10-CM", {
311
- * version: "2025"
312
- * })
313
- */
314
- getCodeSystemDetail(codesystem, request = {}, requestOptions) {
315
- return core.HttpResponsePromise.fromPromise(this.__getCodeSystemDetail(codesystem, request, requestOptions));
316
- }
317
- __getCodeSystemDetail(codesystem_1) {
318
- return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
319
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
320
- const { version } = request;
321
- const _queryParams = {
322
- version,
323
- };
324
- const _authRequest = yield this._options.authProvider.getAuthRequest();
325
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
326
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
327
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/systems/${core.url.encodePathParam(codesystem)}`),
328
- method: "GET",
329
- headers: _headers,
330
- queryString: core.url
331
- .queryBuilder()
332
- .addMany(_queryParams)
333
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
334
- .build(),
335
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
336
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
337
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
338
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
339
- logging: this._options.logging,
340
- });
341
- if (_response.ok) {
342
- return {
343
- data: _response.body,
344
- rawResponse: _response.rawResponse,
345
- };
346
- }
347
- if (_response.error.reason === "status-code") {
348
- switch (_response.error.statusCode) {
349
- case 400:
350
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
351
- case 401:
352
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
353
- case 404:
354
- throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
355
- case 500:
356
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
357
- default:
358
- throw new errors.phenomlError({
359
- statusCode: _response.error.statusCode,
360
- body: _response.error.body,
361
- rawResponse: _response.rawResponse,
362
- });
363
- }
364
- }
365
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/systems/{codesystem}");
366
- });
367
- }
368
- /**
369
- * Deletes a custom (non-builtin) code system and all its codes. Builtin systems cannot be deleted.
370
- * Only available on dedicated instances. Large systems may take up to a minute to delete.
371
- *
372
- * @param {string} codesystem - Code system name
373
- * @param {phenoml.construe.DeleteConstrueCodesSystemsCodesystemRequest} request
374
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
375
- *
376
- * @throws {@link phenoml.construe.BadRequestError}
377
- * @throws {@link phenoml.construe.UnauthorizedError}
378
- * @throws {@link phenoml.construe.ForbiddenError}
379
- * @throws {@link phenoml.construe.NotFoundError}
380
- * @throws {@link phenoml.construe.InternalServerError}
381
- *
382
- * @example
383
- * await client.construe.deleteCustomCodeSystem("CUSTOM_CODES", {
384
- * version: "version"
385
- * })
386
- */
387
- deleteCustomCodeSystem(codesystem, request = {}, requestOptions) {
388
- return core.HttpResponsePromise.fromPromise(this.__deleteCustomCodeSystem(codesystem, request, requestOptions));
389
- }
390
- __deleteCustomCodeSystem(codesystem_1) {
391
- return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
392
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
393
- const { version } = request;
394
- const _queryParams = {
395
- version,
396
- };
397
- const _authRequest = yield this._options.authProvider.getAuthRequest();
398
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
399
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
400
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/systems/${core.url.encodePathParam(codesystem)}`),
401
- method: "DELETE",
402
- headers: _headers,
403
- queryString: core.url
404
- .queryBuilder()
405
- .addMany(_queryParams)
406
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
407
- .build(),
408
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
409
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
410
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
411
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
412
- logging: this._options.logging,
413
- });
414
- if (_response.ok) {
415
- return {
416
- data: _response.body,
417
- rawResponse: _response.rawResponse,
418
- };
419
- }
420
- if (_response.error.reason === "status-code") {
421
- switch (_response.error.statusCode) {
422
- case 400:
423
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
424
- case 401:
425
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
426
- case 403:
427
- throw new phenoml.construe.ForbiddenError(_response.error.body, _response.rawResponse);
428
- case 404:
429
- throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
430
- case 500:
431
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
432
- default:
433
- throw new errors.phenomlError({
434
- statusCode: _response.error.statusCode,
435
- body: _response.error.body,
436
- rawResponse: _response.rawResponse,
437
- });
438
- }
439
- }
440
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/construe/codes/systems/{codesystem}");
441
- });
24
+ get codeSystems() {
25
+ var _a;
26
+ return ((_a = this._codeSystems) !== null && _a !== void 0 ? _a : (this._codeSystems = new CodeSystemsClient(this._options)));
442
27
  }
443
- /**
444
- * Exports a custom (non-builtin) code system as a JSON file compatible with the upload format.
445
- * The exported file can be re-uploaded directly via POST /construe/upload with format "json".
446
- * Only available on dedicated instances. Builtin systems cannot be exported.
447
- *
448
- * @param {string} codesystem - Code system name
449
- * @param {phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest} request
450
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
451
- *
452
- * @throws {@link phenoml.construe.BadRequestError}
453
- * @throws {@link phenoml.construe.UnauthorizedError}
454
- * @throws {@link phenoml.construe.ForbiddenError}
455
- * @throws {@link phenoml.construe.NotFoundError}
456
- * @throws {@link phenoml.construe.ConflictError}
457
- * @throws {@link phenoml.construe.FailedDependencyError}
458
- * @throws {@link phenoml.construe.InternalServerError}
459
- *
460
- * @example
461
- * await client.construe.exportCustomCodeSystem("CUSTOM_CODES", {
462
- * version: "version"
463
- * })
464
- */
465
- exportCustomCodeSystem(codesystem, request = {}, requestOptions) {
466
- return core.HttpResponsePromise.fromPromise(this.__exportCustomCodeSystem(codesystem, request, requestOptions));
467
- }
468
- __exportCustomCodeSystem(codesystem_1) {
469
- return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
470
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
471
- const { version } = request;
472
- const _queryParams = {
473
- version,
474
- };
475
- const _authRequest = yield this._options.authProvider.getAuthRequest();
476
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
477
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
478
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/systems/${core.url.encodePathParam(codesystem)}/export`),
479
- method: "GET",
480
- headers: _headers,
481
- queryString: core.url
482
- .queryBuilder()
483
- .addMany(_queryParams)
484
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
485
- .build(),
486
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
487
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
488
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
489
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
490
- logging: this._options.logging,
491
- });
492
- if (_response.ok) {
493
- return {
494
- data: _response.body,
495
- rawResponse: _response.rawResponse,
496
- };
497
- }
498
- if (_response.error.reason === "status-code") {
499
- switch (_response.error.statusCode) {
500
- case 400:
501
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
502
- case 401:
503
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
504
- case 403:
505
- throw new phenoml.construe.ForbiddenError(_response.error.body, _response.rawResponse);
506
- case 404:
507
- throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
508
- case 409:
509
- throw new phenoml.construe.ConflictError(_response.error.body, _response.rawResponse);
510
- case 424:
511
- throw new phenoml.construe.FailedDependencyError(_response.error.body, _response.rawResponse);
512
- case 500:
513
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
514
- default:
515
- throw new errors.phenomlError({
516
- statusCode: _response.error.statusCode,
517
- body: _response.error.body,
518
- rawResponse: _response.rawResponse,
519
- });
520
- }
521
- }
522
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/systems/{codesystem}/export");
523
- });
524
- }
525
- /**
526
- * Returns a paginated list of all codes in the specified code system from the terminology server.
527
- *
528
- * Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
529
- *
530
- * @param {string} codesystem - Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
531
- * @param {phenoml.construe.GetConstrueCodesCodesystemRequest} request
532
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
533
- *
534
- * @throws {@link phenoml.construe.BadRequestError}
535
- * @throws {@link phenoml.construe.UnauthorizedError}
536
- * @throws {@link phenoml.construe.NotFoundError}
537
- * @throws {@link phenoml.construe.InternalServerError}
538
- *
539
- * @example
540
- * await client.construe.listCodesInACodeSystem("ICD-10-CM", {
541
- * version: "2025",
542
- * cursor: "cursor",
543
- * limit: 1
544
- * })
545
- */
546
- listCodesInACodeSystem(codesystem, request = {}, requestOptions) {
547
- return core.HttpResponsePromise.fromPromise(this.__listCodesInACodeSystem(codesystem, request, requestOptions));
548
- }
549
- __listCodesInACodeSystem(codesystem_1) {
550
- return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
551
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
552
- const { version, cursor, limit } = request;
553
- const _queryParams = {
554
- version,
555
- cursor,
556
- limit,
557
- };
558
- const _authRequest = yield this._options.authProvider.getAuthRequest();
559
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
560
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
561
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/${core.url.encodePathParam(codesystem)}`),
562
- method: "GET",
563
- headers: _headers,
564
- queryString: core.url
565
- .queryBuilder()
566
- .addMany(_queryParams)
567
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
568
- .build(),
569
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
570
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
571
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
572
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
573
- logging: this._options.logging,
574
- });
575
- if (_response.ok) {
576
- return { data: _response.body, rawResponse: _response.rawResponse };
577
- }
578
- if (_response.error.reason === "status-code") {
579
- switch (_response.error.statusCode) {
580
- case 400:
581
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
582
- case 401:
583
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
584
- case 404:
585
- throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
586
- case 500:
587
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
588
- default:
589
- throw new errors.phenomlError({
590
- statusCode: _response.error.statusCode,
591
- body: _response.error.body,
592
- rawResponse: _response.rawResponse,
593
- });
594
- }
595
- }
596
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}");
597
- });
598
- }
599
- /**
600
- * Looks up a specific code in the terminology server and returns its details.
601
- *
602
- * Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
603
- *
604
- * @param {string} codesystem - Code system name
605
- * @param {string} codeID - The code identifier. ICD-10-CM codes are stored without their
606
- * cosmetic dot (use "E1165", not "E11.65").
607
- * @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
608
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
609
- *
610
- * @throws {@link phenoml.construe.BadRequestError}
611
- * @throws {@link phenoml.construe.UnauthorizedError}
612
- * @throws {@link phenoml.construe.NotFoundError}
613
- * @throws {@link phenoml.construe.InternalServerError}
614
- *
615
- * @example
616
- * await client.construe.getASpecificCode("ICD-10-CM", "E1165", {
617
- * version: "version"
618
- * })
619
- */
620
- getASpecificCode(codesystem, codeID, request = {}, requestOptions) {
621
- return core.HttpResponsePromise.fromPromise(this.__getASpecificCode(codesystem, codeID, request, requestOptions));
622
- }
623
- __getASpecificCode(codesystem_1, codeID_1) {
624
- return __awaiter(this, arguments, void 0, function* (codesystem, codeID, request = {}, requestOptions) {
625
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
626
- const { version } = request;
627
- const _queryParams = {
628
- version,
629
- };
630
- const _authRequest = yield this._options.authProvider.getAuthRequest();
631
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
632
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
633
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/${core.url.encodePathParam(codesystem)}/${core.url.encodePathParam(codeID)}`),
634
- method: "GET",
635
- headers: _headers,
636
- queryString: core.url
637
- .queryBuilder()
638
- .addMany(_queryParams)
639
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
640
- .build(),
641
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
642
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
643
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
644
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
645
- logging: this._options.logging,
646
- });
647
- if (_response.ok) {
648
- return { data: _response.body, rawResponse: _response.rawResponse };
649
- }
650
- if (_response.error.reason === "status-code") {
651
- switch (_response.error.statusCode) {
652
- case 400:
653
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
654
- case 401:
655
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
656
- case 404:
657
- throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
658
- case 500:
659
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
660
- default:
661
- throw new errors.phenomlError({
662
- statusCode: _response.error.statusCode,
663
- body: _response.error.body,
664
- rawResponse: _response.rawResponse,
665
- });
666
- }
667
- }
668
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/{codeID}");
669
- });
670
- }
671
- /**
672
- * Performs semantic similarity search using vector embeddings.
673
- *
674
- * **Availability**: This endpoint works for both **built-in and custom** code systems.
675
- *
676
- * **When to use**: Best for natural language queries where you want to find conceptually
677
- * related codes, even when different terminology is used. The search understands meaning,
678
- * not just keywords.
679
- *
680
- * **Examples**:
681
- * - Query "trouble breathing at night" finds codes like "Sleep apnea", "Orthopnea",
682
- * "Nocturnal dyspnea" — semantically related but no exact keyword matches
683
- * - Query "heart problems" finds "Myocardial infarction", "Cardiac arrest", "Arrhythmia"
684
- *
685
- * **Trade-offs**: Slower than text search (requires embedding generation), but finds
686
- * conceptually similar results that keyword search would miss.
687
- *
688
- * See also: `/search/text` for faster keyword-based lookup with typo tolerance.
689
- *
690
- * Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
691
- *
692
- * @param {string} codesystem - Code system name
693
- * @param {phenoml.construe.GetConstrueCodesCodesystemSearchSemanticRequest} request
694
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
695
- *
696
- * @throws {@link phenoml.construe.BadRequestError}
697
- * @throws {@link phenoml.construe.UnauthorizedError}
698
- * @throws {@link phenoml.construe.NotFoundError}
699
- * @throws {@link phenoml.construe.InternalServerError}
700
- *
701
- * @example
702
- * await client.construe.semanticSearchEmbeddingBased("ICD-10-CM", {
703
- * text: "patient has trouble breathing at night and wakes up gasping",
704
- * version: "version",
705
- * limit: 1
706
- * })
707
- */
708
- semanticSearchEmbeddingBased(codesystem, request, requestOptions) {
709
- return core.HttpResponsePromise.fromPromise(this.__semanticSearchEmbeddingBased(codesystem, request, requestOptions));
710
- }
711
- __semanticSearchEmbeddingBased(codesystem, request, requestOptions) {
712
- return __awaiter(this, void 0, void 0, function* () {
713
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
714
- const { text, version, limit } = request;
715
- const _queryParams = {
716
- text,
717
- version,
718
- limit,
719
- };
720
- const _authRequest = yield this._options.authProvider.getAuthRequest();
721
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
722
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
723
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/${core.url.encodePathParam(codesystem)}/search/semantic`),
724
- method: "GET",
725
- headers: _headers,
726
- queryString: core.url
727
- .queryBuilder()
728
- .addMany(_queryParams)
729
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
730
- .build(),
731
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
732
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
733
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
734
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
735
- logging: this._options.logging,
736
- });
737
- if (_response.ok) {
738
- return {
739
- data: _response.body,
740
- rawResponse: _response.rawResponse,
741
- };
742
- }
743
- if (_response.error.reason === "status-code") {
744
- switch (_response.error.statusCode) {
745
- case 400:
746
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
747
- case 401:
748
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
749
- case 404:
750
- throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
751
- case 500:
752
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
753
- default:
754
- throw new errors.phenomlError({
755
- statusCode: _response.error.statusCode,
756
- body: _response.error.body,
757
- rawResponse: _response.rawResponse,
758
- });
759
- }
760
- }
761
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/search/semantic");
762
- });
28
+ get codes() {
29
+ var _a;
30
+ return ((_a = this._codes) !== null && _a !== void 0 ? _a : (this._codes = new CodesClient(this._options)));
763
31
  }
764
32
  /**
765
33
  * Submits user feedback on results from the Construe extraction endpoint.
@@ -774,7 +42,7 @@ export class ConstrueClient {
774
42
  * @throws {@link phenoml.construe.ServiceUnavailableError}
775
43
  *
776
44
  * @example
777
- * await client.construe.submitFeedbackOnExtractionResults({
45
+ * await client.construe.submitFeedback({
778
46
  * text: "Patient has type 2 diabetes with hyperglycemia",
779
47
  * received_result: {
780
48
  * system: {
@@ -801,10 +69,10 @@ export class ConstrueClient {
801
69
  * detail: "Expected code E11.65 because the text mentions hyperglycemia"
802
70
  * })
803
71
  */
804
- submitFeedbackOnExtractionResults(request, requestOptions) {
805
- return core.HttpResponsePromise.fromPromise(this.__submitFeedbackOnExtractionResults(request, requestOptions));
72
+ submitFeedback(request, requestOptions) {
73
+ return core.HttpResponsePromise.fromPromise(this.__submitFeedback(request, requestOptions));
806
74
  }
807
- __submitFeedbackOnExtractionResults(request, requestOptions) {
75
+ __submitFeedback(request, requestOptions) {
808
76
  return __awaiter(this, void 0, void 0, function* () {
809
77
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
810
78
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -847,102 +115,4 @@ export class ConstrueClient {
847
115
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/construe/feedback");
848
116
  });
849
117
  }
850
- /**
851
- * Performs fast full-text search over code IDs and descriptions.
852
- *
853
- * **Availability**: This endpoint is only available for **built-in code systems**.
854
- * Custom code systems uploaded via `/construe/upload` are not indexed for full-text search
855
- * and will return empty results. Use `/search/semantic` to search custom code systems.
856
- *
857
- * **When to use**: Best for autocomplete UIs, code lookup, or when users know part of
858
- * the code ID or specific keywords. Fast response times suitable for typeahead interfaces.
859
- *
860
- * **Features**:
861
- * - Substring matching on code IDs (e.g., "11.65" finds "E11.65")
862
- * - Typo tolerance on descriptions (not on code IDs)
863
- * - Fast response times (~10-50ms)
864
- *
865
- * **Examples**:
866
- * - Query "E11" finds all codes starting with E11 (diabetes codes)
867
- * - Query "diabtes" (typo) still finds "diabetes" codes
868
- *
869
- * **Trade-offs**: Faster than semantic search, but only matches keywords/substrings.
870
- * Won't find conceptually related codes with different terminology.
871
- *
872
- * See also: `/search/semantic` for finding conceptually similar codes.
873
- *
874
- * Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
875
- *
876
- * @param {string} codesystem - Code system name
877
- * @param {phenoml.construe.GetConstrueCodesCodesystemSearchTextRequest} request
878
- * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
879
- *
880
- * @throws {@link phenoml.construe.BadRequestError}
881
- * @throws {@link phenoml.construe.UnauthorizedError}
882
- * @throws {@link phenoml.construe.NotFoundError}
883
- * @throws {@link phenoml.construe.InternalServerError}
884
- * @throws {@link phenoml.construe.NotImplementedError}
885
- *
886
- * @example
887
- * await client.construe.terminologyServerTextSearch("ICD-10-CM", {
888
- * q: "E11.65",
889
- * version: "version",
890
- * limit: 1
891
- * })
892
- */
893
- terminologyServerTextSearch(codesystem, request, requestOptions) {
894
- return core.HttpResponsePromise.fromPromise(this.__terminologyServerTextSearch(codesystem, request, requestOptions));
895
- }
896
- __terminologyServerTextSearch(codesystem, request, requestOptions) {
897
- return __awaiter(this, void 0, void 0, function* () {
898
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
899
- const { q, version, limit } = request;
900
- const _queryParams = {
901
- q,
902
- version,
903
- limit,
904
- };
905
- const _authRequest = yield this._options.authProvider.getAuthRequest();
906
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
907
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
908
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/${core.url.encodePathParam(codesystem)}/search/text`),
909
- method: "GET",
910
- headers: _headers,
911
- queryString: core.url
912
- .queryBuilder()
913
- .addMany(_queryParams)
914
- .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
915
- .build(),
916
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
917
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
918
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
919
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
920
- logging: this._options.logging,
921
- });
922
- if (_response.ok) {
923
- return { data: _response.body, rawResponse: _response.rawResponse };
924
- }
925
- if (_response.error.reason === "status-code") {
926
- switch (_response.error.statusCode) {
927
- case 400:
928
- throw new phenoml.construe.BadRequestError(_response.error.body, _response.rawResponse);
929
- case 401:
930
- throw new phenoml.construe.UnauthorizedError(_response.error.body, _response.rawResponse);
931
- case 404:
932
- throw new phenoml.construe.NotFoundError(_response.error.body, _response.rawResponse);
933
- case 500:
934
- throw new phenoml.construe.InternalServerError(_response.error.body, _response.rawResponse);
935
- case 501:
936
- throw new phenoml.construe.NotImplementedError(_response.error.body, _response.rawResponse);
937
- default:
938
- throw new errors.phenomlError({
939
- statusCode: _response.error.statusCode,
940
- body: _response.error.body,
941
- rawResponse: _response.rawResponse,
942
- });
943
- }
944
- }
945
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/search/text");
946
- });
947
- }
948
118
  }