phenoml 9.1.0 → 10.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 (512) hide show
  1. package/dist/cjs/BaseClient.d.ts +13 -4
  2. package/dist/cjs/BaseClient.js +59 -0
  3. package/dist/cjs/Client.d.ts +34 -34
  4. package/dist/cjs/Client.js +13 -54
  5. package/dist/cjs/api/resources/agent/client/Client.d.ts +26 -27
  6. package/dist/cjs/api/resources/agent/client/Client.js +56 -185
  7. package/dist/cjs/api/resources/agent/errors/BadRequestError.js +5 -1
  8. package/dist/cjs/api/resources/agent/errors/ForbiddenError.js +5 -1
  9. package/dist/cjs/api/resources/agent/errors/InternalServerError.js +5 -1
  10. package/dist/cjs/api/resources/agent/errors/NotFoundError.js +5 -1
  11. package/dist/cjs/api/resources/agent/errors/UnauthorizedError.js +5 -1
  12. package/dist/cjs/api/resources/agent/exports.d.ts +3 -0
  13. package/dist/cjs/api/resources/agent/exports.js +22 -0
  14. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +20 -21
  15. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +35 -129
  16. package/dist/cjs/api/resources/agent/resources/prompts/exports.d.ts +2 -0
  17. package/dist/cjs/api/resources/agent/resources/prompts/exports.js +21 -0
  18. package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsDeleteResponse.d.ts +2 -2
  19. package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsListResponse.d.ts +3 -3
  20. package/dist/cjs/api/resources/agent/types/AgentChatResponse.d.ts +4 -4
  21. package/dist/cjs/api/resources/agent/types/AgentChatStreamEvent.d.ts +8 -8
  22. package/dist/cjs/api/resources/agent/types/AgentCreateRequest.d.ts +4 -4
  23. package/dist/cjs/api/resources/agent/types/AgentDeleteResponse.d.ts +2 -2
  24. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesResponse.d.ts +3 -3
  25. package/dist/cjs/api/resources/agent/types/AgentListResponse.d.ts +3 -3
  26. package/dist/cjs/api/resources/agent/types/AgentPromptsResponse.d.ts +3 -3
  27. package/dist/cjs/api/resources/agent/types/AgentResponse.d.ts +3 -3
  28. package/dist/cjs/api/resources/agent/types/AgentTemplate.d.ts +8 -8
  29. package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.d.ts +10 -10
  30. package/dist/cjs/api/resources/agent/types/ChatSessionTemplate.d.ts +9 -9
  31. package/dist/cjs/api/resources/agent/types/JsonPatchOperation.d.ts +2 -2
  32. package/dist/cjs/api/resources/agent/types/PromptTemplate.d.ts +6 -6
  33. package/dist/cjs/api/resources/agent/types/SuccessResponse.d.ts +2 -2
  34. package/dist/cjs/api/resources/authtoken/client/Client.d.ts +9 -9
  35. package/dist/cjs/api/resources/authtoken/client/Client.js +7 -6
  36. package/dist/cjs/api/resources/authtoken/errors/BadRequestError.js +5 -1
  37. package/dist/cjs/api/resources/authtoken/errors/InternalServerError.d.ts +5 -0
  38. package/dist/cjs/api/resources/authtoken/errors/InternalServerError.js +54 -0
  39. package/dist/cjs/api/resources/authtoken/errors/UnauthorizedError.js +5 -1
  40. package/dist/cjs/api/resources/authtoken/errors/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/authtoken/errors/index.js +1 -0
  42. package/dist/cjs/api/resources/authtoken/exports.d.ts +3 -0
  43. package/dist/cjs/api/resources/authtoken/exports.js +22 -0
  44. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +28 -30
  45. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +76 -43
  46. package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.ts +12 -0
  47. package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.js +3 -0
  48. package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/index.d.ts +1 -0
  49. package/dist/cjs/api/resources/authtoken/resources/auth/exports.d.ts +2 -0
  50. package/dist/cjs/api/resources/authtoken/resources/auth/exports.js +21 -0
  51. package/dist/cjs/api/resources/authtoken/types/BadRequestErrorBody.d.ts +3 -3
  52. package/dist/cjs/api/resources/authtoken/types/OAuthError.d.ts +19 -0
  53. package/dist/cjs/api/resources/authtoken/types/OAuthError.js +14 -0
  54. package/dist/cjs/api/resources/authtoken/types/TokenResponse.d.ts +8 -0
  55. package/dist/cjs/api/resources/authtoken/types/TokenResponse.js +3 -0
  56. package/dist/cjs/api/resources/authtoken/types/UnauthorizedErrorBody.d.ts +3 -3
  57. package/dist/cjs/api/resources/authtoken/types/index.d.ts +2 -0
  58. package/dist/cjs/api/resources/authtoken/types/index.js +2 -0
  59. package/dist/cjs/api/resources/cohort/client/Client.d.ts +8 -9
  60. package/dist/cjs/api/resources/cohort/client/Client.js +11 -27
  61. package/dist/cjs/api/resources/cohort/errors/BadRequestError.js +5 -1
  62. package/dist/cjs/api/resources/cohort/errors/InternalServerError.js +5 -1
  63. package/dist/cjs/api/resources/cohort/errors/UnauthorizedError.js +5 -1
  64. package/dist/cjs/api/resources/cohort/exports.d.ts +2 -0
  65. package/dist/cjs/api/resources/cohort/exports.js +21 -0
  66. package/dist/cjs/api/resources/cohort/types/CohortResponse.d.ts +3 -3
  67. package/dist/cjs/api/resources/cohort/types/SearchConcept.d.ts +4 -4
  68. package/dist/cjs/api/resources/construe/client/Client.d.ts +28 -29
  69. package/dist/cjs/api/resources/construe/client/Client.js +78 -239
  70. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +1 -1
  71. package/dist/cjs/api/resources/construe/client/requests/index.js +3 -0
  72. package/dist/cjs/api/resources/construe/errors/BadRequestError.js +5 -1
  73. package/dist/cjs/api/resources/construe/errors/ConflictError.js +5 -1
  74. package/dist/cjs/api/resources/construe/errors/FailedDependencyError.js +5 -1
  75. package/dist/cjs/api/resources/construe/errors/ForbiddenError.js +5 -1
  76. package/dist/cjs/api/resources/construe/errors/GatewayTimeoutError.js +5 -1
  77. package/dist/cjs/api/resources/construe/errors/InternalServerError.js +5 -1
  78. package/dist/cjs/api/resources/construe/errors/NotFoundError.js +5 -1
  79. package/dist/cjs/api/resources/construe/errors/NotImplementedError.js +5 -1
  80. package/dist/cjs/api/resources/construe/errors/ServiceUnavailableError.js +5 -1
  81. package/dist/cjs/api/resources/construe/errors/UnauthorizedError.js +5 -1
  82. package/dist/cjs/api/resources/construe/exports.d.ts +2 -0
  83. package/dist/cjs/api/resources/construe/exports.js +21 -0
  84. package/dist/cjs/api/resources/construe/types/CodeResponse.d.ts +1 -1
  85. package/dist/cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.ts +3 -3
  86. package/dist/cjs/api/resources/construe/types/ExtractRequestConfig.d.ts +8 -8
  87. package/dist/cjs/api/resources/construe/types/ExtractRequestSystem.d.ts +2 -2
  88. package/dist/cjs/api/resources/construe/types/ExtractedCodeResult.d.ts +3 -3
  89. package/dist/cjs/api/resources/construe/types/GetCodeResponse.d.ts +1 -1
  90. package/dist/cjs/api/resources/construe/types/ListCodesResponse.d.ts +1 -1
  91. package/dist/cjs/api/resources/fhir/client/Client.d.ts +18 -19
  92. package/dist/cjs/api/resources/fhir/client/Client.js +46 -134
  93. package/dist/cjs/api/resources/fhir/client/requests/FhirSearchRequest.d.ts +0 -6
  94. package/dist/cjs/api/resources/fhir/errors/BadGatewayError.js +5 -1
  95. package/dist/cjs/api/resources/fhir/errors/BadRequestError.js +5 -1
  96. package/dist/cjs/api/resources/fhir/errors/InternalServerError.js +5 -1
  97. package/dist/cjs/api/resources/fhir/errors/NotFoundError.js +5 -1
  98. package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.js +5 -1
  99. package/dist/cjs/api/resources/fhir/exports.d.ts +2 -0
  100. package/dist/cjs/api/resources/fhir/exports.js +21 -0
  101. package/dist/cjs/api/resources/fhir/types/ErrorResponse.d.ts +2 -2
  102. package/dist/cjs/api/resources/fhir/types/FhirBundle.d.ts +8 -8
  103. package/dist/cjs/api/resources/fhir/types/FhirPatchRequestBodyItem.d.ts +2 -2
  104. package/dist/cjs/api/resources/fhir/types/FhirResource.d.ts +5 -5
  105. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +20 -21
  106. package/dist/cjs/api/resources/fhirProvider/client/Client.js +35 -129
  107. package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.js +5 -1
  108. package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.js +5 -1
  109. package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.js +5 -1
  110. package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.js +5 -1
  111. package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.js +5 -1
  112. package/dist/cjs/api/resources/fhirProvider/exports.d.ts +2 -0
  113. package/dist/cjs/api/resources/fhirProvider/exports.js +21 -0
  114. package/dist/cjs/api/resources/fhirProvider/types/ClientSecretAuth.d.ts +2 -2
  115. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.ts +12 -12
  116. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.ts +2 -2
  117. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.d.ts +3 -3
  118. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.ts +3 -3
  119. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.d.ts +3 -3
  120. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +4 -4
  121. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +8 -8
  122. package/dist/cjs/api/resources/fhirProvider/types/FhirQueryResponse.d.ts +4 -4
  123. package/dist/cjs/api/resources/fhirProvider/types/JsonWebKey.d.ts +6 -6
  124. package/dist/cjs/api/resources/fhirProvider/types/JwtAuth.d.ts +3 -3
  125. package/dist/cjs/api/resources/fhirProvider/types/OnBehalfOfAuth.d.ts +2 -2
  126. package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountMetadata.d.ts +4 -4
  127. package/dist/cjs/api/resources/fhirProvider/types/SmartConfiguration.d.ts +5 -5
  128. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +38 -17
  129. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +93 -92
  130. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.ts +19 -0
  131. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.js +3 -0
  132. package/dist/cjs/api/resources/lang2Fhir/client/requests/index.d.ts +2 -1
  133. package/dist/cjs/api/resources/lang2Fhir/client/requests/index.js +3 -0
  134. package/dist/cjs/api/resources/lang2Fhir/errors/BadRequestError.js +5 -1
  135. package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.js +5 -1
  136. package/dist/cjs/api/resources/lang2Fhir/errors/ForbiddenError.js +5 -1
  137. package/dist/cjs/api/resources/lang2Fhir/errors/InternalServerError.js +5 -1
  138. package/dist/cjs/api/resources/lang2Fhir/errors/UnauthorizedError.js +5 -1
  139. package/dist/cjs/api/resources/lang2Fhir/errors/UnprocessableEntityError.d.ts +5 -0
  140. package/dist/cjs/api/resources/lang2Fhir/errors/UnprocessableEntityError.js +54 -0
  141. package/dist/cjs/api/resources/lang2Fhir/errors/index.d.ts +1 -0
  142. package/dist/cjs/api/resources/lang2Fhir/errors/index.js +1 -0
  143. package/dist/cjs/api/resources/lang2Fhir/exports.d.ts +2 -0
  144. package/dist/cjs/api/resources/lang2Fhir/exports.js +21 -0
  145. package/dist/cjs/api/resources/lang2Fhir/types/CreateMultiResponse.d.ts +15 -15
  146. package/dist/cjs/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.d.ts +4 -4
  147. package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +2 -2
  148. package/dist/cjs/api/resources/summary/client/Client.d.ts +18 -19
  149. package/dist/cjs/api/resources/summary/client/Client.js +31 -112
  150. package/dist/cjs/api/resources/summary/client/requests/index.d.ts +1 -1
  151. package/dist/cjs/api/resources/summary/client/requests/index.js +3 -0
  152. package/dist/cjs/api/resources/summary/errors/BadRequestError.js +5 -1
  153. package/dist/cjs/api/resources/summary/errors/ForbiddenError.js +5 -1
  154. package/dist/cjs/api/resources/summary/errors/InternalServerError.js +5 -1
  155. package/dist/cjs/api/resources/summary/errors/NotFoundError.js +5 -1
  156. package/dist/cjs/api/resources/summary/errors/UnauthorizedError.js +5 -1
  157. package/dist/cjs/api/resources/summary/exports.d.ts +2 -0
  158. package/dist/cjs/api/resources/summary/exports.js +21 -0
  159. package/dist/cjs/api/resources/summary/types/CreateSummaryResponse.d.ts +4 -4
  160. package/dist/cjs/api/resources/summary/types/CreateSummaryTemplateResponse.d.ts +4 -4
  161. package/dist/cjs/api/resources/summary/types/ErrorResponse.d.ts +2 -2
  162. package/dist/cjs/api/resources/summary/types/FhirBundle.d.ts +1 -1
  163. package/dist/cjs/api/resources/summary/types/SummaryDeleteTemplateResponse.d.ts +2 -2
  164. package/dist/cjs/api/resources/summary/types/SummaryGetTemplateResponse.d.ts +2 -2
  165. package/dist/cjs/api/resources/summary/types/SummaryListTemplatesResponse.d.ts +2 -2
  166. package/dist/cjs/api/resources/summary/types/SummaryTemplate.d.ts +9 -9
  167. package/dist/cjs/api/resources/summary/types/SummaryUpdateTemplateResponse.d.ts +3 -3
  168. package/dist/cjs/api/resources/tools/client/Client.d.ts +17 -18
  169. package/dist/cjs/api/resources/tools/client/Client.js +32 -91
  170. package/dist/cjs/api/resources/tools/client/requests/index.d.ts +1 -1
  171. package/dist/cjs/api/resources/tools/client/requests/index.js +3 -0
  172. package/dist/cjs/api/resources/tools/errors/BadRequestError.js +5 -1
  173. package/dist/cjs/api/resources/tools/errors/FailedDependencyError.js +5 -1
  174. package/dist/cjs/api/resources/tools/errors/ForbiddenError.js +5 -1
  175. package/dist/cjs/api/resources/tools/errors/InternalServerError.js +5 -1
  176. package/dist/cjs/api/resources/tools/errors/UnauthorizedError.js +5 -1
  177. package/dist/cjs/api/resources/tools/exports.d.ts +3 -0
  178. package/dist/cjs/api/resources/tools/exports.js +22 -0
  179. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.d.ts +17 -18
  180. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +24 -79
  181. package/dist/cjs/api/resources/tools/resources/mcpServer/exports.d.ts +3 -0
  182. package/dist/cjs/api/resources/tools/resources/mcpServer/exports.js +22 -0
  183. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +14 -15
  184. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +23 -78
  185. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/exports.d.ts +2 -0
  186. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/exports.js +21 -0
  187. package/dist/cjs/api/resources/tools/types/CohortResponse.d.ts +5 -5
  188. package/dist/cjs/api/resources/tools/types/Lang2FhirAndCreateMultiResponse.d.ts +10 -10
  189. package/dist/cjs/api/resources/tools/types/Lang2FhirAndCreateResponse.d.ts +4 -4
  190. package/dist/cjs/api/resources/tools/types/Lang2FhirAndSearchResponse.d.ts +5 -5
  191. package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +7 -7
  192. package/dist/cjs/api/resources/tools/types/McpServerToolCallResponse.d.ts +4 -4
  193. package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +9 -9
  194. package/dist/cjs/api/resources/tools/types/SearchConcept.d.ts +4 -4
  195. package/dist/cjs/api/resources/workflows/client/Client.d.ts +18 -19
  196. package/dist/cjs/api/resources/workflows/client/Client.js +43 -128
  197. package/dist/cjs/api/resources/workflows/errors/BadRequestError.js +5 -1
  198. package/dist/cjs/api/resources/workflows/errors/ForbiddenError.js +5 -1
  199. package/dist/cjs/api/resources/workflows/errors/InternalServerError.js +5 -1
  200. package/dist/cjs/api/resources/workflows/errors/NotFoundError.js +5 -1
  201. package/dist/cjs/api/resources/workflows/errors/UnauthorizedError.js +5 -1
  202. package/dist/cjs/api/resources/workflows/exports.d.ts +2 -0
  203. package/dist/cjs/api/resources/workflows/exports.js +21 -0
  204. package/dist/cjs/api/resources/workflows/types/CreateWorkflowResponse.d.ts +5 -5
  205. package/dist/cjs/api/resources/workflows/types/DecisionNodeDefinition.d.ts +3 -3
  206. package/dist/cjs/api/resources/workflows/types/ExecuteWorkflowResponse.d.ts +4 -4
  207. package/dist/cjs/api/resources/workflows/types/Lang2FhirCreateDefinition.d.ts +4 -4
  208. package/dist/cjs/api/resources/workflows/types/Lang2FhirSearchDefinition.d.ts +5 -5
  209. package/dist/cjs/api/resources/workflows/types/ListWorkflowsResponse.d.ts +4 -4
  210. package/dist/cjs/api/resources/workflows/types/StepOperation.d.ts +4 -4
  211. package/dist/cjs/api/resources/workflows/types/SubWorkflowDefinition.d.ts +3 -3
  212. package/dist/cjs/api/resources/workflows/types/WorkflowConfig.d.ts +2 -2
  213. package/dist/cjs/api/resources/workflows/types/WorkflowDefinition.d.ts +8 -8
  214. package/dist/cjs/api/resources/workflows/types/WorkflowGraph.d.ts +1 -1
  215. package/dist/cjs/api/resources/workflows/types/WorkflowResponse.d.ts +9 -9
  216. package/dist/cjs/api/resources/workflows/types/WorkflowStep.d.ts +8 -8
  217. package/dist/cjs/api/resources/workflows/types/WorkflowStepSummary.d.ts +5 -5
  218. package/dist/cjs/api/resources/workflows/types/WorkflowsDeleteResponse.d.ts +2 -2
  219. package/dist/cjs/api/resources/workflows/types/WorkflowsGetResponse.d.ts +3 -3
  220. package/dist/cjs/api/resources/workflows/types/WorkflowsUpdateResponse.d.ts +4 -4
  221. package/dist/cjs/auth/OAuthAuthProvider.d.ts +45 -0
  222. package/dist/cjs/auth/OAuthAuthProvider.js +190 -0
  223. package/dist/cjs/auth/index.d.ts +1 -0
  224. package/dist/cjs/auth/index.js +5 -0
  225. package/dist/cjs/core/auth/AuthProvider.d.ts +4 -1
  226. package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
  227. package/dist/cjs/core/auth/BearerToken.js +7 -6
  228. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
  229. package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
  230. package/dist/cjs/core/auth/index.d.ts +1 -0
  231. package/dist/cjs/core/auth/index.js +3 -1
  232. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
  233. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
  234. package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -3
  235. package/dist/cjs/core/fetcher/Fetcher.js +10 -3
  236. package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
  237. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  238. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  239. package/dist/cjs/core/fetcher/signals.d.ts +1 -1
  240. package/dist/cjs/core/headers.d.ts +2 -2
  241. package/dist/cjs/core/runtime/runtime.js +17 -15
  242. package/dist/cjs/core/stream/Stream.d.ts +9 -0
  243. package/dist/cjs/core/stream/Stream.js +100 -5
  244. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
  245. package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
  246. package/dist/cjs/errors/phenomlError.js +5 -1
  247. package/dist/cjs/errors/phenomlTimeoutError.js +5 -1
  248. package/dist/cjs/index.d.ts +4 -2
  249. package/dist/cjs/index.js +9 -5
  250. package/dist/cjs/version.d.ts +1 -1
  251. package/dist/cjs/version.js +1 -1
  252. package/dist/esm/BaseClient.d.mts +13 -4
  253. package/dist/esm/BaseClient.mjs +24 -1
  254. package/dist/esm/Client.d.mts +34 -34
  255. package/dist/esm/Client.mjs +23 -31
  256. package/dist/esm/api/resources/agent/client/Client.d.mts +26 -27
  257. package/dist/esm/api/resources/agent/client/Client.mjs +55 -184
  258. package/dist/esm/api/resources/agent/errors/BadRequestError.mjs +5 -1
  259. package/dist/esm/api/resources/agent/errors/ForbiddenError.mjs +5 -1
  260. package/dist/esm/api/resources/agent/errors/InternalServerError.mjs +5 -1
  261. package/dist/esm/api/resources/agent/errors/NotFoundError.mjs +5 -1
  262. package/dist/esm/api/resources/agent/errors/UnauthorizedError.mjs +5 -1
  263. package/dist/esm/api/resources/agent/exports.d.mts +3 -0
  264. package/dist/esm/api/resources/agent/exports.mjs +4 -0
  265. package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +20 -21
  266. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +34 -128
  267. package/dist/esm/api/resources/agent/resources/prompts/exports.d.mts +2 -0
  268. package/dist/esm/api/resources/agent/resources/prompts/exports.mjs +3 -0
  269. package/dist/esm/api/resources/agent/resources/prompts/types/PromptsDeleteResponse.d.mts +2 -2
  270. package/dist/esm/api/resources/agent/resources/prompts/types/PromptsListResponse.d.mts +3 -3
  271. package/dist/esm/api/resources/agent/types/AgentChatResponse.d.mts +4 -4
  272. package/dist/esm/api/resources/agent/types/AgentChatStreamEvent.d.mts +8 -8
  273. package/dist/esm/api/resources/agent/types/AgentCreateRequest.d.mts +4 -4
  274. package/dist/esm/api/resources/agent/types/AgentDeleteResponse.d.mts +2 -2
  275. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesResponse.d.mts +3 -3
  276. package/dist/esm/api/resources/agent/types/AgentListResponse.d.mts +3 -3
  277. package/dist/esm/api/resources/agent/types/AgentPromptsResponse.d.mts +3 -3
  278. package/dist/esm/api/resources/agent/types/AgentResponse.d.mts +3 -3
  279. package/dist/esm/api/resources/agent/types/AgentTemplate.d.mts +8 -8
  280. package/dist/esm/api/resources/agent/types/ChatMessageTemplate.d.mts +10 -10
  281. package/dist/esm/api/resources/agent/types/ChatSessionTemplate.d.mts +9 -9
  282. package/dist/esm/api/resources/agent/types/JsonPatchOperation.d.mts +2 -2
  283. package/dist/esm/api/resources/agent/types/PromptTemplate.d.mts +6 -6
  284. package/dist/esm/api/resources/agent/types/SuccessResponse.d.mts +2 -2
  285. package/dist/esm/api/resources/authtoken/client/Client.d.mts +9 -9
  286. package/dist/esm/api/resources/authtoken/client/Client.mjs +6 -5
  287. package/dist/esm/api/resources/authtoken/errors/BadRequestError.mjs +5 -1
  288. package/dist/esm/api/resources/authtoken/errors/InternalServerError.d.mts +5 -0
  289. package/dist/esm/api/resources/authtoken/errors/InternalServerError.mjs +17 -0
  290. package/dist/esm/api/resources/authtoken/errors/UnauthorizedError.mjs +5 -1
  291. package/dist/esm/api/resources/authtoken/errors/index.d.mts +1 -0
  292. package/dist/esm/api/resources/authtoken/errors/index.mjs +1 -0
  293. package/dist/esm/api/resources/authtoken/exports.d.mts +3 -0
  294. package/dist/esm/api/resources/authtoken/exports.mjs +4 -0
  295. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +28 -30
  296. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +74 -41
  297. package/dist/esm/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.mts +12 -0
  298. package/dist/esm/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.mjs +2 -0
  299. package/dist/esm/api/resources/authtoken/resources/auth/client/requests/index.d.mts +1 -0
  300. package/dist/esm/api/resources/authtoken/resources/auth/exports.d.mts +2 -0
  301. package/dist/esm/api/resources/authtoken/resources/auth/exports.mjs +3 -0
  302. package/dist/esm/api/resources/authtoken/types/BadRequestErrorBody.d.mts +3 -3
  303. package/dist/esm/api/resources/authtoken/types/OAuthError.d.mts +19 -0
  304. package/dist/esm/api/resources/authtoken/types/OAuthError.mjs +11 -0
  305. package/dist/esm/api/resources/authtoken/types/TokenResponse.d.mts +8 -0
  306. package/dist/esm/api/resources/authtoken/types/TokenResponse.mjs +2 -0
  307. package/dist/esm/api/resources/authtoken/types/UnauthorizedErrorBody.d.mts +3 -3
  308. package/dist/esm/api/resources/authtoken/types/index.d.mts +2 -0
  309. package/dist/esm/api/resources/authtoken/types/index.mjs +2 -0
  310. package/dist/esm/api/resources/cohort/client/Client.d.mts +8 -9
  311. package/dist/esm/api/resources/cohort/client/Client.mjs +10 -26
  312. package/dist/esm/api/resources/cohort/errors/BadRequestError.mjs +5 -1
  313. package/dist/esm/api/resources/cohort/errors/InternalServerError.mjs +5 -1
  314. package/dist/esm/api/resources/cohort/errors/UnauthorizedError.mjs +5 -1
  315. package/dist/esm/api/resources/cohort/exports.d.mts +2 -0
  316. package/dist/esm/api/resources/cohort/exports.mjs +3 -0
  317. package/dist/esm/api/resources/cohort/types/CohortResponse.d.mts +3 -3
  318. package/dist/esm/api/resources/cohort/types/SearchConcept.d.mts +4 -4
  319. package/dist/esm/api/resources/construe/client/Client.d.mts +28 -29
  320. package/dist/esm/api/resources/construe/client/Client.mjs +77 -238
  321. package/dist/esm/api/resources/construe/client/requests/index.d.mts +1 -1
  322. package/dist/esm/api/resources/construe/client/requests/index.mjs +1 -1
  323. package/dist/esm/api/resources/construe/errors/BadRequestError.mjs +5 -1
  324. package/dist/esm/api/resources/construe/errors/ConflictError.mjs +5 -1
  325. package/dist/esm/api/resources/construe/errors/FailedDependencyError.mjs +5 -1
  326. package/dist/esm/api/resources/construe/errors/ForbiddenError.mjs +5 -1
  327. package/dist/esm/api/resources/construe/errors/GatewayTimeoutError.mjs +5 -1
  328. package/dist/esm/api/resources/construe/errors/InternalServerError.mjs +5 -1
  329. package/dist/esm/api/resources/construe/errors/NotFoundError.mjs +5 -1
  330. package/dist/esm/api/resources/construe/errors/NotImplementedError.mjs +5 -1
  331. package/dist/esm/api/resources/construe/errors/ServiceUnavailableError.mjs +5 -1
  332. package/dist/esm/api/resources/construe/errors/UnauthorizedError.mjs +5 -1
  333. package/dist/esm/api/resources/construe/exports.d.mts +2 -0
  334. package/dist/esm/api/resources/construe/exports.mjs +3 -0
  335. package/dist/esm/api/resources/construe/types/CodeResponse.d.mts +1 -1
  336. package/dist/esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.mts +3 -3
  337. package/dist/esm/api/resources/construe/types/ExtractRequestConfig.d.mts +8 -8
  338. package/dist/esm/api/resources/construe/types/ExtractRequestSystem.d.mts +2 -2
  339. package/dist/esm/api/resources/construe/types/ExtractedCodeResult.d.mts +3 -3
  340. package/dist/esm/api/resources/construe/types/GetCodeResponse.d.mts +1 -1
  341. package/dist/esm/api/resources/construe/types/ListCodesResponse.d.mts +1 -1
  342. package/dist/esm/api/resources/fhir/client/Client.d.mts +18 -19
  343. package/dist/esm/api/resources/fhir/client/Client.mjs +44 -132
  344. package/dist/esm/api/resources/fhir/client/requests/FhirSearchRequest.d.mts +0 -6
  345. package/dist/esm/api/resources/fhir/errors/BadGatewayError.mjs +5 -1
  346. package/dist/esm/api/resources/fhir/errors/BadRequestError.mjs +5 -1
  347. package/dist/esm/api/resources/fhir/errors/InternalServerError.mjs +5 -1
  348. package/dist/esm/api/resources/fhir/errors/NotFoundError.mjs +5 -1
  349. package/dist/esm/api/resources/fhir/errors/UnauthorizedError.mjs +5 -1
  350. package/dist/esm/api/resources/fhir/exports.d.mts +2 -0
  351. package/dist/esm/api/resources/fhir/exports.mjs +3 -0
  352. package/dist/esm/api/resources/fhir/types/ErrorResponse.d.mts +2 -2
  353. package/dist/esm/api/resources/fhir/types/FhirBundle.d.mts +8 -8
  354. package/dist/esm/api/resources/fhir/types/FhirPatchRequestBodyItem.d.mts +2 -2
  355. package/dist/esm/api/resources/fhir/types/FhirResource.d.mts +5 -5
  356. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +20 -21
  357. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +34 -128
  358. package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.mjs +5 -1
  359. package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.mjs +5 -1
  360. package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.mjs +5 -1
  361. package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.mjs +5 -1
  362. package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.mjs +5 -1
  363. package/dist/esm/api/resources/fhirProvider/exports.d.mts +2 -0
  364. package/dist/esm/api/resources/fhirProvider/exports.mjs +3 -0
  365. package/dist/esm/api/resources/fhirProvider/types/ClientSecretAuth.d.mts +2 -2
  366. package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.mts +12 -12
  367. package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.mts +2 -2
  368. package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.d.mts +3 -3
  369. package/dist/esm/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.mts +3 -3
  370. package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.d.mts +3 -3
  371. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +4 -4
  372. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +8 -8
  373. package/dist/esm/api/resources/fhirProvider/types/FhirQueryResponse.d.mts +4 -4
  374. package/dist/esm/api/resources/fhirProvider/types/JsonWebKey.d.mts +6 -6
  375. package/dist/esm/api/resources/fhirProvider/types/JwtAuth.d.mts +3 -3
  376. package/dist/esm/api/resources/fhirProvider/types/OnBehalfOfAuth.d.mts +2 -2
  377. package/dist/esm/api/resources/fhirProvider/types/ServiceAccountMetadata.d.mts +4 -4
  378. package/dist/esm/api/resources/fhirProvider/types/SmartConfiguration.d.mts +5 -5
  379. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +38 -17
  380. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +92 -91
  381. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.mts +19 -0
  382. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.mjs +2 -0
  383. package/dist/esm/api/resources/lang2Fhir/client/requests/index.d.mts +2 -1
  384. package/dist/esm/api/resources/lang2Fhir/client/requests/index.mjs +1 -1
  385. package/dist/esm/api/resources/lang2Fhir/errors/BadRequestError.mjs +5 -1
  386. package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.mjs +5 -1
  387. package/dist/esm/api/resources/lang2Fhir/errors/ForbiddenError.mjs +5 -1
  388. package/dist/esm/api/resources/lang2Fhir/errors/InternalServerError.mjs +5 -1
  389. package/dist/esm/api/resources/lang2Fhir/errors/UnauthorizedError.mjs +5 -1
  390. package/dist/esm/api/resources/lang2Fhir/errors/UnprocessableEntityError.d.mts +5 -0
  391. package/dist/esm/api/resources/lang2Fhir/errors/UnprocessableEntityError.mjs +17 -0
  392. package/dist/esm/api/resources/lang2Fhir/errors/index.d.mts +1 -0
  393. package/dist/esm/api/resources/lang2Fhir/errors/index.mjs +1 -0
  394. package/dist/esm/api/resources/lang2Fhir/exports.d.mts +2 -0
  395. package/dist/esm/api/resources/lang2Fhir/exports.mjs +3 -0
  396. package/dist/esm/api/resources/lang2Fhir/types/CreateMultiResponse.d.mts +15 -15
  397. package/dist/esm/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.d.mts +4 -4
  398. package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +2 -2
  399. package/dist/esm/api/resources/summary/client/Client.d.mts +18 -19
  400. package/dist/esm/api/resources/summary/client/Client.mjs +30 -111
  401. package/dist/esm/api/resources/summary/client/requests/index.d.mts +1 -1
  402. package/dist/esm/api/resources/summary/client/requests/index.mjs +1 -1
  403. package/dist/esm/api/resources/summary/errors/BadRequestError.mjs +5 -1
  404. package/dist/esm/api/resources/summary/errors/ForbiddenError.mjs +5 -1
  405. package/dist/esm/api/resources/summary/errors/InternalServerError.mjs +5 -1
  406. package/dist/esm/api/resources/summary/errors/NotFoundError.mjs +5 -1
  407. package/dist/esm/api/resources/summary/errors/UnauthorizedError.mjs +5 -1
  408. package/dist/esm/api/resources/summary/exports.d.mts +2 -0
  409. package/dist/esm/api/resources/summary/exports.mjs +3 -0
  410. package/dist/esm/api/resources/summary/types/CreateSummaryResponse.d.mts +4 -4
  411. package/dist/esm/api/resources/summary/types/CreateSummaryTemplateResponse.d.mts +4 -4
  412. package/dist/esm/api/resources/summary/types/ErrorResponse.d.mts +2 -2
  413. package/dist/esm/api/resources/summary/types/FhirBundle.d.mts +1 -1
  414. package/dist/esm/api/resources/summary/types/SummaryDeleteTemplateResponse.d.mts +2 -2
  415. package/dist/esm/api/resources/summary/types/SummaryGetTemplateResponse.d.mts +2 -2
  416. package/dist/esm/api/resources/summary/types/SummaryListTemplatesResponse.d.mts +2 -2
  417. package/dist/esm/api/resources/summary/types/SummaryTemplate.d.mts +9 -9
  418. package/dist/esm/api/resources/summary/types/SummaryUpdateTemplateResponse.d.mts +3 -3
  419. package/dist/esm/api/resources/tools/client/Client.d.mts +17 -18
  420. package/dist/esm/api/resources/tools/client/Client.mjs +31 -90
  421. package/dist/esm/api/resources/tools/client/requests/index.d.mts +1 -1
  422. package/dist/esm/api/resources/tools/client/requests/index.mjs +1 -1
  423. package/dist/esm/api/resources/tools/errors/BadRequestError.mjs +5 -1
  424. package/dist/esm/api/resources/tools/errors/FailedDependencyError.mjs +5 -1
  425. package/dist/esm/api/resources/tools/errors/ForbiddenError.mjs +5 -1
  426. package/dist/esm/api/resources/tools/errors/InternalServerError.mjs +5 -1
  427. package/dist/esm/api/resources/tools/errors/UnauthorizedError.mjs +5 -1
  428. package/dist/esm/api/resources/tools/exports.d.mts +3 -0
  429. package/dist/esm/api/resources/tools/exports.mjs +4 -0
  430. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.d.mts +17 -18
  431. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +24 -79
  432. package/dist/esm/api/resources/tools/resources/mcpServer/exports.d.mts +3 -0
  433. package/dist/esm/api/resources/tools/resources/mcpServer/exports.mjs +4 -0
  434. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +14 -15
  435. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +22 -77
  436. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/exports.d.mts +2 -0
  437. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/exports.mjs +3 -0
  438. package/dist/esm/api/resources/tools/types/CohortResponse.d.mts +5 -5
  439. package/dist/esm/api/resources/tools/types/Lang2FhirAndCreateMultiResponse.d.mts +10 -10
  440. package/dist/esm/api/resources/tools/types/Lang2FhirAndCreateResponse.d.mts +4 -4
  441. package/dist/esm/api/resources/tools/types/Lang2FhirAndSearchResponse.d.mts +5 -5
  442. package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +7 -7
  443. package/dist/esm/api/resources/tools/types/McpServerToolCallResponse.d.mts +4 -4
  444. package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +9 -9
  445. package/dist/esm/api/resources/tools/types/SearchConcept.d.mts +4 -4
  446. package/dist/esm/api/resources/workflows/client/Client.d.mts +18 -19
  447. package/dist/esm/api/resources/workflows/client/Client.mjs +42 -127
  448. package/dist/esm/api/resources/workflows/errors/BadRequestError.mjs +5 -1
  449. package/dist/esm/api/resources/workflows/errors/ForbiddenError.mjs +5 -1
  450. package/dist/esm/api/resources/workflows/errors/InternalServerError.mjs +5 -1
  451. package/dist/esm/api/resources/workflows/errors/NotFoundError.mjs +5 -1
  452. package/dist/esm/api/resources/workflows/errors/UnauthorizedError.mjs +5 -1
  453. package/dist/esm/api/resources/workflows/exports.d.mts +2 -0
  454. package/dist/esm/api/resources/workflows/exports.mjs +3 -0
  455. package/dist/esm/api/resources/workflows/types/CreateWorkflowResponse.d.mts +5 -5
  456. package/dist/esm/api/resources/workflows/types/DecisionNodeDefinition.d.mts +3 -3
  457. package/dist/esm/api/resources/workflows/types/ExecuteWorkflowResponse.d.mts +4 -4
  458. package/dist/esm/api/resources/workflows/types/Lang2FhirCreateDefinition.d.mts +4 -4
  459. package/dist/esm/api/resources/workflows/types/Lang2FhirSearchDefinition.d.mts +5 -5
  460. package/dist/esm/api/resources/workflows/types/ListWorkflowsResponse.d.mts +4 -4
  461. package/dist/esm/api/resources/workflows/types/StepOperation.d.mts +4 -4
  462. package/dist/esm/api/resources/workflows/types/SubWorkflowDefinition.d.mts +3 -3
  463. package/dist/esm/api/resources/workflows/types/WorkflowConfig.d.mts +2 -2
  464. package/dist/esm/api/resources/workflows/types/WorkflowDefinition.d.mts +8 -8
  465. package/dist/esm/api/resources/workflows/types/WorkflowGraph.d.mts +1 -1
  466. package/dist/esm/api/resources/workflows/types/WorkflowResponse.d.mts +9 -9
  467. package/dist/esm/api/resources/workflows/types/WorkflowStep.d.mts +8 -8
  468. package/dist/esm/api/resources/workflows/types/WorkflowStepSummary.d.mts +5 -5
  469. package/dist/esm/api/resources/workflows/types/WorkflowsDeleteResponse.d.mts +2 -2
  470. package/dist/esm/api/resources/workflows/types/WorkflowsGetResponse.d.mts +3 -3
  471. package/dist/esm/api/resources/workflows/types/WorkflowsUpdateResponse.d.mts +4 -4
  472. package/dist/esm/auth/OAuthAuthProvider.d.mts +45 -0
  473. package/dist/esm/auth/OAuthAuthProvider.mjs +152 -0
  474. package/dist/esm/auth/index.d.mts +1 -0
  475. package/dist/esm/auth/index.mjs +1 -0
  476. package/dist/esm/core/auth/AuthProvider.d.mts +4 -1
  477. package/dist/esm/core/auth/BearerToken.d.mts +3 -1
  478. package/dist/esm/core/auth/BearerToken.mjs +7 -6
  479. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  480. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  481. package/dist/esm/core/auth/index.d.mts +1 -0
  482. package/dist/esm/core/auth/index.mjs +1 -0
  483. package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
  484. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  485. package/dist/esm/core/fetcher/Fetcher.d.mts +6 -3
  486. package/dist/esm/core/fetcher/Fetcher.mjs +10 -3
  487. package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
  488. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  489. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  490. package/dist/esm/core/fetcher/signals.d.mts +1 -1
  491. package/dist/esm/core/headers.d.mts +2 -2
  492. package/dist/esm/core/runtime/runtime.mjs +17 -15
  493. package/dist/esm/core/stream/Stream.d.mts +9 -0
  494. package/dist/esm/core/stream/Stream.mjs +100 -5
  495. package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
  496. package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
  497. package/dist/esm/errors/phenomlError.mjs +5 -1
  498. package/dist/esm/errors/phenomlTimeoutError.mjs +5 -1
  499. package/dist/esm/index.d.mts +4 -2
  500. package/dist/esm/index.mjs +3 -2
  501. package/dist/esm/version.d.mts +1 -1
  502. package/dist/esm/version.mjs +1 -1
  503. package/package.json +162 -5
  504. package/reference.md +209 -73
  505. package/dist/cjs/WrapperClient.d.ts +0 -21
  506. package/dist/cjs/WrapperClient.js +0 -111
  507. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  508. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  509. package/dist/esm/WrapperClient.d.mts +0 -21
  510. package/dist/esm/WrapperClient.mjs +0 -75
  511. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  512. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
