phenoml 0.0.6 → 0.0.8

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 (686) hide show
  1. package/dist/cjs/BaseClient.d.ts +3 -3
  2. package/dist/cjs/Client.d.ts +5 -2
  3. package/dist/cjs/Client.js +14 -9
  4. package/dist/cjs/api/index.d.ts +0 -1
  5. package/dist/cjs/api/index.js +0 -1
  6. package/dist/cjs/api/resources/agent/client/Client.d.ts +2 -2
  7. package/dist/cjs/api/resources/agent/client/Client.js +23 -27
  8. package/dist/cjs/api/resources/agent/client/index.d.ts +0 -1
  9. package/dist/cjs/api/resources/agent/client/requests/AgentGetChatMessagesRequest.d.ts +1 -1
  10. package/dist/cjs/api/resources/agent/client/requests/index.d.ts +3 -3
  11. package/dist/cjs/api/resources/agent/errors/BadRequestError.d.ts +1 -1
  12. package/dist/cjs/api/resources/agent/errors/ForbiddenError.d.ts +1 -1
  13. package/dist/cjs/api/resources/agent/errors/InternalServerError.d.ts +1 -1
  14. package/dist/cjs/api/resources/agent/errors/NotFoundError.d.ts +1 -1
  15. package/dist/cjs/api/resources/agent/errors/UnauthorizedError.d.ts +1 -1
  16. package/dist/cjs/api/resources/agent/errors/index.d.ts +1 -1
  17. package/dist/cjs/api/resources/agent/errors/index.js +1 -1
  18. package/dist/cjs/api/resources/agent/index.d.ts +3 -3
  19. package/dist/cjs/api/resources/agent/index.js +3 -3
  20. package/dist/cjs/api/resources/agent/resources/index.d.ts +1 -1
  21. package/dist/cjs/api/resources/agent/resources/index.js +4 -4
  22. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +2 -2
  23. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +16 -20
  24. package/dist/cjs/api/resources/agent/resources/prompts/client/index.d.ts +0 -1
  25. package/dist/cjs/api/resources/agent/resources/prompts/client/requests/index.d.ts +2 -2
  26. package/dist/cjs/api/resources/agent/resources/prompts/index.d.ts +1 -1
  27. package/dist/cjs/api/resources/agent/resources/prompts/index.js +1 -1
  28. package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsListResponse.d.ts +1 -1
  29. package/dist/cjs/api/resources/agent/resources/prompts/types/index.d.ts +1 -1
  30. package/dist/cjs/api/resources/agent/resources/prompts/types/index.js +1 -1
  31. package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesResponse.d.ts +1 -1
  32. package/dist/cjs/api/resources/agent/types/AgentListResponse.d.ts +1 -1
  33. package/dist/cjs/api/resources/agent/types/AgentPromptsResponse.d.ts +1 -1
  34. package/dist/cjs/api/resources/agent/types/AgentResponse.d.ts +1 -1
  35. package/dist/cjs/api/resources/agent/types/JsonPatch.d.ts +1 -1
  36. package/dist/cjs/api/resources/agent/types/index.d.ts +7 -7
  37. package/dist/cjs/api/resources/agent/types/index.js +7 -7
  38. package/dist/cjs/api/resources/authtoken/client/Client.d.ts +1 -1
  39. package/dist/cjs/api/resources/authtoken/client/Client.js +1 -1
  40. package/dist/cjs/api/resources/authtoken/errors/BadRequestError.d.ts +1 -1
  41. package/dist/cjs/api/resources/authtoken/errors/UnauthorizedError.d.ts +1 -1
  42. package/dist/cjs/api/resources/authtoken/index.d.ts +2 -2
  43. package/dist/cjs/api/resources/authtoken/index.js +2 -2
  44. package/dist/cjs/api/resources/authtoken/resources/auth/client/index.d.ts +0 -1
  45. package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/index.d.ts +1 -1
  46. package/dist/cjs/api/resources/authtoken/resources/auth/index.d.ts +1 -1
  47. package/dist/cjs/api/resources/authtoken/resources/auth/index.js +1 -1
  48. package/dist/cjs/api/resources/authtoken/resources/index.d.ts +1 -1
  49. package/dist/cjs/api/resources/authtoken/resources/index.js +4 -4
  50. package/dist/cjs/api/resources/cohort/client/Client.d.ts +2 -2
  51. package/dist/cjs/api/resources/cohort/client/Client.js +6 -10
  52. package/dist/cjs/api/resources/cohort/client/index.d.ts +0 -1
  53. package/dist/cjs/api/resources/cohort/client/requests/index.d.ts +1 -1
  54. package/dist/cjs/api/resources/cohort/errors/BadRequestError.d.ts +1 -1
  55. package/dist/cjs/api/resources/cohort/errors/InternalServerError.d.ts +1 -1
  56. package/dist/cjs/api/resources/cohort/errors/UnauthorizedError.d.ts +1 -1
  57. package/dist/cjs/api/resources/cohort/errors/index.d.ts +1 -1
  58. package/dist/cjs/api/resources/cohort/errors/index.js +1 -1
  59. package/dist/cjs/api/resources/cohort/index.d.ts +2 -2
  60. package/dist/cjs/api/resources/cohort/index.js +2 -2
  61. package/dist/cjs/api/resources/cohort/types/CohortResponse.d.ts +1 -1
  62. package/dist/cjs/api/resources/construe/client/Client.d.ts +2 -2
  63. package/dist/cjs/api/resources/construe/client/Client.js +8 -12
  64. package/dist/cjs/api/resources/construe/client/index.d.ts +0 -1
  65. package/dist/cjs/api/resources/construe/client/requests/ExtractRequest.d.ts +1 -1
  66. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +3 -3
  67. package/dist/cjs/api/resources/construe/errors/BadRequestError.d.ts +1 -1
  68. package/dist/cjs/api/resources/construe/errors/ConflictError.d.ts +1 -1
  69. package/dist/cjs/api/resources/construe/errors/FailedDependencyError.d.ts +1 -1
  70. package/dist/cjs/api/resources/construe/errors/InternalServerError.d.ts +1 -1
  71. package/dist/cjs/api/resources/construe/errors/UnauthorizedError.d.ts +1 -1
  72. package/dist/cjs/api/resources/construe/errors/index.d.ts +1 -1
  73. package/dist/cjs/api/resources/construe/errors/index.js +1 -1
  74. package/dist/cjs/api/resources/construe/index.d.ts +2 -2
  75. package/dist/cjs/api/resources/construe/index.js +2 -2
  76. package/dist/cjs/api/resources/construe/types/ExtractCodesResult.d.ts +1 -1
  77. package/dist/cjs/api/resources/construe/types/index.d.ts +6 -6
  78. package/dist/cjs/api/resources/construe/types/index.js +6 -6
  79. package/dist/cjs/api/resources/fhir/client/Client.d.ts +2 -2
  80. package/dist/cjs/api/resources/fhir/client/Client.js +18 -22
  81. package/dist/cjs/api/resources/fhir/client/index.d.ts +0 -1
  82. package/dist/cjs/api/resources/fhir/client/requests/FhirCreateRequest.d.ts +1 -1
  83. package/dist/cjs/api/resources/fhir/client/requests/FhirExecuteBundleRequest.d.ts +1 -1
  84. package/dist/cjs/api/resources/fhir/client/requests/FhirPatchRequest.d.ts +1 -1
  85. package/dist/cjs/api/resources/fhir/client/requests/FhirUpsertRequest.d.ts +1 -1
  86. package/dist/cjs/api/resources/fhir/client/requests/index.d.ts +6 -6
  87. package/dist/cjs/api/resources/fhir/errors/BadRequestError.d.ts +1 -1
  88. package/dist/cjs/api/resources/fhir/errors/InternalServerError.d.ts +1 -1
  89. package/dist/cjs/api/resources/fhir/errors/NotFoundError.d.ts +1 -1
  90. package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.d.ts +1 -1
  91. package/dist/cjs/api/resources/fhir/errors/index.d.ts +2 -2
  92. package/dist/cjs/api/resources/fhir/errors/index.js +2 -2
  93. package/dist/cjs/api/resources/fhir/index.d.ts +2 -2
  94. package/dist/cjs/api/resources/fhir/index.js +2 -2
  95. package/dist/cjs/api/resources/fhir/types/FhirSearchResponse.d.ts +1 -1
  96. package/dist/cjs/api/resources/fhir/types/index.d.ts +3 -3
  97. package/dist/cjs/api/resources/fhir/types/index.js +3 -3
  98. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +2 -2
  99. package/dist/cjs/api/resources/fhirProvider/client/Client.js +17 -21
  100. package/dist/cjs/api/resources/fhirProvider/client/index.d.ts +0 -1
  101. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.d.ts +1 -1
  102. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.ts +1 -1
  103. package/dist/cjs/api/resources/fhirProvider/client/requests/index.d.ts +4 -4
  104. package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.d.ts +1 -1
  105. package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.d.ts +1 -1
  106. package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.d.ts +1 -1
  107. package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.d.ts +1 -1
  108. package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.d.ts +1 -1
  109. package/dist/cjs/api/resources/fhirProvider/errors/index.d.ts +1 -1
  110. package/dist/cjs/api/resources/fhirProvider/errors/index.js +1 -1
  111. package/dist/cjs/api/resources/fhirProvider/index.d.ts +2 -2
  112. package/dist/cjs/api/resources/fhirProvider/index.js +2 -2
  113. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.ts +1 -1
  114. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.d.ts +1 -1
  115. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.ts +1 -1
  116. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.d.ts +1 -1
  117. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.ts +1 -1
  118. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +1 -1
  119. package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +7 -7
  120. package/dist/cjs/api/resources/fhirProvider/types/index.js +7 -7
  121. package/dist/cjs/api/resources/index.d.ts +1 -0
  122. package/dist/cjs/api/resources/index.js +2 -1
  123. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +2 -2
  124. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +9 -13
  125. package/dist/cjs/api/resources/lang2Fhir/client/index.d.ts +0 -1
  126. package/dist/cjs/api/resources/lang2Fhir/client/requests/index.d.ts +4 -4
  127. package/dist/cjs/api/resources/lang2Fhir/errors/BadRequestError.d.ts +1 -1
  128. package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.d.ts +1 -1
  129. package/dist/cjs/api/resources/lang2Fhir/errors/ForbiddenError.d.ts +1 -1
  130. package/dist/cjs/api/resources/lang2Fhir/errors/InternalServerError.d.ts +1 -1
  131. package/dist/cjs/api/resources/lang2Fhir/errors/UnauthorizedError.d.ts +1 -1
  132. package/dist/cjs/api/resources/lang2Fhir/errors/index.d.ts +2 -2
  133. package/dist/cjs/api/resources/lang2Fhir/errors/index.js +2 -2
  134. package/dist/cjs/api/resources/lang2Fhir/index.d.ts +2 -2
  135. package/dist/cjs/api/resources/lang2Fhir/index.js +2 -2
  136. package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +1 -1
  137. package/dist/cjs/api/resources/lang2Fhir/types/index.js +1 -1
  138. package/dist/cjs/api/resources/summary/client/Client.d.ts +125 -0
  139. package/dist/cjs/api/resources/{workflows/resources/workflows → summary}/client/Client.js +136 -195
  140. package/dist/cjs/api/resources/{workflows/resources/workflows → summary}/client/index.d.ts +0 -1
  141. package/dist/cjs/api/resources/summary/client/requests/CreateSummaryRequest.d.ts +37 -0
  142. package/dist/cjs/api/resources/summary/client/requests/CreateSummaryRequest.js +16 -0
  143. package/dist/cjs/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.ts +23 -0
  144. package/dist/cjs/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.ts +18 -0
  145. package/dist/cjs/api/resources/summary/client/requests/index.d.ts +3 -0
  146. package/dist/cjs/api/resources/summary/errors/BadRequestError.d.ts +5 -0
  147. package/dist/cjs/api/resources/summary/errors/BadRequestError.js +50 -0
  148. package/dist/cjs/api/resources/summary/errors/ForbiddenError.d.ts +5 -0
  149. package/dist/cjs/api/resources/{workflows/resources/index.js → summary/errors/ForbiddenError.js} +15 -8
  150. package/dist/cjs/api/resources/summary/errors/InternalServerError.d.ts +5 -0
  151. package/dist/cjs/api/resources/summary/errors/InternalServerError.js +50 -0
  152. package/dist/cjs/api/resources/summary/errors/NotFoundError.d.ts +5 -0
  153. package/dist/cjs/api/resources/{workflows/resources/mcpServer/resources/index.js → summary/errors/NotFoundError.js} +15 -2
  154. package/dist/cjs/api/resources/summary/errors/UnauthorizedError.d.ts +5 -0
  155. package/dist/cjs/api/resources/summary/errors/UnauthorizedError.js +50 -0
  156. package/dist/cjs/api/resources/summary/errors/index.d.ts +5 -0
  157. package/dist/cjs/api/resources/{workflows/resources/mcpServer/resources/tools → summary/errors}/index.js +5 -1
  158. package/dist/cjs/api/resources/{workflows/resources/workflows → summary}/index.d.ts +2 -1
  159. package/dist/cjs/api/resources/{workflows/resources/workflows → summary}/index.js +2 -1
  160. package/dist/cjs/api/resources/summary/types/CreateSummaryResponse.d.ts +8 -0
  161. package/dist/cjs/api/resources/summary/types/CreateSummaryTemplateResponse.d.ts +7 -0
  162. package/dist/cjs/api/resources/summary/types/FhirBundle.d.ts +13 -0
  163. package/dist/cjs/api/resources/summary/types/FhirResource.d.ts +6 -0
  164. package/dist/cjs/api/resources/summary/types/SummaryDeleteTemplateResponse.d.ts +4 -0
  165. package/dist/cjs/api/resources/summary/types/SummaryGetTemplateResponse.d.ts +5 -0
  166. package/dist/cjs/api/resources/summary/types/SummaryListTemplatesResponse.d.ts +5 -0
  167. package/dist/cjs/api/resources/summary/types/SummaryTemplate.d.ts +15 -0
  168. package/dist/cjs/api/resources/summary/types/SummaryUpdateTemplateResponse.d.ts +6 -0
  169. package/dist/cjs/api/resources/summary/types/index.d.ts +9 -0
  170. package/dist/cjs/api/{types → resources/summary/types}/index.js +9 -7
  171. package/dist/cjs/api/resources/tools/client/Client.d.ts +2 -2
  172. package/dist/cjs/api/resources/tools/client/Client.js +8 -12
  173. package/dist/cjs/api/resources/tools/client/index.d.ts +0 -1
  174. package/dist/cjs/api/resources/tools/client/requests/index.d.ts +3 -3
  175. package/dist/cjs/api/resources/tools/errors/BadRequestError.d.ts +1 -1
  176. package/dist/cjs/api/resources/tools/errors/FailedDependencyError.d.ts +1 -1
  177. package/dist/cjs/api/resources/tools/errors/ForbiddenError.d.ts +1 -1
  178. package/dist/cjs/api/resources/tools/errors/InternalServerError.d.ts +1 -1
  179. package/dist/cjs/api/resources/tools/errors/UnauthorizedError.d.ts +1 -1
  180. package/dist/cjs/api/resources/tools/errors/index.d.ts +2 -2
  181. package/dist/cjs/api/resources/tools/errors/index.js +2 -2
  182. package/dist/cjs/api/resources/tools/index.d.ts +2 -2
  183. package/dist/cjs/api/resources/tools/index.js +2 -2
  184. package/dist/cjs/api/resources/tools/resources/index.d.ts +1 -1
  185. package/dist/cjs/api/resources/tools/resources/index.js +4 -4
  186. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.d.ts +2 -2
  187. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +11 -15
  188. package/dist/cjs/api/resources/tools/resources/mcpServer/client/index.d.ts +0 -1
  189. package/dist/cjs/api/resources/tools/resources/mcpServer/client/requests/index.d.ts +1 -1
  190. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/index.d.ts +1 -1
  191. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/index.js +4 -4
  192. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +2 -2
  193. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +13 -17
  194. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/index.d.ts +0 -1
  195. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.d.ts +1 -1
  196. package/dist/cjs/api/resources/tools/types/CohortResponse.d.ts +1 -1
  197. package/dist/cjs/api/resources/tools/types/index.d.ts +1 -1
  198. package/dist/cjs/api/resources/tools/types/index.js +1 -1
  199. package/dist/cjs/api/resources/workflows/client/Client.d.ts +119 -17
  200. package/dist/cjs/api/resources/workflows/client/Client.js +399 -56
  201. package/dist/cjs/api/resources/workflows/client/index.d.ts +1 -1
  202. package/dist/cjs/api/resources/workflows/client/index.js +15 -0
  203. package/dist/cjs/api/resources/workflows/client/requests/WorkflowsListRequest.js +3 -0
  204. package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +5 -0
  205. package/dist/cjs/api/resources/workflows/errors/BadRequestError.d.ts +1 -1
  206. package/dist/cjs/api/resources/workflows/errors/ForbiddenError.d.ts +1 -1
  207. package/dist/cjs/api/resources/workflows/errors/InternalServerError.d.ts +1 -1
  208. package/dist/cjs/api/resources/workflows/errors/NotFoundError.d.ts +1 -1
  209. package/dist/cjs/api/resources/workflows/errors/UnauthorizedError.d.ts +1 -1
  210. package/dist/cjs/api/resources/workflows/errors/index.d.ts +2 -2
  211. package/dist/cjs/api/resources/workflows/errors/index.js +2 -2
  212. package/dist/cjs/api/resources/workflows/index.d.ts +2 -3
  213. package/dist/cjs/api/resources/workflows/index.js +2 -3
  214. package/dist/cjs/api/resources/workflows/types/CreateWorkflowResponse.d.ts +1 -1
  215. package/dist/cjs/api/resources/workflows/types/ListWorkflowsResponse.d.ts +1 -1
  216. package/dist/cjs/api/resources/workflows/types/StepOperation.d.ts +1 -1
  217. package/dist/cjs/api/resources/workflows/types/WorkflowDefinition.d.ts +1 -1
  218. package/dist/cjs/api/resources/workflows/types/WorkflowGraph.d.ts +1 -1
  219. package/dist/cjs/api/resources/workflows/types/WorkflowResponse.d.ts +1 -1
  220. package/dist/cjs/api/resources/workflows/types/WorkflowStep.d.ts +1 -1
  221. package/dist/cjs/api/resources/workflows/types/WorkflowsDeleteResponse.js +3 -0
  222. package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsGetResponse.d.ts +1 -1
  223. package/dist/cjs/api/resources/workflows/types/WorkflowsGetResponse.js +3 -0
  224. package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsUpdateResponse.d.ts +1 -1
  225. package/dist/cjs/api/resources/workflows/types/WorkflowsUpdateResponse.js +3 -0
  226. package/dist/cjs/api/resources/workflows/types/index.d.ts +11 -8
  227. package/dist/cjs/api/resources/workflows/types/index.js +11 -8
  228. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +1 -1
  229. package/dist/cjs/core/fetcher/Fetcher.js +2 -1
  230. package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
  231. package/dist/cjs/core/fetcher/getResponseBody.js +3 -3
  232. package/dist/cjs/core/fetcher/makeRequest.js +2 -2
  233. package/dist/cjs/core/fetcher/requestWithRetries.js +3 -3
  234. package/dist/cjs/core/index.d.ts +2 -2
  235. package/dist/cjs/core/index.js +2 -2
  236. package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
  237. package/dist/cjs/core/url/encodePathParam.js +21 -0
  238. package/dist/cjs/core/url/index.d.ts +1 -0
  239. package/dist/cjs/core/url/index.js +3 -1
  240. package/dist/cjs/core/url/join.js +3 -3
  241. package/dist/cjs/errors/phenomlError.d.ts +1 -1
  242. package/dist/cjs/errors/phenomlError.js +1 -1
  243. package/dist/cjs/version.d.ts +1 -1
  244. package/dist/cjs/version.js +1 -1
  245. package/dist/esm/BaseClient.d.mts +3 -3
  246. package/dist/esm/BaseClient.mjs +1 -2
  247. package/dist/esm/Client.d.mts +5 -2
  248. package/dist/esm/Client.mjs +10 -6
  249. package/dist/esm/api/index.d.mts +0 -1
  250. package/dist/esm/api/index.mjs +0 -1
  251. package/dist/esm/api/resources/agent/client/Client.d.mts +2 -2
  252. package/dist/esm/api/resources/agent/client/Client.mjs +23 -27
  253. package/dist/esm/api/resources/agent/client/index.d.mts +0 -1
  254. package/dist/esm/api/resources/agent/client/index.mjs +0 -1
  255. package/dist/esm/api/resources/agent/client/requests/AgentGetChatMessagesRequest.d.mts +1 -1
  256. package/dist/esm/api/resources/agent/client/requests/AgentGetChatMessagesRequest.mjs +1 -1
  257. package/dist/esm/api/resources/agent/client/requests/index.d.mts +3 -3
  258. package/dist/esm/api/resources/agent/client/requests/index.mjs +1 -3
  259. package/dist/esm/api/resources/agent/errors/BadRequestError.d.mts +1 -1
  260. package/dist/esm/api/resources/agent/errors/BadRequestError.mjs +0 -1
  261. package/dist/esm/api/resources/agent/errors/ForbiddenError.d.mts +1 -1
  262. package/dist/esm/api/resources/agent/errors/ForbiddenError.mjs +0 -1
  263. package/dist/esm/api/resources/agent/errors/InternalServerError.d.mts +1 -1
  264. package/dist/esm/api/resources/agent/errors/InternalServerError.mjs +0 -1
  265. package/dist/esm/api/resources/agent/errors/NotFoundError.d.mts +1 -1
  266. package/dist/esm/api/resources/agent/errors/NotFoundError.mjs +0 -1
  267. package/dist/esm/api/resources/agent/errors/UnauthorizedError.d.mts +1 -1
  268. package/dist/esm/api/resources/agent/errors/UnauthorizedError.mjs +0 -1
  269. package/dist/esm/api/resources/agent/errors/index.d.mts +1 -1
  270. package/dist/esm/api/resources/agent/errors/index.mjs +1 -1
  271. package/dist/esm/api/resources/agent/index.d.mts +3 -3
  272. package/dist/esm/api/resources/agent/index.mjs +3 -3
  273. package/dist/esm/api/resources/agent/resources/index.d.mts +1 -1
  274. package/dist/esm/api/resources/agent/resources/index.mjs +1 -1
  275. package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +2 -2
  276. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +16 -20
  277. package/dist/esm/api/resources/agent/resources/prompts/client/index.d.mts +0 -1
  278. package/dist/esm/api/resources/agent/resources/prompts/client/index.mjs +0 -1
  279. package/dist/esm/api/resources/agent/resources/prompts/client/requests/index.d.mts +2 -2
  280. package/dist/esm/api/resources/agent/resources/prompts/client/requests/index.mjs +1 -2
  281. package/dist/esm/api/resources/agent/resources/prompts/index.d.mts +1 -1
  282. package/dist/esm/api/resources/agent/resources/prompts/index.mjs +1 -1
  283. package/dist/esm/api/resources/agent/resources/prompts/types/PromptsListResponse.d.mts +1 -1
  284. package/dist/esm/api/resources/agent/resources/prompts/types/PromptsListResponse.mjs +1 -1
  285. package/dist/esm/api/resources/agent/resources/prompts/types/index.d.mts +1 -1
  286. package/dist/esm/api/resources/agent/resources/prompts/types/index.mjs +1 -1
  287. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesResponse.d.mts +1 -1
  288. package/dist/esm/api/resources/agent/types/AgentGetChatMessagesResponse.mjs +1 -1
  289. package/dist/esm/api/resources/agent/types/AgentListResponse.d.mts +1 -1
  290. package/dist/esm/api/resources/agent/types/AgentListResponse.mjs +1 -1
  291. package/dist/esm/api/resources/agent/types/AgentPromptsResponse.d.mts +1 -1
  292. package/dist/esm/api/resources/agent/types/AgentPromptsResponse.mjs +1 -1
  293. package/dist/esm/api/resources/agent/types/AgentResponse.d.mts +1 -1
  294. package/dist/esm/api/resources/agent/types/AgentResponse.mjs +1 -1
  295. package/dist/esm/api/resources/agent/types/JsonPatch.d.mts +1 -1
  296. package/dist/esm/api/resources/agent/types/JsonPatch.mjs +1 -1
  297. package/dist/esm/api/resources/agent/types/index.d.mts +7 -7
  298. package/dist/esm/api/resources/agent/types/index.mjs +7 -7
  299. package/dist/esm/api/resources/authtoken/client/Client.d.mts +1 -1
  300. package/dist/esm/api/resources/authtoken/client/Client.mjs +1 -3
  301. package/dist/esm/api/resources/authtoken/errors/BadRequestError.d.mts +1 -1
  302. package/dist/esm/api/resources/authtoken/errors/BadRequestError.mjs +0 -1
  303. package/dist/esm/api/resources/authtoken/errors/UnauthorizedError.d.mts +1 -1
  304. package/dist/esm/api/resources/authtoken/errors/UnauthorizedError.mjs +0 -1
  305. package/dist/esm/api/resources/authtoken/index.d.mts +2 -2
  306. package/dist/esm/api/resources/authtoken/index.mjs +2 -2
  307. package/dist/esm/api/resources/authtoken/resources/auth/client/index.d.mts +0 -1
  308. package/dist/esm/api/resources/authtoken/resources/auth/client/index.mjs +0 -1
  309. package/dist/esm/api/resources/authtoken/resources/auth/client/requests/index.d.mts +1 -1
  310. package/dist/esm/api/resources/authtoken/resources/auth/client/requests/index.mjs +1 -1
  311. package/dist/esm/api/resources/authtoken/resources/auth/index.d.mts +1 -1
  312. package/dist/esm/api/resources/authtoken/resources/auth/index.mjs +1 -1
  313. package/dist/esm/api/resources/authtoken/resources/index.d.mts +1 -1
  314. package/dist/esm/api/resources/authtoken/resources/index.mjs +1 -1
  315. package/dist/esm/api/resources/cohort/client/Client.d.mts +2 -2
  316. package/dist/esm/api/resources/cohort/client/Client.mjs +6 -10
  317. package/dist/esm/api/resources/cohort/client/index.d.mts +0 -1
  318. package/dist/esm/api/resources/cohort/client/index.mjs +0 -1
  319. package/dist/esm/api/resources/cohort/client/requests/index.d.mts +1 -1
  320. package/dist/esm/api/resources/cohort/client/requests/index.mjs +1 -1
  321. package/dist/esm/api/resources/cohort/errors/BadRequestError.d.mts +1 -1
  322. package/dist/esm/api/resources/cohort/errors/BadRequestError.mjs +0 -1
  323. package/dist/esm/api/resources/cohort/errors/InternalServerError.d.mts +1 -1
  324. package/dist/esm/api/resources/cohort/errors/InternalServerError.mjs +0 -1
  325. package/dist/esm/api/resources/cohort/errors/UnauthorizedError.d.mts +1 -1
  326. package/dist/esm/api/resources/cohort/errors/UnauthorizedError.mjs +0 -1
  327. package/dist/esm/api/resources/cohort/errors/index.d.mts +1 -1
  328. package/dist/esm/api/resources/cohort/errors/index.mjs +1 -1
  329. package/dist/esm/api/resources/cohort/index.d.mts +2 -2
  330. package/dist/esm/api/resources/cohort/index.mjs +2 -2
  331. package/dist/esm/api/resources/cohort/types/CohortResponse.d.mts +1 -1
  332. package/dist/esm/api/resources/cohort/types/CohortResponse.mjs +1 -1
  333. package/dist/esm/api/resources/construe/client/Client.d.mts +2 -2
  334. package/dist/esm/api/resources/construe/client/Client.mjs +8 -12
  335. package/dist/esm/api/resources/construe/client/index.d.mts +0 -1
  336. package/dist/esm/api/resources/construe/client/index.mjs +0 -1
  337. package/dist/esm/api/resources/construe/client/requests/ExtractRequest.d.mts +1 -1
  338. package/dist/esm/api/resources/construe/client/requests/ExtractRequest.mjs +1 -1
  339. package/dist/esm/api/resources/construe/client/requests/index.d.mts +3 -3
  340. package/dist/esm/api/resources/construe/client/requests/index.mjs +1 -3
  341. package/dist/esm/api/resources/construe/errors/BadRequestError.d.mts +1 -1
  342. package/dist/esm/api/resources/construe/errors/BadRequestError.mjs +0 -1
  343. package/dist/esm/api/resources/construe/errors/ConflictError.d.mts +1 -1
  344. package/dist/esm/api/resources/construe/errors/ConflictError.mjs +0 -1
  345. package/dist/esm/api/resources/construe/errors/FailedDependencyError.d.mts +1 -1
  346. package/dist/esm/api/resources/construe/errors/FailedDependencyError.mjs +0 -1
  347. package/dist/esm/api/resources/construe/errors/InternalServerError.d.mts +1 -1
  348. package/dist/esm/api/resources/construe/errors/InternalServerError.mjs +0 -1
  349. package/dist/esm/api/resources/construe/errors/UnauthorizedError.d.mts +1 -1
  350. package/dist/esm/api/resources/construe/errors/UnauthorizedError.mjs +0 -1
  351. package/dist/esm/api/resources/construe/errors/index.d.mts +1 -1
  352. package/dist/esm/api/resources/construe/errors/index.mjs +1 -1
  353. package/dist/esm/api/resources/construe/index.d.mts +2 -2
  354. package/dist/esm/api/resources/construe/index.mjs +2 -2
  355. package/dist/esm/api/resources/construe/types/ExtractCodesResult.d.mts +1 -1
  356. package/dist/esm/api/resources/construe/types/ExtractCodesResult.mjs +1 -1
  357. package/dist/esm/api/resources/construe/types/index.d.mts +6 -6
  358. package/dist/esm/api/resources/construe/types/index.mjs +6 -6
  359. package/dist/esm/api/resources/fhir/client/Client.d.mts +2 -2
  360. package/dist/esm/api/resources/fhir/client/Client.mjs +18 -22
  361. package/dist/esm/api/resources/fhir/client/index.d.mts +0 -1
  362. package/dist/esm/api/resources/fhir/client/index.mjs +0 -1
  363. package/dist/esm/api/resources/fhir/client/requests/FhirCreateRequest.d.mts +1 -1
  364. package/dist/esm/api/resources/fhir/client/requests/FhirCreateRequest.mjs +1 -1
  365. package/dist/esm/api/resources/fhir/client/requests/FhirExecuteBundleRequest.d.mts +1 -1
  366. package/dist/esm/api/resources/fhir/client/requests/FhirExecuteBundleRequest.mjs +1 -1
  367. package/dist/esm/api/resources/fhir/client/requests/FhirPatchRequest.d.mts +1 -1
  368. package/dist/esm/api/resources/fhir/client/requests/FhirPatchRequest.mjs +1 -1
  369. package/dist/esm/api/resources/fhir/client/requests/FhirUpsertRequest.d.mts +1 -1
  370. package/dist/esm/api/resources/fhir/client/requests/FhirUpsertRequest.mjs +1 -1
  371. package/dist/esm/api/resources/fhir/client/requests/index.d.mts +6 -6
  372. package/dist/esm/api/resources/fhir/client/requests/index.mjs +1 -6
  373. package/dist/esm/api/resources/fhir/errors/BadRequestError.d.mts +1 -1
  374. package/dist/esm/api/resources/fhir/errors/BadRequestError.mjs +0 -1
  375. package/dist/esm/api/resources/fhir/errors/InternalServerError.d.mts +1 -1
  376. package/dist/esm/api/resources/fhir/errors/InternalServerError.mjs +0 -1
  377. package/dist/esm/api/resources/fhir/errors/NotFoundError.d.mts +1 -1
  378. package/dist/esm/api/resources/fhir/errors/NotFoundError.mjs +0 -1
  379. package/dist/esm/api/resources/fhir/errors/UnauthorizedError.d.mts +1 -1
  380. package/dist/esm/api/resources/fhir/errors/UnauthorizedError.mjs +0 -1
  381. package/dist/esm/api/resources/fhir/errors/index.d.mts +2 -2
  382. package/dist/esm/api/resources/fhir/errors/index.mjs +2 -2
  383. package/dist/esm/api/resources/fhir/index.d.mts +2 -2
  384. package/dist/esm/api/resources/fhir/index.mjs +2 -2
  385. package/dist/esm/api/resources/fhir/types/FhirSearchResponse.d.mts +1 -1
  386. package/dist/esm/api/resources/fhir/types/FhirSearchResponse.mjs +1 -1
  387. package/dist/esm/api/resources/fhir/types/index.d.mts +3 -3
  388. package/dist/esm/api/resources/fhir/types/index.mjs +3 -3
  389. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +2 -2
  390. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +17 -21
  391. package/dist/esm/api/resources/fhirProvider/client/index.d.mts +0 -1
  392. package/dist/esm/api/resources/fhirProvider/client/index.mjs +0 -1
  393. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.d.mts +1 -1
  394. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.mjs +1 -1
  395. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.mts +1 -1
  396. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.mjs +1 -1
  397. package/dist/esm/api/resources/fhirProvider/client/requests/index.d.mts +4 -4
  398. package/dist/esm/api/resources/fhirProvider/client/requests/index.mjs +1 -4
  399. package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.d.mts +1 -1
  400. package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.mjs +0 -1
  401. package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.d.mts +1 -1
  402. package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.mjs +0 -1
  403. package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.d.mts +1 -1
  404. package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.mjs +0 -1
  405. package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.d.mts +1 -1
  406. package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.mjs +0 -1
  407. package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.d.mts +1 -1
  408. package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.mjs +0 -1
  409. package/dist/esm/api/resources/fhirProvider/errors/index.d.mts +1 -1
  410. package/dist/esm/api/resources/fhirProvider/errors/index.mjs +1 -1
  411. package/dist/esm/api/resources/fhirProvider/index.d.mts +2 -2
  412. package/dist/esm/api/resources/fhirProvider/index.mjs +2 -2
  413. package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.mts +1 -1
  414. package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.mjs +1 -1
  415. package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.d.mts +1 -1
  416. package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.mjs +1 -1
  417. package/dist/esm/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.mts +1 -1
  418. package/dist/esm/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.mjs +1 -1
  419. package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.d.mts +1 -1
  420. package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.mjs +1 -1
  421. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.mts +1 -1
  422. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.mjs +1 -1
  423. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +1 -1
  424. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.mjs +1 -1
  425. package/dist/esm/api/resources/fhirProvider/types/index.d.mts +7 -7
  426. package/dist/esm/api/resources/fhirProvider/types/index.mjs +7 -7
  427. package/dist/esm/api/resources/index.d.mts +1 -0
  428. package/dist/esm/api/resources/index.mjs +1 -0
  429. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +2 -2
  430. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +9 -13
  431. package/dist/esm/api/resources/lang2Fhir/client/index.d.mts +0 -1
  432. package/dist/esm/api/resources/lang2Fhir/client/index.mjs +0 -1
  433. package/dist/esm/api/resources/lang2Fhir/client/requests/index.d.mts +4 -4
  434. package/dist/esm/api/resources/lang2Fhir/client/requests/index.mjs +1 -4
  435. package/dist/esm/api/resources/lang2Fhir/errors/BadRequestError.d.mts +1 -1
  436. package/dist/esm/api/resources/lang2Fhir/errors/BadRequestError.mjs +0 -1
  437. package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.d.mts +1 -1
  438. package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.mjs +0 -1
  439. package/dist/esm/api/resources/lang2Fhir/errors/ForbiddenError.d.mts +1 -1
  440. package/dist/esm/api/resources/lang2Fhir/errors/ForbiddenError.mjs +0 -1
  441. package/dist/esm/api/resources/lang2Fhir/errors/InternalServerError.d.mts +1 -1
  442. package/dist/esm/api/resources/lang2Fhir/errors/InternalServerError.mjs +0 -1
  443. package/dist/esm/api/resources/lang2Fhir/errors/UnauthorizedError.d.mts +1 -1
  444. package/dist/esm/api/resources/lang2Fhir/errors/UnauthorizedError.mjs +0 -1
  445. package/dist/esm/api/resources/lang2Fhir/errors/index.d.mts +2 -2
  446. package/dist/esm/api/resources/lang2Fhir/errors/index.mjs +2 -2
  447. package/dist/esm/api/resources/lang2Fhir/index.d.mts +2 -2
  448. package/dist/esm/api/resources/lang2Fhir/index.mjs +2 -2
  449. package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +1 -1
  450. package/dist/esm/api/resources/lang2Fhir/types/index.mjs +1 -1
  451. package/dist/esm/api/resources/summary/client/Client.d.mts +125 -0
  452. package/dist/esm/api/resources/{workflows/resources/workflows → summary}/client/Client.mjs +134 -193
  453. package/dist/esm/api/resources/{workflows/resources/workflows → summary}/client/index.d.mts +0 -1
  454. package/dist/esm/api/resources/{workflows/resources/workflows → summary}/client/index.mjs +0 -1
  455. package/dist/esm/api/resources/summary/client/requests/CreateSummaryRequest.d.mts +37 -0
  456. package/dist/esm/api/resources/summary/client/requests/CreateSummaryRequest.mjs +13 -0
  457. package/dist/esm/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.mts +23 -0
  458. package/dist/esm/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.mts +18 -0
  459. package/dist/esm/api/resources/summary/client/requests/index.d.mts +3 -0
  460. package/dist/esm/api/resources/summary/errors/BadRequestError.d.mts +5 -0
  461. package/dist/esm/api/resources/summary/errors/BadRequestError.mjs +13 -0
  462. package/dist/esm/api/resources/summary/errors/ForbiddenError.d.mts +5 -0
  463. package/dist/esm/api/resources/summary/errors/ForbiddenError.mjs +13 -0
  464. package/dist/esm/api/resources/summary/errors/InternalServerError.d.mts +5 -0
  465. package/dist/esm/api/resources/summary/errors/InternalServerError.mjs +13 -0
  466. package/dist/esm/api/resources/summary/errors/NotFoundError.d.mts +5 -0
  467. package/dist/esm/api/resources/summary/errors/NotFoundError.mjs +13 -0
  468. package/dist/esm/api/resources/summary/errors/UnauthorizedError.d.mts +5 -0
  469. package/dist/esm/api/resources/summary/errors/UnauthorizedError.mjs +13 -0
  470. package/dist/esm/api/resources/summary/errors/index.d.mts +5 -0
  471. package/dist/esm/api/resources/summary/errors/index.mjs +5 -0
  472. package/dist/esm/api/resources/{workflows/resources/workflows → summary}/index.d.mts +2 -1
  473. package/dist/esm/api/resources/{workflows/resources/workflows → summary}/index.mjs +2 -1
  474. package/dist/esm/api/resources/summary/types/CreateSummaryResponse.d.mts +8 -0
  475. package/dist/esm/api/resources/summary/types/CreateSummaryTemplateResponse.d.mts +7 -0
  476. package/dist/esm/api/resources/summary/types/FhirBundle.d.mts +13 -0
  477. package/dist/esm/api/resources/summary/types/FhirResource.d.mts +6 -0
  478. package/dist/esm/api/resources/summary/types/SummaryDeleteTemplateResponse.d.mts +4 -0
  479. package/dist/esm/api/resources/summary/types/SummaryGetTemplateResponse.d.mts +5 -0
  480. package/dist/esm/api/resources/summary/types/SummaryListTemplatesResponse.d.mts +5 -0
  481. package/dist/esm/api/resources/summary/types/SummaryTemplate.d.mts +15 -0
  482. package/dist/esm/api/resources/summary/types/SummaryUpdateTemplateResponse.d.mts +6 -0
  483. package/dist/esm/api/resources/summary/types/index.d.mts +9 -0
  484. package/dist/esm/api/resources/summary/types/index.mjs +9 -0
  485. package/dist/esm/api/resources/tools/client/Client.d.mts +2 -2
  486. package/dist/esm/api/resources/tools/client/Client.mjs +8 -12
  487. package/dist/esm/api/resources/tools/client/index.d.mts +0 -1
  488. package/dist/esm/api/resources/tools/client/index.mjs +0 -1
  489. package/dist/esm/api/resources/tools/client/requests/index.d.mts +3 -3
  490. package/dist/esm/api/resources/tools/client/requests/index.mjs +1 -3
  491. package/dist/esm/api/resources/tools/errors/BadRequestError.d.mts +1 -1
  492. package/dist/esm/api/resources/tools/errors/BadRequestError.mjs +0 -1
  493. package/dist/esm/api/resources/tools/errors/FailedDependencyError.d.mts +1 -1
  494. package/dist/esm/api/resources/tools/errors/FailedDependencyError.mjs +0 -1
  495. package/dist/esm/api/resources/tools/errors/ForbiddenError.d.mts +1 -1
  496. package/dist/esm/api/resources/tools/errors/ForbiddenError.mjs +0 -1
  497. package/dist/esm/api/resources/tools/errors/InternalServerError.d.mts +1 -1
  498. package/dist/esm/api/resources/tools/errors/InternalServerError.mjs +0 -1
  499. package/dist/esm/api/resources/tools/errors/UnauthorizedError.d.mts +1 -1
  500. package/dist/esm/api/resources/tools/errors/UnauthorizedError.mjs +0 -1
  501. package/dist/esm/api/resources/tools/errors/index.d.mts +2 -2
  502. package/dist/esm/api/resources/tools/errors/index.mjs +2 -2
  503. package/dist/esm/api/resources/tools/index.d.mts +2 -2
  504. package/dist/esm/api/resources/tools/index.mjs +2 -2
  505. package/dist/esm/api/resources/tools/resources/index.d.mts +1 -1
  506. package/dist/esm/api/resources/tools/resources/index.mjs +1 -1
  507. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.d.mts +2 -2
  508. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +11 -15
  509. package/dist/esm/api/resources/tools/resources/mcpServer/client/index.d.mts +0 -1
  510. package/dist/esm/api/resources/tools/resources/mcpServer/client/index.mjs +0 -1
  511. package/dist/esm/api/resources/tools/resources/mcpServer/client/requests/index.d.mts +1 -1
  512. package/dist/esm/api/resources/tools/resources/mcpServer/client/requests/index.mjs +1 -1
  513. package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.d.mts +1 -1
  514. package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.mjs +1 -1
  515. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +2 -2
  516. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +13 -17
  517. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/index.d.mts +0 -1
  518. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/index.mjs +0 -1
  519. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.d.mts +1 -1
  520. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.mjs +1 -1
  521. package/dist/esm/api/resources/tools/types/CohortResponse.d.mts +1 -1
  522. package/dist/esm/api/resources/tools/types/CohortResponse.mjs +1 -1
  523. package/dist/esm/api/resources/tools/types/index.d.mts +1 -1
  524. package/dist/esm/api/resources/tools/types/index.mjs +1 -1
  525. package/dist/esm/api/resources/workflows/client/Client.d.mts +119 -17
  526. package/dist/esm/api/resources/workflows/client/Client.mjs +399 -56
  527. package/dist/esm/api/resources/workflows/client/index.d.mts +1 -1
  528. package/dist/esm/api/resources/workflows/client/index.mjs +1 -1
  529. package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowRequest.mjs +2 -0
  530. package/dist/esm/api/resources/workflows/client/requests/WorkflowsGetRequest.mjs +2 -0
  531. package/dist/esm/api/resources/workflows/client/requests/WorkflowsListRequest.mjs +2 -0
  532. package/dist/esm/api/resources/workflows/client/requests/index.d.mts +5 -0
  533. package/dist/esm/api/resources/workflows/errors/BadRequestError.d.mts +1 -1
  534. package/dist/esm/api/resources/workflows/errors/BadRequestError.mjs +0 -1
  535. package/dist/esm/api/resources/workflows/errors/ForbiddenError.d.mts +1 -1
  536. package/dist/esm/api/resources/workflows/errors/ForbiddenError.mjs +0 -1
  537. package/dist/esm/api/resources/workflows/errors/InternalServerError.d.mts +1 -1
  538. package/dist/esm/api/resources/workflows/errors/InternalServerError.mjs +0 -1
  539. package/dist/esm/api/resources/workflows/errors/NotFoundError.d.mts +1 -1
  540. package/dist/esm/api/resources/workflows/errors/NotFoundError.mjs +0 -1
  541. package/dist/esm/api/resources/workflows/errors/UnauthorizedError.d.mts +1 -1
  542. package/dist/esm/api/resources/workflows/errors/UnauthorizedError.mjs +0 -1
  543. package/dist/esm/api/resources/workflows/errors/index.d.mts +2 -2
  544. package/dist/esm/api/resources/workflows/errors/index.mjs +2 -2
  545. package/dist/esm/api/resources/workflows/index.d.mts +2 -3
  546. package/dist/esm/api/resources/workflows/index.mjs +2 -3
  547. package/dist/esm/api/resources/workflows/types/CreateWorkflowResponse.d.mts +1 -1
  548. package/dist/esm/api/resources/workflows/types/CreateWorkflowResponse.mjs +1 -1
  549. package/dist/esm/api/resources/workflows/types/ListWorkflowsResponse.d.mts +1 -1
  550. package/dist/esm/api/resources/workflows/types/ListWorkflowsResponse.mjs +1 -1
  551. package/dist/esm/api/resources/workflows/types/StepOperation.d.mts +1 -1
  552. package/dist/esm/api/resources/workflows/types/StepOperation.mjs +1 -1
  553. package/dist/esm/api/resources/workflows/types/WorkflowDefinition.d.mts +1 -1
  554. package/dist/esm/api/resources/workflows/types/WorkflowDefinition.mjs +1 -1
  555. package/dist/esm/api/resources/workflows/types/WorkflowGraph.d.mts +1 -1
  556. package/dist/esm/api/resources/workflows/types/WorkflowGraph.mjs +1 -1
  557. package/dist/esm/api/resources/workflows/types/WorkflowResponse.d.mts +1 -1
  558. package/dist/esm/api/resources/workflows/types/WorkflowResponse.mjs +1 -1
  559. package/dist/esm/api/resources/workflows/types/WorkflowStep.d.mts +1 -1
  560. package/dist/esm/api/resources/workflows/types/WorkflowStep.mjs +0 -1
  561. package/dist/esm/api/resources/workflows/types/WorkflowsDeleteResponse.mjs +2 -0
  562. package/dist/esm/api/resources/workflows/{resources/workflows/types → types}/WorkflowsGetResponse.d.mts +1 -1
  563. package/dist/esm/api/resources/workflows/types/WorkflowsGetResponse.mjs +2 -0
  564. package/dist/esm/api/resources/workflows/{resources/workflows/types → types}/WorkflowsUpdateResponse.d.mts +1 -1
  565. package/dist/esm/api/resources/workflows/types/WorkflowsUpdateResponse.mjs +2 -0
  566. package/dist/esm/api/resources/workflows/types/index.d.mts +11 -8
  567. package/dist/esm/api/resources/workflows/types/index.mjs +11 -8
  568. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +1 -1
  569. package/dist/esm/core/fetcher/EndpointSupplier.mjs +0 -1
  570. package/dist/esm/core/fetcher/Fetcher.mjs +2 -1
  571. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
  572. package/dist/esm/core/fetcher/getResponseBody.mjs +3 -3
  573. package/dist/esm/core/fetcher/makeRequest.mjs +2 -2
  574. package/dist/esm/core/fetcher/requestWithRetries.mjs +3 -3
  575. package/dist/esm/core/index.d.mts +2 -2
  576. package/dist/esm/core/index.mjs +2 -2
  577. package/dist/esm/core/url/encodePathParam.d.mts +1 -0
  578. package/dist/esm/core/url/encodePathParam.mjs +18 -0
  579. package/dist/esm/core/url/index.d.mts +1 -0
  580. package/dist/esm/core/url/index.mjs +1 -0
  581. package/dist/esm/core/url/join.mjs +3 -3
  582. package/dist/esm/errors/phenomlError.d.mts +1 -1
  583. package/dist/esm/errors/phenomlError.mjs +1 -2
  584. package/dist/esm/version.d.mts +1 -1
  585. package/dist/esm/version.mjs +1 -1
  586. package/package.json +16 -15
  587. package/reference.md +636 -766
  588. package/dist/cjs/api/resources/workflows/resources/index.d.ts +0 -4
  589. package/dist/cjs/api/resources/workflows/resources/mcpServer/client/Client.d.ts +0 -50
  590. package/dist/cjs/api/resources/workflows/resources/mcpServer/client/Client.js +0 -268
  591. package/dist/cjs/api/resources/workflows/resources/mcpServer/client/index.d.ts +0 -1
  592. package/dist/cjs/api/resources/workflows/resources/mcpServer/index.d.ts +0 -2
  593. package/dist/cjs/api/resources/workflows/resources/mcpServer/index.js +0 -18
  594. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/index.d.ts +0 -1
  595. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/client/Client.d.ts +0 -49
  596. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/client/Client.js +0 -265
  597. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/client/index.d.ts +0 -1
  598. package/dist/cjs/api/resources/workflows/resources/mcpServer/resources/tools/index.d.ts +0 -1
  599. package/dist/cjs/api/resources/workflows/resources/workflows/client/Client.d.ts +0 -145
  600. package/dist/cjs/api/resources/workflows/resources/workflows/client/requests/index.d.ts +0 -5
  601. package/dist/cjs/api/resources/workflows/resources/workflows/client/requests/index.js +0 -2
  602. package/dist/cjs/api/resources/workflows/resources/workflows/types/index.d.ts +0 -3
  603. package/dist/cjs/api/resources/workflows/resources/workflows/types/index.js +0 -19
  604. package/dist/cjs/api/types/CohortResponse.d.ts +0 -1
  605. package/dist/cjs/api/types/Lang2FhirAndCreateResponse.d.ts +0 -1
  606. package/dist/cjs/api/types/Lang2FhirAndSearchResponse.d.ts +0 -1
  607. package/dist/cjs/api/types/McpServerResponse.d.ts +0 -1
  608. package/dist/cjs/api/types/McpServerToolCallResponse.d.ts +0 -1
  609. package/dist/cjs/api/types/McpServerToolResponse.d.ts +0 -1
  610. package/dist/cjs/api/types/SearchConcept.d.ts +0 -1
  611. package/dist/cjs/api/types/index.d.ts +0 -7
  612. package/dist/esm/api/resources/workflows/resources/index.d.mts +0 -4
  613. package/dist/esm/api/resources/workflows/resources/index.mjs +0 -4
  614. package/dist/esm/api/resources/workflows/resources/mcpServer/client/Client.d.mts +0 -50
  615. package/dist/esm/api/resources/workflows/resources/mcpServer/client/Client.mjs +0 -231
  616. package/dist/esm/api/resources/workflows/resources/mcpServer/client/index.d.mts +0 -1
  617. package/dist/esm/api/resources/workflows/resources/mcpServer/index.d.mts +0 -2
  618. package/dist/esm/api/resources/workflows/resources/mcpServer/index.mjs +0 -2
  619. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/index.d.mts +0 -1
  620. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/index.mjs +0 -1
  621. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/client/Client.d.mts +0 -49
  622. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/client/Client.mjs +0 -228
  623. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/client/index.d.mts +0 -1
  624. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/index.d.mts +0 -1
  625. package/dist/esm/api/resources/workflows/resources/mcpServer/resources/tools/index.mjs +0 -1
  626. package/dist/esm/api/resources/workflows/resources/workflows/client/Client.d.mts +0 -145
  627. package/dist/esm/api/resources/workflows/resources/workflows/client/requests/index.d.mts +0 -5
  628. package/dist/esm/api/resources/workflows/resources/workflows/client/requests/index.mjs +0 -5
  629. package/dist/esm/api/resources/workflows/resources/workflows/types/WorkflowsGetResponse.mjs +0 -2
  630. package/dist/esm/api/resources/workflows/resources/workflows/types/WorkflowsUpdateResponse.mjs +0 -2
  631. package/dist/esm/api/resources/workflows/resources/workflows/types/index.d.mts +0 -3
  632. package/dist/esm/api/resources/workflows/resources/workflows/types/index.mjs +0 -3
  633. package/dist/esm/api/types/CohortResponse.d.mts +0 -1
  634. package/dist/esm/api/types/Lang2FhirAndCreateResponse.d.mts +0 -1
  635. package/dist/esm/api/types/Lang2FhirAndSearchResponse.d.mts +0 -1
  636. package/dist/esm/api/types/McpServerResponse.d.mts +0 -1
  637. package/dist/esm/api/types/McpServerToolCallResponse.d.mts +0 -1
  638. package/dist/esm/api/types/McpServerToolResponse.d.mts +0 -1
  639. package/dist/esm/api/types/SearchConcept.d.mts +0 -1
  640. package/dist/esm/api/types/index.d.mts +0 -7
  641. package/dist/esm/api/types/index.mjs +0 -7
  642. /package/dist/cjs/api/resources/{workflows/resources/workflows → summary}/client/index.js +0 -0
  643. /package/dist/cjs/api/resources/{workflows/resources/workflows/client/requests/CreateWorkflowRequest.js → summary/client/requests/CreateSummaryTemplateRequest.js} +0 -0
  644. /package/dist/cjs/api/resources/{workflows/resources/workflows/client/requests/ExecuteWorkflowRequest.js → summary/client/requests/UpdateSummaryTemplateRequest.js} +0 -0
  645. /package/dist/cjs/api/resources/{workflows/resources/mcpServer/client → summary/client/requests}/index.js +0 -0
  646. /package/dist/cjs/api/resources/{workflows/resources/workflows/client/requests/UpdateWorkflowRequest.js → summary/types/CreateSummaryResponse.js} +0 -0
  647. /package/dist/cjs/api/resources/{workflows/resources/workflows/client/requests/WorkflowsGetRequest.js → summary/types/CreateSummaryTemplateResponse.js} +0 -0
  648. /package/dist/cjs/api/resources/{workflows/resources/workflows/client/requests/WorkflowsListRequest.js → summary/types/FhirBundle.js} +0 -0
  649. /package/dist/cjs/api/resources/{workflows/resources/workflows/types/WorkflowsDeleteResponse.js → summary/types/FhirResource.js} +0 -0
  650. /package/dist/cjs/api/resources/{workflows/resources/workflows/types/WorkflowsGetResponse.js → summary/types/SummaryDeleteTemplateResponse.js} +0 -0
  651. /package/dist/cjs/api/resources/{workflows/resources/workflows/types/WorkflowsUpdateResponse.js → summary/types/SummaryGetTemplateResponse.js} +0 -0
  652. /package/dist/cjs/api/{types/CohortResponse.js → resources/summary/types/SummaryListTemplatesResponse.js} +0 -0
  653. /package/dist/cjs/api/{types/Lang2FhirAndCreateResponse.js → resources/summary/types/SummaryTemplate.js} +0 -0
  654. /package/dist/cjs/api/{types/Lang2FhirAndSearchResponse.js → resources/summary/types/SummaryUpdateTemplateResponse.js} +0 -0
  655. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/CreateWorkflowRequest.d.ts +0 -0
  656. /package/dist/cjs/api/{types/McpServerResponse.js → resources/workflows/client/requests/CreateWorkflowRequest.js} +0 -0
  657. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/ExecuteWorkflowRequest.d.ts +0 -0
  658. /package/dist/cjs/api/{types/McpServerToolCallResponse.js → resources/workflows/client/requests/ExecuteWorkflowRequest.js} +0 -0
  659. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/UpdateWorkflowRequest.d.ts +0 -0
  660. /package/dist/cjs/api/{types/McpServerToolResponse.js → resources/workflows/client/requests/UpdateWorkflowRequest.js} +0 -0
  661. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsGetRequest.d.ts +0 -0
  662. /package/dist/cjs/api/{types/SearchConcept.js → resources/workflows/client/requests/WorkflowsGetRequest.js} +0 -0
  663. /package/dist/cjs/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsListRequest.d.ts +0 -0
  664. /package/dist/cjs/api/resources/workflows/{resources/mcpServer/resources/tools/client → client/requests}/index.js +0 -0
  665. /package/dist/cjs/api/resources/workflows/{resources/workflows/types → types}/WorkflowsDeleteResponse.d.ts +0 -0
  666. /package/dist/esm/api/resources/{workflows/resources/workflows/client/requests/CreateWorkflowRequest.mjs → summary/client/requests/CreateSummaryTemplateRequest.mjs} +0 -0
  667. /package/dist/esm/api/resources/{workflows/resources/workflows/client/requests/ExecuteWorkflowRequest.mjs → summary/client/requests/UpdateSummaryTemplateRequest.mjs} +0 -0
  668. /package/dist/esm/api/resources/{workflows/resources/mcpServer/client → summary/client/requests}/index.mjs +0 -0
  669. /package/dist/esm/api/resources/{workflows/resources/workflows/client/requests/UpdateWorkflowRequest.mjs → summary/types/CreateSummaryResponse.mjs} +0 -0
  670. /package/dist/esm/api/resources/{workflows/resources/workflows/client/requests/WorkflowsGetRequest.mjs → summary/types/CreateSummaryTemplateResponse.mjs} +0 -0
  671. /package/dist/esm/api/resources/{workflows/resources/workflows/client/requests/WorkflowsListRequest.mjs → summary/types/FhirBundle.mjs} +0 -0
  672. /package/dist/esm/api/resources/{workflows/resources/workflows/types/WorkflowsDeleteResponse.mjs → summary/types/FhirResource.mjs} +0 -0
  673. /package/dist/esm/api/{types/CohortResponse.mjs → resources/summary/types/SummaryDeleteTemplateResponse.mjs} +0 -0
  674. /package/dist/esm/api/{types/Lang2FhirAndCreateResponse.mjs → resources/summary/types/SummaryGetTemplateResponse.mjs} +0 -0
  675. /package/dist/esm/api/{types/Lang2FhirAndSearchResponse.mjs → resources/summary/types/SummaryListTemplatesResponse.mjs} +0 -0
  676. /package/dist/esm/api/{types/McpServerResponse.mjs → resources/summary/types/SummaryTemplate.mjs} +0 -0
  677. /package/dist/esm/api/{types/McpServerToolCallResponse.mjs → resources/summary/types/SummaryUpdateTemplateResponse.mjs} +0 -0
  678. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/CreateWorkflowRequest.d.mts +0 -0
  679. /package/dist/esm/api/{types/McpServerToolResponse.mjs → resources/workflows/client/requests/CreateWorkflowRequest.mjs} +0 -0
  680. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/ExecuteWorkflowRequest.d.mts +0 -0
  681. /package/dist/esm/api/{types/SearchConcept.mjs → resources/workflows/client/requests/ExecuteWorkflowRequest.mjs} +0 -0
  682. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/UpdateWorkflowRequest.d.mts +0 -0
  683. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsGetRequest.d.mts +0 -0
  684. /package/dist/esm/api/resources/workflows/{resources/workflows/client → client}/requests/WorkflowsListRequest.d.mts +0 -0
  685. /package/dist/esm/api/resources/workflows/{resources/mcpServer/resources/tools/client → client/requests}/index.mjs +0 -0
  686. /package/dist/esm/api/resources/workflows/{resources/workflows/types → types}/WorkflowsDeleteResponse.d.mts +0 -0
