phenoml 15.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 (313) 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/{AgentGetChatMessagesRequest.d.ts → GetChatMessagesRequest.d.ts} +3 -3
  5. package/dist/{esm/api/resources/agent/client/requests/AgentListRequest.d.mts → cjs/api/resources/agent/client/requests/ListRequest.d.ts} +1 -1
  6. package/dist/cjs/api/resources/agent/client/requests/index.d.ts +2 -2
  7. package/dist/cjs/api/resources/agent/types/{AgentDeleteResponse.d.ts → DeleteResponse.d.ts} +1 -1
  8. package/dist/cjs/api/resources/agent/types/GetChatMessagesRequestOrder.d.ts +5 -0
  9. package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesRequestOrder.js → GetChatMessagesRequestOrder.js} +2 -2
  10. package/dist/cjs/api/resources/agent/types/GetChatMessagesRequestRole.d.ts +7 -0
  11. package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesRequestRole.js → GetChatMessagesRequestRole.js} +2 -2
  12. package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesResponse.d.ts → GetChatMessagesResponse.d.ts} +1 -1
  13. package/dist/cjs/api/resources/agent/types/{AgentListResponse.d.ts → ListResponse.d.ts} +1 -1
  14. package/dist/cjs/api/resources/agent/types/index.d.ts +5 -5
  15. package/dist/cjs/api/resources/agent/types/index.js +5 -5
  16. package/dist/cjs/api/resources/authtoken/client/Client.d.ts +26 -4
  17. package/dist/cjs/api/resources/authtoken/client/Client.js +109 -4
  18. package/dist/cjs/api/resources/authtoken/client/index.d.ts +1 -1
  19. package/dist/cjs/api/resources/authtoken/client/index.js +15 -0
  20. package/dist/cjs/api/resources/authtoken/exports.d.ts +0 -1
  21. package/dist/cjs/api/resources/authtoken/exports.js +0 -1
  22. package/dist/cjs/api/resources/authtoken/index.d.ts +0 -1
  23. package/dist/cjs/api/resources/authtoken/index.js +0 -1
  24. package/dist/cjs/api/resources/construe/client/Client.d.ts +35 -35
  25. package/dist/cjs/api/resources/construe/client/Client.js +43 -43
  26. package/dist/cjs/api/resources/construe/client/requests/{DeleteConstrueCodesSystemsCodesystemRequest.d.ts → DeleteCodeSystemRequest.d.ts} +1 -1
  27. package/dist/{esm/api/resources/construe/client/requests/DeleteConstrueCodesSystemsCodesystemRequest.d.mts → cjs/api/resources/construe/client/requests/ExportCodeSystemRequest.d.ts} +1 -1
  28. package/dist/{esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.mts → cjs/api/resources/construe/client/requests/GetCodeRequest.d.ts} +1 -1
  29. package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemRequest.d.ts → GetCodeSystemRequest.d.ts} +1 -1
  30. package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemRequest.d.ts → ListCodesRequest.d.ts} +1 -1
  31. package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchSemanticRequest.d.ts → SearchSemanticRequest.d.ts} +1 -1
  32. package/dist/{esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.mts → cjs/api/resources/construe/client/requests/SearchTextRequest.d.ts} +1 -1
  33. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +7 -7
  34. package/dist/{esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.mts → cjs/api/resources/construe/types/UploadCodeSystemResponse.d.ts} +1 -1
  35. package/dist/cjs/api/resources/construe/types/index.d.ts +1 -1
  36. package/dist/cjs/api/resources/construe/types/index.js +1 -1
  37. package/dist/cjs/api/resources/fhir/client/Client.d.ts +12 -12
  38. package/dist/cjs/api/resources/fhir/client/Client.js +6 -6
  39. package/dist/cjs/api/resources/fhir/client/requests/{FhirCreateRequest.d.ts → CreateRequest.d.ts} +1 -1
  40. package/dist/{esm/api/resources/fhir/client/requests/FhirDeleteRequest.d.mts → cjs/api/resources/fhir/client/requests/DeleteRequest.d.ts} +1 -1
  41. package/dist/cjs/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.d.ts → ExecuteBundleRequest.d.ts} +1 -1
  42. package/dist/cjs/api/resources/fhir/client/requests/{FhirPatchRequest.d.ts → PatchRequest.d.ts} +2 -2
  43. package/dist/cjs/api/resources/fhir/client/requests/{FhirSearchRequest.d.ts → SearchRequest.d.ts} +1 -1
  44. package/dist/cjs/api/resources/fhir/client/requests/{FhirUpsertRequest.d.ts → UpsertRequest.d.ts} +1 -1
  45. package/dist/cjs/api/resources/fhir/client/requests/index.d.ts +6 -6
  46. package/dist/cjs/api/resources/fhir/types/{FhirPatchRequestBodyItem.d.ts → PatchRequestBodyItem.d.ts} +3 -3
  47. package/dist/cjs/api/resources/fhir/types/{FhirPatchRequestBodyItem.js → PatchRequestBodyItem.js} +5 -5
  48. package/dist/cjs/api/resources/fhir/types/SearchResponse.d.ts +2 -0
  49. package/dist/cjs/api/resources/fhir/types/index.d.ts +2 -2
  50. package/dist/cjs/api/resources/fhir/types/index.js +2 -2
  51. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +2 -2
  52. package/dist/cjs/api/resources/fhirProvider/client/Client.js +1 -4
  53. package/dist/{esm/api/resources/agent/types/AgentDeleteResponse.d.mts → cjs/api/resources/fhirProvider/types/DeleteResponse.d.ts} +1 -1
  54. package/dist/cjs/api/resources/fhirProvider/types/{FhirProviderRemoveAuthConfigResponse.d.ts → RemoveAuthConfigResponse.d.ts} +1 -1
  55. package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +2 -2
  56. package/dist/cjs/api/resources/fhirProvider/types/index.js +2 -2
  57. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +4 -4
  58. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +4 -4
  59. package/dist/cjs/api/resources/lang2Fhir/types/{Lang2FhirUploadProfileResponse.d.ts → UploadProfileResponse.d.ts} +1 -1
  60. package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +1 -1
  61. package/dist/cjs/api/resources/lang2Fhir/types/index.js +1 -1
  62. package/dist/cjs/api/resources/summary/client/Client.d.ts +3 -88
  63. package/dist/cjs/api/resources/summary/client/Client.js +4 -309
  64. package/dist/cjs/api/resources/summary/client/requests/index.d.ts +0 -2
  65. package/dist/cjs/api/resources/summary/exports.d.ts +1 -0
  66. package/dist/cjs/api/resources/summary/exports.js +1 -0
  67. package/dist/cjs/api/resources/summary/index.d.ts +1 -0
  68. package/dist/cjs/api/resources/summary/index.js +1 -0
  69. package/dist/cjs/api/resources/summary/resources/index.d.ts +3 -0
  70. package/dist/cjs/api/resources/{authtoken → summary}/resources/index.js +4 -3
  71. package/dist/cjs/api/resources/summary/resources/templates/client/Client.d.ts +101 -0
  72. package/dist/cjs/api/resources/summary/resources/templates/client/Client.js +366 -0
  73. package/dist/cjs/api/resources/summary/resources/templates/client/requests/index.d.ts +2 -0
  74. package/dist/cjs/api/resources/summary/resources/templates/client/requests/index.js +2 -0
  75. package/dist/cjs/api/resources/summary/resources/templates/exports.d.ts +2 -0
  76. package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/exports.js +2 -2
  77. package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/index.d.ts +1 -0
  78. package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/index.js +1 -0
  79. package/dist/cjs/api/resources/{workflows/types/WorkflowsDeleteResponse.d.ts → summary/resources/templates/types/TemplatesDeleteResponse.d.ts} +1 -1
  80. package/dist/cjs/api/resources/summary/{types/SummaryGetTemplateResponse.d.ts → resources/templates/types/TemplatesGetResponse.d.ts} +2 -2
  81. package/dist/cjs/api/resources/summary/{types/SummaryListTemplatesResponse.d.ts → resources/templates/types/TemplatesListResponse.d.ts} +2 -2
  82. package/dist/cjs/api/resources/summary/{types/SummaryUpdateTemplateResponse.d.ts → resources/templates/types/TemplatesUpdateResponse.d.ts} +2 -2
  83. package/dist/cjs/api/resources/summary/resources/templates/types/index.d.ts +4 -0
  84. package/dist/cjs/api/resources/summary/resources/templates/types/index.js +20 -0
  85. package/dist/cjs/api/resources/summary/types/index.d.ts +0 -4
  86. package/dist/cjs/api/resources/summary/types/index.js +0 -4
  87. package/dist/cjs/api/resources/workflows/client/Client.d.ts +7 -6
  88. package/dist/cjs/api/resources/workflows/client/Client.js +8 -14
  89. package/dist/{esm/api/resources/workflows/client/requests/WorkflowsGetRequest.d.mts → cjs/api/resources/workflows/client/requests/GetRequest.d.ts} +1 -1
  90. package/dist/cjs/api/resources/workflows/client/requests/{WorkflowsGetRequest.d.ts → ListRequest.d.ts} +1 -1
  91. package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +2 -2
  92. package/dist/cjs/api/resources/workflows/errors/GatewayTimeoutError.d.ts +5 -0
  93. package/dist/cjs/api/resources/workflows/errors/GatewayTimeoutError.js +54 -0
  94. package/dist/cjs/api/resources/workflows/errors/index.d.ts +1 -0
  95. package/dist/cjs/api/resources/workflows/errors/index.js +1 -0
  96. package/dist/{esm/api/resources/workflows/types/WorkflowsDeleteResponse.d.mts → cjs/api/resources/workflows/types/DeleteResponse.d.ts} +1 -1
  97. package/dist/cjs/api/resources/workflows/types/{WorkflowsGetResponse.d.ts → GetResponse.d.ts} +1 -1
  98. package/dist/cjs/api/resources/workflows/types/{WorkflowsUpdateResponse.d.ts → UpdateResponse.d.ts} +1 -1
  99. package/dist/cjs/api/resources/workflows/types/index.d.ts +3 -3
  100. package/dist/cjs/api/resources/workflows/types/index.js +3 -3
  101. package/dist/cjs/auth/OAuthAuthProvider.js +2 -2
  102. package/dist/cjs/version.d.ts +1 -1
  103. package/dist/cjs/version.js +1 -1
  104. package/dist/esm/BaseClient.mjs +2 -2
  105. package/dist/esm/api/resources/agent/client/Client.d.mts +5 -5
  106. package/dist/esm/api/resources/agent/client/Client.mjs +2 -2
  107. package/dist/esm/api/resources/agent/client/requests/{AgentGetChatMessagesRequest.d.mts → GetChatMessagesRequest.d.mts} +3 -3
  108. package/dist/{cjs/api/resources/agent/client/requests/AgentListRequest.d.ts → esm/api/resources/agent/client/requests/ListRequest.d.mts} +1 -1
  109. package/dist/esm/api/resources/agent/client/requests/index.d.mts +2 -2
  110. package/dist/esm/api/resources/agent/types/DeleteResponse.d.mts +4 -0
  111. package/dist/esm/api/resources/agent/types/GetChatMessagesRequestOrder.d.mts +5 -0
  112. package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesRequestOrder.mjs → GetChatMessagesRequestOrder.mjs} +1 -1
  113. package/dist/esm/api/resources/agent/types/GetChatMessagesRequestRole.d.mts +7 -0
  114. package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesRequestRole.mjs → GetChatMessagesRequestRole.mjs} +1 -1
  115. package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesResponse.d.mts → GetChatMessagesResponse.d.mts} +1 -1
  116. package/dist/esm/api/resources/agent/types/{AgentListResponse.d.mts → ListResponse.d.mts} +1 -1
  117. package/dist/esm/api/resources/agent/types/index.d.mts +5 -5
  118. package/dist/esm/api/resources/agent/types/index.mjs +5 -5
  119. package/dist/esm/api/resources/authtoken/client/Client.d.mts +26 -4
  120. package/dist/esm/api/resources/authtoken/client/Client.mjs +76 -4
  121. package/dist/esm/api/resources/authtoken/client/index.d.mts +1 -1
  122. package/dist/esm/api/resources/authtoken/client/index.mjs +1 -1
  123. package/dist/esm/api/resources/authtoken/exports.d.mts +0 -1
  124. package/dist/esm/api/resources/authtoken/exports.mjs +0 -1
  125. package/dist/esm/api/resources/authtoken/index.d.mts +0 -1
  126. package/dist/esm/api/resources/authtoken/index.mjs +0 -1
  127. package/dist/esm/api/resources/construe/client/Client.d.mts +35 -35
  128. package/dist/esm/api/resources/construe/client/Client.mjs +43 -43
  129. package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemExportRequest.d.mts → DeleteCodeSystemRequest.d.mts} +1 -1
  130. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesSystemsCodesystemExportRequest.d.ts → esm/api/resources/construe/client/requests/ExportCodeSystemRequest.d.mts} +1 -1
  131. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.ts → esm/api/resources/construe/client/requests/GetCodeRequest.d.mts} +1 -1
  132. package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemRequest.d.mts → GetCodeSystemRequest.d.mts} +1 -1
  133. package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemRequest.d.mts → ListCodesRequest.d.mts} +1 -1
  134. package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchSemanticRequest.d.mts → SearchSemanticRequest.d.mts} +1 -1
  135. package/dist/{cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.ts → esm/api/resources/construe/client/requests/SearchTextRequest.d.mts} +1 -1
  136. package/dist/esm/api/resources/construe/client/requests/index.d.mts +7 -7
  137. package/dist/{cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.ts → esm/api/resources/construe/types/UploadCodeSystemResponse.d.mts} +1 -1
  138. package/dist/esm/api/resources/construe/types/index.d.mts +1 -1
  139. package/dist/esm/api/resources/construe/types/index.mjs +1 -1
  140. package/dist/esm/api/resources/fhir/client/Client.d.mts +12 -12
  141. package/dist/esm/api/resources/fhir/client/Client.mjs +6 -6
  142. package/dist/esm/api/resources/fhir/client/requests/{FhirCreateRequest.d.mts → CreateRequest.d.mts} +1 -1
  143. package/dist/{cjs/api/resources/fhir/client/requests/FhirDeleteRequest.d.ts → esm/api/resources/fhir/client/requests/DeleteRequest.d.mts} +1 -1
  144. package/dist/esm/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.d.mts → ExecuteBundleRequest.d.mts} +1 -1
  145. package/dist/esm/api/resources/fhir/client/requests/{FhirPatchRequest.d.mts → PatchRequest.d.mts} +2 -2
  146. package/dist/esm/api/resources/fhir/client/requests/{FhirSearchRequest.d.mts → SearchRequest.d.mts} +1 -1
  147. package/dist/esm/api/resources/fhir/client/requests/{FhirUpsertRequest.d.mts → UpsertRequest.d.mts} +1 -1
  148. package/dist/esm/api/resources/fhir/client/requests/index.d.mts +6 -6
  149. package/dist/esm/api/resources/fhir/types/{FhirPatchRequestBodyItem.d.mts → PatchRequestBodyItem.d.mts} +3 -3
  150. package/dist/esm/api/resources/fhir/types/{FhirPatchRequestBodyItem.mjs → PatchRequestBodyItem.mjs} +4 -4
  151. package/dist/esm/api/resources/fhir/types/SearchResponse.d.mts +2 -0
  152. package/dist/esm/api/resources/fhir/types/index.d.mts +2 -2
  153. package/dist/esm/api/resources/fhir/types/index.mjs +2 -2
  154. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +2 -2
  155. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +1 -4
  156. package/dist/esm/api/resources/fhirProvider/types/DeleteResponse.d.mts +4 -0
  157. package/dist/esm/api/resources/fhirProvider/types/{FhirProviderRemoveAuthConfigResponse.d.mts → RemoveAuthConfigResponse.d.mts} +1 -1
  158. package/dist/esm/api/resources/fhirProvider/types/index.d.mts +2 -2
  159. package/dist/esm/api/resources/fhirProvider/types/index.mjs +2 -2
  160. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +4 -4
  161. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +4 -4
  162. package/dist/esm/api/resources/lang2Fhir/types/{Lang2FhirUploadProfileResponse.d.mts → UploadProfileResponse.d.mts} +1 -1
  163. package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +1 -1
  164. package/dist/esm/api/resources/lang2Fhir/types/index.mjs +1 -1
  165. package/dist/esm/api/resources/summary/client/Client.d.mts +3 -88
  166. package/dist/esm/api/resources/summary/client/Client.mjs +4 -309
  167. package/dist/esm/api/resources/summary/client/requests/index.d.mts +0 -2
  168. package/dist/esm/api/resources/summary/exports.d.mts +1 -0
  169. package/dist/esm/api/resources/summary/exports.mjs +1 -0
  170. package/dist/esm/api/resources/summary/index.d.mts +1 -0
  171. package/dist/esm/api/resources/summary/index.mjs +1 -0
  172. package/dist/esm/api/resources/summary/resources/index.d.mts +3 -0
  173. package/dist/esm/api/resources/summary/resources/index.mjs +3 -0
  174. package/dist/esm/api/resources/summary/resources/templates/client/Client.d.mts +101 -0
  175. package/dist/esm/api/resources/summary/resources/templates/client/Client.mjs +329 -0
  176. package/dist/esm/api/resources/summary/resources/templates/client/requests/index.d.mts +2 -0
  177. package/dist/esm/api/resources/summary/resources/templates/client/requests/index.mjs +1 -0
  178. package/dist/esm/api/resources/summary/resources/templates/exports.d.mts +2 -0
  179. package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/exports.mjs +1 -1
  180. package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/index.d.mts +1 -0
  181. package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/index.mjs +1 -0
  182. package/dist/esm/api/resources/summary/resources/templates/types/TemplatesDeleteResponse.d.mts +4 -0
  183. package/dist/esm/api/resources/summary/resources/templates/types/TemplatesGetResponse.d.mts +5 -0
  184. package/dist/esm/api/resources/summary/{types/SummaryListTemplatesResponse.d.mts → resources/templates/types/TemplatesListResponse.d.mts} +2 -2
  185. package/dist/esm/api/resources/summary/{types/SummaryUpdateTemplateResponse.d.mts → resources/templates/types/TemplatesUpdateResponse.d.mts} +2 -2
  186. package/dist/esm/api/resources/summary/resources/templates/types/index.d.mts +4 -0
  187. package/dist/esm/api/resources/summary/resources/templates/types/index.mjs +4 -0
  188. package/dist/esm/api/resources/summary/types/index.d.mts +0 -4
  189. package/dist/esm/api/resources/summary/types/index.mjs +0 -4
  190. package/dist/esm/api/resources/workflows/client/Client.d.mts +7 -6
  191. package/dist/esm/api/resources/workflows/client/Client.mjs +8 -14
  192. package/dist/{cjs/api/resources/workflows/client/requests/WorkflowsListRequest.d.ts → esm/api/resources/workflows/client/requests/GetRequest.d.mts} +1 -1
  193. package/dist/esm/api/resources/workflows/client/requests/{WorkflowsListRequest.d.mts → ListRequest.d.mts} +1 -1
  194. package/dist/esm/api/resources/workflows/client/requests/index.d.mts +2 -2
  195. package/dist/esm/api/resources/workflows/errors/GatewayTimeoutError.d.mts +5 -0
  196. package/dist/esm/api/resources/workflows/errors/GatewayTimeoutError.mjs +17 -0
  197. package/dist/esm/api/resources/workflows/errors/index.d.mts +1 -0
  198. package/dist/esm/api/resources/workflows/errors/index.mjs +1 -0
  199. package/dist/esm/api/resources/workflows/types/DeleteResponse.d.mts +4 -0
  200. package/dist/esm/api/resources/workflows/types/{WorkflowsGetResponse.d.mts → GetResponse.d.mts} +1 -1
  201. package/dist/esm/api/resources/workflows/types/{WorkflowsUpdateResponse.d.mts → UpdateResponse.d.mts} +1 -1
  202. package/dist/esm/api/resources/workflows/types/index.d.mts +3 -3
  203. package/dist/esm/api/resources/workflows/types/index.mjs +3 -3
  204. package/dist/esm/auth/OAuthAuthProvider.mjs +2 -2
  205. package/dist/esm/version.d.mts +1 -1
  206. package/dist/esm/version.mjs +1 -1
  207. package/openapi/openapi.json +11397 -0
  208. package/package.json +14 -12
  209. package/reference.md +140 -139
  210. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestOrder.d.ts +0 -5
  211. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.ts +0 -7
  212. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +0 -34
  213. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +0 -121
  214. package/dist/cjs/api/resources/authtoken/resources/auth/exports.d.ts +0 -2
  215. package/dist/cjs/api/resources/authtoken/resources/index.d.ts +0 -2
  216. package/dist/cjs/api/resources/fhir/types/FhirSearchResponse.d.ts +0 -2
  217. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.ts +0 -4
  218. package/dist/cjs/api/resources/summary/types/SummaryDeleteTemplateResponse.d.ts +0 -4
  219. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestOrder.d.mts +0 -5
  220. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestRole.d.mts +0 -7
  221. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +0 -34
  222. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +0 -84
  223. package/dist/esm/api/resources/authtoken/resources/auth/exports.d.mts +0 -2
  224. package/dist/esm/api/resources/authtoken/resources/index.d.mts +0 -2
  225. package/dist/esm/api/resources/authtoken/resources/index.mjs +0 -2
  226. package/dist/esm/api/resources/fhir/types/FhirSearchResponse.d.mts +0 -2
  227. package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.mts +0 -4
  228. package/dist/esm/api/resources/summary/types/SummaryDeleteTemplateResponse.d.mts +0 -4
  229. package/dist/esm/api/resources/summary/types/SummaryGetTemplateResponse.d.mts +0 -5
  230. /package/dist/cjs/api/resources/agent/client/requests/{AgentGetChatMessagesRequest.js → GetChatMessagesRequest.js} +0 -0
  231. /package/dist/cjs/api/resources/agent/client/requests/{AgentListRequest.js → ListRequest.js} +0 -0
  232. /package/dist/cjs/api/resources/agent/types/{AgentDeleteResponse.js → DeleteResponse.js} +0 -0
  233. /package/dist/cjs/api/resources/agent/types/{AgentGetChatMessagesResponse.js → GetChatMessagesResponse.js} +0 -0
  234. /package/dist/cjs/api/resources/agent/types/{AgentListResponse.js → ListResponse.js} +0 -0
  235. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.d.ts +0 -0
  236. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.js +0 -0
  237. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/index.d.ts +0 -0
  238. /package/dist/cjs/api/resources/authtoken/{resources/auth/client → client}/requests/index.js +0 -0
  239. /package/dist/cjs/api/resources/construe/client/requests/{DeleteConstrueCodesSystemsCodesystemRequest.js → DeleteCodeSystemRequest.js} +0 -0
  240. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemCodeIdRequest.js → ExportCodeSystemRequest.js} +0 -0
  241. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemRequest.js → GetCodeRequest.js} +0 -0
  242. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchSemanticRequest.js → GetCodeSystemRequest.js} +0 -0
  243. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchTextRequest.js → ListCodesRequest.js} +0 -0
  244. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemExportRequest.js → SearchSemanticRequest.js} +0 -0
  245. /package/dist/cjs/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemRequest.js → SearchTextRequest.js} +0 -0
  246. /package/dist/cjs/api/resources/construe/types/{ConstrueUploadCodeSystemResponse.js → UploadCodeSystemResponse.js} +0 -0
  247. /package/dist/cjs/api/resources/fhir/client/requests/{FhirCreateRequest.js → CreateRequest.js} +0 -0
  248. /package/dist/cjs/api/resources/fhir/client/requests/{FhirDeleteRequest.js → DeleteRequest.js} +0 -0
  249. /package/dist/cjs/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.js → ExecuteBundleRequest.js} +0 -0
  250. /package/dist/cjs/api/resources/fhir/client/requests/{FhirPatchRequest.js → PatchRequest.js} +0 -0
  251. /package/dist/cjs/api/resources/fhir/client/requests/{FhirSearchRequest.js → SearchRequest.js} +0 -0
  252. /package/dist/cjs/api/resources/fhir/client/requests/{FhirUpsertRequest.js → UpsertRequest.js} +0 -0
  253. /package/dist/cjs/api/resources/fhir/types/{FhirSearchResponse.js → SearchResponse.js} +0 -0
  254. /package/dist/cjs/api/resources/fhirProvider/types/{FhirProviderDeleteResponse.js → DeleteResponse.js} +0 -0
  255. /package/dist/cjs/api/resources/fhirProvider/types/{FhirProviderRemoveAuthConfigResponse.js → RemoveAuthConfigResponse.js} +0 -0
  256. /package/dist/cjs/api/resources/lang2Fhir/types/{Lang2FhirUploadProfileResponse.js → UploadProfileResponse.js} +0 -0
  257. /package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/client/index.d.ts +0 -0
  258. /package/dist/cjs/api/resources/{authtoken/resources/auth → summary/resources/templates}/client/index.js +0 -0
  259. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.d.ts +0 -0
  260. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.js +0 -0
  261. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.d.ts +0 -0
  262. /package/dist/cjs/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.js +0 -0
  263. /package/dist/cjs/api/resources/summary/{types/SummaryDeleteTemplateResponse.js → resources/templates/types/TemplatesDeleteResponse.js} +0 -0
  264. /package/dist/cjs/api/resources/summary/{types/SummaryGetTemplateResponse.js → resources/templates/types/TemplatesGetResponse.js} +0 -0
  265. /package/dist/cjs/api/resources/summary/{types/SummaryListTemplatesResponse.js → resources/templates/types/TemplatesListResponse.js} +0 -0
  266. /package/dist/cjs/api/resources/summary/{types/SummaryUpdateTemplateResponse.js → resources/templates/types/TemplatesUpdateResponse.js} +0 -0
  267. /package/dist/cjs/api/resources/workflows/client/requests/{WorkflowsGetRequest.js → GetRequest.js} +0 -0
  268. /package/dist/cjs/api/resources/workflows/client/requests/{WorkflowsListRequest.js → ListRequest.js} +0 -0
  269. /package/dist/cjs/api/resources/workflows/types/{WorkflowsDeleteResponse.js → DeleteResponse.js} +0 -0
  270. /package/dist/cjs/api/resources/workflows/types/{WorkflowsGetResponse.js → GetResponse.js} +0 -0
  271. /package/dist/cjs/api/resources/workflows/types/{WorkflowsUpdateResponse.js → UpdateResponse.js} +0 -0
  272. /package/dist/esm/api/resources/agent/client/requests/{AgentGetChatMessagesRequest.mjs → GetChatMessagesRequest.mjs} +0 -0
  273. /package/dist/esm/api/resources/agent/client/requests/{AgentListRequest.mjs → ListRequest.mjs} +0 -0
  274. /package/dist/esm/api/resources/agent/types/{AgentDeleteResponse.mjs → DeleteResponse.mjs} +0 -0
  275. /package/dist/esm/api/resources/agent/types/{AgentGetChatMessagesResponse.mjs → GetChatMessagesResponse.mjs} +0 -0
  276. /package/dist/esm/api/resources/agent/types/{AgentListResponse.mjs → ListResponse.mjs} +0 -0
  277. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.d.mts +0 -0
  278. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/ClientCredentialsRequest.mjs +0 -0
  279. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/index.d.mts +0 -0
  280. /package/dist/esm/api/resources/authtoken/{resources/auth/client → client}/requests/index.mjs +0 -0
  281. /package/dist/esm/api/resources/construe/client/requests/{DeleteConstrueCodesSystemsCodesystemRequest.mjs → DeleteCodeSystemRequest.mjs} +0 -0
  282. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemCodeIdRequest.mjs → ExportCodeSystemRequest.mjs} +0 -0
  283. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemRequest.mjs → GetCodeRequest.mjs} +0 -0
  284. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchSemanticRequest.mjs → GetCodeSystemRequest.mjs} +0 -0
  285. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesCodesystemSearchTextRequest.mjs → ListCodesRequest.mjs} +0 -0
  286. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemExportRequest.mjs → SearchSemanticRequest.mjs} +0 -0
  287. /package/dist/esm/api/resources/construe/client/requests/{GetConstrueCodesSystemsCodesystemRequest.mjs → SearchTextRequest.mjs} +0 -0
  288. /package/dist/esm/api/resources/construe/types/{ConstrueUploadCodeSystemResponse.mjs → UploadCodeSystemResponse.mjs} +0 -0
  289. /package/dist/esm/api/resources/fhir/client/requests/{FhirCreateRequest.mjs → CreateRequest.mjs} +0 -0
  290. /package/dist/esm/api/resources/fhir/client/requests/{FhirDeleteRequest.mjs → DeleteRequest.mjs} +0 -0
  291. /package/dist/esm/api/resources/fhir/client/requests/{FhirExecuteBundleRequest.mjs → ExecuteBundleRequest.mjs} +0 -0
  292. /package/dist/esm/api/resources/fhir/client/requests/{FhirPatchRequest.mjs → PatchRequest.mjs} +0 -0
  293. /package/dist/esm/api/resources/fhir/client/requests/{FhirSearchRequest.mjs → SearchRequest.mjs} +0 -0
  294. /package/dist/esm/api/resources/fhir/client/requests/{FhirUpsertRequest.mjs → UpsertRequest.mjs} +0 -0
  295. /package/dist/esm/api/resources/fhir/types/{FhirSearchResponse.mjs → SearchResponse.mjs} +0 -0
  296. /package/dist/esm/api/resources/fhirProvider/types/{FhirProviderDeleteResponse.mjs → DeleteResponse.mjs} +0 -0
  297. /package/dist/esm/api/resources/fhirProvider/types/{FhirProviderRemoveAuthConfigResponse.mjs → RemoveAuthConfigResponse.mjs} +0 -0
  298. /package/dist/esm/api/resources/lang2Fhir/types/{Lang2FhirUploadProfileResponse.mjs → UploadProfileResponse.mjs} +0 -0
  299. /package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/client/index.d.mts +0 -0
  300. /package/dist/esm/api/resources/{authtoken/resources/auth → summary/resources/templates}/client/index.mjs +0 -0
  301. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.d.mts +0 -0
  302. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/CreateSummaryTemplateRequest.mjs +0 -0
  303. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.d.mts +0 -0
  304. /package/dist/esm/api/resources/summary/{client → resources/templates/client}/requests/UpdateSummaryTemplateRequest.mjs +0 -0
  305. /package/dist/esm/api/resources/summary/{types/SummaryDeleteTemplateResponse.mjs → resources/templates/types/TemplatesDeleteResponse.mjs} +0 -0
  306. /package/dist/esm/api/resources/summary/{types/SummaryGetTemplateResponse.mjs → resources/templates/types/TemplatesGetResponse.mjs} +0 -0
  307. /package/dist/esm/api/resources/summary/{types/SummaryListTemplatesResponse.mjs → resources/templates/types/TemplatesListResponse.mjs} +0 -0
  308. /package/dist/esm/api/resources/summary/{types/SummaryUpdateTemplateResponse.mjs → resources/templates/types/TemplatesUpdateResponse.mjs} +0 -0
  309. /package/dist/esm/api/resources/workflows/client/requests/{WorkflowsGetRequest.mjs → GetRequest.mjs} +0 -0
  310. /package/dist/esm/api/resources/workflows/client/requests/{WorkflowsListRequest.mjs → ListRequest.mjs} +0 -0
  311. /package/dist/esm/api/resources/workflows/types/{WorkflowsDeleteResponse.mjs → DeleteResponse.mjs} +0 -0
  312. /package/dist/esm/api/resources/workflows/types/{WorkflowsGetResponse.mjs → GetResponse.mjs} +0 -0
  313. /package/dist/esm/api/resources/workflows/types/{WorkflowsUpdateResponse.mjs → UpdateResponse.mjs} +0 -0
