phenoml 9.2.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.d.ts +13 -4
- package/dist/cjs/BaseClient.js +59 -0
- package/dist/cjs/Client.d.ts +34 -34
- package/dist/cjs/Client.js +13 -54
- package/dist/cjs/api/resources/agent/client/Client.d.ts +26 -27
- package/dist/cjs/api/resources/agent/client/Client.js +56 -185
- package/dist/cjs/api/resources/agent/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/agent/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/resources/agent/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/agent/errors/NotFoundError.js +5 -1
- package/dist/cjs/api/resources/agent/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/agent/exports.d.ts +3 -0
- package/dist/cjs/api/resources/agent/exports.js +22 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +20 -21
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +35 -129
- package/dist/cjs/api/resources/agent/resources/prompts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/agent/resources/prompts/exports.js +21 -0
- package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsDeleteResponse.d.ts +2 -2
- package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsListResponse.d.ts +3 -3
- package/dist/cjs/api/resources/agent/types/AgentChatResponse.d.ts +4 -4
- package/dist/cjs/api/resources/agent/types/AgentChatStreamEvent.d.ts +8 -8
- package/dist/cjs/api/resources/agent/types/AgentCreateRequest.d.ts +4 -4
- package/dist/cjs/api/resources/agent/types/AgentDeleteResponse.d.ts +2 -2
- package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesResponse.d.ts +3 -3
- package/dist/cjs/api/resources/agent/types/AgentListResponse.d.ts +3 -3
- package/dist/cjs/api/resources/agent/types/AgentPromptsResponse.d.ts +3 -3
- package/dist/cjs/api/resources/agent/types/AgentResponse.d.ts +3 -3
- package/dist/cjs/api/resources/agent/types/AgentTemplate.d.ts +8 -8
- package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.d.ts +10 -10
- package/dist/cjs/api/resources/agent/types/ChatSessionTemplate.d.ts +9 -9
- package/dist/cjs/api/resources/agent/types/JsonPatchOperation.d.ts +2 -2
- package/dist/cjs/api/resources/agent/types/PromptTemplate.d.ts +6 -6
- package/dist/cjs/api/resources/agent/types/SuccessResponse.d.ts +2 -2
- package/dist/cjs/api/resources/authtoken/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/authtoken/client/Client.js +7 -6
- package/dist/cjs/api/resources/authtoken/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/authtoken/errors/InternalServerError.d.ts +5 -0
- package/dist/cjs/api/resources/authtoken/errors/InternalServerError.js +54 -0
- package/dist/cjs/api/resources/authtoken/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/authtoken/errors/index.d.ts +1 -0
- package/dist/cjs/api/resources/authtoken/errors/index.js +1 -0
- package/dist/cjs/api/resources/authtoken/exports.d.ts +3 -0
- package/dist/cjs/api/resources/authtoken/exports.js +22 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +28 -30
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +76 -43
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.ts +12 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.js +3 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/exports.d.ts +2 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/exports.js +21 -0
- package/dist/cjs/api/resources/authtoken/types/BadRequestErrorBody.d.ts +3 -3
- package/dist/cjs/api/resources/authtoken/types/OAuthError.d.ts +19 -0
- package/dist/cjs/api/resources/authtoken/types/OAuthError.js +14 -0
- package/dist/cjs/api/resources/authtoken/types/TokenResponse.d.ts +8 -0
- package/dist/cjs/api/resources/authtoken/types/TokenResponse.js +3 -0
- package/dist/cjs/api/resources/authtoken/types/UnauthorizedErrorBody.d.ts +3 -3
- package/dist/cjs/api/resources/authtoken/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/authtoken/types/index.js +2 -0
- package/dist/cjs/api/resources/cohort/client/Client.d.ts +8 -9
- package/dist/cjs/api/resources/cohort/client/Client.js +11 -27
- package/dist/cjs/api/resources/cohort/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/cohort/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/cohort/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/cohort/exports.d.ts +2 -0
- package/dist/cjs/api/resources/cohort/exports.js +21 -0
- package/dist/cjs/api/resources/cohort/types/CohortResponse.d.ts +3 -3
- package/dist/cjs/api/resources/cohort/types/SearchConcept.d.ts +4 -4
- package/dist/cjs/api/resources/construe/client/Client.d.ts +28 -29
- package/dist/cjs/api/resources/construe/client/Client.js +78 -239
- package/dist/cjs/api/resources/construe/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/construe/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/construe/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/ConflictError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/FailedDependencyError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/GatewayTimeoutError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/NotFoundError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/NotImplementedError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/ServiceUnavailableError.js +5 -1
- package/dist/cjs/api/resources/construe/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/construe/exports.d.ts +2 -0
- package/dist/cjs/api/resources/construe/exports.js +21 -0
- package/dist/cjs/api/resources/construe/types/CodeResponse.d.ts +1 -1
- package/dist/cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.ts +3 -3
- package/dist/cjs/api/resources/construe/types/ExtractRequestConfig.d.ts +8 -8
- package/dist/cjs/api/resources/construe/types/ExtractRequestSystem.d.ts +2 -2
- package/dist/cjs/api/resources/construe/types/ExtractedCodeResult.d.ts +3 -3
- package/dist/cjs/api/resources/construe/types/GetCodeResponse.d.ts +1 -1
- package/dist/cjs/api/resources/construe/types/ListCodesResponse.d.ts +1 -1
- package/dist/cjs/api/resources/fhir/client/Client.d.ts +18 -19
- package/dist/cjs/api/resources/fhir/client/Client.js +46 -134
- package/dist/cjs/api/resources/fhir/client/requests/FhirSearchRequest.d.ts +0 -6
- package/dist/cjs/api/resources/fhir/errors/BadGatewayError.js +5 -1
- package/dist/cjs/api/resources/fhir/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/fhir/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/fhir/errors/NotFoundError.js +5 -1
- package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/fhir/exports.d.ts +2 -0
- package/dist/cjs/api/resources/fhir/exports.js +21 -0
- package/dist/cjs/api/resources/fhir/types/ErrorResponse.d.ts +2 -2
- package/dist/cjs/api/resources/fhir/types/FhirBundle.d.ts +8 -8
- package/dist/cjs/api/resources/fhir/types/FhirPatchRequestBodyItem.d.ts +2 -2
- package/dist/cjs/api/resources/fhir/types/FhirResource.d.ts +5 -5
- package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +20 -21
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +35 -129
- package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.js +5 -1
- package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/fhirProvider/exports.d.ts +2 -0
- package/dist/cjs/api/resources/fhirProvider/exports.js +21 -0
- package/dist/cjs/api/resources/fhirProvider/types/ClientSecretAuth.d.ts +2 -2
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.ts +12 -12
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.ts +2 -2
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.d.ts +3 -3
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.ts +3 -3
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.d.ts +3 -3
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +4 -4
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +8 -8
- package/dist/cjs/api/resources/fhirProvider/types/FhirQueryResponse.d.ts +4 -4
- package/dist/cjs/api/resources/fhirProvider/types/JsonWebKey.d.ts +6 -6
- package/dist/cjs/api/resources/fhirProvider/types/JwtAuth.d.ts +3 -3
- package/dist/cjs/api/resources/fhirProvider/types/OnBehalfOfAuth.d.ts +2 -2
- package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountMetadata.d.ts +4 -4
- package/dist/cjs/api/resources/fhirProvider/types/SmartConfiguration.d.ts +5 -5
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +18 -19
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +31 -112
- package/dist/cjs/api/resources/lang2Fhir/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.js +5 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/UnprocessableEntityError.js +5 -1
- package/dist/cjs/api/resources/lang2Fhir/exports.d.ts +2 -0
- package/dist/cjs/api/resources/lang2Fhir/exports.js +21 -0
- package/dist/cjs/api/resources/lang2Fhir/types/CreateMultiResponse.d.ts +15 -15
- package/dist/cjs/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.d.ts +4 -4
- package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +2 -2
- package/dist/cjs/api/resources/summary/client/Client.d.ts +18 -19
- package/dist/cjs/api/resources/summary/client/Client.js +31 -112
- package/dist/cjs/api/resources/summary/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/summary/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/summary/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/summary/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/resources/summary/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/summary/errors/NotFoundError.js +5 -1
- package/dist/cjs/api/resources/summary/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/summary/exports.d.ts +2 -0
- package/dist/cjs/api/resources/summary/exports.js +21 -0
- package/dist/cjs/api/resources/summary/types/CreateSummaryResponse.d.ts +4 -4
- package/dist/cjs/api/resources/summary/types/CreateSummaryTemplateResponse.d.ts +4 -4
- package/dist/cjs/api/resources/summary/types/ErrorResponse.d.ts +2 -2
- package/dist/cjs/api/resources/summary/types/FhirBundle.d.ts +1 -1
- package/dist/cjs/api/resources/summary/types/SummaryDeleteTemplateResponse.d.ts +2 -2
- package/dist/cjs/api/resources/summary/types/SummaryGetTemplateResponse.d.ts +2 -2
- package/dist/cjs/api/resources/summary/types/SummaryListTemplatesResponse.d.ts +2 -2
- package/dist/cjs/api/resources/summary/types/SummaryTemplate.d.ts +9 -9
- package/dist/cjs/api/resources/summary/types/SummaryUpdateTemplateResponse.d.ts +3 -3
- package/dist/cjs/api/resources/tools/client/Client.d.ts +17 -18
- package/dist/cjs/api/resources/tools/client/Client.js +32 -91
- package/dist/cjs/api/resources/tools/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/tools/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/tools/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/tools/errors/FailedDependencyError.js +5 -1
- package/dist/cjs/api/resources/tools/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/resources/tools/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/tools/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/tools/exports.d.ts +3 -0
- package/dist/cjs/api/resources/tools/exports.js +22 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.d.ts +17 -18
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +24 -79
- package/dist/cjs/api/resources/tools/resources/mcpServer/exports.d.ts +3 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/exports.js +22 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +14 -15
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +23 -78
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/exports.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/exports.js +21 -0
- package/dist/cjs/api/resources/tools/types/CohortResponse.d.ts +5 -5
- package/dist/cjs/api/resources/tools/types/Lang2FhirAndCreateMultiResponse.d.ts +10 -10
- package/dist/cjs/api/resources/tools/types/Lang2FhirAndCreateResponse.d.ts +4 -4
- package/dist/cjs/api/resources/tools/types/Lang2FhirAndSearchResponse.d.ts +5 -5
- package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +7 -7
- package/dist/cjs/api/resources/tools/types/McpServerToolCallResponse.d.ts +4 -4
- package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +9 -9
- package/dist/cjs/api/resources/tools/types/SearchConcept.d.ts +4 -4
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +18 -19
- package/dist/cjs/api/resources/workflows/client/Client.js +43 -128
- package/dist/cjs/api/resources/workflows/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/workflows/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/resources/workflows/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/resources/workflows/errors/NotFoundError.js +5 -1
- package/dist/cjs/api/resources/workflows/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/workflows/exports.d.ts +2 -0
- package/dist/cjs/api/resources/workflows/exports.js +21 -0
- package/dist/cjs/api/resources/workflows/types/CreateWorkflowResponse.d.ts +5 -5
- package/dist/cjs/api/resources/workflows/types/DecisionNodeDefinition.d.ts +3 -3
- package/dist/cjs/api/resources/workflows/types/ExecuteWorkflowResponse.d.ts +4 -4
- package/dist/cjs/api/resources/workflows/types/Lang2FhirCreateDefinition.d.ts +4 -4
- package/dist/cjs/api/resources/workflows/types/Lang2FhirSearchDefinition.d.ts +5 -5
- package/dist/cjs/api/resources/workflows/types/ListWorkflowsResponse.d.ts +4 -4
- package/dist/cjs/api/resources/workflows/types/StepOperation.d.ts +4 -4
- package/dist/cjs/api/resources/workflows/types/SubWorkflowDefinition.d.ts +3 -3
- package/dist/cjs/api/resources/workflows/types/WorkflowConfig.d.ts +2 -2
- package/dist/cjs/api/resources/workflows/types/WorkflowDefinition.d.ts +8 -8
- package/dist/cjs/api/resources/workflows/types/WorkflowGraph.d.ts +1 -1
- package/dist/cjs/api/resources/workflows/types/WorkflowResponse.d.ts +9 -9
- package/dist/cjs/api/resources/workflows/types/WorkflowStep.d.ts +8 -8
- package/dist/cjs/api/resources/workflows/types/WorkflowStepSummary.d.ts +5 -5
- package/dist/cjs/api/resources/workflows/types/WorkflowsDeleteResponse.d.ts +2 -2
- package/dist/cjs/api/resources/workflows/types/WorkflowsGetResponse.d.ts +3 -3
- package/dist/cjs/api/resources/workflows/types/WorkflowsUpdateResponse.d.ts +4 -4
- package/dist/cjs/auth/OAuthAuthProvider.d.ts +45 -0
- package/dist/cjs/auth/OAuthAuthProvider.js +190 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -1
- package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
- package/dist/cjs/core/auth/BearerToken.js +7 -6
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +1 -0
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -3
- package/dist/cjs/core/fetcher/Fetcher.js +10 -3
- package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
- package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/core/fetcher/makeRequest.js +30 -9
- package/dist/cjs/core/fetcher/signals.d.ts +1 -1
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/runtime/runtime.js +17 -15
- package/dist/cjs/core/stream/Stream.d.ts +9 -0
- package/dist/cjs/core/stream/Stream.js +100 -5
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/errors/phenomlError.js +5 -1
- package/dist/cjs/errors/phenomlTimeoutError.js +5 -1
- package/dist/cjs/index.d.ts +4 -2
- package/dist/cjs/index.js +9 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +13 -4
- package/dist/esm/BaseClient.mjs +24 -1
- package/dist/esm/Client.d.mts +34 -34
- package/dist/esm/Client.mjs +23 -31
- package/dist/esm/api/resources/agent/client/Client.d.mts +26 -27
- package/dist/esm/api/resources/agent/client/Client.mjs +55 -184
- package/dist/esm/api/resources/agent/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/agent/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/resources/agent/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/agent/errors/NotFoundError.mjs +5 -1
- package/dist/esm/api/resources/agent/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/agent/exports.d.mts +3 -0
- package/dist/esm/api/resources/agent/exports.mjs +4 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +20 -21
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +34 -128
- package/dist/esm/api/resources/agent/resources/prompts/exports.d.mts +2 -0
- package/dist/esm/api/resources/agent/resources/prompts/exports.mjs +3 -0
- package/dist/esm/api/resources/agent/resources/prompts/types/PromptsDeleteResponse.d.mts +2 -2
- package/dist/esm/api/resources/agent/resources/prompts/types/PromptsListResponse.d.mts +3 -3
- package/dist/esm/api/resources/agent/types/AgentChatResponse.d.mts +4 -4
- package/dist/esm/api/resources/agent/types/AgentChatStreamEvent.d.mts +8 -8
- package/dist/esm/api/resources/agent/types/AgentCreateRequest.d.mts +4 -4
- package/dist/esm/api/resources/agent/types/AgentDeleteResponse.d.mts +2 -2
- package/dist/esm/api/resources/agent/types/AgentGetChatMessagesResponse.d.mts +3 -3
- package/dist/esm/api/resources/agent/types/AgentListResponse.d.mts +3 -3
- package/dist/esm/api/resources/agent/types/AgentPromptsResponse.d.mts +3 -3
- package/dist/esm/api/resources/agent/types/AgentResponse.d.mts +3 -3
- package/dist/esm/api/resources/agent/types/AgentTemplate.d.mts +8 -8
- package/dist/esm/api/resources/agent/types/ChatMessageTemplate.d.mts +10 -10
- package/dist/esm/api/resources/agent/types/ChatSessionTemplate.d.mts +9 -9
- package/dist/esm/api/resources/agent/types/JsonPatchOperation.d.mts +2 -2
- package/dist/esm/api/resources/agent/types/PromptTemplate.d.mts +6 -6
- package/dist/esm/api/resources/agent/types/SuccessResponse.d.mts +2 -2
- package/dist/esm/api/resources/authtoken/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/authtoken/client/Client.mjs +6 -5
- package/dist/esm/api/resources/authtoken/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/authtoken/errors/InternalServerError.d.mts +5 -0
- package/dist/esm/api/resources/authtoken/errors/InternalServerError.mjs +17 -0
- package/dist/esm/api/resources/authtoken/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/authtoken/errors/index.d.mts +1 -0
- package/dist/esm/api/resources/authtoken/errors/index.mjs +1 -0
- package/dist/esm/api/resources/authtoken/exports.d.mts +3 -0
- package/dist/esm/api/resources/authtoken/exports.mjs +4 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +28 -30
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +74 -41
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.mts +12 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.mjs +2 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/authtoken/resources/auth/exports.d.mts +2 -0
- package/dist/esm/api/resources/authtoken/resources/auth/exports.mjs +3 -0
- package/dist/esm/api/resources/authtoken/types/BadRequestErrorBody.d.mts +3 -3
- package/dist/esm/api/resources/authtoken/types/OAuthError.d.mts +19 -0
- package/dist/esm/api/resources/authtoken/types/OAuthError.mjs +11 -0
- package/dist/esm/api/resources/authtoken/types/TokenResponse.d.mts +8 -0
- package/dist/esm/api/resources/authtoken/types/TokenResponse.mjs +2 -0
- package/dist/esm/api/resources/authtoken/types/UnauthorizedErrorBody.d.mts +3 -3
- package/dist/esm/api/resources/authtoken/types/index.d.mts +2 -0
- package/dist/esm/api/resources/authtoken/types/index.mjs +2 -0
- package/dist/esm/api/resources/cohort/client/Client.d.mts +8 -9
- package/dist/esm/api/resources/cohort/client/Client.mjs +10 -26
- package/dist/esm/api/resources/cohort/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/cohort/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/cohort/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/cohort/exports.d.mts +2 -0
- package/dist/esm/api/resources/cohort/exports.mjs +3 -0
- package/dist/esm/api/resources/cohort/types/CohortResponse.d.mts +3 -3
- package/dist/esm/api/resources/cohort/types/SearchConcept.d.mts +4 -4
- package/dist/esm/api/resources/construe/client/Client.d.mts +28 -29
- package/dist/esm/api/resources/construe/client/Client.mjs +77 -238
- package/dist/esm/api/resources/construe/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/construe/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/ConflictError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/FailedDependencyError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/GatewayTimeoutError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/NotFoundError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/NotImplementedError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/ServiceUnavailableError.mjs +5 -1
- package/dist/esm/api/resources/construe/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/construe/exports.d.mts +2 -0
- package/dist/esm/api/resources/construe/exports.mjs +3 -0
- package/dist/esm/api/resources/construe/types/CodeResponse.d.mts +1 -1
- package/dist/esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.mts +3 -3
- package/dist/esm/api/resources/construe/types/ExtractRequestConfig.d.mts +8 -8
- package/dist/esm/api/resources/construe/types/ExtractRequestSystem.d.mts +2 -2
- package/dist/esm/api/resources/construe/types/ExtractedCodeResult.d.mts +3 -3
- package/dist/esm/api/resources/construe/types/GetCodeResponse.d.mts +1 -1
- package/dist/esm/api/resources/construe/types/ListCodesResponse.d.mts +1 -1
- package/dist/esm/api/resources/fhir/client/Client.d.mts +18 -19
- package/dist/esm/api/resources/fhir/client/Client.mjs +44 -132
- package/dist/esm/api/resources/fhir/client/requests/FhirSearchRequest.d.mts +0 -6
- package/dist/esm/api/resources/fhir/errors/BadGatewayError.mjs +5 -1
- package/dist/esm/api/resources/fhir/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/fhir/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/fhir/errors/NotFoundError.mjs +5 -1
- package/dist/esm/api/resources/fhir/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/fhir/exports.d.mts +2 -0
- package/dist/esm/api/resources/fhir/exports.mjs +3 -0
- package/dist/esm/api/resources/fhir/types/ErrorResponse.d.mts +2 -2
- package/dist/esm/api/resources/fhir/types/FhirBundle.d.mts +8 -8
- package/dist/esm/api/resources/fhir/types/FhirPatchRequestBodyItem.d.mts +2 -2
- package/dist/esm/api/resources/fhir/types/FhirResource.d.mts +5 -5
- package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +20 -21
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +34 -128
- package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.mjs +5 -1
- package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/fhirProvider/exports.d.mts +2 -0
- package/dist/esm/api/resources/fhirProvider/exports.mjs +3 -0
- package/dist/esm/api/resources/fhirProvider/types/ClientSecretAuth.d.mts +2 -2
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.mts +12 -12
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.mts +2 -2
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.d.mts +3 -3
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.mts +3 -3
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.d.mts +3 -3
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +4 -4
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +8 -8
- package/dist/esm/api/resources/fhirProvider/types/FhirQueryResponse.d.mts +4 -4
- package/dist/esm/api/resources/fhirProvider/types/JsonWebKey.d.mts +6 -6
- package/dist/esm/api/resources/fhirProvider/types/JwtAuth.d.mts +3 -3
- package/dist/esm/api/resources/fhirProvider/types/OnBehalfOfAuth.d.mts +2 -2
- package/dist/esm/api/resources/fhirProvider/types/ServiceAccountMetadata.d.mts +4 -4
- package/dist/esm/api/resources/fhirProvider/types/SmartConfiguration.d.mts +5 -5
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +18 -19
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +30 -111
- package/dist/esm/api/resources/lang2Fhir/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.mjs +5 -1
- package/dist/esm/api/resources/lang2Fhir/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/resources/lang2Fhir/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/lang2Fhir/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/lang2Fhir/errors/UnprocessableEntityError.mjs +5 -1
- package/dist/esm/api/resources/lang2Fhir/exports.d.mts +2 -0
- package/dist/esm/api/resources/lang2Fhir/exports.mjs +3 -0
- package/dist/esm/api/resources/lang2Fhir/types/CreateMultiResponse.d.mts +15 -15
- package/dist/esm/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.d.mts +4 -4
- package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +2 -2
- package/dist/esm/api/resources/summary/client/Client.d.mts +18 -19
- package/dist/esm/api/resources/summary/client/Client.mjs +30 -111
- package/dist/esm/api/resources/summary/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/summary/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/summary/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/summary/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/resources/summary/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/summary/errors/NotFoundError.mjs +5 -1
- package/dist/esm/api/resources/summary/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/summary/exports.d.mts +2 -0
- package/dist/esm/api/resources/summary/exports.mjs +3 -0
- package/dist/esm/api/resources/summary/types/CreateSummaryResponse.d.mts +4 -4
- package/dist/esm/api/resources/summary/types/CreateSummaryTemplateResponse.d.mts +4 -4
- package/dist/esm/api/resources/summary/types/ErrorResponse.d.mts +2 -2
- package/dist/esm/api/resources/summary/types/FhirBundle.d.mts +1 -1
- package/dist/esm/api/resources/summary/types/SummaryDeleteTemplateResponse.d.mts +2 -2
- package/dist/esm/api/resources/summary/types/SummaryGetTemplateResponse.d.mts +2 -2
- package/dist/esm/api/resources/summary/types/SummaryListTemplatesResponse.d.mts +2 -2
- package/dist/esm/api/resources/summary/types/SummaryTemplate.d.mts +9 -9
- package/dist/esm/api/resources/summary/types/SummaryUpdateTemplateResponse.d.mts +3 -3
- package/dist/esm/api/resources/tools/client/Client.d.mts +17 -18
- package/dist/esm/api/resources/tools/client/Client.mjs +31 -90
- package/dist/esm/api/resources/tools/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/tools/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/tools/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/tools/errors/FailedDependencyError.mjs +5 -1
- package/dist/esm/api/resources/tools/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/resources/tools/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/tools/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/tools/exports.d.mts +3 -0
- package/dist/esm/api/resources/tools/exports.mjs +4 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.d.mts +17 -18
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +24 -79
- package/dist/esm/api/resources/tools/resources/mcpServer/exports.d.mts +3 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/exports.mjs +4 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +14 -15
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +22 -77
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/exports.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/exports.mjs +3 -0
- package/dist/esm/api/resources/tools/types/CohortResponse.d.mts +5 -5
- package/dist/esm/api/resources/tools/types/Lang2FhirAndCreateMultiResponse.d.mts +10 -10
- package/dist/esm/api/resources/tools/types/Lang2FhirAndCreateResponse.d.mts +4 -4
- package/dist/esm/api/resources/tools/types/Lang2FhirAndSearchResponse.d.mts +5 -5
- package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +7 -7
- package/dist/esm/api/resources/tools/types/McpServerToolCallResponse.d.mts +4 -4
- package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +9 -9
- package/dist/esm/api/resources/tools/types/SearchConcept.d.mts +4 -4
- package/dist/esm/api/resources/workflows/client/Client.d.mts +18 -19
- package/dist/esm/api/resources/workflows/client/Client.mjs +42 -127
- package/dist/esm/api/resources/workflows/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/workflows/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/resources/workflows/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/resources/workflows/errors/NotFoundError.mjs +5 -1
- package/dist/esm/api/resources/workflows/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/workflows/exports.d.mts +2 -0
- package/dist/esm/api/resources/workflows/exports.mjs +3 -0
- package/dist/esm/api/resources/workflows/types/CreateWorkflowResponse.d.mts +5 -5
- package/dist/esm/api/resources/workflows/types/DecisionNodeDefinition.d.mts +3 -3
- package/dist/esm/api/resources/workflows/types/ExecuteWorkflowResponse.d.mts +4 -4
- package/dist/esm/api/resources/workflows/types/Lang2FhirCreateDefinition.d.mts +4 -4
- package/dist/esm/api/resources/workflows/types/Lang2FhirSearchDefinition.d.mts +5 -5
- package/dist/esm/api/resources/workflows/types/ListWorkflowsResponse.d.mts +4 -4
- package/dist/esm/api/resources/workflows/types/StepOperation.d.mts +4 -4
- package/dist/esm/api/resources/workflows/types/SubWorkflowDefinition.d.mts +3 -3
- package/dist/esm/api/resources/workflows/types/WorkflowConfig.d.mts +2 -2
- package/dist/esm/api/resources/workflows/types/WorkflowDefinition.d.mts +8 -8
- package/dist/esm/api/resources/workflows/types/WorkflowGraph.d.mts +1 -1
- package/dist/esm/api/resources/workflows/types/WorkflowResponse.d.mts +9 -9
- package/dist/esm/api/resources/workflows/types/WorkflowStep.d.mts +8 -8
- package/dist/esm/api/resources/workflows/types/WorkflowStepSummary.d.mts +5 -5
- package/dist/esm/api/resources/workflows/types/WorkflowsDeleteResponse.d.mts +2 -2
- package/dist/esm/api/resources/workflows/types/WorkflowsGetResponse.d.mts +3 -3
- package/dist/esm/api/resources/workflows/types/WorkflowsUpdateResponse.d.mts +4 -4
- package/dist/esm/auth/OAuthAuthProvider.d.mts +45 -0
- package/dist/esm/auth/OAuthAuthProvider.mjs +152 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -1
- package/dist/esm/core/auth/BearerToken.d.mts +3 -1
- package/dist/esm/core/auth/BearerToken.mjs +7 -6
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +1 -0
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +6 -3
- package/dist/esm/core/fetcher/Fetcher.mjs +10 -3
- package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
- package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
- package/dist/esm/core/fetcher/signals.d.mts +1 -1
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/runtime/runtime.mjs +17 -15
- package/dist/esm/core/stream/Stream.d.mts +9 -0
- package/dist/esm/core/stream/Stream.mjs +100 -5
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/errors/phenomlError.mjs +5 -1
- package/dist/esm/errors/phenomlTimeoutError.mjs +5 -1
- package/dist/esm/index.d.mts +4 -2
- package/dist/esm/index.mjs +3 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +162 -5
- package/reference.md +141 -74
- package/dist/cjs/WrapperClient.d.ts +0 -21
- package/dist/cjs/WrapperClient.js +0 -111
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/esm/WrapperClient.d.mts +0 -21
- package/dist/esm/WrapperClient.mjs +0 -75
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
|
@@ -19,25 +19,27 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
22
23
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
23
24
|
import * as core from "../../../../core/index.mjs";
|
|
24
25
|
import * as environments from "../../../../environments.mjs";
|
|
26
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
25
27
|
import * as errors from "../../../../errors/index.mjs";
|
|
26
28
|
import * as phenoml from "../../../index.mjs";
|
|
27
|
-
import {
|
|
28
|
-
export class
|
|
29
|
-
constructor(
|
|
30
|
-
this._options =
|
|
29
|
+
import { PromptsClient } from "../resources/prompts/client/Client.mjs";
|
|
30
|
+
export class AgentClient {
|
|
31
|
+
constructor(options = {}) {
|
|
32
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
31
33
|
}
|
|
32
34
|
get prompts() {
|
|
33
35
|
var _a;
|
|
34
|
-
return ((_a = this._prompts) !== null && _a !== void 0 ? _a : (this._prompts = new
|
|
36
|
+
return ((_a = this._prompts) !== null && _a !== void 0 ? _a : (this._prompts = new PromptsClient(this._options)));
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
39
|
* Creates a new PhenoAgent with specified configuration
|
|
38
40
|
*
|
|
39
41
|
* @param {phenoml.agent.AgentCreateRequest} request
|
|
40
|
-
* @param {
|
|
42
|
+
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
43
|
*
|
|
42
44
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
43
45
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -57,7 +59,8 @@ export class Agent {
|
|
|
57
59
|
__create(request, requestOptions) {
|
|
58
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
61
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
60
|
-
const
|
|
62
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
63
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
61
64
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
62
65
|
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/create"),
|
|
63
66
|
method: "POST",
|
|
@@ -93,28 +96,14 @@ export class Agent {
|
|
|
93
96
|
});
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
|
-
|
|
97
|
-
case "non-json":
|
|
98
|
-
throw new errors.phenomlError({
|
|
99
|
-
statusCode: _response.error.statusCode,
|
|
100
|
-
body: _response.error.rawBody,
|
|
101
|
-
rawResponse: _response.rawResponse,
|
|
102
|
-
});
|
|
103
|
-
case "timeout":
|
|
104
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /agent/create.");
|
|
105
|
-
case "unknown":
|
|
106
|
-
throw new errors.phenomlError({
|
|
107
|
-
message: _response.error.errorMessage,
|
|
108
|
-
rawResponse: _response.rawResponse,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
99
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/agent/create");
|
|
111
100
|
});
|
|
112
101
|
}
|
|
113
102
|
/**
|
|
114
103
|
* Retrieves a list of PhenoAgents belonging to the authenticated user
|
|
115
104
|
*
|
|
116
105
|
* @param {phenoml.agent.AgentListRequest} request
|
|
117
|
-
* @param {
|
|
106
|
+
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
107
|
*
|
|
119
108
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
120
109
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -132,11 +121,11 @@ export class Agent {
|
|
|
132
121
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
133
122
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
134
123
|
const { tags } = request;
|
|
135
|
-
const _queryParams = {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
124
|
+
const _queryParams = {
|
|
125
|
+
tags,
|
|
126
|
+
};
|
|
127
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
128
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
140
129
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
141
130
|
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/list"),
|
|
142
131
|
method: "GET",
|
|
@@ -167,28 +156,14 @@ export class Agent {
|
|
|
167
156
|
});
|
|
168
157
|
}
|
|
169
158
|
}
|
|
170
|
-
|
|
171
|
-
case "non-json":
|
|
172
|
-
throw new errors.phenomlError({
|
|
173
|
-
statusCode: _response.error.statusCode,
|
|
174
|
-
body: _response.error.rawBody,
|
|
175
|
-
rawResponse: _response.rawResponse,
|
|
176
|
-
});
|
|
177
|
-
case "timeout":
|
|
178
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /agent/list.");
|
|
179
|
-
case "unknown":
|
|
180
|
-
throw new errors.phenomlError({
|
|
181
|
-
message: _response.error.errorMessage,
|
|
182
|
-
rawResponse: _response.rawResponse,
|
|
183
|
-
});
|
|
184
|
-
}
|
|
159
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/agent/list");
|
|
185
160
|
});
|
|
186
161
|
}
|
|
187
162
|
/**
|
|
188
163
|
* Retrieves a specific agent by its ID
|
|
189
164
|
*
|
|
190
165
|
* @param {string} id - Agent ID
|
|
191
|
-
* @param {
|
|
166
|
+
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
192
167
|
*
|
|
193
168
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
194
169
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -204,7 +179,8 @@ export class Agent {
|
|
|
204
179
|
__get(id, requestOptions) {
|
|
205
180
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
181
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
207
|
-
const
|
|
182
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
183
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
208
184
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
209
185
|
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/${core.url.encodePathParam(id)}`),
|
|
210
186
|
method: "GET",
|
|
@@ -237,21 +213,7 @@ export class Agent {
|
|
|
237
213
|
});
|
|
238
214
|
}
|
|
239
215
|
}
|
|
240
|
-
|
|
241
|
-
case "non-json":
|
|
242
|
-
throw new errors.phenomlError({
|
|
243
|
-
statusCode: _response.error.statusCode,
|
|
244
|
-
body: _response.error.rawBody,
|
|
245
|
-
rawResponse: _response.rawResponse,
|
|
246
|
-
});
|
|
247
|
-
case "timeout":
|
|
248
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /agent/{id}.");
|
|
249
|
-
case "unknown":
|
|
250
|
-
throw new errors.phenomlError({
|
|
251
|
-
message: _response.error.errorMessage,
|
|
252
|
-
rawResponse: _response.rawResponse,
|
|
253
|
-
});
|
|
254
|
-
}
|
|
216
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/agent/{id}");
|
|
255
217
|
});
|
|
256
218
|
}
|
|
257
219
|
/**
|
|
@@ -259,7 +221,7 @@ export class Agent {
|
|
|
259
221
|
*
|
|
260
222
|
* @param {string} id - Agent ID
|
|
261
223
|
* @param {phenoml.agent.AgentCreateRequest} request
|
|
262
|
-
* @param {
|
|
224
|
+
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
263
225
|
*
|
|
264
226
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
265
227
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -280,7 +242,8 @@ export class Agent {
|
|
|
280
242
|
__update(id, request, requestOptions) {
|
|
281
243
|
return __awaiter(this, void 0, void 0, function* () {
|
|
282
244
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
283
|
-
const
|
|
245
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
246
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
284
247
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
285
248
|
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/${core.url.encodePathParam(id)}`),
|
|
286
249
|
method: "PUT",
|
|
@@ -318,28 +281,14 @@ export class Agent {
|
|
|
318
281
|
});
|
|
319
282
|
}
|
|
320
283
|
}
|
|
321
|
-
|
|
322
|
-
case "non-json":
|
|
323
|
-
throw new errors.phenomlError({
|
|
324
|
-
statusCode: _response.error.statusCode,
|
|
325
|
-
body: _response.error.rawBody,
|
|
326
|
-
rawResponse: _response.rawResponse,
|
|
327
|
-
});
|
|
328
|
-
case "timeout":
|
|
329
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PUT /agent/{id}.");
|
|
330
|
-
case "unknown":
|
|
331
|
-
throw new errors.phenomlError({
|
|
332
|
-
message: _response.error.errorMessage,
|
|
333
|
-
rawResponse: _response.rawResponse,
|
|
334
|
-
});
|
|
335
|
-
}
|
|
284
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/agent/{id}");
|
|
336
285
|
});
|
|
337
286
|
}
|
|
338
287
|
/**
|
|
339
288
|
* Deletes an existing agent
|
|
340
289
|
*
|
|
341
290
|
* @param {string} id - Agent ID
|
|
342
|
-
* @param {
|
|
291
|
+
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
343
292
|
*
|
|
344
293
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
345
294
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -355,7 +304,8 @@ export class Agent {
|
|
|
355
304
|
__delete(id, requestOptions) {
|
|
356
305
|
return __awaiter(this, void 0, void 0, function* () {
|
|
357
306
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
358
|
-
const
|
|
307
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
308
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
359
309
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
360
310
|
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/${core.url.encodePathParam(id)}`),
|
|
361
311
|
method: "DELETE",
|
|
@@ -388,21 +338,7 @@ export class Agent {
|
|
|
388
338
|
});
|
|
389
339
|
}
|
|
390
340
|
}
|
|
391
|
-
|
|
392
|
-
case "non-json":
|
|
393
|
-
throw new errors.phenomlError({
|
|
394
|
-
statusCode: _response.error.statusCode,
|
|
395
|
-
body: _response.error.rawBody,
|
|
396
|
-
rawResponse: _response.rawResponse,
|
|
397
|
-
});
|
|
398
|
-
case "timeout":
|
|
399
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /agent/{id}.");
|
|
400
|
-
case "unknown":
|
|
401
|
-
throw new errors.phenomlError({
|
|
402
|
-
message: _response.error.errorMessage,
|
|
403
|
-
rawResponse: _response.rawResponse,
|
|
404
|
-
});
|
|
405
|
-
}
|
|
341
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/agent/{id}");
|
|
406
342
|
});
|
|
407
343
|
}
|
|
408
344
|
/**
|
|
@@ -410,7 +346,7 @@ export class Agent {
|
|
|
410
346
|
*
|
|
411
347
|
* @param {string} id - Agent ID
|
|
412
348
|
* @param {phenoml.agent.JsonPatch} request
|
|
413
|
-
* @param {
|
|
349
|
+
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
414
350
|
*
|
|
415
351
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
416
352
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -438,7 +374,8 @@ export class Agent {
|
|
|
438
374
|
__patch(id, request, requestOptions) {
|
|
439
375
|
return __awaiter(this, void 0, void 0, function* () {
|
|
440
376
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
441
|
-
const
|
|
377
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
378
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
442
379
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
443
380
|
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/${core.url.encodePathParam(id)}`),
|
|
444
381
|
method: "PATCH",
|
|
@@ -476,28 +413,14 @@ export class Agent {
|
|
|
476
413
|
});
|
|
477
414
|
}
|
|
478
415
|
}
|
|
479
|
-
|
|
480
|
-
case "non-json":
|
|
481
|
-
throw new errors.phenomlError({
|
|
482
|
-
statusCode: _response.error.statusCode,
|
|
483
|
-
body: _response.error.rawBody,
|
|
484
|
-
rawResponse: _response.rawResponse,
|
|
485
|
-
});
|
|
486
|
-
case "timeout":
|
|
487
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PATCH /agent/{id}.");
|
|
488
|
-
case "unknown":
|
|
489
|
-
throw new errors.phenomlError({
|
|
490
|
-
message: _response.error.errorMessage,
|
|
491
|
-
rawResponse: _response.rawResponse,
|
|
492
|
-
});
|
|
493
|
-
}
|
|
416
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/agent/{id}");
|
|
494
417
|
});
|
|
495
418
|
}
|
|
496
419
|
/**
|
|
497
420
|
* Send a message to an agent and receive a JSON response.
|
|
498
421
|
*
|
|
499
422
|
* @param {phenoml.agent.AgentChatRequest} request
|
|
500
|
-
* @param {
|
|
423
|
+
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
501
424
|
*
|
|
502
425
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
503
426
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -519,10 +442,10 @@ export class Agent {
|
|
|
519
442
|
return __awaiter(this, void 0, void 0, function* () {
|
|
520
443
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
521
444
|
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"]);
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf
|
|
525
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider
|
|
445
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
446
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
447
|
+
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
448
|
+
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
526
449
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
527
450
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
528
451
|
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"),
|
|
@@ -559,21 +482,7 @@ export class Agent {
|
|
|
559
482
|
});
|
|
560
483
|
}
|
|
561
484
|
}
|
|
562
|
-
|
|
563
|
-
case "non-json":
|
|
564
|
-
throw new errors.phenomlError({
|
|
565
|
-
statusCode: _response.error.statusCode,
|
|
566
|
-
body: _response.error.rawBody,
|
|
567
|
-
rawResponse: _response.rawResponse,
|
|
568
|
-
});
|
|
569
|
-
case "timeout":
|
|
570
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /agent/chat.");
|
|
571
|
-
case "unknown":
|
|
572
|
-
throw new errors.phenomlError({
|
|
573
|
-
message: _response.error.errorMessage,
|
|
574
|
-
rawResponse: _response.rawResponse,
|
|
575
|
-
});
|
|
576
|
-
}
|
|
485
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/agent/chat");
|
|
577
486
|
});
|
|
578
487
|
}
|
|
579
488
|
/**
|
|
@@ -588,10 +497,10 @@ export class Agent {
|
|
|
588
497
|
return __awaiter(this, void 0, void 0, function* () {
|
|
589
498
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
590
499
|
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"]);
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf
|
|
594
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider
|
|
500
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
501
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
502
|
+
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
503
|
+
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
595
504
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
596
505
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
597
506
|
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"),
|
|
@@ -616,7 +525,6 @@ export class Agent {
|
|
|
616
525
|
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
617
526
|
eventShape: {
|
|
618
527
|
type: "sse",
|
|
619
|
-
streamTerminator: "[DONE]",
|
|
620
528
|
},
|
|
621
529
|
}),
|
|
622
530
|
rawResponse: _response.rawResponse,
|
|
@@ -640,28 +548,14 @@ export class Agent {
|
|
|
640
548
|
});
|
|
641
549
|
}
|
|
642
550
|
}
|
|
643
|
-
|
|
644
|
-
case "non-json":
|
|
645
|
-
throw new errors.phenomlError({
|
|
646
|
-
statusCode: _response.error.statusCode,
|
|
647
|
-
body: _response.error.rawBody,
|
|
648
|
-
rawResponse: _response.rawResponse,
|
|
649
|
-
});
|
|
650
|
-
case "timeout":
|
|
651
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /agent/stream-chat.");
|
|
652
|
-
case "unknown":
|
|
653
|
-
throw new errors.phenomlError({
|
|
654
|
-
message: _response.error.errorMessage,
|
|
655
|
-
rawResponse: _response.rawResponse,
|
|
656
|
-
});
|
|
657
|
-
}
|
|
551
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/agent/stream-chat");
|
|
658
552
|
});
|
|
659
553
|
}
|
|
660
554
|
/**
|
|
661
555
|
* Retrieves a list of chat messages for a given chat session
|
|
662
556
|
*
|
|
663
557
|
* @param {phenoml.agent.AgentGetChatMessagesRequest} request
|
|
664
|
-
* @param {
|
|
558
|
+
* @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
665
559
|
*
|
|
666
560
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
667
561
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -682,18 +576,14 @@ export class Agent {
|
|
|
682
576
|
return __awaiter(this, void 0, void 0, function* () {
|
|
683
577
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
684
578
|
const { chat_session_id: chatSessionId, num_messages: numMessages, role, order } = request;
|
|
685
|
-
const _queryParams = {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
if (order != null) {
|
|
694
|
-
_queryParams.order = order;
|
|
695
|
-
}
|
|
696
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
579
|
+
const _queryParams = {
|
|
580
|
+
chat_session_id: chatSessionId,
|
|
581
|
+
num_messages: numMessages,
|
|
582
|
+
role: role != null ? role : undefined,
|
|
583
|
+
order: order != null ? order : undefined,
|
|
584
|
+
};
|
|
585
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
586
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
697
587
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
698
588
|
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"),
|
|
699
589
|
method: "GET",
|
|
@@ -727,26 +617,7 @@ export class Agent {
|
|
|
727
617
|
});
|
|
728
618
|
}
|
|
729
619
|
}
|
|
730
|
-
|
|
731
|
-
case "non-json":
|
|
732
|
-
throw new errors.phenomlError({
|
|
733
|
-
statusCode: _response.error.statusCode,
|
|
734
|
-
body: _response.error.rawBody,
|
|
735
|
-
rawResponse: _response.rawResponse,
|
|
736
|
-
});
|
|
737
|
-
case "timeout":
|
|
738
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /agent/chat/messages.");
|
|
739
|
-
case "unknown":
|
|
740
|
-
throw new errors.phenomlError({
|
|
741
|
-
message: _response.error.errorMessage,
|
|
742
|
-
rawResponse: _response.rawResponse,
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
_getAuthorizationHeader() {
|
|
748
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
749
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
620
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/agent/chat/messages");
|
|
750
621
|
});
|
|
751
622
|
}
|
|
752
623
|
}
|
|
@@ -8,6 +8,10 @@ export class BadRequestError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class ForbiddenError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class InternalServerError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class NotFoundError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class UnauthorizedError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
2
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
3
4
|
import * as phenoml from "../../../../../index.mjs";
|
|
4
|
-
export declare namespace
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
export declare namespace PromptsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
10
|
+
export declare class PromptsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<PromptsClient.Options>;
|
|
12
|
+
constructor(options?: PromptsClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new agent prompt
|
|
15
15
|
*
|
|
16
16
|
* @param {phenoml.agent.AgentPromptsCreateRequest} request
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
18
|
*
|
|
19
19
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
20
20
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -27,12 +27,12 @@ export declare class Prompts {
|
|
|
27
27
|
* content: "You are a helpful medical assistant specialized in FHIR data processing..."
|
|
28
28
|
* })
|
|
29
29
|
*/
|
|
30
|
-
create(request: phenoml.agent.AgentPromptsCreateRequest, requestOptions?:
|
|
30
|
+
create(request: phenoml.agent.AgentPromptsCreateRequest, requestOptions?: PromptsClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentPromptsResponse>;
|
|
31
31
|
private __create;
|
|
32
32
|
/**
|
|
33
33
|
* Retrieves a list of agent prompts belonging to the authenticated user
|
|
34
34
|
*
|
|
35
|
-
* @param {
|
|
35
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
36
|
*
|
|
37
37
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
38
38
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -41,13 +41,13 @@ export declare class Prompts {
|
|
|
41
41
|
* @example
|
|
42
42
|
* await client.agent.prompts.list()
|
|
43
43
|
*/
|
|
44
|
-
list(requestOptions?:
|
|
44
|
+
list(requestOptions?: PromptsClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.PromptsListResponse>;
|
|
45
45
|
private __list;
|
|
46
46
|
/**
|
|
47
47
|
* Retrieves a specific prompt by its ID
|
|
48
48
|
*
|
|
49
49
|
* @param {string} id - Prompt ID
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
51
|
*
|
|
52
52
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
53
53
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -57,14 +57,14 @@ export declare class Prompts {
|
|
|
57
57
|
* @example
|
|
58
58
|
* await client.agent.prompts.get("id")
|
|
59
59
|
*/
|
|
60
|
-
get(id: string, requestOptions?:
|
|
60
|
+
get(id: string, requestOptions?: PromptsClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentPromptsResponse>;
|
|
61
61
|
private __get;
|
|
62
62
|
/**
|
|
63
63
|
* Updates an existing prompt
|
|
64
64
|
*
|
|
65
65
|
* @param {string} id - Prompt ID
|
|
66
66
|
* @param {phenoml.agent.AgentPromptsUpdateRequest} request
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
68
|
*
|
|
69
69
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
70
70
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -75,13 +75,13 @@ export declare class Prompts {
|
|
|
75
75
|
* @example
|
|
76
76
|
* await client.agent.prompts.update("id")
|
|
77
77
|
*/
|
|
78
|
-
update(id: string, request?: phenoml.agent.AgentPromptsUpdateRequest, requestOptions?:
|
|
78
|
+
update(id: string, request?: phenoml.agent.AgentPromptsUpdateRequest, requestOptions?: PromptsClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentPromptsResponse>;
|
|
79
79
|
private __update;
|
|
80
80
|
/**
|
|
81
81
|
* Deletes a prompt
|
|
82
82
|
*
|
|
83
83
|
* @param {string} id - Prompt ID
|
|
84
|
-
* @param {
|
|
84
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
85
|
*
|
|
86
86
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
87
87
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -91,14 +91,14 @@ export declare class Prompts {
|
|
|
91
91
|
* @example
|
|
92
92
|
* await client.agent.prompts.delete("id")
|
|
93
93
|
*/
|
|
94
|
-
delete(id: string, requestOptions?:
|
|
94
|
+
delete(id: string, requestOptions?: PromptsClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.PromptsDeleteResponse>;
|
|
95
95
|
private __delete;
|
|
96
96
|
/**
|
|
97
97
|
* Patches an existing prompt
|
|
98
98
|
*
|
|
99
99
|
* @param {string} id - Agent Prompt ID
|
|
100
100
|
* @param {phenoml.agent.JsonPatch} request
|
|
101
|
-
* @param {
|
|
101
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
102
|
*
|
|
103
103
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
104
104
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -120,12 +120,12 @@ export declare class Prompts {
|
|
|
120
120
|
* path: "/description"
|
|
121
121
|
* }])
|
|
122
122
|
*/
|
|
123
|
-
patch(id: string, request: phenoml.agent.JsonPatch, requestOptions?:
|
|
123
|
+
patch(id: string, request: phenoml.agent.JsonPatch, requestOptions?: PromptsClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentPromptsResponse>;
|
|
124
124
|
private __patch;
|
|
125
125
|
/**
|
|
126
126
|
* Loads default agent prompts for the authenticated user
|
|
127
127
|
*
|
|
128
|
-
* @param {
|
|
128
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
129
|
*
|
|
130
130
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
131
131
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -134,7 +134,6 @@ export declare class Prompts {
|
|
|
134
134
|
* @example
|
|
135
135
|
* await client.agent.prompts.loadDefaults()
|
|
136
136
|
*/
|
|
137
|
-
loadDefaults(requestOptions?:
|
|
137
|
+
loadDefaults(requestOptions?: PromptsClient.RequestOptions): core.HttpResponsePromise<phenoml.agent.SuccessResponse>;
|
|
138
138
|
private __loadDefaults;
|
|
139
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
140
139
|
}
|