@@ -8,55 +8,251 @@ 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 * as environments from "../../../../environments.mjs";
12
- import * as core from "../../../../core/index.mjs";
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
13
22
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
23
+ import * as core from "../../../../core/index.mjs";
24
+ import * as environments from "../../../../environments.mjs";
14
25
  import * as errors from "../../../../errors/index.mjs";
15
- import { Workflows as Workflows_ } from "../resources/workflows/client/Client.mjs";
16
- import { McpServer } from "../resources/mcpServer/client/Client.mjs";
26
+ import * as phenoml from "../../../index.mjs";
17
27
  export class Workflows {
18
- constructor(_options = {}) {
28
+ constructor(_options) {
19
29
  this._options = _options;
20
30
  }
21
- get workflows() {
22
- var _a;
23
- return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Workflows_(this._options)));
31
+ /**
32
+ * Retrieves all workflow definitions for the authenticated user
33
+ *
34
+ * @param {phenoml.workflows.WorkflowsListRequest} request
35
+ * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link phenoml.workflows.UnauthorizedError}
38
+ * @throws {@link phenoml.workflows.ForbiddenError}
39
+ * @throws {@link phenoml.workflows.InternalServerError}
40
+ *
41
+ * @example
42
+ * await client.workflows.list({
43
+ * verbose: true
44
+ * })
45
+ */
46
+ list(request = {}, requestOptions) {
47
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
24
48
  }
25
- get mcpServer() {
26
- var _a;
27
- return ((_a = this._mcpServer) !== null && _a !== void 0 ? _a : (this._mcpServer = new McpServer(this._options)));
49
+ __list() {
50
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
52
+ const { verbose } = request;
53
+ const _queryParams = {};
54
+ if (verbose != null) {
55
+ _queryParams.verbose = verbose.toString();
56
+ }
57
+ 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);
58
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
59
+ 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, "workflows"),
60
+ method: "GET",
61
+ headers: _headers,
62
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
63
+ 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,
64
+ 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,
65
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
66
+ });
67
+ if (_response.ok) {
68
+ return {
69
+ data: _response.body,
70
+ rawResponse: _response.rawResponse,
71
+ };
72
+ }
73
+ if (_response.error.reason === "status-code") {
74
+ switch (_response.error.statusCode) {
75
+ case 401:
76
+ throw new phenoml.workflows.UnauthorizedError(_response.error.body, _response.rawResponse);
77
+ case 403:
78
+ throw new phenoml.workflows.ForbiddenError(_response.error.body, _response.rawResponse);
79
+ case 500:
80
+ throw new phenoml.workflows.InternalServerError(_response.error.body, _response.rawResponse);
81
+ default:
82
+ throw new errors.phenomlError({
83
+ statusCode: _response.error.statusCode,
84
+ body: _response.error.body,
85
+ rawResponse: _response.rawResponse,
86
+ });
87
+ }
88
+ }
89
+ switch (_response.error.reason) {
90
+ case "non-json":
91
+ throw new errors.phenomlError({
92
+ statusCode: _response.error.statusCode,
93
+ body: _response.error.rawBody,
94
+ rawResponse: _response.rawResponse,
95
+ });
96
+ case "timeout":
97
+ throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /workflows.");
98
+ case "unknown":
99
+ throw new errors.phenomlError({
100
+ message: _response.error.errorMessage,
101
+ rawResponse: _response.rawResponse,
102
+ });
103
+ }
104
+ });
28
105
  }
