phenoml 14.0.0 → 16.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 (343) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agent/client/Client.d.ts +5 -5
  3. package/dist/cjs/api/resources/agent/client/Client.js +2 -2
  4. package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +1 -1
  5. package/dist/cjs/api/resources/agent/client/requests/AgentStreamChatRequest.d.ts +1 -1
  6. package/dist/cjs/api/resources/agent/client/requests/{AgentGetChatMessagesRequest.d.ts → GetChatMessagesRequest.d.ts} +3 -3
  7. package/dist/{esm/api/resources/agent/client/requests/AgentListRequest.d.mts → cjs/api/resources/agent/client/requests/ListRequest.d.ts} +1 -1
  8. package/dist/cjs/api/resources/agent/client/requests/index.d.ts +2 -2
  9. package/dist/cjs/api/resources/agent/types/{AgentDeleteResponse.d.ts → DeleteResponse.d.ts} +1 -1
  10. package/dist/cjs/api/resources/agent/types/GetChatMessagesRequestOrder.d.ts +5 -0
  11. package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesRequestOrder.js → GetChatMessagesRequestOrder.js} +2 -2
  12. package/dist/cjs/api/resources/agent/types/GetChatMessagesRequestRole.d.ts +7 -0
  13. package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesRequestRole.js → GetChatMessagesRequestRole.js} +2 -2
  14. package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesResponse.d.ts → GetChatMessagesResponse.d.ts} +1 -1
  15. package/dist/cjs/api/resources/agent/types/{AgentListResponse.d.ts → ListResponse.d.ts} +1 -1
  16. package/dist/cjs/api/resources/agent/types/index.d.ts +5 -5
  17. package/dist/cjs/api/resources/agent/types/index.js +5 -5
  18. package/dist/cjs/api/resources/authtoken/client/Client.d.ts +26 -4
  19. package/dist/cjs/api/resources/authtoken/client/Client.js +109 -4
  20. package/dist/cjs/api/resources/authtoken/client/index.d.ts +1 -1
  21. package/dist/cjs/api/resources/authtoken/client/index.js +15 -0
  22. package/dist/cjs/api/resources/authtoken/exports.d.ts +0 -1
  23. package/dist/cjs/api/resources/authtoken/exports.js +0 -1
  24. package/dist/cjs/api/resources/authtoken/index.d.ts +0 -1
  25. package/dist/cjs/api/resources/authtoken/index.js +0 -1
  26. package/dist/cjs/api/resources/construe/client/Client.d.ts +35 -35
  27. package/dist/cjs/api/resources/construe/client/Client.js +43 -43
  28. package/dist/cjs/api/resources/construe/client/requests/{DeleteConstrueCodesSystemsCodesystemRequest.d.ts → DeleteCodeSystemRequest.d.ts} +1 -1
  29. package/dist/{esm/api/resources/construe/client/requests/DeleteConstrueCodesSystemsCodesystemRequest.d.mts → cjs/api/resources/construe/client/requests/ExportCodeSystemRequest.d.ts} +1 -1
  30. package/dist/{esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.mts → cjs/api/resources/construe/client/requests/GetCodeRequest.d.ts} +1 -1
  31. package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemRequest.d.ts → GetCodeSystemRequest.d.ts} +1 -1
  32. package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemRequest.d.ts → ListCodesRequest.d.ts} +1 -1
  33. package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchSemanticRequest.d.ts → SearchSemanticRequest.d.ts} +1 -1
  34. package/dist/{esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.mts → cjs/api/resources/construe/client/requests/SearchTextRequest.d.ts} +1 -1
  35. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +7 -7
  36. package/dist/{esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.mts → cjs/api/resources/construe/types/UploadCodeSystemResponse.d.ts} +1 -1
  37. package/dist/cjs/api/resources/construe/types/index.d.ts +1 -1
  38. package/dist/cjs/api/resources/construe/types/index.js +1 -1
  39. package/dist/cjs/api/resources/fhir/client/Client.d.ts +12 -12
  40. package/dist/cjs/api/resources/fhir/client/Client.js +6 -6
  41. package/dist/cjs/api/resources/fhir/client/requests/{FhirCreateRequest.d.ts → CreateRequest.d.ts} +1 -1
  42. package/dist/{esm/api/resources/fhir/client/requests/FhirDeleteRequest.d.mts → cjs/api/resources/fhir/client/requests/DeleteRequest.d.ts} +1 -1
  43. package/dist/cjs/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.d.ts → ExecuteBundleRequest.d.ts} +1 -1
  44. package/dist/cjs/api/resources/fhir/client/requests/{FhirPatchRequest.d.ts → PatchRequest.d.ts} +2 -2
  45. package/dist/cjs/api/resources/fhir/client/requests/{FhirSearchRequest.d.ts → SearchRequest.d.ts} +1 -1
  46. package/dist/cjs/api/resources/fhir/client/requests/{FhirUpsertRequest.d.ts → UpsertRequest.d.ts} +1 -1
  47. package/dist/cjs/api/resources/fhir/client/requests/index.d.ts +6 -6
  48. package/dist/cjs/api/resources/fhir/types/{FhirPatchRequestBodyItem.d.ts → PatchRequestBodyItem.d.ts} +3 -3
  49. package/dist/cjs/api/resources/fhir/types/{FhirPatchRequestBodyItem.js → PatchRequestBodyItem.js} +5 -5
  50. package/dist/cjs/api/resources/fhir/types/SearchResponse.d.ts +2 -0
  51. package/dist/cjs/api/resources/fhir/types/index.d.ts +2 -2
  52. package/dist/cjs/api/resources/fhir/types/index.js +2 -2
  53. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +2 -2
  54. package/dist/cjs/api/resources/fhirProvider/client/Client.js +1 -4
  55. package/dist/{esm/api/resources/agent/types/AgentDeleteResponse.d.mts → cjs/api/resources/fhirProvider/types/DeleteResponse.d.ts} +1 -1
  56. package/dist/cjs/api/resources/fhirProvider/types/{FhirProviderRemoveAuthConfigResponse.d.ts → RemoveAuthConfigResponse.d.ts} +1 -1
  57. package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +2 -2
  58. package/dist/cjs/api/resources/fhirProvider/types/index.js +2 -2
  59. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +4 -4
  60. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +4 -4
  61. package/dist/cjs/api/resources/lang2Fhir/types/{Lang2FhirUploadProfileResponse.d.ts → UploadProfileResponse.d.ts} +1 -1
  62. package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +1 -1
  63. package/dist/cjs/api/resources/lang2Fhir/types/index.js +1 -1
  64. package/dist/cjs/api/resources/summary/client/Client.d.ts +3 -88
  65. package/dist/cjs/api/resources/summary/client/Client.js +4 -309
  66. package/dist/cjs/api/resources/summary/client/requests/index.d.ts +0 -2
  67. package/dist/cjs/api/resources/summary/exports.d.ts +1 -0
  68. package/dist/cjs/api/resources/summary/exports.js +1 -0
  69. package/dist/cjs/api/resources/summary/index.d.ts +1 -0
  70. package/dist/cjs/api/resources/summary/index.js +1 -0
  71. package/dist/cjs/api/resources/summary/resources/index.d.ts +3 -0
  72. package/dist/cjs/api/resources/{authtoken → summary}/resources/index.js +4 -3
  73. package/dist/cjs/api/resources/summary/resources/templates/client/Client.d.ts +101 -0
  74. package/dist/cjs/api/resources/summary/resources/templates/client/Client.js +366 -0
  75. package/dist/cjs/api/resources/summary/resources/templates/client/requests/index.d.ts +2 -0
  76. package/dist/cjs/api/resources/summary/resources/templates/exports.d.ts +2 -0
  77. package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/exports.js +2 -2
  78. package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/index.d.ts +1 -0
  79. package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/index.js +1 -0
  80. package/dist/cjs/api/resources/{workflows/types/WorkflowsDeleteResponse.d.ts → summary/resources/templates/types/TemplatesDeleteResponse.d.ts} +1 -1
  81. package/dist/cjs/api/resources/summary/{types/SummaryGetTemplateResponse.d.ts → resources/templates/types/TemplatesGetResponse.d.ts} +2 -2
  82. package/dist/cjs/api/resources/summary/{types/SummaryListTemplatesResponse.d.ts → resources/templates/types/TemplatesListResponse.d.ts} +2 -2
  83. package/dist/cjs/api/resources/summary/{types/SummaryUpdateTemplateResponse.d.ts → resources/templates/types/TemplatesUpdateResponse.d.ts} +2 -2
  84. package/dist/cjs/api/resources/summary/resources/templates/types/index.d.ts +4 -0
  85. package/dist/cjs/api/resources/summary/resources/templates/types/index.js +20 -0
  86. package/dist/cjs/api/resources/summary/types/index.d.ts +0 -4
  87. package/dist/cjs/api/resources/summary/types/index.js +0 -4
  88. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/index.d.ts +0 -1
  89. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/index.js +0 -4
  90. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +0 -21
  91. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +0 -68
  92. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/index.d.ts +1 -1
  93. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/index.js +0 -15
  94. package/dist/cjs/api/resources/tools/types/index.d.ts +0 -1
  95. package/dist/cjs/api/resources/tools/types/index.js +0 -1
  96. package/dist/cjs/api/resources/workflows/client/Client.d.ts +7 -6
  97. package/dist/cjs/api/resources/workflows/client/Client.js +8 -14
  98. package/dist/{esm/api/resources/workflows/client/requests/WorkflowsGetRequest.d.mts → cjs/api/resources/workflows/client/requests/GetRequest.d.ts} +1 -1
  99. package/dist/cjs/api/resources/workflows/client/requests/{WorkflowsGetRequest.d.ts → ListRequest.d.ts} +1 -1
  100. package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +2 -2
  101. package/dist/cjs/api/resources/workflows/errors/GatewayTimeoutError.d.ts +5 -0
  102. package/dist/cjs/api/resources/workflows/errors/GatewayTimeoutError.js +54 -0
  103. package/dist/cjs/api/resources/workflows/errors/index.d.ts +1 -0
  104. package/dist/cjs/api/resources/workflows/errors/index.js +1 -0
  105. package/dist/{esm/api/resources/workflows/types/WorkflowsDeleteResponse.d.mts → cjs/api/resources/workflows/types/DeleteResponse.d.ts} +1 -1
  106. package/dist/cjs/api/resources/workflows/types/{WorkflowsGetResponse.d.ts → GetResponse.d.ts} +1 -1
  107. package/dist/cjs/api/resources/workflows/types/{WorkflowsUpdateResponse.d.ts → UpdateResponse.d.ts} +1 -1
  108. package/dist/cjs/api/resources/workflows/types/index.d.ts +3 -3
  109. package/dist/cjs/api/resources/workflows/types/index.js +3 -3
  110. package/dist/cjs/auth/OAuthAuthProvider.js +2 -2
  111. package/dist/cjs/version.d.ts +1 -1
  112. package/dist/cjs/version.js +1 -1
  113. package/dist/esm/BaseClient.mjs +2 -2
  114. package/dist/esm/api/resources/agent/client/Client.d.mts +5 -5
  115. package/dist/esm/api/resources/agent/client/Client.mjs +2 -2
  116. package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +1 -1
  117. package/dist/esm/api/resources/agent/client/requests/AgentStreamChatRequest.d.mts +1 -1
  118. package/dist/esm/api/resources/agent/client/requests/{AgentGetChatMessagesRequest.d.mts → GetChatMessagesRequest.d.mts} +3 -3
  119. package/dist/{cjs/api/resources/agent/client/requests/AgentListRequest.d.ts → esm/api/resources/agent/client/requests/ListRequest.d.mts} +1 -1
  120. package/dist/esm/api/resources/agent/client/requests/index.d.mts +2 -2
  121. package/dist/esm/api/resources/agent/types/DeleteResponse.d.mts +4 -0
  122. package/dist/esm/api/resources/agent/types/GetChatMessagesRequestOrder.d.mts +5 -0
  123. package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesRequestOrder.mjs → GetChatMessagesRequestOrder.mjs} +1 -1
  124. package/dist/esm/api/resources/agent/types/GetChatMessagesRequestRole.d.mts +7 -0
  125. package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesRequestRole.mjs → GetChatMessagesRequestRole.mjs} +1 -1
  126. package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesResponse.d.mts → GetChatMessagesResponse.d.mts} +1 -1
  127. package/dist/esm/api/resources/agent/types/{AgentListResponse.d.mts → ListResponse.d.mts} +1 -1
  128. package/dist/esm/api/resources/agent/types/index.d.mts +5 -5
  129. package/dist/esm/api/resources/agent/types/index.mjs +5 -5
  130. package/dist/esm/api/resources/authtoken/client/Client.d.mts +26 -4
  131. package/dist/esm/api/resources/authtoken/client/Client.mjs +76 -4
  132. package/dist/esm/api/resources/authtoken/client/index.d.mts +1 -1
  133. package/dist/esm/api/resources/authtoken/client/index.mjs +1 -1
  134. package/dist/esm/api/resources/authtoken/exports.d.mts +0 -1
  135. package/dist/esm/api/resources/authtoken/exports.mjs +0 -1
  136. package/dist/esm/api/resources/authtoken/index.d.mts +0 -1
  137. package/dist/esm/api/resources/authtoken/index.mjs +0 -1
  138. package/dist/esm/api/resources/construe/client/Client.d.mts +35 -35
  139. package/dist/esm/api/resources/construe/client/Client.mjs +43 -43
  140. package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemExportRequest.d.mts → DeleteCodeSystemRequest.d.mts} +1 -1
  141. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesSystemsCodesystemExportRequest.d.ts → esm/api/resources/construe/client/requests/ExportCodeSystemRequest.d.mts} +1 -1
  142. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.ts → esm/api/resources/construe/client/requests/GetCodeRequest.d.mts} +1 -1
  143. package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemRequest.d.mts → GetCodeSystemRequest.d.mts} +1 -1
  144. package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemRequest.d.mts → ListCodesRequest.d.mts} +1 -1
  145. package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchSemanticRequest.d.mts → SearchSemanticRequest.d.mts} +1 -1
  146. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.ts → esm/api/resources/construe/client/requests/SearchTextRequest.d.mts} +1 -1
  147. package/dist/esm/api/resources/construe/client/requests/index.d.mts +7 -7
  148. package/dist/{cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.ts → esm/api/resources/construe/types/UploadCodeSystemResponse.d.mts} +1 -1
  149. package/dist/esm/api/resources/construe/types/index.d.mts +1 -1
  150. package/dist/esm/api/resources/construe/types/index.mjs +1 -1
  151. package/dist/esm/api/resources/fhir/client/Client.d.mts +12 -12
  152. package/dist/esm/api/resources/fhir/client/Client.mjs +6 -6
  153. package/dist/esm/api/resources/fhir/client/requests/{FhirCreateRequest.d.mts → CreateRequest.d.mts} +1 -1
  154. package/dist/{cjs/api/resources/fhir/client/requests/FhirDeleteRequest.d.ts → esm/api/resources/fhir/client/requests/DeleteRequest.d.mts} +1 -1
  155. package/dist/esm/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.d.mts → ExecuteBundleRequest.d.mts} +1 -1
  156. package/dist/esm/api/resources/fhir/client/requests/{FhirPatchRequest.d.mts → PatchRequest.d.mts} +2 -2
  157. package/dist/esm/api/resources/fhir/client/requests/{FhirSearchRequest.d.mts → SearchRequest.d.mts} +1 -1
  158. package/dist/esm/api/resources/fhir/client/requests/{FhirUpsertRequest.d.mts → UpsertRequest.d.mts} +1 -1
  159. package/dist/esm/api/resources/fhir/client/requests/index.d.mts +6 -6
  160. package/dist/esm/api/resources/fhir/types/{FhirPatchRequestBodyItem.d.mts → PatchRequestBodyItem.d.mts} +3 -3
  161. package/dist/esm/api/resources/fhir/types/{FhirPatchRequestBodyItem.mjs → PatchRequestBodyItem.mjs} +4 -4
  162. package/dist/esm/api/resources/fhir/types/SearchResponse.d.mts +2 -0
  163. package/dist/esm/api/resources/fhir/types/index.d.mts +2 -2
  164. package/dist/esm/api/resources/fhir/types/index.mjs +2 -2
  165. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +2 -2
  166. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +1 -4
  167. package/dist/esm/api/resources/fhirProvider/types/DeleteResponse.d.mts +4 -0
  168. package/dist/esm/api/resources/fhirProvider/types/{FhirProviderRemoveAuthConfigResponse.d.mts → RemoveAuthConfigResponse.d.mts} +1 -1
  169. package/dist/esm/api/resources/fhirProvider/types/index.d.mts +2 -2
  170. package/dist/esm/api/resources/fhirProvider/types/index.mjs +2 -2
  171. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +4 -4
  172. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +4 -4
  173. package/dist/esm/api/resources/lang2Fhir/types/{Lang2FhirUploadProfileResponse.d.mts → UploadProfileResponse.d.mts} +1 -1
  174. package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +1 -1
  175. package/dist/esm/api/resources/lang2Fhir/types/index.mjs +1 -1
  176. package/dist/esm/api/resources/summary/client/Client.d.mts +3 -88
  177. package/dist/esm/api/resources/summary/client/Client.mjs +4 -309
  178. package/dist/esm/api/resources/summary/client/requests/index.d.mts +0 -2
  179. package/dist/esm/api/resources/summary/exports.d.mts +1 -0
  180. package/dist/esm/api/resources/summary/exports.mjs +1 -0
  181. package/dist/esm/api/resources/summary/index.d.mts +1 -0
  182. package/dist/esm/api/resources/summary/index.mjs +1 -0
  183. package/dist/esm/api/resources/summary/resources/index.d.mts +3 -0
  184. package/dist/esm/api/resources/summary/resources/index.mjs +3 -0
  185. package/dist/esm/api/resources/summary/resources/templates/client/Client.d.mts +101 -0
  186. package/dist/esm/api/resources/summary/resources/templates/client/Client.mjs +329 -0
  187. package/dist/esm/api/resources/summary/resources/templates/client/requests/index.d.mts +2 -0
  188. package/dist/esm/api/resources/summary/resources/templates/exports.d.mts +2 -0
  189. package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/exports.mjs +1 -1
  190. package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/index.d.mts +1 -0
  191. package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/index.mjs +1 -0
  192. package/dist/esm/api/resources/summary/resources/templates/types/TemplatesDeleteResponse.d.mts +4 -0
  193. package/dist/esm/api/resources/summary/resources/templates/types/TemplatesGetResponse.d.mts +5 -0
  194. package/dist/esm/api/resources/summary/{types/SummaryListTemplatesResponse.d.mts → resources/templates/types/TemplatesListResponse.d.mts} +2 -2
  195. package/dist/esm/api/resources/summary/{types/SummaryUpdateTemplateResponse.d.mts → resources/templates/types/TemplatesUpdateResponse.d.mts} +2 -2
  196. package/dist/esm/api/resources/summary/resources/templates/types/index.d.mts +4 -0
  197. package/dist/esm/api/resources/summary/resources/templates/types/index.mjs +4 -0
  198. package/dist/esm/api/resources/summary/types/index.d.mts +0 -4
  199. package/dist/esm/api/resources/summary/types/index.mjs +0 -4
  200. package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.d.mts +0 -1
  201. package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.mjs +0 -1
  202. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +0 -21
  203. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +0 -68
  204. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/index.d.mts +1 -1
  205. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/index.mjs +1 -1
  206. package/dist/esm/api/resources/tools/types/index.d.mts +0 -1
  207. package/dist/esm/api/resources/tools/types/index.mjs +0 -1
  208. package/dist/esm/api/resources/workflows/client/Client.d.mts +7 -6
  209. package/dist/esm/api/resources/workflows/client/Client.mjs +8 -14
  210. package/dist/{cjs/api/resources/workflows/client/requests/WorkflowsListRequest.d.ts → esm/api/resources/workflows/client/requests/GetRequest.d.mts} +1 -1
  211. package/dist/esm/api/resources/workflows/client/requests/{WorkflowsListRequest.d.mts → ListRequest.d.mts} +1 -1
  212. package/dist/esm/api/resources/workflows/client/requests/index.d.mts +2 -2
  213. package/dist/esm/api/resources/workflows/errors/GatewayTimeoutError.d.mts +5 -0
  214. package/dist/esm/api/resources/workflows/errors/GatewayTimeoutError.mjs +17 -0
  215. package/dist/esm/api/resources/workflows/errors/index.d.mts +1 -0
  216. package/dist/esm/api/resources/workflows/errors/index.mjs +1 -0
  217. package/dist/esm/api/resources/workflows/types/DeleteResponse.d.mts +4 -0
  218. package/dist/esm/api/resources/workflows/types/{WorkflowsGetResponse.d.mts → GetResponse.d.mts} +1 -1
  219. package/dist/esm/api/resources/workflows/types/{WorkflowsUpdateResponse.d.mts → UpdateResponse.d.mts} +1 -1
  220. package/dist/esm/api/resources/workflows/types/index.d.mts +3 -3
  221. package/dist/esm/api/resources/workflows/types/index.mjs +3 -3
  222. package/dist/esm/auth/OAuthAuthProvider.mjs +2 -2
  223. package/dist/esm/version.d.mts +1 -1
  224. package/dist/esm/version.mjs +1 -1
  225. package/openapi/openapi.json +11397 -0
  226. package/package.json +14 -12
  227. package/reference.md +140 -214
  228. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestOrder.d.ts +0 -5
  229. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.ts +0 -7
  230. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +0 -34
  231. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +0 -121
  232. package/dist/cjs/api/resources/authtoken/resources/auth/exports.d.ts +0 -2
  233. package/dist/cjs/api/resources/authtoken/resources/index.d.ts +0 -2
  234. package/dist/cjs/api/resources/fhir/types/FhirSearchResponse.d.ts +0 -2
  235. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.ts +0 -4
  236. package/dist/cjs/api/resources/summary/types/SummaryDeleteTemplateResponse.d.ts +0 -4
  237. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/requests/McpServerToolCallRequest.d.ts +0 -12
  238. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.d.ts +0 -1
  239. package/dist/cjs/api/resources/tools/types/McpServerToolCallResponse.d.ts +0 -10
  240. package/dist/cjs/api/resources/workflows/types/WorkflowsGetResponse.js +0 -3
  241. package/dist/cjs/api/resources/workflows/types/WorkflowsUpdateResponse.js +0 -3
  242. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestOrder.d.mts +0 -5
  243. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.mts +0 -7
  244. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +0 -34
  245. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +0 -84
  246. package/dist/esm/api/resources/authtoken/resources/auth/exports.d.mts +0 -2
  247. package/dist/esm/api/resources/authtoken/resources/index.d.mts +0 -2
  248. package/dist/esm/api/resources/authtoken/resources/index.mjs +0 -2
  249. package/dist/esm/api/resources/fhir/types/FhirSearchResponse.d.mts +0 -2
  250. package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.mts +0 -4
  251. package/dist/esm/api/resources/summary/types/SummaryDeleteTemplateResponse.d.mts +0 -4
  252. package/dist/esm/api/resources/summary/types/SummaryGetTemplateResponse.d.mts +0 -5
  253. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/requests/McpServerToolCallRequest.d.mts +0 -12
  254. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.d.mts +0 -1
  255. package/dist/esm/api/resources/tools/types/McpServerToolCallResponse.d.mts +0 -10
  256. package/dist/esm/api/resources/workflows/types/WorkflowsGetResponse.mjs +0 -2
  257. package/dist/esm/api/resources/workflows/types/WorkflowsUpdateResponse.mjs +0 -2
  258. /package/dist/cjs/api/resources/agent/client/requests/{AgentGetChatMessagesRequest.js → GetChatMessagesRequest.js} +0 -0
  259. /package/dist/cjs/api/resources/agent/client/requests/{AgentListRequest.js → ListRequest.js} +0 -0
  260. /package/dist/cjs/api/resources/agent/types/{AgentDeleteResponse.js → DeleteResponse.js} +0 -0
  261. /package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesResponse.js → GetChatMessagesResponse.js} +0 -0
  262. /package/dist/cjs/api/resources/agent/types/{AgentListResponse.js → ListResponse.js} +0 -0
  263. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.d.ts +0 -0
  264. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.js +0 -0
  265. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/index.d.ts +0 -0
  266. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/index.js +0 -0
  267. /package/dist/cjs/api/resources/construe/client/requests/{DeleteConstrueCodesSystemsCodesystemRequest.js → DeleteCodeSystemRequest.js} +0 -0
  268. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemCodeIdRequest.js → ExportCodeSystemRequest.js} +0 -0
  269. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemRequest.js → GetCodeRequest.js} +0 -0
  270. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchSemanticRequest.js → GetCodeSystemRequest.js} +0 -0
  271. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchTextRequest.js → ListCodesRequest.js} +0 -0
  272. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemExportRequest.js → SearchSemanticRequest.js} +0 -0
  273. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemRequest.js → SearchTextRequest.js} +0 -0
  274. /package/dist/cjs/api/resources/construe/types/{ConstrueUploadCodeSystemResponse.js → UploadCodeSystemResponse.js} +0 -0
  275. /package/dist/cjs/api/resources/fhir/client/requests/{FhirCreateRequest.js → CreateRequest.js} +0 -0
  276. /package/dist/cjs/api/resources/fhir/client/requests/{FhirDeleteRequest.js → DeleteRequest.js} +0 -0
  277. /package/dist/cjs/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.js → ExecuteBundleRequest.js} +0 -0
  278. /package/dist/cjs/api/resources/fhir/client/requests/{FhirPatchRequest.js → PatchRequest.js} +0 -0
  279. /package/dist/cjs/api/resources/fhir/client/requests/{FhirSearchRequest.js → SearchRequest.js} +0 -0
  280. /package/dist/cjs/api/resources/fhir/client/requests/{FhirUpsertRequest.js → UpsertRequest.js} +0 -0
  281. /package/dist/cjs/api/resources/fhir/types/{FhirSearchResponse.js → SearchResponse.js} +0 -0
  282. /package/dist/cjs/api/resources/fhirProvider/types/{FhirProviderDeleteResponse.js → DeleteResponse.js} +0 -0
  283. /package/dist/cjs/api/resources/fhirProvider/types/{FhirProviderRemoveAuthConfigResponse.js → RemoveAuthConfigResponse.js} +0 -0
  284. /package/dist/cjs/api/resources/lang2Fhir/types/{Lang2FhirUploadProfileResponse.js → UploadProfileResponse.js} +0 -0
  285. /package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/client/index.d.ts +0 -0
  286. /package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/client/index.js +0 -0
  287. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.d.ts +0 -0
  288. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.js +0 -0
  289. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.d.ts +0 -0
  290. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.js +0 -0
  291. /package/dist/cjs/api/resources/{tools/resources/mcpServer/resources/tools → summary/resources/templates}/client/requests/index.js +0 -0
  292. /package/dist/cjs/api/resources/summary/{types/SummaryDeleteTemplateResponse.js → resources/templates/types/TemplatesDeleteResponse.js} +0 -0
  293. /package/dist/cjs/api/resources/summary/{types/SummaryGetTemplateResponse.js → resources/templates/types/TemplatesGetResponse.js} +0 -0
  294. /package/dist/cjs/api/resources/summary/{types/SummaryListTemplatesResponse.js → resources/templates/types/TemplatesListResponse.js} +0 -0
  295. /package/dist/cjs/api/resources/summary/{types/SummaryUpdateTemplateResponse.js → resources/templates/types/TemplatesUpdateResponse.js} +0 -0
  296. /package/dist/cjs/api/resources/{tools/resources/mcpServer/resources/tools/client/requests/McpServerToolCallRequest.js → workflows/client/requests/GetRequest.js} +0 -0
  297. /package/dist/cjs/api/resources/{tools/types/McpServerToolCallResponse.js → workflows/client/requests/ListRequest.js} +0 -0
  298. /package/dist/cjs/api/resources/workflows/{client/requests/WorkflowsGetRequest.js → types/DeleteResponse.js} +0 -0
  299. /package/dist/cjs/api/resources/workflows/{client/requests/WorkflowsListRequest.js → types/GetResponse.js} +0 -0
  300. /package/dist/cjs/api/resources/workflows/types/{WorkflowsDeleteResponse.js → UpdateResponse.js} +0 -0
  301. /package/dist/esm/api/resources/agent/client/requests/{AgentGetChatMessagesRequest.mjs → GetChatMessagesRequest.mjs} +0 -0
  302. /package/dist/esm/api/resources/agent/client/requests/{AgentListRequest.mjs → ListRequest.mjs} +0 -0
  303. /package/dist/esm/api/resources/agent/types/{AgentDeleteResponse.mjs → DeleteResponse.mjs} +0 -0
  304. /package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesResponse.mjs → GetChatMessagesResponse.mjs} +0 -0
  305. /package/dist/esm/api/resources/agent/types/{AgentListResponse.mjs → ListResponse.mjs} +0 -0
  306. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.d.mts +0 -0
  307. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.mjs +0 -0
  308. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/index.d.mts +0 -0
  309. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/index.mjs +0 -0
  310. /package/dist/esm/api/resources/construe/client/requests/{DeleteConstrueCodesSystemsCodesystemRequest.mjs → DeleteCodeSystemRequest.mjs} +0 -0
  311. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemCodeIdRequest.mjs → ExportCodeSystemRequest.mjs} +0 -0
  312. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemRequest.mjs → GetCodeRequest.mjs} +0 -0
  313. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchSemanticRequest.mjs → GetCodeSystemRequest.mjs} +0 -0
  314. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchTextRequest.mjs → ListCodesRequest.mjs} +0 -0
  315. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemExportRequest.mjs → SearchSemanticRequest.mjs} +0 -0
  316. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemRequest.mjs → SearchTextRequest.mjs} +0 -0
  317. /package/dist/esm/api/resources/construe/types/{ConstrueUploadCodeSystemResponse.mjs → UploadCodeSystemResponse.mjs} +0 -0
  318. /package/dist/esm/api/resources/fhir/client/requests/{FhirCreateRequest.mjs → CreateRequest.mjs} +0 -0
  319. /package/dist/esm/api/resources/fhir/client/requests/{FhirDeleteRequest.mjs → DeleteRequest.mjs} +0 -0
  320. /package/dist/esm/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.mjs → ExecuteBundleRequest.mjs} +0 -0
  321. /package/dist/esm/api/resources/fhir/client/requests/{FhirPatchRequest.mjs → PatchRequest.mjs} +0 -0
  322. /package/dist/esm/api/resources/fhir/client/requests/{FhirSearchRequest.mjs → SearchRequest.mjs} +0 -0
  323. /package/dist/esm/api/resources/fhir/client/requests/{FhirUpsertRequest.mjs → UpsertRequest.mjs} +0 -0
  324. /package/dist/esm/api/resources/fhir/types/{FhirSearchResponse.mjs → SearchResponse.mjs} +0 -0
  325. /package/dist/esm/api/resources/fhirProvider/types/{FhirProviderDeleteResponse.mjs → DeleteResponse.mjs} +0 -0
  326. /package/dist/esm/api/resources/fhirProvider/types/{FhirProviderRemoveAuthConfigResponse.mjs → RemoveAuthConfigResponse.mjs} +0 -0
  327. /package/dist/esm/api/resources/lang2Fhir/types/{Lang2FhirUploadProfileResponse.mjs → UploadProfileResponse.mjs} +0 -0
  328. /package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/client/index.d.mts +0 -0
  329. /package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/client/index.mjs +0 -0
  330. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.d.mts +0 -0
  331. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.mjs +0 -0
  332. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.d.mts +0 -0
  333. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.mjs +0 -0
  334. /package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools → summary/resources/templates}/client/requests/index.mjs +0 -0
  335. /package/dist/esm/api/resources/summary/{types/SummaryDeleteTemplateResponse.mjs → resources/templates/types/TemplatesDeleteResponse.mjs} +0 -0
  336. /package/dist/esm/api/resources/summary/{types/SummaryGetTemplateResponse.mjs → resources/templates/types/TemplatesGetResponse.mjs} +0 -0
  337. /package/dist/esm/api/resources/summary/{types/SummaryListTemplatesResponse.mjs → resources/templates/types/TemplatesListResponse.mjs} +0 -0
  338. /package/dist/esm/api/resources/summary/{types/SummaryUpdateTemplateResponse.mjs → resources/templates/types/TemplatesUpdateResponse.mjs} +0 -0
  339. /package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools/client/requests/McpServerToolCallRequest.mjs → workflows/client/requests/GetRequest.mjs} +0 -0
  340. /package/dist/esm/api/resources/{tools/types/McpServerToolCallResponse.mjs → workflows/client/requests/ListRequest.mjs} +0 -0
  341. /package/dist/esm/api/resources/workflows/{client/requests/WorkflowsGetRequest.mjs → types/DeleteResponse.mjs} +0 -0
  342. /package/dist/esm/api/resources/workflows/{client/requests/WorkflowsListRequest.mjs → types/GetResponse.mjs} +0 -0
  343. /package/dist/esm/api/resources/workflows/types/{WorkflowsDeleteResponse.mjs → UpdateResponse.mjs} +0 -0
