phenoml 16.0.0 → 17.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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/agent/client/Client.d.ts +3 -59
- package/dist/cjs/api/resources/agent/client/Client.js +7 -232
- package/dist/cjs/api/resources/agent/client/requests/index.d.ts +0 -3
- package/dist/cjs/api/resources/{fhir/errors/InternalServerError.d.ts → agent/errors/GatewayTimeoutError.d.ts} +1 -1
- package/dist/cjs/api/resources/{fhir/errors/BadGatewayError.js → agent/errors/GatewayTimeoutError.js} +5 -5
- package/dist/cjs/api/resources/agent/errors/index.d.ts +1 -0
- package/dist/cjs/api/resources/agent/errors/index.js +1 -0
- package/dist/cjs/api/resources/agent/resources/chat/client/Client.d.ts +79 -0
- package/dist/cjs/api/resources/agent/resources/chat/client/Client.js +305 -0
- package/dist/cjs/api/resources/agent/{client/requests/GetChatMessagesRequest.d.ts → resources/chat/client/requests/ListMessagesRequest.d.ts} +4 -4
- package/dist/cjs/api/resources/agent/resources/chat/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/agent/resources/chat/exports.d.ts +2 -0
- package/dist/cjs/api/resources/{tools/resources/mcpServer/resources/tools → agent/resources/chat}/exports.js +2 -2
- package/dist/cjs/api/resources/agent/resources/chat/index.d.ts +2 -0
- package/dist/cjs/api/resources/{tools/resources/mcpServer → agent/resources/chat}/index.js +1 -1
- package/dist/cjs/api/resources/agent/resources/chat/types/ListMessagesRequestOrder.d.ts +5 -0
- package/dist/cjs/api/resources/agent/{types/GetChatMessagesRequestOrder.js → resources/chat/types/ListMessagesRequestOrder.js} +2 -2
- package/dist/cjs/api/resources/agent/resources/chat/types/ListMessagesRequestRole.d.ts +7 -0
- package/dist/cjs/api/resources/agent/{types/GetChatMessagesRequestRole.js → resources/chat/types/ListMessagesRequestRole.js} +2 -2
- package/dist/cjs/api/resources/agent/{types/GetChatMessagesResponse.d.ts → resources/chat/types/ListMessagesResponse.d.ts} +2 -2
- package/dist/cjs/api/resources/agent/resources/chat/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/agent/resources/chat/types/index.js +19 -0
- package/dist/cjs/api/resources/agent/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/agent/resources/index.js +4 -1
- package/dist/cjs/api/resources/agent/types/index.d.ts +0 -3
- package/dist/cjs/api/resources/agent/types/index.js +0 -3
- package/dist/cjs/api/resources/construe/client/Client.d.ts +6 -330
- package/dist/cjs/api/resources/construe/client/Client.js +8 -838
- package/dist/cjs/api/resources/construe/client/requests/index.d.ts +0 -9
- package/dist/cjs/api/resources/construe/client/requests/index.js +0 -3
- package/dist/cjs/api/resources/construe/exports.d.ts +1 -0
- package/dist/cjs/api/resources/construe/exports.js +1 -0
- package/dist/cjs/api/resources/construe/index.d.ts +1 -0
- package/dist/cjs/api/resources/construe/index.js +1 -0
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/Client.d.ts +135 -0
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/Client.js +433 -0
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/index.js +17 -0
- package/dist/{esm/api/resources/construe/client/requests/ExportCodeSystemRequest.d.mts → cjs/api/resources/construe/resources/codeSystems/client/requests/DeleteRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/construe/{client/requests/DeleteCodeSystemRequest.d.ts → resources/codeSystems/client/requests/ExportRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/construe/{client/requests/GetCodeSystemRequest.d.ts → resources/codeSystems/client/requests/FindRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/construe/{client → resources/codeSystems/client}/requests/UploadRequest.d.ts +1 -1
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/construe/resources/codeSystems/exports.d.ts +2 -0
- package/dist/cjs/api/resources/{tools/resources/mcpServer → construe/resources/codeSystems}/exports.js +2 -3
- package/dist/cjs/api/resources/construe/resources/codeSystems/index.d.ts +2 -0
- package/dist/cjs/api/resources/construe/resources/codeSystems/index.js +18 -0
- package/dist/{esm/api/resources/construe/types/UploadCodeSystemResponse.d.mts → cjs/api/resources/construe/resources/codeSystems/types/UploadResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/construe/resources/codeSystems/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/construe/resources/codeSystems/types/index.js +17 -0
- package/dist/cjs/api/resources/construe/resources/codes/client/Client.d.ts +227 -0
- package/dist/cjs/api/resources/construe/resources/codes/client/Client.js +528 -0
- package/dist/cjs/api/resources/construe/resources/codes/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/construe/resources/codes/client/index.js +17 -0
- package/dist/cjs/api/resources/construe/{client/requests/ListCodesRequest.d.ts → resources/codes/client/requests/CodesListRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/construe/{client → resources/codes/client}/requests/ExtractRequest.d.ts +1 -1
- package/dist/{esm/api/resources/construe/client/requests/GetCodeRequest.d.mts → cjs/api/resources/construe/resources/codes/client/requests/LookupRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/construe/resources/codes/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/construe/resources/codes/exports.d.ts +2 -0
- package/dist/cjs/api/resources/construe/resources/codes/exports.js +21 -0
- package/dist/cjs/api/resources/construe/resources/index.d.ts +5 -0
- package/dist/cjs/api/resources/construe/resources/index.js +44 -0
- package/dist/cjs/api/resources/construe/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/construe/types/index.js +0 -1
- package/dist/cjs/api/resources/fhir/client/Client.d.ts +50 -75
- package/dist/cjs/api/resources/fhir/client/Client.js +75 -205
- package/dist/cjs/api/resources/fhir/client/requests/CreateRequest.d.ts +2 -3
- package/dist/cjs/api/resources/fhir/client/requests/ExecuteBundleRequest.d.ts +19 -16
- package/dist/cjs/api/resources/fhir/client/requests/SearchRequest.d.ts +0 -8
- package/dist/cjs/api/resources/fhir/client/requests/UpsertRequest.d.ts +3 -4
- package/dist/cjs/api/resources/fhir/index.d.ts +0 -1
- package/dist/cjs/api/resources/fhir/index.js +0 -1
- package/dist/cjs/api/resources/fhir/types/index.d.ts +0 -4
- package/dist/cjs/api/resources/fhir/types/index.js +0 -4
- package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +3 -74
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +5 -221
- package/dist/cjs/api/resources/fhirProvider/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/fhirProvider/exports.d.ts +1 -0
- package/dist/cjs/api/resources/fhirProvider/exports.js +1 -0
- package/dist/cjs/api/resources/fhirProvider/index.d.ts +1 -0
- package/dist/cjs/api/resources/fhirProvider/index.js +1 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/Client.d.ts +90 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/Client.js +280 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/index.js +17 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/exports.d.ts +2 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/exports.js +21 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/index.d.ts +2 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/index.js +18 -0
- package/dist/cjs/api/resources/fhirProvider/{types/RemoveAuthConfigResponse.d.ts → resources/authConfig/types/RemoveResponse.d.ts} +2 -2
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/types/index.js +17 -0
- package/dist/cjs/api/resources/fhirProvider/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/{tools/resources/mcpServer → fhirProvider}/resources/index.js +7 -2
- package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/fhirProvider/types/index.js +0 -1
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +11 -1
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +33 -3
- package/dist/cjs/api/resources/{fhir/errors/ServiceUnavailableError.d.ts → lang2Fhir/errors/ClientClosedRequestError.d.ts} +1 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/ClientClosedRequestError.js +54 -0
- package/dist/cjs/api/resources/{fhir/errors/UnauthorizedError.d.ts → lang2Fhir/errors/GatewayTimeoutError.d.ts} +1 -1
- package/dist/cjs/api/resources/{fhir/errors/InternalServerError.js → lang2Fhir/errors/GatewayTimeoutError.js} +5 -5
- package/dist/cjs/api/resources/lang2Fhir/errors/index.d.ts +3 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/index.js +3 -1
- package/dist/cjs/api/resources/summary/resources/templates/client/Client.d.ts +7 -4
- package/dist/cjs/api/resources/summary/resources/templates/client/Client.js +6 -12
- package/dist/{esm/api/resources/summary/resources/templates/types/TemplatesDeleteResponse.d.mts → cjs/api/resources/summary/resources/templates/types/DeleteResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/summary/resources/templates/types/{TemplatesGetResponse.d.ts → GetResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/summary/resources/templates/types/{TemplatesListResponse.d.ts → ListResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/summary/resources/templates/types/{TemplatesUpdateResponse.d.ts → UpdateResponse.d.ts} +1 -1
- package/dist/cjs/api/resources/summary/resources/templates/types/index.d.ts +4 -4
- package/dist/cjs/api/resources/summary/resources/templates/types/index.js +4 -4
- package/dist/cjs/api/resources/tools/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/tools/client/Client.js +8 -12
- package/dist/cjs/api/resources/{fhir/errors/BadRequestError.d.ts → tools/errors/NotFoundError.d.ts} +1 -1
- package/dist/cjs/api/resources/{fhir/errors/BadRequestError.js → tools/errors/NotFoundError.js} +5 -5
- package/dist/cjs/api/resources/tools/errors/index.d.ts +1 -1
- package/dist/cjs/api/resources/tools/errors/index.js +1 -1
- package/dist/cjs/api/resources/tools/resources/index.d.ts +3 -2
- package/dist/cjs/api/resources/tools/resources/index.js +4 -3
- package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/Client.d.ts +21 -19
- package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/Client.js +20 -16
- package/dist/cjs/api/resources/tools/resources/mcpServers/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/tools/resources/mcpServers/client/index.js +17 -0
- package/dist/cjs/api/resources/tools/resources/mcpServers/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServers/exports.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServers/exports.js +21 -0
- package/dist/cjs/api/resources/tools/resources/mcpServers/index.d.ts +1 -0
- package/dist/cjs/api/resources/tools/resources/mcpServers/index.js +17 -0
- package/dist/cjs/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/Client.d.ts +19 -17
- package/dist/cjs/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/Client.js +22 -16
- package/dist/cjs/api/resources/tools/resources/mcpTools/client/index.js +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpTools/exports.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpTools/exports.js +21 -0
- package/dist/cjs/api/resources/tools/resources/mcpTools/index.d.ts +1 -0
- package/dist/cjs/api/resources/tools/resources/mcpTools/index.js +17 -0
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/workflows/client/Client.js +9 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/agent/client/Client.d.mts +3 -59
- package/dist/esm/api/resources/agent/client/Client.mjs +6 -231
- package/dist/esm/api/resources/agent/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/{fhir/errors/InternalServerError.d.mts → agent/errors/GatewayTimeoutError.d.mts} +1 -1
- package/dist/esm/api/resources/{fhir/errors/InternalServerError.mjs → agent/errors/GatewayTimeoutError.mjs} +3 -3
- package/dist/esm/api/resources/agent/errors/index.d.mts +1 -0
- package/dist/esm/api/resources/agent/errors/index.mjs +1 -0
- package/dist/esm/api/resources/agent/resources/chat/client/Client.d.mts +79 -0
- package/dist/esm/api/resources/agent/resources/chat/client/Client.mjs +268 -0
- package/dist/esm/api/resources/agent/{client/requests/GetChatMessagesRequest.d.mts → resources/chat/client/requests/ListMessagesRequest.d.mts} +4 -4
- package/dist/esm/api/resources/agent/resources/chat/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/agent/resources/chat/exports.d.mts +2 -0
- package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools → agent/resources/chat}/exports.mjs +1 -1
- package/dist/esm/api/resources/agent/resources/chat/index.d.mts +2 -0
- package/dist/esm/api/resources/agent/resources/chat/index.mjs +2 -0
- package/dist/esm/api/resources/agent/resources/chat/types/ListMessagesRequestOrder.d.mts +5 -0
- package/dist/esm/api/resources/agent/{types/GetChatMessagesRequestOrder.mjs → resources/chat/types/ListMessagesRequestOrder.mjs} +1 -1
- package/dist/esm/api/resources/agent/resources/chat/types/ListMessagesRequestRole.d.mts +7 -0
- package/dist/esm/api/resources/agent/{types/GetChatMessagesRequestRole.mjs → resources/chat/types/ListMessagesRequestRole.mjs} +1 -1
- package/dist/esm/api/resources/agent/{types/GetChatMessagesResponse.d.mts → resources/chat/types/ListMessagesResponse.d.mts} +2 -2
- package/dist/esm/api/resources/agent/resources/chat/types/index.d.mts +3 -0
- package/dist/esm/api/resources/agent/resources/chat/types/index.mjs +3 -0
- package/dist/esm/api/resources/agent/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/agent/resources/index.mjs +3 -0
- package/dist/esm/api/resources/agent/types/index.d.mts +0 -3
- package/dist/esm/api/resources/agent/types/index.mjs +0 -3
- package/dist/esm/api/resources/construe/client/Client.d.mts +6 -330
- package/dist/esm/api/resources/construe/client/Client.mjs +8 -838
- package/dist/esm/api/resources/construe/client/requests/index.d.mts +0 -9
- package/dist/esm/api/resources/construe/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/construe/exports.d.mts +1 -0
- package/dist/esm/api/resources/construe/exports.mjs +1 -0
- package/dist/esm/api/resources/construe/index.d.mts +1 -0
- package/dist/esm/api/resources/construe/index.mjs +1 -0
- package/dist/esm/api/resources/construe/resources/codeSystems/client/Client.d.mts +135 -0
- package/dist/esm/api/resources/construe/resources/codeSystems/client/Client.mjs +396 -0
- package/dist/esm/api/resources/construe/resources/codeSystems/client/index.d.mts +1 -0
- package/dist/esm/api/resources/construe/resources/codeSystems/client/index.mjs +1 -0
- package/dist/{cjs/api/resources/construe/client/requests/ExportCodeSystemRequest.d.ts → esm/api/resources/construe/resources/codeSystems/client/requests/DeleteRequest.d.mts} +1 -1
- package/dist/esm/api/resources/construe/{client/requests/DeleteCodeSystemRequest.d.mts → resources/codeSystems/client/requests/ExportRequest.d.mts} +1 -1
- package/dist/esm/api/resources/construe/{client/requests/GetCodeSystemRequest.d.mts → resources/codeSystems/client/requests/FindRequest.d.mts} +1 -1
- package/dist/esm/api/resources/construe/{client → resources/codeSystems/client}/requests/UploadRequest.d.mts +1 -1
- package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/construe/resources/codeSystems/exports.d.mts +2 -0
- package/dist/esm/api/resources/{tools/resources/mcpServer → construe/resources/codeSystems}/exports.mjs +1 -2
- package/dist/esm/api/resources/construe/resources/codeSystems/index.d.mts +2 -0
- package/dist/esm/api/resources/construe/resources/codeSystems/index.mjs +2 -0
- package/dist/{cjs/api/resources/construe/types/UploadCodeSystemResponse.d.ts → esm/api/resources/construe/resources/codeSystems/types/UploadResponse.d.mts} +1 -1
- package/dist/esm/api/resources/construe/resources/codeSystems/types/index.d.mts +1 -0
- package/dist/esm/api/resources/construe/resources/codeSystems/types/index.mjs +1 -0
- package/dist/esm/api/resources/construe/resources/codes/client/Client.d.mts +227 -0
- package/dist/esm/api/resources/construe/resources/codes/client/Client.mjs +491 -0
- package/dist/esm/api/resources/construe/resources/codes/client/index.d.mts +1 -0
- package/dist/esm/api/resources/construe/resources/codes/client/index.mjs +1 -0
- package/dist/esm/api/resources/construe/{client/requests/ListCodesRequest.d.mts → resources/codes/client/requests/CodesListRequest.d.mts} +1 -1
- package/dist/esm/api/resources/construe/{client → resources/codes/client}/requests/ExtractRequest.d.mts +1 -1
- package/dist/{cjs/api/resources/construe/client/requests/GetCodeRequest.d.ts → esm/api/resources/construe/resources/codes/client/requests/LookupRequest.d.mts} +1 -1
- package/dist/esm/api/resources/construe/resources/codes/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/construe/resources/codes/exports.d.mts +2 -0
- package/dist/esm/api/resources/construe/resources/codes/exports.mjs +3 -0
- package/dist/esm/api/resources/construe/resources/index.d.mts +5 -0
- package/dist/esm/api/resources/construe/resources/index.mjs +5 -0
- package/dist/esm/api/resources/construe/types/index.d.mts +0 -1
- package/dist/esm/api/resources/construe/types/index.mjs +0 -1
- package/dist/esm/api/resources/fhir/client/Client.d.mts +50 -75
- package/dist/esm/api/resources/fhir/client/Client.mjs +75 -205
- package/dist/esm/api/resources/fhir/client/requests/CreateRequest.d.mts +2 -3
- package/dist/esm/api/resources/fhir/client/requests/ExecuteBundleRequest.d.mts +19 -16
- package/dist/esm/api/resources/fhir/client/requests/SearchRequest.d.mts +0 -8
- package/dist/esm/api/resources/fhir/client/requests/UpsertRequest.d.mts +3 -4
- package/dist/esm/api/resources/fhir/index.d.mts +0 -1
- package/dist/esm/api/resources/fhir/index.mjs +0 -1
- package/dist/esm/api/resources/fhir/types/index.d.mts +0 -4
- package/dist/esm/api/resources/fhir/types/index.mjs +0 -4
- package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +3 -74
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +5 -221
- package/dist/esm/api/resources/fhirProvider/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/fhirProvider/exports.d.mts +1 -0
- package/dist/esm/api/resources/fhirProvider/exports.mjs +1 -0
- package/dist/esm/api/resources/fhirProvider/index.d.mts +1 -0
- package/dist/esm/api/resources/fhirProvider/index.mjs +1 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/Client.d.mts +90 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/Client.mjs +243 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/index.d.mts +1 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/index.mjs +1 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/exports.d.mts +2 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/exports.mjs +3 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/index.d.mts +2 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/index.mjs +2 -0
- package/dist/esm/api/resources/fhirProvider/{types/RemoveAuthConfigResponse.d.mts → resources/authConfig/types/RemoveResponse.d.mts} +2 -2
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/types/index.d.mts +1 -0
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/types/index.mjs +1 -0
- package/dist/esm/api/resources/fhirProvider/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/fhirProvider/resources/index.mjs +3 -0
- package/dist/esm/api/resources/fhirProvider/types/index.d.mts +0 -1
- package/dist/esm/api/resources/fhirProvider/types/index.mjs +0 -1
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +11 -1
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +33 -3
- package/dist/esm/api/resources/{fhir/errors/ServiceUnavailableError.d.mts → lang2Fhir/errors/ClientClosedRequestError.d.mts} +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/ClientClosedRequestError.mjs +17 -0
- package/dist/esm/api/resources/{fhir/errors/UnauthorizedError.d.mts → lang2Fhir/errors/GatewayTimeoutError.d.mts} +1 -1
- package/dist/esm/api/resources/{fhir/errors/BadGatewayError.mjs → lang2Fhir/errors/GatewayTimeoutError.mjs} +3 -3
- package/dist/esm/api/resources/lang2Fhir/errors/index.d.mts +3 -1
- package/dist/esm/api/resources/lang2Fhir/errors/index.mjs +3 -1
- package/dist/esm/api/resources/summary/resources/templates/client/Client.d.mts +7 -4
- package/dist/esm/api/resources/summary/resources/templates/client/Client.mjs +6 -12
- package/dist/{cjs/api/resources/summary/resources/templates/types/TemplatesDeleteResponse.d.ts → esm/api/resources/summary/resources/templates/types/DeleteResponse.d.mts} +1 -1
- package/dist/esm/api/resources/summary/resources/templates/types/{TemplatesGetResponse.d.mts → GetResponse.d.mts} +1 -1
- package/dist/esm/api/resources/summary/resources/templates/types/{TemplatesListResponse.d.mts → ListResponse.d.mts} +1 -1
- package/dist/esm/api/resources/summary/resources/templates/types/{TemplatesUpdateResponse.d.mts → UpdateResponse.d.mts} +1 -1
- package/dist/esm/api/resources/summary/resources/templates/types/index.d.mts +4 -4
- package/dist/esm/api/resources/summary/resources/templates/types/index.mjs +4 -4
- package/dist/esm/api/resources/tools/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/tools/client/Client.mjs +8 -12
- package/dist/esm/api/resources/{fhir/errors/BadRequestError.d.mts → tools/errors/NotFoundError.d.mts} +1 -1
- package/dist/esm/api/resources/{fhir/errors/BadRequestError.mjs → tools/errors/NotFoundError.mjs} +3 -3
- package/dist/esm/api/resources/tools/errors/index.d.mts +1 -1
- package/dist/esm/api/resources/tools/errors/index.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/index.d.mts +3 -2
- package/dist/esm/api/resources/tools/resources/index.mjs +3 -2
- package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/Client.d.mts +21 -19
- package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/Client.mjs +18 -14
- package/dist/esm/api/resources/tools/resources/mcpServers/client/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServers/client/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServers/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServers/exports.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServers/exports.mjs +3 -0
- package/dist/esm/api/resources/tools/resources/mcpServers/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServers/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/Client.d.mts +19 -17
- package/dist/esm/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/Client.mjs +20 -14
- package/dist/esm/api/resources/tools/resources/mcpTools/client/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/mcpTools/client/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/mcpTools/exports.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/mcpTools/exports.mjs +3 -0
- package/dist/esm/api/resources/tools/resources/mcpTools/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/mcpTools/index.mjs +1 -0
- package/dist/esm/api/resources/workflows/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/workflows/client/Client.mjs +9 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/openapi/openapi.json +353 -660
- package/package.json +57 -13
- package/reference.md +235 -211
- package/dist/cjs/api/resources/agent/types/GetChatMessagesRequestOrder.d.ts +0 -5
- package/dist/cjs/api/resources/agent/types/GetChatMessagesRequestRole.d.ts +0 -7
- package/dist/cjs/api/resources/fhir/errors/BadGatewayError.d.ts +0 -6
- package/dist/cjs/api/resources/fhir/errors/ServiceUnavailableError.js +0 -54
- package/dist/cjs/api/resources/fhir/errors/TooManyRequestsError.d.ts +0 -6
- package/dist/cjs/api/resources/fhir/errors/TooManyRequestsError.js +0 -54
- package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.js +0 -54
- package/dist/cjs/api/resources/fhir/errors/index.d.ts +0 -7
- package/dist/cjs/api/resources/fhir/errors/index.js +0 -23
- package/dist/cjs/api/resources/fhir/types/ErrorResponse.d.ts +0 -11
- package/dist/cjs/api/resources/fhir/types/FhirBundle.d.ts +0 -54
- package/dist/cjs/api/resources/fhir/types/FhirBundle.js +0 -23
- package/dist/cjs/api/resources/fhir/types/FhirResource.d.ts +0 -24
- package/dist/cjs/api/resources/fhir/types/SearchResponse.d.ts +0 -2
- package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.d.ts +0 -5
- package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.js +0 -54
- package/dist/cjs/api/resources/summary/resources/templates/types/TemplatesGetResponse.js +0 -3
- package/dist/cjs/api/resources/summary/resources/templates/types/TemplatesListResponse.js +0 -3
- package/dist/cjs/api/resources/summary/resources/templates/types/TemplatesUpdateResponse.js +0 -3
- package/dist/cjs/api/resources/tools/errors/FailedDependencyError.d.ts +0 -5
- package/dist/cjs/api/resources/tools/errors/FailedDependencyError.js +0 -54
- package/dist/cjs/api/resources/tools/resources/mcpServer/exports.d.ts +0 -3
- package/dist/cjs/api/resources/tools/resources/mcpServer/index.d.ts +0 -2
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/exports.d.ts +0 -2
- package/dist/esm/api/resources/agent/types/GetChatMessagesRequestOrder.d.mts +0 -5
- package/dist/esm/api/resources/agent/types/GetChatMessagesRequestRole.d.mts +0 -7
- package/dist/esm/api/resources/fhir/errors/BadGatewayError.d.mts +0 -6
- package/dist/esm/api/resources/fhir/errors/ServiceUnavailableError.mjs +0 -17
- package/dist/esm/api/resources/fhir/errors/TooManyRequestsError.d.mts +0 -6
- package/dist/esm/api/resources/fhir/errors/TooManyRequestsError.mjs +0 -17
- package/dist/esm/api/resources/fhir/errors/UnauthorizedError.mjs +0 -17
- package/dist/esm/api/resources/fhir/errors/index.d.mts +0 -7
- package/dist/esm/api/resources/fhir/errors/index.mjs +0 -7
- package/dist/esm/api/resources/fhir/types/ErrorResponse.d.mts +0 -11
- package/dist/esm/api/resources/fhir/types/FhirBundle.d.mts +0 -54
- package/dist/esm/api/resources/fhir/types/FhirBundle.mjs +0 -20
- package/dist/esm/api/resources/fhir/types/FhirResource.d.mts +0 -24
- package/dist/esm/api/resources/fhir/types/SearchResponse.d.mts +0 -2
- package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.d.mts +0 -5
- package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.mjs +0 -17
- package/dist/esm/api/resources/summary/resources/templates/types/TemplatesGetResponse.mjs +0 -2
- package/dist/esm/api/resources/summary/resources/templates/types/TemplatesListResponse.mjs +0 -2
- package/dist/esm/api/resources/summary/resources/templates/types/TemplatesUpdateResponse.mjs +0 -2
- package/dist/esm/api/resources/tools/errors/FailedDependencyError.d.mts +0 -5
- package/dist/esm/api/resources/tools/errors/FailedDependencyError.mjs +0 -17
- package/dist/esm/api/resources/tools/resources/mcpServer/exports.d.mts +0 -3
- package/dist/esm/api/resources/tools/resources/mcpServer/index.d.mts +0 -2
- package/dist/esm/api/resources/tools/resources/mcpServer/index.mjs +0 -2
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.mjs +0 -1
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/exports.d.mts +0 -2
- /package/dist/cjs/api/resources/{tools/resources/mcpServer → agent/resources/chat}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{tools/resources/mcpServer → agent/resources/chat}/client/index.js +0 -0
- /package/dist/cjs/api/resources/agent/{client → resources/chat/client}/requests/AgentChatRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/agent/{client → resources/chat/client}/requests/AgentChatRequest.js +0 -0
- /package/dist/cjs/api/resources/agent/{client → resources/chat/client}/requests/AgentStreamChatRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/agent/{client → resources/chat/client}/requests/AgentStreamChatRequest.js +0 -0
- /package/dist/cjs/api/resources/agent/{client/requests/GetChatMessagesRequest.js → resources/chat/client/requests/ListMessagesRequest.js} +0 -0
- /package/dist/cjs/api/resources/{tools/resources/mcpServer → agent/resources/chat}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/agent/{types/GetChatMessagesResponse.js → resources/chat/types/ListMessagesResponse.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client/requests/DeleteCodeSystemRequest.js → resources/codeSystems/client/requests/DeleteRequest.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client/requests/ExportCodeSystemRequest.js → resources/codeSystems/client/requests/ExportRequest.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client/requests/ExtractRequest.js → resources/codeSystems/client/requests/FindRequest.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client → resources/codeSystems/client}/requests/UploadRequest.js +0 -0
- /package/dist/cjs/api/resources/construe/{client/requests/GetCodeRequest.js → resources/codeSystems/types/UploadResponse.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client/requests/GetCodeSystemRequest.js → resources/codes/client/requests/CodesListRequest.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client/requests/ListCodesRequest.js → resources/codes/client/requests/ExtractRequest.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client/requests/SearchSemanticRequest.js → resources/codes/client/requests/LookupRequest.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client → resources/codes/client}/requests/SearchSemanticRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/construe/{client/requests/SearchTextRequest.js → resources/codes/client/requests/SearchSemanticRequest.js} +0 -0
- /package/dist/cjs/api/resources/construe/{client → resources/codes/client}/requests/SearchTextRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/construe/{types/UploadCodeSystemResponse.js → resources/codes/client/requests/SearchTextRequest.js} +0 -0
- /package/dist/cjs/api/resources/{tools/resources/mcpServer/resources/tools/client → construe/resources/codes/client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/{tools/resources/mcpServer/resources/tools → construe/resources/codes}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{tools/resources/mcpServer/resources/tools → construe/resources/codes}/index.js +0 -0
- /package/dist/cjs/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderRemoveAuthConfigRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderRemoveAuthConfigRequest.js +0 -0
- /package/dist/cjs/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderSetActiveAuthConfigRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderSetActiveAuthConfigRequest.js +0 -0
- /package/dist/cjs/api/resources/{fhir/types/ErrorResponse.js → fhirProvider/resources/authConfig/types/RemoveResponse.js} +0 -0
- /package/dist/cjs/api/resources/{fhir → lang2Fhir}/errors/NotFoundError.d.ts +0 -0
- /package/dist/cjs/api/resources/{fhir → lang2Fhir}/errors/NotFoundError.js +0 -0
- /package/dist/cjs/api/resources/{fhir/types/FhirResource.js → summary/resources/templates/types/DeleteResponse.js} +0 -0
- /package/dist/cjs/api/resources/{fhir/types/SearchResponse.js → summary/resources/templates/types/GetResponse.js} +0 -0
- /package/dist/cjs/api/resources/{fhirProvider/types/RemoveAuthConfigResponse.js → summary/resources/templates/types/ListResponse.js} +0 -0
- /package/dist/cjs/api/resources/summary/resources/templates/types/{TemplatesDeleteResponse.js → UpdateResponse.js} +0 -0
- /package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/McpServerCreateRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/McpServerCreateRequest.js +0 -0
- /package/dist/cjs/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/index.d.ts +0 -0
- /package/dist/cjs/api/resources/tools/resources/{mcpServer/resources/tools → mcpTools}/client/index.d.ts +0 -0
- /package/dist/esm/api/resources/{tools/resources/mcpServer → agent/resources/chat}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{tools/resources/mcpServer → agent/resources/chat}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/agent/{client → resources/chat/client}/requests/AgentChatRequest.d.mts +0 -0
- /package/dist/esm/api/resources/agent/{client → resources/chat/client}/requests/AgentChatRequest.mjs +0 -0
- /package/dist/esm/api/resources/agent/{client → resources/chat/client}/requests/AgentStreamChatRequest.d.mts +0 -0
- /package/dist/esm/api/resources/agent/{client → resources/chat/client}/requests/AgentStreamChatRequest.mjs +0 -0
- /package/dist/esm/api/resources/agent/{client/requests/GetChatMessagesRequest.mjs → resources/chat/client/requests/ListMessagesRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{tools/resources/mcpServer → agent/resources/chat}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/agent/{types/GetChatMessagesResponse.mjs → resources/chat/types/ListMessagesResponse.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client/requests/DeleteCodeSystemRequest.mjs → resources/codeSystems/client/requests/DeleteRequest.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client/requests/ExportCodeSystemRequest.mjs → resources/codeSystems/client/requests/ExportRequest.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client/requests/ExtractRequest.mjs → resources/codeSystems/client/requests/FindRequest.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client → resources/codeSystems/client}/requests/UploadRequest.mjs +0 -0
- /package/dist/esm/api/resources/construe/{client/requests/GetCodeRequest.mjs → resources/codeSystems/types/UploadResponse.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client/requests/GetCodeSystemRequest.mjs → resources/codes/client/requests/CodesListRequest.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client/requests/ListCodesRequest.mjs → resources/codes/client/requests/ExtractRequest.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client/requests/SearchSemanticRequest.mjs → resources/codes/client/requests/LookupRequest.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client → resources/codes/client}/requests/SearchSemanticRequest.d.mts +0 -0
- /package/dist/esm/api/resources/construe/{client/requests/SearchTextRequest.mjs → resources/codes/client/requests/SearchSemanticRequest.mjs} +0 -0
- /package/dist/esm/api/resources/construe/{client → resources/codes/client}/requests/SearchTextRequest.d.mts +0 -0
- /package/dist/esm/api/resources/construe/{types/UploadCodeSystemResponse.mjs → resources/codes/client/requests/SearchTextRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools/client → construe/resources/codes/client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools → construe/resources/codes}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools → construe/resources/codes}/index.mjs +0 -0
- /package/dist/esm/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderRemoveAuthConfigRequest.d.mts +0 -0
- /package/dist/esm/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderRemoveAuthConfigRequest.mjs +0 -0
- /package/dist/esm/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderSetActiveAuthConfigRequest.d.mts +0 -0
- /package/dist/esm/api/resources/fhirProvider/{client → resources/authConfig/client}/requests/FhirProviderSetActiveAuthConfigRequest.mjs +0 -0
- /package/dist/esm/api/resources/{tools/resources/mcpServer/resources/tools/client/index.d.mts → fhirProvider/resources/authConfig/client/requests/index.mjs} +0 -0
- /package/dist/esm/api/resources/{fhir/types/ErrorResponse.mjs → fhirProvider/resources/authConfig/types/RemoveResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{fhir → lang2Fhir}/errors/NotFoundError.d.mts +0 -0
- /package/dist/esm/api/resources/{fhir → lang2Fhir}/errors/NotFoundError.mjs +0 -0
- /package/dist/esm/api/resources/{fhir/types/FhirResource.mjs → summary/resources/templates/types/DeleteResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{fhir/types/SearchResponse.mjs → summary/resources/templates/types/GetResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{fhirProvider/types/RemoveAuthConfigResponse.mjs → summary/resources/templates/types/ListResponse.mjs} +0 -0
- /package/dist/esm/api/resources/summary/resources/templates/types/{TemplatesDeleteResponse.mjs → UpdateResponse.mjs} +0 -0
- /package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/McpServerCreateRequest.d.mts +0 -0
- /package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/McpServerCreateRequest.mjs +0 -0
- /package/dist/esm/api/resources/tools/resources/{mcpServer → mcpServers}/client/requests/index.d.mts +0 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "phenoml",
|
|
46
|
-
"X-Fern-SDK-Version": "
|
|
47
|
-
"User-Agent": "phenoml/
|
|
46
|
+
"X-Fern-SDK-Version": "17.0.0",
|
|
47
|
+
"User-Agent": "phenoml/17.0.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -2,6 +2,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
4
|
import * as phenoml from "../../../index.js";
|
|
5
|
+
import { ChatClient } from "../resources/chat/client/Client.js";
|
|
5
6
|
import { PromptsClient } from "../resources/prompts/client/Client.js";
|
|
6
7
|
export declare namespace AgentClient {
|
|
7
8
|
type Options = BaseClientOptions;
|
|
@@ -10,8 +11,10 @@ export declare namespace AgentClient {
|
|
|
10
11
|
}
|
|
11
12
|
export declare class AgentClient {
|
|
12
13
|
protected readonly _options: NormalizedClientOptionsWithAuth<AgentClient.Options>;
|
|
14
|
+
protected _chat: ChatClient | undefined;
|
|
13
15
|
protected _prompts: PromptsClient | undefined;
|
|
14
16
|
constructor(options?: AgentClient.Options);
|
|
17
|
+
get chat(): ChatClient;
|
|
15
18
|
get prompts(): PromptsClient;
|
|
16
19
|
/**
|
|
17
20
|
* Creates a new PhenoAgent with specified configuration
|
|
@@ -134,63 +137,4 @@ export declare class AgentClient {
|
|
|
134
137
|
*/
|
|
135
138
|
patch(id: string, request: phenoml.agent.JsonPatch, requestOptions?: AgentClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentResponse>;
|
|
136
139
|
private __patch;
|
|
137
|
-
/**
|
|
138
|
-
* Send a message to an agent and receive a JSON response.
|
|
139
|
-
*
|
|
140
|
-
* @param {phenoml.agent.AgentChatRequest} request
|
|
141
|
-
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
142
|
-
*
|
|
143
|
-
* @throws {@link phenoml.agent.BadRequestError}
|
|
144
|
-
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
145
|
-
* @throws {@link phenoml.agent.ForbiddenError}
|
|
146
|
-
* @throws {@link phenoml.agent.InternalServerError}
|
|
147
|
-
*
|
|
148
|
-
* @example
|
|
149
|
-
* await client.agent.chat({
|
|
150
|
-
* "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
|
|
151
|
-
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
|
|
152
|
-
* message: "What is the patient's current condition?",
|
|
153
|
-
* session_id: "session-abc123",
|
|
154
|
-
* agent_id: "agent-123"
|
|
155
|
-
* })
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
* await client.agent.chat({
|
|
159
|
-
* "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
|
|
160
|
-
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
|
|
161
|
-
* message: "Create a patient record for Jane Doe, 32F, diagnosed with iron deficiency anemia. Prescribe ferrous sulfate 325mg daily.",
|
|
162
|
-
* session_id: "session-def456",
|
|
163
|
-
* agent_id: "agent-123",
|
|
164
|
-
* enhanced_reasoning: true
|
|
165
|
-
* })
|
|
166
|
-
*/
|
|
167
|
-
chat(request: phenoml.agent.AgentChatRequest, requestOptions?: AgentClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentChatResponse>;
|
|
168
|
-
private __chat;
|
|
169
|
-
/**
|
|
170
|
-
* Send a message to an agent and receive the response as a Server-Sent Events
|
|
171
|
-
* (SSE) stream. Events include message_start, content_delta, tool_use,
|
|
172
|
-
* tool_result, message_end, and error.
|
|
173
|
-
*/
|
|
174
|
-
streamChat(request: phenoml.agent.AgentStreamChatRequest, requestOptions?: AgentClient.RequestOptions): core.HttpResponsePromise<core.Stream<phenoml.agent.AgentChatStreamEvent>>;
|
|
175
|
-
private __streamChat;
|
|
176
|
-
/**
|
|
177
|
-
* Retrieves a list of chat messages for a given chat session
|
|
178
|
-
*
|
|
179
|
-
* @param {phenoml.agent.GetChatMessagesRequest} request
|
|
180
|
-
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
|
-
*
|
|
182
|
-
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
183
|
-
* @throws {@link phenoml.agent.ForbiddenError}
|
|
184
|
-
* @throws {@link phenoml.agent.InternalServerError}
|
|
185
|
-
*
|
|
186
|
-
* @example
|
|
187
|
-
* await client.agent.getChatMessages({
|
|
188
|
-
* chat_session_id: "chat_session_id",
|
|
189
|
-
* num_messages: 1,
|
|
190
|
-
* role: "user",
|
|
191
|
-
* order: "asc"
|
|
192
|
-
* })
|
|
193
|
-
*/
|
|
194
|
-
getChatMessages(request: phenoml.agent.GetChatMessagesRequest, requestOptions?: AgentClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.GetChatMessagesResponse>;
|
|
195
|
-
private __getChatMessages;
|
|
196
140
|
}
|
|
@@ -42,17 +42,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
-
var t = {};
|
|
47
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
-
t[p] = s[p];
|
|
49
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
-
t[p[i]] = s[p[i]];
|
|
53
|
-
}
|
|
54
|
-
return t;
|
|
55
|
-
};
|
|
56
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
46
|
exports.AgentClient = void 0;
|
|
58
47
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
@@ -62,14 +51,19 @@ const environments = __importStar(require("../../../../environments.js"));
|
|
|
62
51
|
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
63
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
64
53
|
const phenoml = __importStar(require("../../../index.js"));
|
|
65
|
-
const Client_js_1 = require("../resources/
|
|
54
|
+
const Client_js_1 = require("../resources/chat/client/Client.js");
|
|
55
|
+
const Client_js_2 = require("../resources/prompts/client/Client.js");
|
|
66
56
|
class AgentClient {
|
|
67
57
|
constructor(options = {}) {
|
|
68
58
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
69
59
|
}
|
|
60
|
+
get chat() {
|
|
61
|
+
var _a;
|
|
62
|
+
return ((_a = this._chat) !== null && _a !== void 0 ? _a : (this._chat = new Client_js_1.ChatClient(this._options)));
|
|
63
|
+
}
|
|
70
64
|
get prompts() {
|
|
71
65
|
var _a;
|
|
72
|
-
return ((_a = this._prompts) !== null && _a !== void 0 ? _a : (this._prompts = new
|
|
66
|
+
return ((_a = this._prompts) !== null && _a !== void 0 ? _a : (this._prompts = new Client_js_2.PromptsClient(this._options)));
|
|
73
67
|
}
|
|
74
68
|
/**
|
|
75
69
|
* Creates a new PhenoAgent with specified configuration
|
|
@@ -457,224 +451,5 @@ class AgentClient {
|
|
|
457
451
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/agent/{id}");
|
|
458
452
|
});
|
|
459
453
|
}
|
|
460
|
-
/**
|
|
461
|
-
* Send a message to an agent and receive a JSON response.
|
|
462
|
-
*
|
|
463
|
-
* @param {phenoml.agent.AgentChatRequest} request
|
|
464
|
-
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
465
|
-
*
|
|
466
|
-
* @throws {@link phenoml.agent.BadRequestError}
|
|
467
|
-
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
468
|
-
* @throws {@link phenoml.agent.ForbiddenError}
|
|
469
|
-
* @throws {@link phenoml.agent.InternalServerError}
|
|
470
|
-
*
|
|
471
|
-
* @example
|
|
472
|
-
* await client.agent.chat({
|
|
473
|
-
* "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
|
|
474
|
-
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
|
|
475
|
-
* message: "What is the patient's current condition?",
|
|
476
|
-
* session_id: "session-abc123",
|
|
477
|
-
* agent_id: "agent-123"
|
|
478
|
-
* })
|
|
479
|
-
*
|
|
480
|
-
* @example
|
|
481
|
-
* await client.agent.chat({
|
|
482
|
-
* "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
|
|
483
|
-
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
|
|
484
|
-
* message: "Create a patient record for Jane Doe, 32F, diagnosed with iron deficiency anemia. Prescribe ferrous sulfate 325mg daily.",
|
|
485
|
-
* session_id: "session-def456",
|
|
486
|
-
* agent_id: "agent-123",
|
|
487
|
-
* enhanced_reasoning: true
|
|
488
|
-
* })
|
|
489
|
-
*/
|
|
490
|
-
chat(request, requestOptions) {
|
|
491
|
-
return core.HttpResponsePromise.fromPromise(this.__chat(request, requestOptions));
|
|
492
|
-
}
|
|
493
|
-
__chat(request, requestOptions) {
|
|
494
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
495
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
496
|
-
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider } = request, _body = __rest(request, ["X-Phenoml-On-Behalf-Of", "X-Phenoml-Fhir-Provider"]);
|
|
497
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
498
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
499
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
500
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
501
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
502
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
503
|
-
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, "agent/chat"),
|
|
504
|
-
method: "POST",
|
|
505
|
-
headers: _headers,
|
|
506
|
-
contentType: "application/json",
|
|
507
|
-
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
508
|
-
requestType: "json",
|
|
509
|
-
body: _body,
|
|
510
|
-
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,
|
|
511
|
-
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,
|
|
512
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
513
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
514
|
-
logging: this._options.logging,
|
|
515
|
-
});
|
|
516
|
-
if (_response.ok) {
|
|
517
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
518
|
-
}
|
|
519
|
-
if (_response.error.reason === "status-code") {
|
|
520
|
-
switch (_response.error.statusCode) {
|
|
521
|
-
case 400:
|
|
522
|
-
throw new phenoml.agent.BadRequestError(_response.error.body, _response.rawResponse);
|
|
523
|
-
case 401:
|
|
524
|
-
throw new phenoml.agent.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
525
|
-
case 403:
|
|
526
|
-
throw new phenoml.agent.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
527
|
-
case 500:
|
|
528
|
-
throw new phenoml.agent.InternalServerError(_response.error.body, _response.rawResponse);
|
|
529
|
-
default:
|
|
530
|
-
throw new errors.phenomlError({
|
|
531
|
-
statusCode: _response.error.statusCode,
|
|
532
|
-
body: _response.error.body,
|
|
533
|
-
rawResponse: _response.rawResponse,
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/agent/chat");
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
/**
|
|
541
|
-
* Send a message to an agent and receive the response as a Server-Sent Events
|
|
542
|
-
* (SSE) stream. Events include message_start, content_delta, tool_use,
|
|
543
|
-
* tool_result, message_end, and error.
|
|
544
|
-
*/
|
|
545
|
-
streamChat(request, requestOptions) {
|
|
546
|
-
return core.HttpResponsePromise.fromPromise(this.__streamChat(request, requestOptions));
|
|
547
|
-
}
|
|
548
|
-
__streamChat(request, requestOptions) {
|
|
549
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
550
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
551
|
-
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider } = request, _body = __rest(request, ["X-Phenoml-On-Behalf-Of", "X-Phenoml-Fhir-Provider"]);
|
|
552
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
553
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
554
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
555
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
556
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
557
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
558
|
-
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, "agent/stream-chat"),
|
|
559
|
-
method: "POST",
|
|
560
|
-
headers: _headers,
|
|
561
|
-
contentType: "application/json",
|
|
562
|
-
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
563
|
-
requestType: "json",
|
|
564
|
-
body: _body,
|
|
565
|
-
responseType: "sse",
|
|
566
|
-
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,
|
|
567
|
-
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,
|
|
568
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
569
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
570
|
-
logging: this._options.logging,
|
|
571
|
-
});
|
|
572
|
-
if (_response.ok) {
|
|
573
|
-
return {
|
|
574
|
-
data: new core.Stream({
|
|
575
|
-
stream: _response.body,
|
|
576
|
-
parse: (data) => data,
|
|
577
|
-
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
578
|
-
eventShape: {
|
|
579
|
-
type: "sse",
|
|
580
|
-
},
|
|
581
|
-
}),
|
|
582
|
-
rawResponse: _response.rawResponse,
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
if (_response.error.reason === "status-code") {
|
|
586
|
-
switch (_response.error.statusCode) {
|
|
587
|
-
case 400:
|
|
588
|
-
throw new phenoml.agent.BadRequestError(_response.error.body, _response.rawResponse);
|
|
589
|
-
case 401:
|
|
590
|
-
throw new phenoml.agent.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
591
|
-
case 403:
|
|
592
|
-
throw new phenoml.agent.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
593
|
-
case 500:
|
|
594
|
-
throw new phenoml.agent.InternalServerError(_response.error.body, _response.rawResponse);
|
|
595
|
-
default:
|
|
596
|
-
throw new errors.phenomlError({
|
|
597
|
-
statusCode: _response.error.statusCode,
|
|
598
|
-
body: _response.error.body,
|
|
599
|
-
rawResponse: _response.rawResponse,
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/agent/stream-chat");
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
/**
|
|
607
|
-
* Retrieves a list of chat messages for a given chat session
|
|
608
|
-
*
|
|
609
|
-
* @param {phenoml.agent.GetChatMessagesRequest} request
|
|
610
|
-
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
611
|
-
*
|
|
612
|
-
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
613
|
-
* @throws {@link phenoml.agent.ForbiddenError}
|
|
614
|
-
* @throws {@link phenoml.agent.InternalServerError}
|
|
615
|
-
*
|
|
616
|
-
* @example
|
|
617
|
-
* await client.agent.getChatMessages({
|
|
618
|
-
* chat_session_id: "chat_session_id",
|
|
619
|
-
* num_messages: 1,
|
|
620
|
-
* role: "user",
|
|
621
|
-
* order: "asc"
|
|
622
|
-
* })
|
|
623
|
-
*/
|
|
624
|
-
getChatMessages(request, requestOptions) {
|
|
625
|
-
return core.HttpResponsePromise.fromPromise(this.__getChatMessages(request, requestOptions));
|
|
626
|
-
}
|
|
627
|
-
__getChatMessages(request, requestOptions) {
|
|
628
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
629
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
630
|
-
const { chat_session_id: chatSessionId, num_messages: numMessages, role, order } = request;
|
|
631
|
-
const _queryParams = {
|
|
632
|
-
chat_session_id: chatSessionId,
|
|
633
|
-
num_messages: numMessages,
|
|
634
|
-
role: role != null ? role : undefined,
|
|
635
|
-
order: order != null ? order : undefined,
|
|
636
|
-
};
|
|
637
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
638
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
639
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
640
|
-
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, "agent/chat/messages"),
|
|
641
|
-
method: "GET",
|
|
642
|
-
headers: _headers,
|
|
643
|
-
queryString: core.url
|
|
644
|
-
.queryBuilder()
|
|
645
|
-
.addMany(_queryParams)
|
|
646
|
-
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
647
|
-
.build(),
|
|
648
|
-
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,
|
|
649
|
-
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,
|
|
650
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
651
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
652
|
-
logging: this._options.logging,
|
|
653
|
-
});
|
|
654
|
-
if (_response.ok) {
|
|
655
|
-
return {
|
|
656
|
-
data: _response.body,
|
|
657
|
-
rawResponse: _response.rawResponse,
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
if (_response.error.reason === "status-code") {
|
|
661
|
-
switch (_response.error.statusCode) {
|
|
662
|
-
case 401:
|
|
663
|
-
throw new phenoml.agent.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
664
|
-
case 403:
|
|
665
|
-
throw new phenoml.agent.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
666
|
-
case 500:
|
|
667
|
-
throw new phenoml.agent.InternalServerError(_response.error.body, _response.rawResponse);
|
|
668
|
-
default:
|
|
669
|
-
throw new errors.phenomlError({
|
|
670
|
-
statusCode: _response.error.statusCode,
|
|
671
|
-
body: _response.error.body,
|
|
672
|
-
rawResponse: _response.rawResponse,
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/agent/chat/messages");
|
|
677
|
-
});
|
|
678
|
-
}
|
|
679
454
|
}
|
|
680
455
|
exports.AgentClient = AgentClient;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as core from "../../../../core/index.js";
|
|
2
2
|
import * as errors from "../../../../errors/index.js";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class GatewayTimeoutError extends errors.phenomlError {
|
|
4
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -34,13 +34,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.
|
|
37
|
+
exports.GatewayTimeoutError = void 0;
|
|
38
38
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
39
|
-
class
|
|
39
|
+
class GatewayTimeoutError extends errors.phenomlError {
|
|
40
40
|
constructor(body, rawResponse) {
|
|
41
41
|
super({
|
|
42
|
-
message: "
|
|
43
|
-
statusCode:
|
|
42
|
+
message: "GatewayTimeoutError",
|
|
43
|
+
statusCode: 504,
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
@@ -51,4 +51,4 @@ class BadGatewayError extends errors.phenomlError {
|
|
|
51
51
|
this.name = this.constructor.name;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
exports.
|
|
54
|
+
exports.GatewayTimeoutError = GatewayTimeoutError;
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./BadRequestError.js"), exports);
|
|
18
18
|
__exportStar(require("./ForbiddenError.js"), exports);
|
|
19
|
+
__exportStar(require("./GatewayTimeoutError.js"), exports);
|
|
19
20
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
20
21
|
__exportStar(require("./NotFoundError.js"), exports);
|
|
21
22
|
__exportStar(require("./UnauthorizedError.js"), exports);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as phenoml from "../../../../../index.js";
|
|
5
|
+
export declare namespace ChatClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Conversational sessions with an agent.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ChatClient {
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ChatClient.Options>;
|
|
15
|
+
constructor(options?: ChatClient.Options);
|
|
16
|
+
/**
|
|
17
|
+
* Send a message to an agent and receive a JSON response.
|
|
18
|
+
*
|
|
19
|
+
* @param {phenoml.agent.AgentChatRequest} request
|
|
20
|
+
* @param {ChatClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
|
+
*
|
|
22
|
+
* @throws {@link phenoml.agent.BadRequestError}
|
|
23
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
24
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
25
|
+
* @throws {@link phenoml.agent.NotFoundError}
|
|
26
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
27
|
+
* @throws {@link phenoml.agent.GatewayTimeoutError}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await client.agent.chat.send({
|
|
31
|
+
* "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
|
|
32
|
+
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
|
|
33
|
+
* message: "What is the patient's current condition?",
|
|
34
|
+
* session_id: "session-abc123",
|
|
35
|
+
* agent_id: "agent-123"
|
|
36
|
+
* })
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.agent.chat.send({
|
|
40
|
+
* "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
|
|
41
|
+
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c...",
|
|
42
|
+
* message: "Create a patient record for Jane Doe, 32F, diagnosed with iron deficiency anemia. Prescribe ferrous sulfate 325mg daily.",
|
|
43
|
+
* session_id: "session-def456",
|
|
44
|
+
* agent_id: "agent-123",
|
|
45
|
+
* enhanced_reasoning: true
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
send(request: phenoml.agent.AgentChatRequest, requestOptions?: ChatClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentChatResponse>;
|
|
49
|
+
private __send;
|
|
50
|
+
/**
|
|
51
|
+
* Send a message to an agent and receive the response as a Server-Sent Events
|
|
52
|
+
* (SSE) stream. Events include message_start, content_delta, tool_use,
|
|
53
|
+
* tool_result, message_end, and error.
|
|
54
|
+
*/
|
|
55
|
+
stream(request: phenoml.agent.AgentStreamChatRequest, requestOptions?: ChatClient.RequestOptions): core.HttpResponsePromise<core.Stream<phenoml.agent.AgentChatStreamEvent>>;
|
|
56
|
+
private __stream;
|
|
57
|
+
/**
|
|
58
|
+
* Retrieves a list of chat messages for a given chat session
|
|
59
|
+
*
|
|
60
|
+
* @param {phenoml.agent.ListMessagesRequest} request
|
|
61
|
+
* @param {ChatClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
64
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
65
|
+
* @throws {@link phenoml.agent.NotFoundError}
|
|
66
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
67
|
+
* @throws {@link phenoml.agent.GatewayTimeoutError}
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await client.agent.chat.listMessages({
|
|
71
|
+
* chat_session_id: "chat_session_id",
|
|
72
|
+
* num_messages: 1,
|
|
73
|
+
* role: "user",
|
|
74
|
+
* order: "asc"
|
|
75
|
+
* })
|
|
76
|
+
*/
|
|
77
|
+
listMessages(request: phenoml.agent.ListMessagesRequest, requestOptions?: ChatClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.ListMessagesResponse>;
|
|
78
|
+
private __listMessages;
|
|
79
|
+
}
|