29
106
  /**
107
+ * Creates a new workflow definition with graph generation from workflow instructions
108
+ *
109
+ * @param {phenoml.workflows.CreateWorkflowRequest} request
30
110
  * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
31
111
  *
112
+ * @throws {@link phenoml.workflows.BadRequestError}
113
+ * @throws {@link phenoml.workflows.UnauthorizedError}
114
+ * @throws {@link phenoml.workflows.ForbiddenError}
115
+ * @throws {@link phenoml.workflows.InternalServerError}
116
+ *
32
117
  * @example
33
- * await client.workflows.createFhirResource()
118
+ * await client.workflows.create({
119
+ * verbose: true,
120
+ * name: "Patient Data Mapping Workflow",
121
+ * workflow_instructions: "Given diagnosis data, find the patient and create condition record",
122
+ * sample_data: {
123
+ * "patient_last_name": "Rippin",
124
+ * "patient_first_name": "Clay",
125
+ * "diagnosis_code": "I10"
126
+ * },
127
+ * fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
128
+ * })
34
129
  */
35
- createFhirResource(requestOptions) {
36
- return core.HttpResponsePromise.fromPromise(this.__createFhirResource(requestOptions));
130
+ create(request, requestOptions) {
131
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
37
132
  }
38
- __createFhirResource(requestOptions) {
133
+ __create(request, requestOptions) {
39
134
  return __awaiter(this, void 0, void 0, function* () {
40
135
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
- let _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);
136
+ const { verbose } = request, _body = __rest(request, ["verbose"]);
137
+ const _queryParams = {};
138
+ if (verbose != null) {
139
+ _queryParams.verbose = verbose.toString();
140
+ }
141
+ 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);
42
142
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
43
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "tools/lang2fhir-and-create"),
143
+ 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, "workflows"),
44
144
  method: "POST",
45
145
  headers: _headers,
46
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
146
+ contentType: "application/json",
147
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
148
+ requestType: "json",
149
+ body: _body,
47
150
  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,
48
151
  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,
49
152
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
50
153
  });