@@ -0,0 +1,366 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.TemplatesClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const phenoml = __importStar(require("../../../../../index.js"));
54
+ class TemplatesClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Retrieves all summary templates for the authenticated user
60
+ *
61
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link phenoml.summary.UnauthorizedError}
64
+ * @throws {@link phenoml.summary.InternalServerError}
65
+ *
66
+ * @example
67
+ * await client.summary.templates.list()
68
+ */
69
+ list(requestOptions) {
70
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
71
+ }
72
+ __list(requestOptions) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
75
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
76
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
77
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
78
+ 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, "fhir2summary/templates"),
79
+ method: "GET",
80
+ headers: _headers,
81
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
82
+ 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,
83
+ 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,
84
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
86
+ logging: this._options.logging,
87
+ });
88
+ if (_response.ok) {
89
+ return {
90
+ data: _response.body,
91
+ rawResponse: _response.rawResponse,
92
+ };
93
+ }
94
+ if (_response.error.reason === "status-code") {
95
+ switch (_response.error.statusCode) {
96
+ case 401:
97
+ throw new phenoml.summary.UnauthorizedError(_response.error.body, _response.rawResponse);
98
+ case 500:
99
+ throw new phenoml.summary.InternalServerError(_response.error.body, _response.rawResponse);
100
+ default:
101
+ throw new errors.phenomlError({
102
+ statusCode: _response.error.statusCode,
103
+ body: _response.error.body,
104
+ rawResponse: _response.rawResponse,
105
+ });
106
+ }
107
+ }
108
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/fhir2summary/templates");
109
+ });
110
+ }
111
+ /**
112
+ * Creates a summary template from an example using LLM function calling
113
+ *
114
+ * @param {phenoml.summary.CreateSummaryTemplateRequest} request
115
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
116
+ *
117
+ * @throws {@link phenoml.summary.BadRequestError}
118
+ * @throws {@link phenoml.summary.UnauthorizedError}
119
+ * @throws {@link phenoml.summary.InternalServerError}
120
+ *
121
+ * @example
122
+ * await client.summary.templates.create({
123
+ * name: "Discharge Summary",
124
+ * example_summary: "Patient John Doe, age 45, was admitted on 2024-01-10 with Type 2 Diabetes. Discharged on 2024-01-15 with Metformin 500mg BID.",
125
+ * target_resources: ["Patient", "Condition", "MedicationRequest"],
126
+ * mode: "narrative"
127
+ * })
128
+ */
129
+ create(request, requestOptions) {
130
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
131
+ }
132
+ __create(request, requestOptions) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
135
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
136
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
137
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
138
+ 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, "fhir2summary/template"),
139
+ method: "POST",
140
+ headers: _headers,
141
+ contentType: "application/json",
142
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
143
+ requestType: "json",
144
+ body: request,
145
+ 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,
146
+ 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,
147
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
149
+ logging: this._options.logging,
150
+ });
151
+ if (_response.ok) {
152
+ return {
153
+ data: _response.body,
154
+ rawResponse: _response.rawResponse,
155
+ };
156
+ }
157
+ if (_response.error.reason === "status-code") {
158
+ switch (_response.error.statusCode) {
159
+ case 400:
160
+ throw new phenoml.summary.BadRequestError(_response.error.body, _response.rawResponse);
161
+ case 401:
162
+ throw new phenoml.summary.UnauthorizedError(_response.error.body, _response.rawResponse);
163
+ case 500:
164
+ throw new phenoml.summary.InternalServerError(_response.error.body, _response.rawResponse);
165
+ default:
166
+ throw new errors.phenomlError({
167
+ statusCode: _response.error.statusCode,
168
+ body: _response.error.body,
169
+ rawResponse: _response.rawResponse,
170
+ });
171
+ }
172
+ }
173
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/fhir2summary/template");
174
+ });
175
+ }
176
+ /**
177
+ * Retrieves a specific summary template
178
+ *
179
+ * @param {string} id - Template ID
180
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
181
+ *
182
+ * @throws {@link phenoml.summary.UnauthorizedError}
183
+ * @throws {@link phenoml.summary.ForbiddenError}
184
+ * @throws {@link phenoml.summary.NotFoundError}
185
+ * @throws {@link phenoml.summary.InternalServerError}
186
+ *
187
+ * @example
188
+ * await client.summary.templates.get("id")
189
+ */
190
+ get(id, requestOptions) {
191
+ return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
192
+ }
193
+ __get(id, requestOptions) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
196
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
197
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
198
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
199
+ 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, `fhir2summary/template/${core.url.encodePathParam(id)}`),
200
+ method: "GET",
201
+ headers: _headers,
202
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
203
+ 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,
204
+ 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,
205
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
206
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
207
+ logging: this._options.logging,
208
+ });
209
+ if (_response.ok) {
210
+ return { data: _response.body, rawResponse: _response.rawResponse };
211
+ }
212
+ if (_response.error.reason === "status-code") {
213
+ switch (_response.error.statusCode) {
214
+ case 401:
215
+ throw new phenoml.summary.UnauthorizedError(_response.error.body, _response.rawResponse);
216
+ case 403:
217
+ throw new phenoml.summary.ForbiddenError(_response.error.body, _response.rawResponse);
218
+ case 404:
219
+ throw new phenoml.summary.NotFoundError(_response.error.body, _response.rawResponse);
220
+ case 500:
221
+ throw new phenoml.summary.InternalServerError(_response.error.body, _response.rawResponse);
222
+ default:
223
+ throw new errors.phenomlError({
224
+ statusCode: _response.error.statusCode,
225
+ body: _response.error.body,
226
+ rawResponse: _response.rawResponse,
227
+ });
228
+ }
229
+ }
230
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/fhir2summary/template/{id}");
231
+ });
232
+ }
233
+ /**
234
+ * Updates an existing summary template
235
+ *
236
+ * @param {string} id - Template ID
237
+ * @param {phenoml.summary.UpdateSummaryTemplateRequest} request
238
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
239
+ *
240
+ * @throws {@link phenoml.summary.BadRequestError}
241
+ * @throws {@link phenoml.summary.UnauthorizedError}
242
+ * @throws {@link phenoml.summary.ForbiddenError}
243
+ * @throws {@link phenoml.summary.NotFoundError}
244
+ * @throws {@link phenoml.summary.InternalServerError}
245
+ *
246
+ * @example
247
+ * await client.summary.templates.update("id", {
248
+ * name: "Discharge Summary",
249
+ * template: "Patient {{Patient.name[0].text}} was discharged on {{Encounter[0].period.end}} with {{MedicationRequest[0].medicationCodeableConcept.coding[0].display}} {{MedicationRequest[0].dosageInstruction[0].text}}.",
250
+ * target_resources: ["Patient", "Encounter", "MedicationRequest"],
251
+ * mode: "narrative"
252
+ * })
253
+ */
254
+ update(id, request, requestOptions) {
255
+ return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
256
+ }
257
+ __update(id, request, requestOptions) {
258
+ return __awaiter(this, void 0, void 0, function* () {
259
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
260
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
261
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
262
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
263
+ 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, `fhir2summary/template/${core.url.encodePathParam(id)}`),
264
+ method: "PUT",
265
+ headers: _headers,
266
+ contentType: "application/json",
267
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
268
+ requestType: "json",
269
+ body: request,
270
+ 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,
271
+ 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,
272
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
273
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
274
+ logging: this._options.logging,
275
+ });
276
+ if (_response.ok) {
277
+ return {
278
+ data: _response.body,
279
+ rawResponse: _response.rawResponse,
280
+ };
281
+ }
282
+ if (_response.error.reason === "status-code") {
283
+ switch (_response.error.statusCode) {
284
+ case 400:
285
+ throw new phenoml.summary.BadRequestError(_response.error.body, _response.rawResponse);
286
+ case 401:
287
+ throw new phenoml.summary.UnauthorizedError(_response.error.body, _response.rawResponse);
288
+ case 403:
289
+ throw new phenoml.summary.ForbiddenError(_response.error.body, _response.rawResponse);
290
+ case 404:
291
+ throw new phenoml.summary.NotFoundError(_response.error.body, _response.rawResponse);
292
+ case 500:
293
+ throw new phenoml.summary.InternalServerError(_response.error.body, _response.rawResponse);
294
+ default:
295
+ throw new errors.phenomlError({
296
+ statusCode: _response.error.statusCode,
297
+ body: _response.error.body,
298
+ rawResponse: _response.rawResponse,
299
+ });
300
+ }
301
+ }
302
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/fhir2summary/template/{id}");
303
+ });
304
+ }
305
+ /**
306
+ * Deletes a summary template
307
+ *
308
+ * @param {string} id - Template ID
309
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
310
+ *
311
+ * @throws {@link phenoml.summary.UnauthorizedError}
312
+ * @throws {@link phenoml.summary.ForbiddenError}
313
+ * @throws {@link phenoml.summary.NotFoundError}
314
+ * @throws {@link phenoml.summary.InternalServerError}
315
+ *
316
+ * @example
317
+ * await client.summary.templates.delete("id")
318
+ */
319
+ delete(id, requestOptions) {
320
+ return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
321
+ }
322
+ __delete(id, requestOptions) {
323
+ return __awaiter(this, void 0, void 0, function* () {
324
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
325
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
326
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
327
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
328
+ 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, `fhir2summary/template/${core.url.encodePathParam(id)}`),
329
+ method: "DELETE",
330
+ headers: _headers,
331
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
332
+ 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,
333
+ 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,
334
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
335
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
336
+ logging: this._options.logging,
337
+ });
338
+ if (_response.ok) {
339
+ return {
340
+ data: _response.body,
341
+ rawResponse: _response.rawResponse,
342
+ };
343
+ }
344
+ if (_response.error.reason === "status-code") {
345
+ switch (_response.error.statusCode) {
346
+ case 401:
347
+ throw new phenoml.summary.UnauthorizedError(_response.error.body, _response.rawResponse);
348
+ case 403:
349
+ throw new phenoml.summary.ForbiddenError(_response.error.body, _response.rawResponse);
350
+ case 404:
351
+ throw new phenoml.summary.NotFoundError(_response.error.body, _response.rawResponse);
352
+ case 500:
353
+ throw new phenoml.summary.InternalServerError(_response.error.body, _response.rawResponse);
354
+ default:
355
+ throw new errors.phenomlError({
356
+ statusCode: _response.error.statusCode,
357
+ body: _response.error.body,
358
+ rawResponse: _response.rawResponse,
359
+ });
360
+ }
361
+ }
362
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/fhir2summary/template/{id}");
363
+ });
364
+ }
365
+ }
366
+ exports.TemplatesClient = TemplatesClient;
@@ -0,0 +1,2 @@
1
+ export type { CreateSummaryTemplateRequest } from "./CreateSummaryTemplateRequest.js";
2
+ export type { UpdateSummaryTemplateRequest } from "./UpdateSummaryTemplateRequest.js";
@@ -0,0 +1,2 @@
1
+ export { TemplatesClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
16
  };
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.AuthClient = void 0;
18
+ exports.TemplatesClient = void 0;
19
19
  var Client_js_1 = require("./client/Client.js");
