phenoml 13.0.0 → 14.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 (174) hide show
  1. package/dist/cjs/BaseClient.d.ts +3 -0
  2. package/dist/cjs/BaseClient.js +17 -2
  3. package/dist/cjs/api/resources/agent/client/Client.d.ts +24 -12
  4. package/dist/cjs/api/resources/agent/client/Client.js +41 -21
  5. package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +11 -0
  6. package/dist/cjs/api/resources/agent/client/requests/AgentStreamChatRequest.d.ts +1 -0
  7. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +13 -25
  8. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +19 -70
  9. package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.ts +4 -1
  10. package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.ts +7 -1
  11. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +4 -1
  12. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +5 -2
  13. package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.ts +4 -1
  14. package/dist/cjs/api/resources/cohort/client/Client.js +1 -1
  15. package/dist/cjs/api/resources/construe/client/Client.d.ts +95 -11
  16. package/dist/cjs/api/resources/construe/client/Client.js +134 -22
  17. package/dist/cjs/api/resources/construe/client/requests/ExtractRequest.d.ts +60 -1
  18. package/dist/cjs/api/resources/construe/client/requests/FeedbackRequest.d.ts +14 -7
  19. package/dist/cjs/api/resources/construe/client/requests/UploadRequest.d.ts +18 -1
  20. package/dist/cjs/api/resources/fhir/client/Client.js +10 -6
  21. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +10 -7
  22. package/dist/cjs/api/resources/fhirProvider/client/Client.js +17 -14
  23. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.ts +5 -3
  24. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.ts +1 -1
  25. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.ts +1 -1
  26. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +6 -4
  27. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +10 -5
  28. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +17 -6
  29. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +23 -12
  30. package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.ts +2 -1
  31. package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateRequest.d.ts +9 -2
  32. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.ts +2 -1
  33. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.d.ts +1 -1
  34. package/dist/cjs/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.ts +3 -1
  35. package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +2 -2
  36. package/dist/cjs/api/resources/summary/client/Client.d.ts +74 -9
  37. package/dist/cjs/api/resources/summary/client/Client.js +80 -15
  38. package/dist/cjs/api/resources/summary/client/requests/CreateSummaryRequest.d.ts +67 -11
  39. package/dist/cjs/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.ts +4 -4
  40. package/dist/cjs/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.ts +4 -4
  41. package/dist/cjs/api/resources/summary/types/index.d.ts +0 -2
  42. package/dist/cjs/api/resources/summary/types/index.js +0 -2
  43. package/dist/cjs/api/resources/tools/client/Client.d.ts +7 -3
  44. package/dist/cjs/api/resources/tools/client/Client.js +11 -7
  45. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateMultiRequest.d.ts +1 -0
  46. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.ts +3 -2
  47. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +3 -1
  48. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +4 -4
  49. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +4 -4
  50. package/dist/cjs/api/resources/tools/types/McpServer.d.ts +10 -0
  51. package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +12 -16
  52. package/dist/cjs/api/resources/tools/types/McpServerTool.d.ts +14 -0
  53. package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +7 -20
  54. package/dist/cjs/api/resources/tools/types/index.d.ts +2 -0
  55. package/dist/cjs/api/resources/tools/types/index.js +2 -0
  56. package/dist/cjs/api/resources/workflows/client/Client.d.ts +21 -9
  57. package/dist/cjs/api/resources/workflows/client/Client.js +43 -15
  58. package/dist/cjs/api/resources/workflows/client/requests/CreateWorkflowRequest.d.ts +3 -2
  59. package/dist/cjs/api/resources/workflows/client/requests/ExecuteWorkflowRequest.d.ts +11 -1
  60. package/dist/cjs/api/resources/workflows/client/requests/UpdateWorkflowRequest.d.ts +6 -5
  61. package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
  62. package/dist/cjs/core/auth/AuthProvider.js +7 -0
  63. package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
  64. package/dist/cjs/core/auth/BasicAuth.js +7 -1
  65. package/dist/cjs/core/auth/index.d.ts +1 -1
  66. package/dist/cjs/core/auth/index.js +3 -1
  67. package/dist/cjs/core/fetcher/Fetcher.d.ts +8 -0
  68. package/dist/cjs/core/fetcher/Fetcher.js +13 -8
  69. package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
  70. package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
  71. package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
  72. package/dist/cjs/core/url/index.d.ts +1 -0
  73. package/dist/cjs/core/url/index.js +3 -1
  74. package/dist/cjs/core/url/qs.d.ts +2 -1
  75. package/dist/cjs/core/url/qs.js +24 -12
  76. package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
  77. package/dist/cjs/errors/phenomlError.d.ts +3 -1
  78. package/dist/cjs/errors/phenomlError.js +4 -1
  79. package/dist/cjs/errors/phenomlTimeoutError.d.ts +4 -1
  80. package/dist/cjs/errors/phenomlTimeoutError.js +4 -1
  81. package/dist/cjs/version.d.ts +1 -1
  82. package/dist/cjs/version.js +1 -1
  83. package/dist/esm/BaseClient.d.mts +3 -0
  84. package/dist/esm/BaseClient.mjs +17 -2
  85. package/dist/esm/api/resources/agent/client/Client.d.mts +24 -12
  86. package/dist/esm/api/resources/agent/client/Client.mjs +41 -21
  87. package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +11 -0
  88. package/dist/esm/api/resources/agent/client/requests/AgentStreamChatRequest.d.mts +1 -0
  89. package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +13 -25
  90. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +19 -70
  91. package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.mts +4 -1
  92. package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.mts +7 -1
  93. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +4 -1
  94. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +5 -2
  95. package/dist/esm/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.mts +4 -1
  96. package/dist/esm/api/resources/cohort/client/Client.mjs +1 -1
  97. package/dist/esm/api/resources/construe/client/Client.d.mts +95 -11
  98. package/dist/esm/api/resources/construe/client/Client.mjs +134 -22
  99. package/dist/esm/api/resources/construe/client/requests/ExtractRequest.d.mts +60 -1
  100. package/dist/esm/api/resources/construe/client/requests/FeedbackRequest.d.mts +14 -7
  101. package/dist/esm/api/resources/construe/client/requests/UploadRequest.d.mts +18 -1
  102. package/dist/esm/api/resources/fhir/client/Client.mjs +10 -6
  103. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +10 -7
  104. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +17 -14
  105. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.mts +5 -3
  106. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.mts +1 -1
  107. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.mts +1 -1
  108. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +6 -4
  109. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +10 -5
  110. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +17 -6
  111. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +23 -12
  112. package/dist/esm/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.mts +2 -1
  113. package/dist/esm/api/resources/lang2Fhir/client/requests/CreateRequest.d.mts +9 -2
  114. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.mts +2 -1
  115. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.d.mts +1 -1
  116. package/dist/esm/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.mts +3 -1
  117. package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +2 -2
  118. package/dist/esm/api/resources/summary/client/Client.d.mts +74 -9
  119. package/dist/esm/api/resources/summary/client/Client.mjs +80 -15
  120. package/dist/esm/api/resources/summary/client/requests/CreateSummaryRequest.d.mts +67 -11
  121. package/dist/esm/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.mts +4 -4
  122. package/dist/esm/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.mts +4 -4
  123. package/dist/esm/api/resources/summary/types/index.d.mts +0 -2
  124. package/dist/esm/api/resources/summary/types/index.mjs +0 -2
  125. package/dist/esm/api/resources/tools/client/Client.d.mts +7 -3
  126. package/dist/esm/api/resources/tools/client/Client.mjs +11 -7
  127. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateMultiRequest.d.mts +1 -0
  128. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.mts +3 -2
  129. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +3 -1
  130. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +4 -4
  131. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +4 -4
  132. package/dist/esm/api/resources/tools/types/McpServer.d.mts +10 -0
  133. package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +12 -16
  134. package/dist/esm/api/resources/tools/types/McpServerTool.d.mts +14 -0
  135. package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +7 -20
  136. package/dist/esm/api/resources/tools/types/index.d.mts +2 -0
  137. package/dist/esm/api/resources/tools/types/index.mjs +2 -0
  138. package/dist/esm/api/resources/workflows/client/Client.d.mts +21 -9
  139. package/dist/esm/api/resources/workflows/client/Client.mjs +43 -15
  140. package/dist/esm/api/resources/workflows/client/requests/CreateWorkflowRequest.d.mts +3 -2
  141. package/dist/esm/api/resources/workflows/client/requests/ExecuteWorkflowRequest.d.mts +11 -1
  142. package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowRequest.d.mts +6 -5
  143. package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
  144. package/dist/esm/core/auth/AuthProvider.mjs +6 -1
  145. package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
  146. package/dist/esm/core/auth/BasicAuth.mjs +7 -1
  147. package/dist/esm/core/auth/index.d.mts +1 -1
  148. package/dist/esm/core/auth/index.mjs +1 -0
  149. package/dist/esm/core/fetcher/Fetcher.d.mts +8 -0
  150. package/dist/esm/core/fetcher/Fetcher.mjs +13 -8
  151. package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
  152. package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
  153. package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
  154. package/dist/esm/core/url/index.d.mts +1 -0
  155. package/dist/esm/core/url/index.mjs +1 -0
  156. package/dist/esm/core/url/qs.d.mts +2 -1
  157. package/dist/esm/core/url/qs.mjs +24 -12
  158. package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
  159. package/dist/esm/errors/phenomlError.d.mts +3 -1
  160. package/dist/esm/errors/phenomlError.mjs +4 -1
  161. package/dist/esm/errors/phenomlTimeoutError.d.mts +4 -1
  162. package/dist/esm/errors/phenomlTimeoutError.mjs +4 -1
  163. package/dist/esm/version.d.mts +1 -1
  164. package/dist/esm/version.mjs +1 -1
  165. package/package.json +2 -2
  166. package/reference.md +140 -124
  167. package/dist/cjs/api/resources/summary/types/FhirBundle.d.ts +0 -13
  168. package/dist/cjs/api/resources/summary/types/FhirResource.d.ts +0 -6
  169. package/dist/esm/api/resources/summary/types/FhirBundle.d.mts +0 -13
  170. package/dist/esm/api/resources/summary/types/FhirResource.d.mts +0 -6
  171. /package/dist/cjs/api/resources/{summary/types/FhirBundle.js → tools/types/McpServer.js} +0 -0
  172. /package/dist/cjs/api/resources/{summary/types/FhirResource.js → tools/types/McpServerTool.js} +0 -0
  173. /package/dist/esm/api/resources/{summary/types/FhirBundle.mjs → tools/types/McpServer.mjs} +0 -0
  174. /package/dist/esm/api/resources/{summary/types/FhirResource.mjs → tools/types/McpServerTool.mjs} +0 -0