@@ -1,19 +1,19 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
2
3
  import * as core from "../../../../core/index.mjs";
3
4
  import * as phenoml from "../../../index.mjs";
4
- export declare namespace Summary {
5
- interface Options extends BaseClientOptions {
6
- }
5
+ export declare namespace SummaryClient {
6
+ type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
9
  }
10
- export declare class Summary {
11
- protected readonly _options: Summary.Options;
12
- constructor(_options: Summary.Options);
10
+ export declare class SummaryClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<SummaryClient.Options>;
12
+ constructor(options?: SummaryClient.Options);
13
13
  /**
14
14
  * Retrieves all summary templates for the authenticated user
15
15
  *
16
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
16
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
17
17
  *
18
18
  * @throws {@link phenoml.summary.UnauthorizedError}
19
19
  * @throws {@link phenoml.summary.InternalServerError}
@@ -21,13 +21,13 @@ export declare class Summary {
21
21
  * @example
22
22
  * await client.summary.listTemplates()
23
23
  */
24
- listTemplates(requestOptions?: Summary.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryListTemplatesResponse>;
24
+ listTemplates(requestOptions?: SummaryClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryListTemplatesResponse>;
25
25
  private __listTemplates;
26
26
  /**
27
27
  * Creates a summary template from an example using LLM function calling
28
28
  *
29
29
  * @param {phenoml.summary.CreateSummaryTemplateRequest} request
30
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
30
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
31
31
  *
32
32
  * @throws {@link phenoml.summary.BadRequestError}
33
33
  * @throws {@link phenoml.summary.UnauthorizedError}
@@ -41,13 +41,13 @@ export declare class Summary {
41
41
  * mode: "mode"
42
42
  * })
43
43
  */
44
- createTemplate(request: phenoml.summary.CreateSummaryTemplateRequest, requestOptions?: Summary.RequestOptions): core.HttpResponsePromise<phenoml.summary.CreateSummaryTemplateResponse>;
44
+ createTemplate(request: phenoml.summary.CreateSummaryTemplateRequest, requestOptions?: SummaryClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.CreateSummaryTemplateResponse>;
45
45
  private __createTemplate;
46
46
  /**
47
47
  * Retrieves a specific summary template
48
48
  *
49
49
  * @param {string} id - Template ID
50
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
50
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
51
51
  *
52
52
  * @throws {@link phenoml.summary.UnauthorizedError}
53
53
  * @throws {@link phenoml.summary.ForbiddenError}
@@ -57,14 +57,14 @@ export declare class Summary {
57
57
  * @example
58
58
  * await client.summary.getTemplate("id")
59
59
  */
60
- getTemplate(id: string, requestOptions?: Summary.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryGetTemplateResponse>;
60
+ getTemplate(id: string, requestOptions?: SummaryClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryGetTemplateResponse>;
61
61
  private __getTemplate;
62
62
  /**
63
63
  * Updates an existing summary template
64
64
  *
65
65
  * @param {string} id - Template ID
66
66
  * @param {phenoml.summary.UpdateSummaryTemplateRequest} request
67
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
67
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
68
68
  *
69
69
  * @throws {@link phenoml.summary.BadRequestError}
70
70
  * @throws {@link phenoml.summary.UnauthorizedError}
@@ -80,13 +80,13 @@ export declare class Summary {
80
80
  * mode: "mode"
81
81
  * })
82
82
  */
83
- updateTemplate(id: string, request: phenoml.summary.UpdateSummaryTemplateRequest, requestOptions?: Summary.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryUpdateTemplateResponse>;
83
+ updateTemplate(id: string, request: phenoml.summary.UpdateSummaryTemplateRequest, requestOptions?: SummaryClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryUpdateTemplateResponse>;
84
84
  private __updateTemplate;
85
85
  /**
86
86
  * Deletes a summary template
87
87
  *
88
88
  * @param {string} id - Template ID
89
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
89
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
90
90
  *
91
91
  * @throws {@link phenoml.summary.UnauthorizedError}
92
92
  * @throws {@link phenoml.summary.ForbiddenError}
@@ -96,7 +96,7 @@ export declare class Summary {
96
96
  * @example
97
97
  * await client.summary.deleteTemplate("id")
98
98
  */
99
- deleteTemplate(id: string, requestOptions?: Summary.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryDeleteTemplateResponse>;
99
+ deleteTemplate(id: string, requestOptions?: SummaryClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryDeleteTemplateResponse>;
100
100
  private __deleteTemplate;
101
101
  /**
102
102
  * Creates a summary from FHIR resources using one of three modes:
@@ -105,7 +105,7 @@ export declare class Summary {
105
105
  * - **ips**: Generates an International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG. Requires a Bundle with exactly one Patient resource (returns 400 error if no Patient or multiple Patients are present). Automatically filters resources to those referencing the patient and generates sections for allergies, medications, problems, immunizations, procedures, and vital signs.
106
106
  *
107
107
  * @param {phenoml.summary.CreateSummaryRequest} request
108
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
108
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
109
109
  *
110
110
  * @throws {@link phenoml.summary.BadRequestError}
111
111
  * @throws {@link phenoml.summary.UnauthorizedError}
@@ -120,7 +120,6 @@ export declare class Summary {
120
120
  * }
121
121
  * })
122
122
  */
123
- create(request: phenoml.summary.CreateSummaryRequest, requestOptions?: Summary.RequestOptions): core.HttpResponsePromise<phenoml.summary.CreateSummaryResponse>;
123
+ create(request: phenoml.summary.CreateSummaryRequest, requestOptions?: SummaryClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.CreateSummaryResponse>;
124
124
  private __create;
125
- protected _getAuthorizationHeader(): Promise<string>;
126
125
  }
@@ -8,19 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
12
13
  import * as core from "../../../../core/index.mjs";
13
14
  import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
14
16
  import * as errors from "../../../../errors/index.mjs";
15
17
  import * as phenoml from "../../../index.mjs";
16
- export class Summary {
17
- constructor(_options) {
18
- this._options = _options;
18
+ export class SummaryClient {
19
+ constructor(options = {}) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
19
21
  }
20
22
  /**
21
23
  * Retrieves all summary templates for the authenticated user
22
24
  *
23
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
25
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
24
26
  *
25
27
  * @throws {@link phenoml.summary.UnauthorizedError}
26
28
  * @throws {@link phenoml.summary.InternalServerError}
@@ -34,7 +36,8 @@ export class Summary {
34
36
  __listTemplates(requestOptions) {
35
37
  return __awaiter(this, void 0, void 0, function* () {
36
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
37
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
39
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
40
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
38
41
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
39
42
  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"),
40
43
  method: "GET",
@@ -66,28 +69,14 @@ export class Summary {
66
69
  });
67
70
  }
68
71
  }
69
- switch (_response.error.reason) {
70
- case "non-json":
71
- throw new errors.phenomlError({
72
- statusCode: _response.error.statusCode,
73
- body: _response.error.rawBody,
74
- rawResponse: _response.rawResponse,
75
- });
76
- case "timeout":
77
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /fhir2summary/templates.");
78
- case "unknown":
79
- throw new errors.phenomlError({
80
- message: _response.error.errorMessage,
81
- rawResponse: _response.rawResponse,
82
- });
83
- }
72
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/fhir2summary/templates");
84
73
  });
85
74
  }
86
75
  /**
87
76
  * Creates a summary template from an example using LLM function calling
88
77
  *
89
78
  * @param {phenoml.summary.CreateSummaryTemplateRequest} request
90
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
79
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
91
80
  *
92
81
  * @throws {@link phenoml.summary.BadRequestError}
93
82
  * @throws {@link phenoml.summary.UnauthorizedError}
@@ -107,7 +96,8 @@ export class Summary {
107
96
  __createTemplate(request, requestOptions) {
108
97
  return __awaiter(this, void 0, void 0, function* () {
109
98
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
110
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
99
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
100
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
111
101
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
112
102
  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"),
113
103
  method: "POST",
@@ -144,28 +134,14 @@ export class Summary {
144
134
  });
145
135
  }
146
136
  }
147
- switch (_response.error.reason) {
148
- case "non-json":
149
- throw new errors.phenomlError({
150
- statusCode: _response.error.statusCode,
151
- body: _response.error.rawBody,
152
- rawResponse: _response.rawResponse,
153
- });
154
- case "timeout":
155
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /fhir2summary/template.");
156
- case "unknown":
157
- throw new errors.phenomlError({
158
- message: _response.error.errorMessage,
159
- rawResponse: _response.rawResponse,
160
- });
161
- }
137
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/fhir2summary/template");
162
138
  });
163
139
  }
164
140
  /**
165
141
  * Retrieves a specific summary template
166
142
  *
167
143
  * @param {string} id - Template ID
168
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
144
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
169
145
  *
170
146
  * @throws {@link phenoml.summary.UnauthorizedError}
171
147
  * @throws {@link phenoml.summary.ForbiddenError}
@@ -181,7 +157,8 @@ export class Summary {
181
157
  __getTemplate(id, requestOptions) {
182
158
  return __awaiter(this, void 0, void 0, function* () {
183
159
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
184
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
160
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
161
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
185
162
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
186
163
  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)}`),
187
164
  method: "GET",
@@ -217,21 +194,7 @@ export class Summary {
217
194
  });
218
195
  }
219
196
  }
220
- switch (_response.error.reason) {
221
- case "non-json":
222
- throw new errors.phenomlError({
223
- statusCode: _response.error.statusCode,
224
- body: _response.error.rawBody,
225
- rawResponse: _response.rawResponse,
226
- });
227
- case "timeout":
228
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /fhir2summary/template/{id}.");
229
- case "unknown":
230
- throw new errors.phenomlError({
231
- message: _response.error.errorMessage,
232
- rawResponse: _response.rawResponse,
233
- });
234
- }
197
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/fhir2summary/template/{id}");
235
198
  });
236
199
  }
237
200
  /**
@@ -239,7 +202,7 @@ export class Summary {
239
202
  *
240
203
  * @param {string} id - Template ID
241
204
  * @param {phenoml.summary.UpdateSummaryTemplateRequest} request
242
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
205
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
243
206
  *
244
207
  * @throws {@link phenoml.summary.BadRequestError}
245
208
  * @throws {@link phenoml.summary.UnauthorizedError}
@@ -261,7 +224,8 @@ export class Summary {
261
224
  __updateTemplate(id, request, requestOptions) {
262
225
  return __awaiter(this, void 0, void 0, function* () {
263
226
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
264
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
227
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
228
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
265
229
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
266
230
  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
231
  method: "PUT",
@@ -302,28 +266,14 @@ export class Summary {
302
266
  });
303
267
  }
304
268
  }
305
- switch (_response.error.reason) {
306
- case "non-json":
307
- throw new errors.phenomlError({
308
- statusCode: _response.error.statusCode,
309
- body: _response.error.rawBody,
310
- rawResponse: _response.rawResponse,
311
- });
312
- case "timeout":
313
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling PUT /fhir2summary/template/{id}.");
314
- case "unknown":
315
- throw new errors.phenomlError({
316
- message: _response.error.errorMessage,
317
- rawResponse: _response.rawResponse,
318
- });
319
- }
269
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/fhir2summary/template/{id}");
320
270
  });
321
271
  }
322
272
  /**
323
273
  * Deletes a summary template
324
274
  *
325
275
  * @param {string} id - Template ID
326
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
276
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
327
277
  *
328
278
  * @throws {@link phenoml.summary.UnauthorizedError}
329
279
  * @throws {@link phenoml.summary.ForbiddenError}
@@ -339,7 +289,8 @@ export class Summary {
339
289
  __deleteTemplate(id, requestOptions) {
340
290
  return __awaiter(this, void 0, void 0, function* () {
341
291
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
342
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
292
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
293
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
343
294
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
344
295
  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)}`),
345
296
  method: "DELETE",
@@ -375,21 +326,7 @@ export class Summary {
375
326
  });
376
327
  }
377
328
  }
378
- switch (_response.error.reason) {
379
- case "non-json":
380
- throw new errors.phenomlError({
381
- statusCode: _response.error.statusCode,
382
- body: _response.error.rawBody,
383
- rawResponse: _response.rawResponse,
384
- });
385
- case "timeout":
386
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /fhir2summary/template/{id}.");
387
- case "unknown":
388
- throw new errors.phenomlError({
389
- message: _response.error.errorMessage,
390
- rawResponse: _response.rawResponse,
391
- });
392
- }
329
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/fhir2summary/template/{id}");
393
330
  });
394
331
  }
395
332
  /**
@@ -399,7 +336,7 @@ export class Summary {
399
336
  * - **ips**: Generates an International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG. Requires a Bundle with exactly one Patient resource (returns 400 error if no Patient or multiple Patients are present). Automatically filters resources to those referencing the patient and generates sections for allergies, medications, problems, immunizations, procedures, and vital signs.
400
337
  *
401
338
  * @param {phenoml.summary.CreateSummaryRequest} request
402
- * @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
339
+ * @param {SummaryClient.RequestOptions} requestOptions - Request-specific configuration.
403
340
  *
404
341
  * @throws {@link phenoml.summary.BadRequestError}
405
342
  * @throws {@link phenoml.summary.UnauthorizedError}
@@ -420,7 +357,8 @@ export class Summary {
420
357
  __create(request, requestOptions) {
421
358
  return __awaiter(this, void 0, void 0, function* () {
422
359
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
423
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
360
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
361
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
424
362
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
425
363
  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/create"),
426
364
  method: "POST",
@@ -461,26 +399,7 @@ export class Summary {
461
399
  });
462
400
  }
463
401
  }
464
- switch (_response.error.reason) {
465
- case "non-json":
466
- throw new errors.phenomlError({
467
- statusCode: _response.error.statusCode,
468
- body: _response.error.rawBody,
469
- rawResponse: _response.rawResponse,
470
- });
471
- case "timeout":
472
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /fhir2summary/create.");
473
- case "unknown":
474
- throw new errors.phenomlError({
475
- message: _response.error.errorMessage,
476
- rawResponse: _response.rawResponse,
477
- });
478
- }
479
- });
480
- }
481
- _getAuthorizationHeader() {
482
- return __awaiter(this, void 0, void 0, function* () {
483
- return `Bearer ${yield core.Supplier.get(this._options.token)}`;
402
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/fhir2summary/create");
484
403
  });
485
404
  }
486
405
  }
@@ -1,3 +1,3 @@
1
- export type { CreateSummaryRequest } from "./CreateSummaryRequest.mjs";
1
+ export { CreateSummaryRequest } from "./CreateSummaryRequest.mjs";
2
2
  export type { CreateSummaryTemplateRequest } from "./CreateSummaryTemplateRequest.mjs";
3
3
  export type { UpdateSummaryTemplateRequest } from "./UpdateSummaryTemplateRequest.mjs";
@@ -1 +1 @@
1
- export {};
1
+ export { CreateSummaryRequest } from "./CreateSummaryRequest.mjs";
@@ -8,6 +8,10 @@ export class BadRequestError extends errors.phenomlError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, BadRequestError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class ForbiddenError extends errors.phenomlError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, ForbiddenError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class InternalServerError extends errors.phenomlError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, InternalServerError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class NotFoundError extends errors.phenomlError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, NotFoundError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class UnauthorizedError extends errors.phenomlError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, UnauthorizedError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -0,0 +1,2 @@
1
+ export { SummaryClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { SummaryClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -1,8 +1,8 @@
1
1
  export interface CreateSummaryResponse {
2
- success?: boolean;
3
- message?: string;
2
+ success?: boolean | undefined;
3
+ message?: string | undefined;
4
4
  /** Generated summary text */
5
- summary?: string;
5
+ summary?: string | undefined;
6
6
  /** Unresolved placeholders or issues (narrative mode only) */
7
- warnings?: string[];
7
+ warnings?: string[] | undefined;
8
8
  }
@@ -1,7 +1,7 @@
1
1
  import type * as phenoml from "../../../index.mjs";
2
2
  export interface CreateSummaryTemplateResponse {
3
- success?: boolean;
4
- message?: string;
5
- template_id?: string;
6
- template?: phenoml.summary.SummaryTemplate;
3
+ success?: boolean | undefined;
4
+ message?: string | undefined;
5
+ template_id?: string | undefined;
6
+ template?: phenoml.summary.SummaryTemplate | undefined;
7
7
  }
@@ -1,5 +1,5 @@
1
1
  export interface ErrorResponse {
2
- success?: boolean;
2
+ success?: boolean | undefined;
3
3
  /** Error message describing what went wrong */
4
- error?: string;
4
+ error?: string | undefined;
5
5
  }
@@ -7,7 +7,7 @@ export declare namespace FhirBundle {
7
7
  type Entry = Entry.Item[];
8
8
  namespace Entry {
9
9
  interface Item {
10
- resource?: phenoml.summary.FhirResource;
10
+ resource?: phenoml.summary.FhirResource | undefined;
11
11
  }
12
12
  }
13
13
  }
@@ -1,4 +1,4 @@
1
1
  export interface SummaryDeleteTemplateResponse {
2
- success?: boolean;
3
- message?: string;
2
+ success?: boolean | undefined;
3
+ message?: string | undefined;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import type * as phenoml from "../../../index.mjs";
2
2
  export interface SummaryGetTemplateResponse {
3
- success?: boolean;
4
- template?: phenoml.summary.SummaryTemplate;
3
+ success?: boolean | undefined;
4
+ template?: phenoml.summary.SummaryTemplate | undefined;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import type * as phenoml from "../../../index.mjs";
2
2
  export interface SummaryListTemplatesResponse {
3
- success?: boolean;
4
- templates?: phenoml.summary.SummaryTemplate[];
3
+ success?: boolean | undefined;
4
+ templates?: phenoml.summary.SummaryTemplate[] | undefined;
5
5
  }
@@ -1,14 +1,14 @@
1
1
  export interface SummaryTemplate {
2
- id?: string;
3
- name?: string;
4
- description?: string;
2
+ id?: string | undefined;
3
+ name?: string | undefined;
4
+ description?: string | undefined;
5
5
  /** Template with {{resource.field}} placeholders */
6
- template?: string;
6
+ template?: string | undefined;
7
7
  /** List of FHIR resource types/profiles */
8
- target_resources?: string[];
8
+ target_resources?: string[] | undefined;
9
9
  /** Template mode (stored value) */
10
- mode?: string;
11
- metadata?: Record<string, unknown>;
12
- created_at?: string;
13
- updated_at?: string;
10
+ mode?: string | undefined;
11
+ metadata?: Record<string, unknown> | undefined;
12
+ created_at?: string | undefined;
13
+ updated_at?: string | undefined;
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import type * as phenoml from "../../../index.mjs";
2
2
  export interface SummaryUpdateTemplateResponse {
3
- success?: boolean;
4
- message?: string;
5
- template?: phenoml.summary.SummaryTemplate;
3
+ success?: boolean | undefined;
4
+ message?: string | undefined;
5
+ template?: phenoml.summary.SummaryTemplate | undefined;
6
6
  }