51
154
  if (_response.ok) {
52
- return { data: undefined, rawResponse: _response.rawResponse };
155
+ return {
156
+ data: _response.body,
157
+ rawResponse: _response.rawResponse,
158
+ };
53
159
  }
54
160
  if (_response.error.reason === "status-code") {
55
- throw new errors.phenomlError({
56
- statusCode: _response.error.statusCode,
57
- body: _response.error.body,
161
+ switch (_response.error.statusCode) {
162
+ case 400:
163
+ throw new phenoml.workflows.BadRequestError(_response.error.body, _response.rawResponse);
164
+ case 401:
165
+ throw new phenoml.workflows.UnauthorizedError(_response.error.body, _response.rawResponse);
166
+ case 403:
167
+ throw new phenoml.workflows.ForbiddenError(_response.error.body, _response.rawResponse);
168
+ case 500:
169
+ throw new phenoml.workflows.InternalServerError(_response.error.body, _response.rawResponse);
170
+ default:
171
+ throw new errors.phenomlError({
172
+ statusCode: _response.error.statusCode,
173
+ body: _response.error.body,
174
+ rawResponse: _response.rawResponse,
175
+ });
176
+ }
177
+ }
178
+ switch (_response.error.reason) {
179
+ case "non-json":
180
+ throw new errors.phenomlError({
181
+ statusCode: _response.error.statusCode,
182
+ body: _response.error.rawBody,
183
+ rawResponse: _response.rawResponse,
184
+ });
185
+ case "timeout":
186
+ throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /workflows.");
187
+ case "unknown":
188
+ throw new errors.phenomlError({
189
+ message: _response.error.errorMessage,
190
+ rawResponse: _response.rawResponse,
191
+ });
192
+ }
193
+ });
194
+ }
195
+ /**
196
+ * Retrieves a workflow definition by its ID
197
+ *
198
+ * @param {string} id - ID of the workflow to retrieve
199
+ * @param {phenoml.workflows.WorkflowsGetRequest} request
200
+ * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
201
+ *
202
+ * @throws {@link phenoml.workflows.UnauthorizedError}
203
+ * @throws {@link phenoml.workflows.ForbiddenError}
204
+ * @throws {@link phenoml.workflows.NotFoundError}
205
+ * @throws {@link phenoml.workflows.InternalServerError}
206
+ *
207
+ * @example
208
+ * await client.workflows.get("id", {
209
+ * verbose: true
210
+ * })
211
+ */
212
+ get(id, request = {}, requestOptions) {
213
+ return core.HttpResponsePromise.fromPromise(this.__get(id, request, requestOptions));
214
+ }
215
+ __get(id_1) {
216
+ return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
217
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
218
+ const { verbose } = request;
219
+ const _queryParams = {};
220
+ if (verbose != null) {
221
+ _queryParams.verbose = verbose.toString();
222
+ }
223
+ 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);
224
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
225
+ 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, `workflows/${core.url.encodePathParam(id)}`),
226
+ method: "GET",
227
+ headers: _headers,
228
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
229
+ 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,
230
+ 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,
231
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
232
+ });
233
+ if (_response.ok) {
234
+ return {
235
+ data: _response.body,
58
236
  rawResponse: _response.rawResponse,
59
- });
237
+ };
238
+ }
239
+ if (_response.error.reason === "status-code") {
240
+ switch (_response.error.statusCode) {
241
+ case 401:
242
+ throw new phenoml.workflows.UnauthorizedError(_response.error.body, _response.rawResponse);
243
+ case 403:
244
+ throw new phenoml.workflows.ForbiddenError(_response.error.body, _response.rawResponse);
245
+ case 404:
246
+ throw new phenoml.workflows.NotFoundError(_response.error.body, _response.rawResponse);
247
+ case 500:
248
+ throw new phenoml.workflows.InternalServerError(_response.error.body, _response.rawResponse);
249
+ default:
250
+ throw new errors.phenomlError({
251
+ statusCode: _response.error.statusCode,
252
+ body: _response.error.body,
253
+ rawResponse: _response.rawResponse,
254
+ });
255
+ }
60
256
  }