@@ -51,319 +51,14 @@ const environments = __importStar(require("../../../../environments.js"));
51
51
  const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
52
  const errors = __importStar(require("../../../../errors/index.js"));
53
53
  const phenoml = __importStar(require("../../../index.js"));
54
+ const Client_js_1 = require("../resources/templates/client/Client.js");
54
55
  class SummaryClient {
55
56
  constructor(options = {}) {
56
57
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
58
  }
58
- /**
59
- * Retrieves all summary templates for the authenticated user
60
- *
61
- * @param {SummaryClient.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.listTemplates()
68
- */
69
- listTemplates(requestOptions) {
70
- return core.HttpResponsePromise.fromPromise(this.__listTemplates(requestOptions));
71
- }
72
- __listTemplates(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 {SummaryClient.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.createTemplate({
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
- createTemplate(request, requestOptions) {
130
- return core.HttpResponsePromise.fromPromise(this.__createTemplate(request, requestOptions));
131
- }
132
- __createTemplate(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 {SummaryClient.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.getTemplate("id")
189
- */
190
- getTemplate(id, requestOptions) {
191
- return core.HttpResponsePromise.fromPromise(this.__getTemplate(id, requestOptions));
192
- }
193
- __getTemplate(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 {
211
- data: _response.body,
212
- rawResponse: _response.rawResponse,
213
- };
214
- }
215
- if (_response.error.reason === "status-code") {
216
- switch (_response.error.statusCode) {
217
- case 401:
218
- throw new phenoml.summary.UnauthorizedError(_response.error.body, _response.rawResponse);
219
- case 403:
220
- throw new phenoml.summary.ForbiddenError(_response.error.body, _response.rawResponse);
221
- case 404:
222
- throw new phenoml.summary.NotFoundError(_response.error.body, _response.rawResponse);
223
- case 500:
224
- throw new phenoml.summary.InternalServerError(_response.error.body, _response.rawResponse);
225
- default:
226
- throw new errors.phenomlError({
227
- statusCode: _response.error.statusCode,
228
- body: _response.error.body,
229
- rawResponse: _response.rawResponse,
230
- });
231
- }
232
- }
233
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/fhir2summary/template/{id}");
234
- });
235
- }
236
- /**
237
- * Updates an existing summary template
238
- *
239
- * @param {string} id - Template ID
240
- * @param {phenoml.summary.UpdateSummaryTemplateRequest} request
241
- * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
242
- *
243
- * @throws {@link phenoml.summary.BadRequestError}
244
- * @throws {@link phenoml.summary.UnauthorizedError}
245
- * @throws {@link phenoml.summary.ForbiddenError}
246
- * @throws {@link phenoml.summary.NotFoundError}
247
- * @throws {@link phenoml.summary.InternalServerError}
248
- *
249
- * @example
250
- * await client.summary.updateTemplate("id", {
251
- * name: "Discharge Summary",
252
- * 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}}.",
253
- * target_resources: ["Patient", "Encounter", "MedicationRequest"],
254
- * mode: "narrative"
255
- * })
256
- */
257
- updateTemplate(id, request, requestOptions) {
258
- return core.HttpResponsePromise.fromPromise(this.__updateTemplate(id, request, requestOptions));
259
- }
260
- __updateTemplate(id, request, requestOptions) {
261
- return __awaiter(this, void 0, void 0, function* () {
262
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
263
- const _authRequest = yield this._options.authProvider.getAuthRequest();
264
- 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);
265
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
266
- 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)}`),
267
- method: "PUT",
268
- headers: _headers,
269
- contentType: "application/json",
270
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
271
- requestType: "json",
272
- body: request,
273
- 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,
274
- 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,
275
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
276
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
277
- logging: this._options.logging,
278
- });
279
- if (_response.ok) {
280
- return {
281
- data: _response.body,
282
- rawResponse: _response.rawResponse,
283
- };
284
- }
285
- if (_response.error.reason === "status-code") {
286
- switch (_response.error.statusCode) {
287
- case 400:
288
- throw new phenoml.summary.BadRequestError(_response.error.body, _response.rawResponse);
289
- case 401:
290
- throw new phenoml.summary.UnauthorizedError(_response.error.body, _response.rawResponse);
291
- case 403:
292
- throw new phenoml.summary.ForbiddenError(_response.error.body, _response.rawResponse);
293
- case 404:
294
- throw new phenoml.summary.NotFoundError(_response.error.body, _response.rawResponse);
295
- case 500:
296
- throw new phenoml.summary.InternalServerError(_response.error.body, _response.rawResponse);
297
- default:
298
- throw new errors.phenomlError({
299
- statusCode: _response.error.statusCode,
300
- body: _response.error.body,
301
- rawResponse: _response.rawResponse,
302
- });
303
- }
304
- }
305
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/fhir2summary/template/{id}");
306
- });
307
- }
308
- /**
309
- * Deletes a summary template
310
- *
311
- * @param {string} id - Template ID
312
- * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
313
- *
314
- * @throws {@link phenoml.summary.UnauthorizedError}
315
- * @throws {@link phenoml.summary.ForbiddenError}
316
- * @throws {@link phenoml.summary.NotFoundError}
317
- * @throws {@link phenoml.summary.InternalServerError}
318
- *
319
- * @example
320
- * await client.summary.deleteTemplate("id")
321
- */
322
- deleteTemplate(id, requestOptions) {
323
- return core.HttpResponsePromise.fromPromise(this.__deleteTemplate(id, requestOptions));
324
- }
325
- __deleteTemplate(id, requestOptions) {
326
- return __awaiter(this, void 0, void 0, function* () {
327
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
328
- const _authRequest = yield this._options.authProvider.getAuthRequest();
329
- 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);
330
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
331
- 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)}`),
332
- method: "DELETE",
333
- headers: _headers,
334
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).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 401:
350
- throw new phenoml.summary.UnauthorizedError(_response.error.body, _response.rawResponse);
351
- case 403:
352
- throw new phenoml.summary.ForbiddenError(_response.error.body, _response.rawResponse);
353
- case 404:
354
- throw new phenoml.summary.NotFoundError(_response.error.body, _response.rawResponse);
355
- case 500:
356
- throw new phenoml.summary.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 (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/fhir2summary/template/{id}");
366
- });
59
+ get templates() {
60
+ var _a;
61
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_js_1.TemplatesClient(this._options)));
367
62
  }