20
- Object.defineProperty(exports, "AuthClient", { enumerable: true, get: function () { return Client_js_1.AuthClient; } });
20
+ Object.defineProperty(exports, "TemplatesClient", { enumerable: true, get: function () { return Client_js_1.TemplatesClient; } });
21
21
  __exportStar(require("./client/index.js"), exports);
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -1,4 +1,4 @@
1
- export interface WorkflowsDeleteResponse {
1
+ export interface TemplatesDeleteResponse {
2
2
  success?: boolean | undefined;
3
3
  message?: string | undefined;
4
4
  }
@@ -1,5 +1,5 @@
1
- import type * as phenoml from "../../../index.js";
2
- export interface SummaryGetTemplateResponse {
1
+ import type * as phenoml from "../../../../../index.js";
2
+ export interface TemplatesGetResponse {
3
3
  success?: boolean | undefined;
4
4
  template?: phenoml.summary.SummaryTemplate | undefined;
5
5
  }
@@ -1,5 +1,5 @@
1
- import type * as phenoml from "../../../index.js";
2
- export interface SummaryListTemplatesResponse {
1
+ import type * as phenoml from "../../../../../index.js";
2
+ export interface TemplatesListResponse {
3
3
  success?: boolean | undefined;
4
4
  templates?: phenoml.summary.SummaryTemplate[] | undefined;
5
5
  }
@@ -1,5 +1,5 @@
1
- import type * as phenoml from "../../../index.js";
2
- export interface SummaryUpdateTemplateResponse {
1
+ import type * as phenoml from "../../../../../index.js";
2
+ export interface TemplatesUpdateResponse {
3
3
  success?: boolean | undefined;
4
4
  message?: string | undefined;
5
5
  template?: phenoml.summary.SummaryTemplate | undefined;
@@ -0,0 +1,4 @@
1
+ export * from "./TemplatesDeleteResponse.js";
2
+ export * from "./TemplatesGetResponse.js";
3
+ export * from "./TemplatesListResponse.js";
4
+ export * from "./TemplatesUpdateResponse.js";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./TemplatesDeleteResponse.js"), exports);
18
+ __exportStar(require("./TemplatesGetResponse.js"), exports);
19
+ __exportStar(require("./TemplatesListResponse.js"), exports);
20
+ __exportStar(require("./TemplatesUpdateResponse.js"), exports);
@@ -1,7 +1,3 @@
1
1
  export * from "./CreateSummaryResponse.js";
2
2
  export * from "./CreateSummaryTemplateResponse.js";
3
- export * from "./SummaryDeleteTemplateResponse.js";
4
- export * from "./SummaryGetTemplateResponse.js";
5
- export * from "./SummaryListTemplatesResponse.js";
6
3
  export * from "./SummaryTemplate.js";
7
- export * from "./SummaryUpdateTemplateResponse.js";
@@ -16,8 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CreateSummaryResponse.js"), exports);
18
18
  __exportStar(require("./CreateSummaryTemplateResponse.js"), exports);
19
- __exportStar(require("./SummaryDeleteTemplateResponse.js"), exports);
20
- __exportStar(require("./SummaryGetTemplateResponse.js"), exports);
21
- __exportStar(require("./SummaryListTemplatesResponse.js"), exports);
22
19
  __exportStar(require("./SummaryTemplate.js"), exports);
23
- __exportStar(require("./SummaryUpdateTemplateResponse.js"), exports);
@@ -1,2 +1 @@
1
- export * from "./tools/client/requests/index.js";
2
1
  export * as tools from "./tools/index.js";
@@ -15,9 +15,6 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
- };
21
18
  var __importStar = (this && this.__importStar) || (function () {
22
19
  var ownKeys = function(o) {
23
20
  ownKeys = Object.getOwnPropertyNames || function (o) {
@@ -37,5 +34,4 @@ var __importStar = (this && this.__importStar) || (function () {
37
34
  })();
38
35
  Object.defineProperty(exports, "__esModule", { value: true });
39
36
  exports.tools = void 0;
40
- __exportStar(require("./tools/client/requests/index.js"), exports);
41
37
  exports.tools = __importStar(require("./tools/index.js"));
@@ -55,25 +55,4 @@ export declare class ToolsClient {
55
55
  */
56
56
  delete(mcp_server_tool_id: string, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
57
57
  private __delete;
58
- /**
59
- * Calls a MCP server tool
60
- *
61
- * @param {string} mcp_server_tool_id - ID of the MCP server tool to call
62
- * @param {phenoml.tools.mcpServer.McpServerToolCallRequest} request
63
- * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
64
- *
65
- * @throws {@link phenoml.tools.BadRequestError}
66
- * @throws {@link phenoml.tools.UnauthorizedError}
67
- * @throws {@link phenoml.tools.ForbiddenError}
68
- * @throws {@link phenoml.tools.InternalServerError}
69
- *
70
- * @example
71
- * await client.tools.mcpServer.tools.call("mcp_server_tool_id", {
72
- * arguments: {
73
- * "title": "PhenoML Agent API"
74
- * }
75
- * })
76
- */
77
- call(mcp_server_tool_id: string, request: phenoml.tools.mcpServer.McpServerToolCallRequest, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolCallResponse>;
78
- private __call;
79
58
  }
@@ -217,73 +217,5 @@ class ToolsClient {
217
217
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/tools/mcp-server/tool/{mcp_server_tool_id}");
218
218
  });
219
219
  }
220
- /**
221
- * Calls a MCP server tool
222
- *
223
- * @param {string} mcp_server_tool_id - ID of the MCP server tool to call
224
- * @param {phenoml.tools.mcpServer.McpServerToolCallRequest} request
225
- * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
226
- *
227
- * @throws {@link phenoml.tools.BadRequestError}
228
- * @throws {@link phenoml.tools.UnauthorizedError}
229
- * @throws {@link phenoml.tools.ForbiddenError}
230
- * @throws {@link phenoml.tools.InternalServerError}
231
- *
232
- * @example
233
- * await client.tools.mcpServer.tools.call("mcp_server_tool_id", {
234
- * arguments: {
235
- * "title": "PhenoML Agent API"
236
- * }
237
- * })
238
- */
239
- call(mcp_server_tool_id, request, requestOptions) {
240
- return core.HttpResponsePromise.fromPromise(this.__call(mcp_server_tool_id, request, requestOptions));
241
- }
242
- __call(mcp_server_tool_id, request, requestOptions) {
243
- return __awaiter(this, void 0, void 0, function* () {
244
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
245
- const _authRequest = yield this._options.authProvider.getAuthRequest();
246
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
247
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
248
- 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, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}/call`),
249
- method: "POST",
250
- headers: _headers,
251
- contentType: "application/json",
252
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
253
- requestType: "json",
254
- body: request,
255
- 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,
256
- 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,
257
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
258
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
259
- logging: this._options.logging,
260
- });
261
- if (_response.ok) {
262
- return {
263
- data: _response.body,
264
- rawResponse: _response.rawResponse,
265
- };
266
- }
267
- if (_response.error.reason === "status-code") {
268
- switch (_response.error.statusCode) {
269
- case 400:
270
- throw new phenoml.tools.BadRequestError(_response.error.body, _response.rawResponse);
271
- case 401:
272
- throw new phenoml.tools.UnauthorizedError(_response.error.body, _response.rawResponse);
273
- case 403:
274
- throw new phenoml.tools.ForbiddenError(_response.error.body, _response.rawResponse);
275
- case 500:
276
- throw new phenoml.tools.InternalServerError(_response.error.body, _response.rawResponse);
277
- default:
278
- throw new errors.phenomlError({
279
- statusCode: _response.error.statusCode,
280
- body: _response.error.body,
281
- rawResponse: _response.rawResponse,
282
- });
283
- }
284
- }
285
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/tools/mcp-server/tool/{mcp_server_tool_id}/call");
286
- });
287
- }
288
220
  }
289
221
  exports.ToolsClient = ToolsClient;
@@ -1 +1 @@
1
- export * from "./requests/index.js";
1
+ export {};
@@ -1,17 +1,2 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests/index.js"), exports);
@@ -5,6 +5,5 @@ export * from "./Lang2FhirAndSearchResponse.js";
5
5
  export * from "./McpServer.js";
6
6
  export * from "./McpServerResponse.js";
7
7
  export * from "./McpServerTool.js";
8
- export * from "./McpServerToolCallResponse.js";
9
8
  export * from "./McpServerToolResponse.js";
10
9
  export * from "./SearchConcept.js";
@@ -21,6 +21,5 @@ __exportStar(require("./Lang2FhirAndSearchResponse.js"), exports);
21
21
  __exportStar(require("./McpServer.js"), exports);
22
22
  __exportStar(require("./McpServerResponse.js"), exports);
23
23
  __exportStar(require("./McpServerTool.js"), exports);
24
- __exportStar(require("./McpServerToolCallResponse.js"), exports);
25
24
  __exportStar(require("./McpServerToolResponse.js"), exports);
26
25
  __exportStar(require("./SearchConcept.js"), exports);