61
257
  switch (_response.error.reason) {
62
258
  case "non-json":
@@ -66,7 +262,7 @@ export class Workflows {
66
262
  rawResponse: _response.rawResponse,
67
263
  });
68
264
  case "timeout":
69
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /tools/lang2fhir-and-create.");
265
+ throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /workflows/{id}.");
70
266
  case "unknown":
71
267
  throw new errors.phenomlError({
72
268
  message: _response.error.errorMessage,
@@ -76,36 +272,151 @@ export class Workflows {
76
272
  });
77
273
  }
78
274
  /**
275
+ * Updates an existing workflow definition
276
+ *
277
+ * @param {string} id - ID of the workflow to update
278
+ * @param {phenoml.workflows.UpdateWorkflowRequest} request
79
279
  * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
80
280
  *
281
+ * @throws {@link phenoml.workflows.BadRequestError}
282
+ * @throws {@link phenoml.workflows.UnauthorizedError}
283
+ * @throws {@link phenoml.workflows.ForbiddenError}
284
+ * @throws {@link phenoml.workflows.NotFoundError}
285
+ * @throws {@link phenoml.workflows.InternalServerError}
286
+ *
81
287
  * @example
82
- * await client.workflows.searchFhirResources()
288
+ * await client.workflows.update("id", {
289
+ * verbose: true,
290
+ * name: "Updated Patient Data Mapping Workflow",
291
+ * workflow_instructions: "Given diagnosis data, find the patient and create condition record",
292
+ * sample_data: {
293
+ * "patient_last_name": "Smith",
294
+ * "patient_first_name": "John",
295
+ * "diagnosis_code": "E11"
296
+ * },
297
+ * fhir_provider_id: "550e8400-e29b-41d4-a716-446655440000"
298
+ * })
83
299
  */