368
63
  /**
369
64
  * Creates a summary from FHIR resources using one of three modes:
@@ -1,3 +1 @@
1
1
  export { CreateSummaryRequest } from "./CreateSummaryRequest.js";
2
- export type { CreateSummaryTemplateRequest } from "./CreateSummaryTemplateRequest.js";
3
- export type { UpdateSummaryTemplateRequest } from "./UpdateSummaryTemplateRequest.js";
@@ -1,2 +1,3 @@
1
1
  export { SummaryClient } from "./client/Client.js";
2
2
  export * from "./client/index.js";
3
+ export * from "./resources/index.js";
@@ -19,3 +19,4 @@ exports.SummaryClient = void 0;
19
19
  var Client_js_1 = require("./client/Client.js");
20
20
  Object.defineProperty(exports, "SummaryClient", { enumerable: true, get: function () { return Client_js_1.SummaryClient; } });
21
21
  __exportStar(require("./client/index.js"), exports);
22
+ __exportStar(require("./resources/index.js"), exports);
@@ -1,3 +1,4 @@
1
1
  export * from "./client/index.js";
2
2
  export * from "./errors/index.js";
3
+ export * from "./resources/index.js";
3
4
  export * from "./types/index.js";
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
18
  __exportStar(require("./errors/index.js"), exports);
19
+ __exportStar(require("./resources/index.js"), exports);
19
20
  __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,3 @@
1
+ export * from "./templates/client/requests/index.js";
2
+ export * as templates from "./templates/index.js";
3
+ export * from "./templates/types/index.js";
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.auth = void 0;
40
- __exportStar(require("./auth/client/requests/index.js"), exports);
41
- exports.auth = __importStar(require("./auth/index.js"));
39
+ exports.templates = void 0;
40
+ __exportStar(require("./templates/client/requests/index.js"), exports);
41
+ exports.templates = __importStar(require("./templates/index.js"));
42
+ __exportStar(require("./templates/types/index.js"), exports);
@@ -0,0 +1,101 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../core/index.js";
4
+ import * as phenoml from "../../../../../index.js";
5
+ export declare namespace TemplatesClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class TemplatesClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<TemplatesClient.Options>;
12
+ constructor(options?: TemplatesClient.Options);
13
+ /**
14
+ * Retrieves all summary templates for the authenticated user
15
+ *
16
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
17
+ *
18
+ * @throws {@link phenoml.summary.UnauthorizedError}
19
+ * @throws {@link phenoml.summary.InternalServerError}
20
+ *
21
+ * @example
22
+ * await client.summary.templates.list()
23
+ */
24
+ list(requestOptions?: TemplatesClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.TemplatesListResponse>;
25
+ private __list;
26
+ /**
27
+ * Creates a summary template from an example using LLM function calling
28
+ *
29
+ * @param {phenoml.summary.CreateSummaryTemplateRequest} request
30
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @throws {@link phenoml.summary.BadRequestError}
33
+ * @throws {@link phenoml.summary.UnauthorizedError}
34
+ * @throws {@link phenoml.summary.InternalServerError}
35
+ *
36
+ * @example
37
+ * await client.summary.templates.create({
38
+ * name: "Discharge Summary",
39
+ * 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.",
40
+ * target_resources: ["Patient", "Condition", "MedicationRequest"],
41
+ * mode: "narrative"
42
+ * })
43
+ */
44
+ create(request: phenoml.summary.CreateSummaryTemplateRequest, requestOptions?: TemplatesClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.CreateSummaryTemplateResponse>;
45
+ private __create;
46
+ /**
47
+ * Retrieves a specific summary template
48
+ *
49
+ * @param {string} id - Template ID
50
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link phenoml.summary.UnauthorizedError}
53
+ * @throws {@link phenoml.summary.ForbiddenError}
54
+ * @throws {@link phenoml.summary.NotFoundError}
55
+ * @throws {@link phenoml.summary.InternalServerError}
56
+ *
57
+ * @example
58
+ * await client.summary.templates.get("id")
59
+ */
60
+ get(id: string, requestOptions?: TemplatesClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.TemplatesGetResponse>;
61
+ private __get;
62
+ /**
63
+ * Updates an existing summary template
64
+ *
65
+ * @param {string} id - Template ID
66
+ * @param {phenoml.summary.UpdateSummaryTemplateRequest} request
67
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link phenoml.summary.BadRequestError}
70
+ * @throws {@link phenoml.summary.UnauthorizedError}
71
+ * @throws {@link phenoml.summary.ForbiddenError}
72
+ * @throws {@link phenoml.summary.NotFoundError}
73
+ * @throws {@link phenoml.summary.InternalServerError}
74
+ *
75
+ * @example
76
+ * await client.summary.templates.update("id", {
77
+ * name: "Discharge Summary",
78
+ * 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}}.",
79
+ * target_resources: ["Patient", "Encounter", "MedicationRequest"],
80
+ * mode: "narrative"
81
+ * })
82
+ */
83
+ update(id: string, request: phenoml.summary.UpdateSummaryTemplateRequest, requestOptions?: TemplatesClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.TemplatesUpdateResponse>;
84
+ private __update;
85
+ /**
86
+ * Deletes a summary template
87
+ *
88
+ * @param {string} id - Template ID
89
+ * @param {TemplatesClient.RequestOptions} requestOptions - Request-specific configuration.
90
+ *
91
+ * @throws {@link phenoml.summary.UnauthorizedError}
92
+ * @throws {@link phenoml.summary.ForbiddenError}
93
+ * @throws {@link phenoml.summary.NotFoundError}
94
+ * @throws {@link phenoml.summary.InternalServerError}
95
+ *
96
+ * @example
97
+ * await client.summary.templates.delete("id")
98
+ */
99
+ delete(id: string, requestOptions?: TemplatesClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.TemplatesDeleteResponse>;
100
+ private __delete;
101
+ }