@@ -78,7 +78,7 @@ class SummaryClient {
78
78
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "fhir2summary/templates"),
79
79
  method: "GET",
80
80
  headers: _headers,
81
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
81
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
82
82
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
83
83
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
84
84
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -120,10 +120,10 @@ class SummaryClient {
120
120
  *
121
121
  * @example
122
122
  * await client.summary.createTemplate({
123
- * name: "name",
124
- * example_summary: "Patient John Doe, age 45, presents with hypertension diagnosed on 2024-01-15.",
125
- * target_resources: ["Patient", "Condition", "Observation"],
126
- * mode: "mode"
123
+ * name: "Discharge Summary",
124
+ * example_summary: "Patient John Doe, age 45, was admitted on 2024-01-10 with Type 2 Diabetes. Discharged on 2024-01-15 with Metformin 500mg BID.",
125
+ * target_resources: ["Patient", "Condition", "MedicationRequest"],
126
+ * mode: "narrative"
127
127
  * })
128
128
  */
129
129
  createTemplate(request, requestOptions) {
@@ -139,7 +139,7 @@ class SummaryClient {
139
139
  method: "POST",
140
140
  headers: _headers,
141
141
  contentType: "application/json",
142
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
142
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
143
143
  requestType: "json",
144
144
  body: request,
145
145
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
@@ -199,7 +199,7 @@ class SummaryClient {
199
199
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir2summary/template/${core.url.encodePathParam(id)}`),
200
200
  method: "GET",
201
201
  headers: _headers,
202
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
202
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
203
203
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
204
204
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
205
205
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -248,10 +248,10 @@ class SummaryClient {
248
248
  *
249
249
  * @example
250
250
  * await client.summary.updateTemplate("id", {
251
- * name: "name",
252
- * template: "template",
253
- * target_resources: ["target_resources"],
254
- * mode: "mode"
251
+ * name: "Discharge Summary",
252
+ * template: "Patient {{Patient.name[0].text}} was discharged on {{Encounter[0].period.end}} with {{MedicationRequest[0].medicationCodeableConcept.coding[0].display}} {{MedicationRequest[0].dosageInstruction[0].text}}.",
253
+ * target_resources: ["Patient", "Encounter", "MedicationRequest"],
254
+ * mode: "narrative"
255
255
  * })
256
256
  */
257
257
  updateTemplate(id, request, requestOptions) {
@@ -267,7 +267,7 @@ class SummaryClient {
267
267
  method: "PUT",
268
268
  headers: _headers,
269
269
  contentType: "application/json",
270
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
270
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
271
271
  requestType: "json",
272
272
  body: request,
273
273
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
@@ -331,7 +331,7 @@ class SummaryClient {
331
331
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir2summary/template/${core.url.encodePathParam(id)}`),
332
332
  method: "DELETE",
333
333
  headers: _headers,
334
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
334
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
335
335
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
336
336
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
337
337
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -382,8 +382,73 @@ class SummaryClient {
382
382
  *
383
383
  * @example
384
384
  * await client.summary.create({
385
+ * mode: "narrative",
386
+ * template_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
385
387
  * fhir_resources: {
386
- * resourceType: "resourceType"
388
+ * "resourceType": "Bundle",
389
+ * "type": "collection",
390
+ * "entry": [
391
+ * {
392
+ * "resource": {
393
+ * "resourceType": "Patient",
394
+ * "name": [
395
+ * {
396
+ * "given": [
397
+ * "John"
398
+ * ],
399
+ * "family": "Doe"
400
+ * }
401
+ * ],
402
+ * "gender": "male",
403
+ * "birthDate": "1979-03-15"
404
+ * }
405
+ * },
406
+ * {
407
+ * "resource": {
408
+ * "resourceType": "Condition",
409
+ * "code": {
410
+ * "text": "Type 2 Diabetes Mellitus"
411
+ * },
412
+ * "onsetDateTime": "2024-01-15"
413
+ * }
414
+ * }
415
+ * ]
416
+ * }
417
+ * })
418
+ *
419
+ * @example
420
+ * await client.summary.create({
421
+ * mode: "ips",
422
+ * fhir_resources: {
423
+ * "resourceType": "Bundle",
424
+ * "type": "collection",
425
+ * "entry": [
426
+ * {
427
+ * "resource": {
428
+ * "resourceType": "Patient",
429
+ * "id": "maria-garcia-001",
430
+ * "name": [
431
+ * {
432
+ * "given": [
433
+ * "Maria"
434
+ * ],
435
+ * "family": "Garcia"
436
+ * }
437
+ * ],
438
+ * "gender": "female",
439
+ * "birthDate": "1985-07-22"
440
+ * }
441
+ * },
442
+ * {
443
+ * "resource": {
444
+ * "resourceType": "AllergyIntolerance",
445
+ * "code": {
446
+ * "text": "Penicillin"
447
+ * },
448
+ * "criticality": "high"
449
+ * }
450
+ * }
451
+ * ]
387
452
  * }
388
453
  * })
389
454
  */
@@ -400,7 +465,7 @@ class SummaryClient {
400
465
  method: "POST",
401
466
  headers: _headers,
402
467
  contentType: "application/json",
403
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
468
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
404
469
  requestType: "json",
405
470
  body: request,
406
471
  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,
@@ -1,9 +1,73 @@
1
- import type * as phenoml from "../../../../index.js";
2
1
  /**
3
2
  * @example
4
3
  * {
4
+ * mode: "narrative",
5
+ * template_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
5
6
  * fhir_resources: {
6
- * resourceType: "resourceType"
7
+ * "resourceType": "Bundle",
8
+ * "type": "collection",
9
+ * "entry": [
10
+ * {
11
+ * "resource": {
12
+ * "resourceType": "Patient",
13
+ * "name": [
14
+ * {
15
+ * "given": [
16
+ * "John"
17
+ * ],
18
+ * "family": "Doe"
19
+ * }
20
+ * ],
21
+ * "gender": "male",
22
+ * "birthDate": "1979-03-15"
23
+ * }
24
+ * },
25
+ * {
26
+ * "resource": {
27
+ * "resourceType": "Condition",
28
+ * "code": {
29
+ * "text": "Type 2 Diabetes Mellitus"
30
+ * },
31
+ * "onsetDateTime": "2024-01-15"
32
+ * }
33
+ * }
34
+ * ]
35
+ * }
36
+ * }
37
+ *
38
+ * @example
39
+ * {
40
+ * mode: "ips",
41
+ * fhir_resources: {
42
+ * "resourceType": "Bundle",
43
+ * "type": "collection",
44
+ * "entry": [
45
+ * {
46
+ * "resource": {
47
+ * "resourceType": "Patient",
48
+ * "id": "maria-garcia-001",
49
+ * "name": [
50
+ * {
51
+ * "given": [
52
+ * "Maria"
53
+ * ],
54
+ * "family": "Garcia"
55
+ * }
56
+ * ],
57
+ * "gender": "female",
58
+ * "birthDate": "1985-07-22"
59
+ * }
60
+ * },
61
+ * {
62
+ * "resource": {
63
+ * "resourceType": "AllergyIntolerance",
64
+ * "code": {
65
+ * "text": "Penicillin"
66
+ * },
67
+ * "criticality": "high"
68
+ * }
69
+ * }
70
+ * ]
7
71
  * }
8
72
  * }
9
73
  */
@@ -24,7 +88,7 @@ export interface CreateSummaryRequest {
24
88
  * if multiple Patients are present, or if the Patient has no identifiers. Resources are
25
89
  * automatically filtered to only include those referencing the patient.
26
90
  */
27
- fhir_resources: CreateSummaryRequest.FhirResources;
91
+ fhir_resources: Record<string, unknown>;
28
92
  }
29
93
  export declare namespace CreateSummaryRequest {
30
94
  /**
@@ -39,12 +103,4 @@ export declare namespace CreateSummaryRequest {
39
103
  readonly Ips: "ips";
40
104
  };
41
105
  type Mode = (typeof Mode)[keyof typeof Mode];
42
- /**
43
- * FHIR resources (single resource or Bundle).
44
- * For IPS mode, must be a Bundle containing exactly one Patient resource with at least one
45
- * identifier (id, fullUrl, or identifier field). Returns an error if no Patient is found,
46
- * if multiple Patients are present, or if the Patient has no identifiers. Resources are
47
- * automatically filtered to only include those referencing the patient.
48
- */
49
- type FhirResources = phenoml.summary.FhirResource | phenoml.summary.FhirBundle;
50
106
  }
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * name: "name",
5
- * example_summary: "Patient John Doe, age 45, presents with hypertension diagnosed on 2024-01-15.",
6
- * target_resources: ["Patient", "Condition", "Observation"],
7
- * mode: "mode"
4
+ * name: "Discharge Summary",
5
+ * example_summary: "Patient John Doe, age 45, was admitted on 2024-01-10 with Type 2 Diabetes. Discharged on 2024-01-15 with Metformin 500mg BID.",
6
+ * target_resources: ["Patient", "Condition", "MedicationRequest"],
7
+ * mode: "narrative"
8
8
  * }
9
9
  */
10
10
  export interface CreateSummaryTemplateRequest {
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * name: "name",
5
- * template: "template",
6
- * target_resources: ["target_resources"],
7
- * mode: "mode"
4
+ * name: "Discharge Summary",
5
+ * template: "Patient {{Patient.name[0].text}} was discharged on {{Encounter[0].period.end}} with {{MedicationRequest[0].medicationCodeableConcept.coding[0].display}} {{MedicationRequest[0].dosageInstruction[0].text}}.",
6
+ * target_resources: ["Patient", "Encounter", "MedicationRequest"],
7
+ * mode: "narrative"
8
8
  * }
9
9
  */
10
10
  export interface UpdateSummaryTemplateRequest {
@@ -1,7 +1,5 @@
1
1
  export * from "./CreateSummaryResponse.js";
2
2
  export * from "./CreateSummaryTemplateResponse.js";
3
- export * from "./FhirBundle.js";
4
- export * from "./FhirResource.js";
5
3
  export * from "./SummaryDeleteTemplateResponse.js";
6
4
  export * from "./SummaryGetTemplateResponse.js";
7
5
  export * from "./SummaryListTemplatesResponse.js";
@@ -16,8 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./CreateSummaryResponse.js"), exports);
18
18
  __exportStar(require("./CreateSummaryTemplateResponse.js"), exports);
19
- __exportStar(require("./FhirBundle.js"), exports);
20
- __exportStar(require("./FhirResource.js"), exports);
21
19
  __exportStar(require("./SummaryDeleteTemplateResponse.js"), exports);
22
20
  __exportStar(require("./SummaryGetTemplateResponse.js"), exports);
23
21
  __exportStar(require("./SummaryListTemplatesResponse.js"), exports);
@@ -29,8 +29,9 @@ export declare class ToolsClient {
29
29
  * await client.tools.createFhirResource({
30
30
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
31
31
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
32
- * resource: "auto",
33
- * text: "Patient John Doe has severe asthma with acute exacerbation"
32
+ * resource: "condition-encounter-diagnosis",
33
+ * text: "Patient has severe persistent asthma with acute exacerbation",
34
+ * provider: "550e8400-e29b-41d4-a716-446655440000"
34
35
  * })
35
36
  */
36
37
  createFhirResource(request: phenoml.tools.Lang2FhirAndCreateRequest, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.Lang2FhirAndCreateResponse>;
@@ -56,6 +57,7 @@ export declare class ToolsClient {
56
57
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
57
58
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
58
59
  * text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily.",
60
+ * version: "R4",
59
61
  * provider: "medplum"
60
62
  * })
61
63
  */
@@ -77,7 +79,9 @@ export declare class ToolsClient {
77
79
  * await client.tools.searchFhirResources({
78
80
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
79
81
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
80
- * text: "Find all appointments for patient John Doe next week"
82
+ * text: "Find all appointments for patient John Doe next week",
83
+ * count: 10,
84
+ * provider: "550e8400-e29b-41d4-a716-446655440000"
81
85
  * })
82
86
  */
83
87
  searchFhirResources(request: phenoml.tools.Lang2FhirAndSearchRequest, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.Lang2FhirAndSearchResponse>;
@@ -87,8 +87,9 @@ class ToolsClient {
87
87
  * await client.tools.createFhirResource({
88
88
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
89
89
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
90
- * resource: "auto",
91
- * text: "Patient John Doe has severe asthma with acute exacerbation"
90
+ * resource: "condition-encounter-diagnosis",
91
+ * text: "Patient has severe persistent asthma with acute exacerbation",
92
+ * provider: "550e8400-e29b-41d4-a716-446655440000"
92
93
  * })
93
94
  */
94
95
  createFhirResource(request, requestOptions) {
@@ -108,7 +109,7 @@ class ToolsClient {
108
109
  method: "POST",
109
110
  headers: _headers,
110
111
  contentType: "application/json",
111
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
112
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
112
113
  requestType: "json",
113
114
  body: _body,
114
115
  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,
@@ -167,6 +168,7 @@ class ToolsClient {
167
168
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
168
169
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
169
170
  * text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily.",
171
+ * version: "R4",
170
172
  * provider: "medplum"
171
173
  * })
172
174
  */
@@ -187,7 +189,7 @@ class ToolsClient {
187
189
  method: "POST",
188
190
  headers: _headers,
189
191
  contentType: "application/json",
190
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
192
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
191
193
  requestType: "json",
192
194
  body: _body,
193
195
  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,
@@ -241,7 +243,9 @@ class ToolsClient {
241
243
  * await client.tools.searchFhirResources({
242
244
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
243
245
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
244
- * text: "Find all appointments for patient John Doe next week"
246
+ * text: "Find all appointments for patient John Doe next week",
247
+ * count: 10,
248
+ * provider: "550e8400-e29b-41d4-a716-446655440000"
245
249
  * })
246
250
  */
247
251
  searchFhirResources(request, requestOptions) {
@@ -261,7 +265,7 @@ class ToolsClient {
261
265
  method: "POST",
262
266
  headers: _headers,
263
267
  contentType: "application/json",
264
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
268
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
265
269
  requestType: "json",
266
270
  body: _body,
267
271
  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,
@@ -335,7 +339,7 @@ class ToolsClient {
335
339
  method: "POST",
336
340
  headers: _headers,
337
341
  contentType: "application/json",
338
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
342
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
339
343
  requestType: "json",
340
344
  body: _body,
341
345
  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,
@@ -4,6 +4,7 @@
4
4
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
5
5
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
6
6
  * text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily.",
7
+ * version: "R4",
7
8
  * provider: "medplum"
8
9
  * }
9
10
  */
@@ -3,8 +3,9 @@
3
3
  * {
4
4
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
5
5
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
6
- * resource: "auto",
7
- * text: "Patient John Doe has severe asthma with acute exacerbation"
6
+ * resource: "condition-encounter-diagnosis",
7
+ * text: "Patient has severe persistent asthma with acute exacerbation",
8
+ * provider: "550e8400-e29b-41d4-a716-446655440000"
8
9
  * }
9
10
  */
10
11
  export interface Lang2FhirAndCreateRequest {
@@ -3,7 +3,9 @@
3
3
  * {
4
4
  * "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
5
5
  * "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
6
- * text: "Find all appointments for patient John Doe next week"
6
+ * text: "Find all appointments for patient John Doe next week",
7
+ * count: 10,
8
+ * provider: "550e8400-e29b-41d4-a716-446655440000"
7
9
  * }
8
10
  */
9
11
  export interface Lang2FhirAndSearchRequest {
@@ -90,7 +90,7 @@ class McpServerClient {
90
90
  method: "POST",
91
91
  headers: _headers,
92
92
  contentType: "application/json",
93
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
93
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
94
94
  requestType: "json",
95
95
  body: request,
96
96
  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,
@@ -147,7 +147,7 @@ class McpServerClient {
147
147
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "tools/mcp-server/list"),
148
148
  method: "GET",
149
149
  headers: _headers,
150
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
150
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
151
151
  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,
152
152
  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,
153
153
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -201,7 +201,7 @@ class McpServerClient {
201
201
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}`),
202
202
  method: "GET",
203
203
  headers: _headers,
204
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
204
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
205
205
  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,
206
206
  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,
207
207
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -255,7 +255,7 @@ class McpServerClient {
255
255
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}`),
256
256
  method: "DELETE",
257
257
  headers: _headers,
258
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
258
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
259
259
  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,
260
260
  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,
261
261
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -80,7 +80,7 @@ class ToolsClient {
80
80
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}/list`),
81
81
  method: "GET",
82
82
  headers: _headers,
83
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
83
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
84
84
  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,
85
85
  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,
86
86
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -134,7 +134,7 @@ class ToolsClient {
134
134
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}`),
135
135
  method: "GET",
136
136
  headers: _headers,
137
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
137
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
138
138
  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,
139
139
  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,
140
140
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -188,7 +188,7 @@ class ToolsClient {
188
188
  url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}`),
189
189
  method: "DELETE",
190
190
  headers: _headers,
191
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
191
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
192
192
  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,
193
193
  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,
194
194
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -249,7 +249,7 @@ class ToolsClient {
249
249
  method: "POST",
250
250
  headers: _headers,
251
251
  contentType: "application/json",
252
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
252
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
253
253
  requestType: "json",
254
254
  body: request,
255
255
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
@@ -0,0 +1,10 @@
1
+ export interface McpServer {
2
+ /** ID of the MCP server */
3
+ id?: string | undefined;
4
+ /** Name of the MCP server */
5
+ name?: string | undefined;
6
+ /** Description of the MCP server */
7
+ description?: string | undefined;
8
+ /** URL of the MCP server */
9
+ mcp_server_url?: string | undefined;
10
+ }
@@ -1,23 +1,19 @@
1
+ import type * as phenoml from "../../../index.js";
1
2
  export interface McpServerResponse {
2
- /** Whether the MCP server was created successfully */
3
+ /** Whether the operation succeeded */
3
4
  success?: boolean | undefined;
4
5
  /** Status message */
5
6
  message?: string | undefined;
6
- /** MCP server data */
7
- data?: McpServerResponse.Data | undefined;
8
- }
9
- export declare namespace McpServerResponse {
7
+ /** Single MCP server (returned by GET /tools/mcp-server/{mcp_server_id}). */
8
+ data?: phenoml.tools.McpServer | undefined;
9
+ /**
10
+ * List of MCP servers. Returned by /tools/mcp-server/create (the
11
+ * newly created server) and /tools/mcp-server/list (all servers).
12
+ */
13
+ mcp_servers?: phenoml.tools.McpServer[] | undefined;
10
14
  /**
11
- * MCP server data
15
+ * Tools loaded from the MCP server. Returned by /tools/mcp-server/create
16
+ * alongside the server record, since tool discovery happens at create time.
12
17
  */
13
- interface Data {
14
- /** ID of the MCP server */
15
- id?: string | undefined;
16
- /** Name of the MCP server */
17
- name?: string | undefined;
18
- /** Description of the MCP server */
19
- description?: string | undefined;
20
- /** URL of the MCP server */
21
- mcp_server_url?: string | undefined;
22
- }
18
+ mcp_server_tools?: phenoml.tools.McpServerTool[] | undefined;
23
19
  }
@@ -0,0 +1,14 @@
1
+ export interface McpServerTool {
2
+ /** ID of the MCP server tool */
3
+ id?: string | undefined;
4
+ /** Name of the MCP server tool */
5
+ name?: string | undefined;
6
+ /** Description of the MCP server tool */
7
+ description?: string | undefined;
8
+ /** Input schema of the MCP server tool */
9
+ input_schema?: Record<string, unknown> | undefined;
10
+ /** ID of the MCP server that the tool belongs to */
11
+ mcp_server_id?: string | undefined;
12
+ /** URL of the MCP server */
13
+ mcp_server_url?: string | undefined;
14
+ }
@@ -1,27 +1,14 @@
1
+ import type * as phenoml from "../../../index.js";
1
2
  export interface McpServerToolResponse {
2
- /** Whether the MCP server tool was created successfully */
3
+ /** Whether the operation succeeded */
3
4
  success?: boolean | undefined;
4
5
  /** Status message */
5
6
  message?: string | undefined;
6
- /** MCP server tool data */
7
- data?: McpServerToolResponse.Data | undefined;
8
- }
9
- export declare namespace McpServerToolResponse {
7
+ /** Single MCP server tool (returned by GET /tools/mcp-server/tool/{mcp_server_tool_id}). */
8
+ data?: phenoml.tools.McpServerTool | undefined;
10
9
  /**
11
- * MCP server tool data
10
+ * List of MCP server tools. Returned by
11
+ * /tools/mcp-server/{mcp_server_id}/list.
12
12
  */
13
- interface Data {
14
- /** ID of the MCP server tool */
15
- id?: string | undefined;
16
- /** Name of the MCP server tool */
17
- name?: string | undefined;
18
- /** Description of the MCP server tool */
19
- description?: string | undefined;
20
- /** Input schema of the MCP server tool */
21
- input_schema?: Record<string, unknown> | undefined;
22
- /** ID of the MCP server that the tool belongs to */
23
- mcp_server_id?: string | undefined;
24
- /** URL of the MCP server */
25
- mcp_server_url?: string | undefined;
26
- }
13
+ mcp_server_tools?: phenoml.tools.McpServerTool[] | undefined;
27
14
  }
@@ -2,7 +2,9 @@ export * from "./CohortResponse.js";
2
2
  export * from "./Lang2FhirAndCreateMultiResponse.js";
3
3
  export * from "./Lang2FhirAndCreateResponse.js";
4
4
  export * from "./Lang2FhirAndSearchResponse.js";
5
+ export * from "./McpServer.js";
5
6
  export * from "./McpServerResponse.js";
7
+ export * from "./McpServerTool.js";
6
8
  export * from "./McpServerToolCallResponse.js";
7
9
  export * from "./McpServerToolResponse.js";
8
10
  export * from "./SearchConcept.js";