84
- searchFhirResources(requestOptions) {
85
- return core.HttpResponsePromise.fromPromise(this.__searchFhirResources(requestOptions));
300
+ update(id, request, requestOptions) {
301
+ return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
86
302
  }
87
- __searchFhirResources(requestOptions) {
303
+ __update(id, request, requestOptions) {
88
304
  return __awaiter(this, void 0, void 0, function* () {
89
305
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
90
- let _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);
306
+ const { verbose } = request, _body = __rest(request, ["verbose"]);
307
+ const _queryParams = {};
308
+ if (verbose != null) {
309
+ _queryParams.verbose = verbose.toString();
310
+ }
311
+ 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);
91
312
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
92
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "tools/lang2fhir-and-search"),
93
- method: "POST",
313
+ 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, `workflows/${core.url.encodePathParam(id)}`),
314
+ method: "PUT",
94
315
  headers: _headers,
95
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
316
+ contentType: "application/json",
317
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
318
+ requestType: "json",
319
+ body: _body,
96
320
  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,
97
321
  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,
98
322
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
323
  });
100
324
  if (_response.ok) {
101
- return { data: undefined, rawResponse: _response.rawResponse };
325
+ return {
326
+ data: _response.body,
327
+ rawResponse: _response.rawResponse,
328
+ };
102
329
  }
103
330
  if (_response.error.reason === "status-code") {
104
- throw new errors.phenomlError({
105
- statusCode: _response.error.statusCode,
106
- body: _response.error.body,
331
+ switch (_response.error.statusCode) {
332
+ case 400:
333
+ throw new phenoml.workflows.BadRequestError(_response.error.body, _response.rawResponse);
334
+ case 401:
335
+ throw new phenoml.workflows.UnauthorizedError(_response.error.body, _response.rawResponse);
336
+ case 403:
337
+ throw new phenoml.workflows.ForbiddenError(_response.error.body, _response.rawResponse);
338
+ case 404:
339
+ throw new phenoml.workflows.NotFoundError(_response.error.body, _response.rawResponse);
340
+ case 500:
341
+ throw new phenoml.workflows.InternalServerError(_response.error.body, _response.rawResponse);
342
+ default:
343
+ throw new errors.phenomlError({
344
+ statusCode: _response.error.statusCode,
345
+ body: _response.error.body,
346
+ rawResponse: _response.rawResponse,
347
+ });
348
+ }
349
+ }
350
+ switch (_response.error.reason) {
351
+ case "non-json":
352
+ throw new errors.phenomlError({
353
+ statusCode: _response.error.statusCode,
354
+ body: _response.error.rawBody,
355
+ rawResponse: _response.rawResponse,
356
+ });
357
+ case "timeout":
358
+ throw new errors.phenomlTimeoutError("Timeout exceeded when calling PUT /workflows/{id}.");
359
+ case "unknown":
360
+ throw new errors.phenomlError({
361
+ message: _response.error.errorMessage,
362
+ rawResponse: _response.rawResponse,
363
+ });
364
+ }
365
+ });
366
+ }
367
+ /**
368
+ * Deletes a workflow definition by its ID
369
+ *
370
+ * @param {string} id - ID of the workflow to delete
371
+ * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
372
+ *
373
+ * @throws {@link phenoml.workflows.UnauthorizedError}
374
+ * @throws {@link phenoml.workflows.ForbiddenError}
375
+ * @throws {@link phenoml.workflows.NotFoundError}
376
+ * @throws {@link phenoml.workflows.InternalServerError}
377
+ *
378
+ * @example
379
+ * await client.workflows.delete("id")
380
+ */
381
+ delete(id, requestOptions) {
382
+ return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
383
+ }
384
+ __delete(id, requestOptions) {
385
+ return __awaiter(this, void 0, void 0, function* () {
386
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
387
+ 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);
388
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
389
+ 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, `workflows/${core.url.encodePathParam(id)}`),
390
+ method: "DELETE",
391
+ headers: _headers,
392
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
393
+ 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,
394
+ 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,
395
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
396
+ });
397
+ if (_response.ok) {
398
+ return {
399
+ data: _response.body,
107
400
  rawResponse: _response.rawResponse,
108
- });
401
+ };
402
+ }
403
+ if (_response.error.reason === "status-code") {
404
+ switch (_response.error.statusCode) {
405
+ case 401:
406
+ throw new phenoml.workflows.UnauthorizedError(_response.error.body, _response.rawResponse);
407
+ case 403:
408
+ throw new phenoml.workflows.ForbiddenError(_response.error.body, _response.rawResponse);
409
+ case 404:
410
+ throw new phenoml.workflows.NotFoundError(_response.error.body, _response.rawResponse);
411
+ case 500:
412
+ throw new phenoml.workflows.InternalServerError(_response.error.body, _response.rawResponse);
413
+ default:
414
+ throw new errors.phenomlError({
415
+ statusCode: _response.error.statusCode,
416
+ body: _response.error.body,
417
+ rawResponse: _response.rawResponse,
418
+ });
419
+ }
109
420
  }
110
421
  switch (_response.error.reason) {
111
422
  case "non-json":
@@ -115,7 +426,7 @@ export class Workflows {
115
426
  rawResponse: _response.rawResponse,
116
427
  });
117
428
  case "timeout":
118
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /tools/lang2fhir-and-search.");
429
+ throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /workflows/{id}.");
119
430
  case "unknown":
120
431
  throw new errors.phenomlError({
121
432
  message: _response.error.errorMessage,
@@ -125,36 +436,72 @@ export class Workflows {
125
436
  });
126
437
  }
127
438
  /**
439
+ * Executes a workflow with provided input data and returns results
440
+ *
441
+ * @param {string} id - ID of the workflow to execute
442
+ * @param {phenoml.workflows.ExecuteWorkflowRequest} request
128
443
  * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
129
444
  *
445
+ * @throws {@link phenoml.workflows.BadRequestError}
446
+ * @throws {@link phenoml.workflows.UnauthorizedError}
447
+ * @throws {@link phenoml.workflows.ForbiddenError}
448
+ * @throws {@link phenoml.workflows.NotFoundError}
449
+ * @throws {@link phenoml.workflows.InternalServerError}
450
+ *
130
451
  * @example
131
- * await client.workflows.analyzeCohort()
452
+ * await client.workflows.execute("id", {
453
+ * input_data: {
454
+ * "patient_last_name": "Johnson",
455
+ * "patient_first_name": "Mary",
456
+ * "diagnosis_code": "M79.3",
457
+ * "encounter_date": "2024-01-15"
458
+ * }
459
+ * })
132
460
  */
133
- analyzeCohort(requestOptions) {
134
- return core.HttpResponsePromise.fromPromise(this.__analyzeCohort(requestOptions));
461
+ execute(id, request, requestOptions) {
462
+ return core.HttpResponsePromise.fromPromise(this.__execute(id, request, requestOptions));
135
463
  }
136
- __analyzeCohort(requestOptions) {
464
+ __execute(id, request, requestOptions) {
137
465
  return __awaiter(this, void 0, void 0, function* () {
138
466
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
139
- let _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);
467
+ 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);
140
468
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
141
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "tools/cohort"),
469
+ 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, `workflows/${core.url.encodePathParam(id)}/execute`),
142
470
  method: "POST",
143
471
  headers: _headers,
472
+ contentType: "application/json",
144
473
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
474
+ requestType: "json",
475
+ body: request,
145
476
  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
477
  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
478
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
479
  });
149
480
  if (_response.ok) {
150
- return { data: undefined, rawResponse: _response.rawResponse };
481
+ return {
482
+ data: _response.body,
483
+ rawResponse: _response.rawResponse,
484
+ };
151
485
  }
152
486
  if (_response.error.reason === "status-code") {
153
- throw new errors.phenomlError({
154
- statusCode: _response.error.statusCode,
155
- body: _response.error.body,
156
- rawResponse: _response.rawResponse,
157
- });
487
+ switch (_response.error.statusCode) {
488
+ case 400:
489
+ throw new phenoml.workflows.BadRequestError(_response.error.body, _response.rawResponse);
490
+ case 401:
491
+ throw new phenoml.workflows.UnauthorizedError(_response.error.body, _response.rawResponse);
492
+ case 403:
493
+ throw new phenoml.workflows.ForbiddenError(_response.error.body, _response.rawResponse);
494
+ case 404:
495
+ throw new phenoml.workflows.NotFoundError(_response.error.body, _response.rawResponse);
496
+ case 500:
497
+ throw new phenoml.workflows.InternalServerError(_response.error.body, _response.rawResponse);
498
+ default:
499
+ throw new errors.phenomlError({
500
+ statusCode: _response.error.statusCode,
501
+ body: _response.error.body,
502
+ rawResponse: _response.rawResponse,
503
+ });
504
+ }
158
505
  }
159
506
  switch (_response.error.reason) {
160
507
  case "non-json":
@@ -164,7 +511,7 @@ export class Workflows {
164
511
  rawResponse: _response.rawResponse,
165
512
  });
166
513
  case "timeout":
167
- throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /tools/cohort.");
514
+ throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /workflows/{id}/execute.");
168
515
  case "unknown":
169
516
  throw new errors.phenomlError({
170
517
  message: _response.error.errorMessage,
@@ -175,11 +522,7 @@ export class Workflows {
175
522
  }
176
523
  _getAuthorizationHeader() {
177
524
  return __awaiter(this, void 0, void 0, function* () {
178
- const bearer = yield core.Supplier.get(this._options.token);
179
- if (bearer != null) {
180
- return `Bearer ${bearer}`;
181
- }
182
- return undefined;
525
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
183
526
  });
184
527
  }
185
528
  }
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests/index.mjs";
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export type { CreateWorkflowRequest } from "./CreateWorkflowRequest.mjs";
2
+ export type { ExecuteWorkflowRequest } from "./ExecuteWorkflowRequest.mjs";
3
+ export type { UpdateWorkflowRequest } from "./UpdateWorkflowRequest.mjs";
4
+ export type { WorkflowsGetRequest } from "./WorkflowsGetRequest.mjs";
5
+ export type { WorkflowsListRequest } from "./WorkflowsListRequest.mjs";
@@ -1,5 +1,5 @@
1
+ import type * as core from "../../../../core/index.mjs";
1
2
  import * as errors from "../../../../errors/index.mjs";
2
- import * as core from "../../../../core/index.mjs";
3
3
  export declare class BadRequestError extends errors.phenomlError {
4
4
  constructor(body?: unknown, rawResponse?: core.RawResponse);
5
5
  }
@@ -1,6 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as errors from "../../../../errors/index.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
3
  export class BadRequestError extends errors.phenomlError {
5
4
  constructor(body, rawResponse) {
6
5
  super({
@@ -1,5 +1,5 @@
1
+ import type * as core from "../../../../core/index.mjs";
1
2
  import * as errors from "../../../../errors/index.mjs";
2
- import * as core from "../../../../core/index.mjs";
3
3
  export declare class ForbiddenError extends errors.phenomlError {
4
4
  constructor(body?: unknown, rawResponse?: core.RawResponse);
5
5
  }
@@ -1,6 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as errors from "../../../../errors/index.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
3
  export class ForbiddenError extends errors.phenomlError {
5
4
  constructor(body, rawResponse) {
6
5
  super({
@@ -1,5 +1,5 @@
1
+ import type * as core from "../../../../core/index.mjs";
1
2
  import * as errors from "../../../../errors/index.mjs";
2
- import * as core from "../../../../core/index.mjs";
3
3
  export declare class InternalServerError extends errors.phenomlError {
4
4
  constructor(body?: unknown, rawResponse?: core.RawResponse);
5
5
  }
@@ -1,6 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as errors from "../../../../errors/index.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
3
  export class InternalServerError extends errors.phenomlError {
5
4
  constructor(body, rawResponse) {
6
5
  super({