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
|
@@ -8,14 +8,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../core/index.mjs";
|
|
13
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
14
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
15
17
|
import * as phenoml from "../../../index.mjs";
|
|
16
|
-
export class
|
|
17
|
-
constructor(
|
|
18
|
-
this._options =
|
|
18
|
+
export class ConstrueClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
|
|
@@ -24,7 +26,7 @@ export class Construe {
|
|
|
24
26
|
* transitions from "processing" to "ready" or "failed".
|
|
25
27
|
*
|
|
26
28
|
* @param {phenoml.construe.UploadRequest} request
|
|
27
|
-
* @param {
|
|
29
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
30
|
*
|
|
29
31
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
30
32
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -46,7 +48,8 @@ export class Construe {
|
|
|
46
48
|
__uploadCodeSystem(request, requestOptions) {
|
|
47
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
50
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
49
|
-
const
|
|
51
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
52
|
+
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);
|
|
50
53
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
51
54
|
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, "construe/upload"),
|
|
52
55
|
method: "POST",
|
|
@@ -89,21 +92,7 @@ export class Construe {
|
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
|
-
|
|
93
|
-
case "non-json":
|
|
94
|
-
throw new errors.phenomlError({
|
|
95
|
-
statusCode: _response.error.statusCode,
|
|
96
|
-
body: _response.error.rawBody,
|
|
97
|
-
rawResponse: _response.rawResponse,
|
|
98
|
-
});
|
|
99
|
-
case "timeout":
|
|
100
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /construe/upload.");
|
|
101
|
-
case "unknown":
|
|
102
|
-
throw new errors.phenomlError({
|
|
103
|
-
message: _response.error.errorMessage,
|
|
104
|
-
rawResponse: _response.rawResponse,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
95
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/construe/upload");
|
|
107
96
|
});
|
|
108
97
|
}
|
|
109
98
|
/**
|
|
@@ -112,7 +101,7 @@ export class Construe {
|
|
|
112
101
|
* Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
113
102
|
*
|
|
114
103
|
* @param {phenoml.construe.ExtractRequest} request
|
|
115
|
-
* @param {
|
|
104
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
105
|
*
|
|
117
106
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
118
107
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -132,7 +121,8 @@ export class Construe {
|
|
|
132
121
|
__extractCodes(request, requestOptions) {
|
|
133
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
134
123
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
135
|
-
const
|
|
124
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
125
|
+
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);
|
|
136
126
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
137
127
|
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, "construe/extract"),
|
|
138
128
|
method: "POST",
|
|
@@ -172,27 +162,13 @@ export class Construe {
|
|
|
172
162
|
});
|
|
173
163
|
}
|
|
174
164
|
}
|
|
175
|
-
|
|
176
|
-
case "non-json":
|
|
177
|
-
throw new errors.phenomlError({
|
|
178
|
-
statusCode: _response.error.statusCode,
|
|
179
|
-
body: _response.error.rawBody,
|
|
180
|
-
rawResponse: _response.rawResponse,
|
|
181
|
-
});
|
|
182
|
-
case "timeout":
|
|
183
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /construe/extract.");
|
|
184
|
-
case "unknown":
|
|
185
|
-
throw new errors.phenomlError({
|
|
186
|
-
message: _response.error.errorMessage,
|
|
187
|
-
rawResponse: _response.rawResponse,
|
|
188
|
-
});
|
|
189
|
-
}
|
|
165
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/construe/extract");
|
|
190
166
|
});
|
|
191
167
|
}
|
|
192
168
|
/**
|
|
193
169
|
* Returns the terminology server's catalog of available code systems, including both built-in standard terminologies and custom uploaded systems.
|
|
194
170
|
*
|
|
195
|
-
* @param {
|
|
171
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
196
172
|
*
|
|
197
173
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
198
174
|
* @throws {@link phenoml.construe.InternalServerError}
|
|
@@ -206,7 +182,8 @@ export class Construe {
|
|
|
206
182
|
__listAvailableCodeSystems(requestOptions) {
|
|
207
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
208
184
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
209
|
-
const
|
|
185
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
186
|
+
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);
|
|
210
187
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
211
188
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, "construe/codes/systems"),
|
|
212
189
|
method: "GET",
|
|
@@ -238,21 +215,7 @@ export class Construe {
|
|
|
238
215
|
});
|
|
239
216
|
}
|
|
240
217
|
}
|
|
241
|
-
|
|
242
|
-
case "non-json":
|
|
243
|
-
throw new errors.phenomlError({
|
|
244
|
-
statusCode: _response.error.statusCode,
|
|
245
|
-
body: _response.error.rawBody,
|
|
246
|
-
rawResponse: _response.rawResponse,
|
|
247
|
-
});
|
|
248
|
-
case "timeout":
|
|
249
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/systems.");
|
|
250
|
-
case "unknown":
|
|
251
|
-
throw new errors.phenomlError({
|
|
252
|
-
message: _response.error.errorMessage,
|
|
253
|
-
rawResponse: _response.rawResponse,
|
|
254
|
-
});
|
|
255
|
-
}
|
|
218
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/systems");
|
|
256
219
|
});
|
|
257
220
|
}
|
|
258
221
|
/**
|
|
@@ -260,7 +223,7 @@ export class Construe {
|
|
|
260
223
|
*
|
|
261
224
|
* @param {string} codesystem - Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
|
|
262
225
|
* @param {phenoml.construe.GetConstrueCodesSystemsCodesystemRequest} request
|
|
263
|
-
* @param {
|
|
226
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
264
227
|
*
|
|
265
228
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
266
229
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -279,11 +242,11 @@ export class Construe {
|
|
|
279
242
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
280
243
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
281
244
|
const { version } = request;
|
|
282
|
-
const _queryParams = {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
245
|
+
const _queryParams = {
|
|
246
|
+
version,
|
|
247
|
+
};
|
|
248
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
249
|
+
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);
|
|
287
250
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
288
251
|
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, `construe/codes/systems/${core.url.encodePathParam(codesystem)}`),
|
|
289
252
|
method: "GET",
|
|
@@ -319,21 +282,7 @@ export class Construe {
|
|
|
319
282
|
});
|
|
320
283
|
}
|
|
321
284
|
}
|
|
322
|
-
|
|
323
|
-
case "non-json":
|
|
324
|
-
throw new errors.phenomlError({
|
|
325
|
-
statusCode: _response.error.statusCode,
|
|
326
|
-
body: _response.error.rawBody,
|
|
327
|
-
rawResponse: _response.rawResponse,
|
|
328
|
-
});
|
|
329
|
-
case "timeout":
|
|
330
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/systems/{codesystem}.");
|
|
331
|
-
case "unknown":
|
|
332
|
-
throw new errors.phenomlError({
|
|
333
|
-
message: _response.error.errorMessage,
|
|
334
|
-
rawResponse: _response.rawResponse,
|
|
335
|
-
});
|
|
336
|
-
}
|
|
285
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/systems/{codesystem}");
|
|
337
286
|
});
|
|
338
287
|
}
|
|
339
288
|
/**
|
|
@@ -342,7 +291,7 @@ export class Construe {
|
|
|
342
291
|
*
|
|
343
292
|
* @param {string} codesystem - Code system name
|
|
344
293
|
* @param {phenoml.construe.DeleteConstrueCodesSystemsCodesystemRequest} request
|
|
345
|
-
* @param {
|
|
294
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
346
295
|
*
|
|
347
296
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
348
297
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -362,11 +311,11 @@ export class Construe {
|
|
|
362
311
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
363
312
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
364
313
|
const { version } = request;
|
|
365
|
-
const _queryParams = {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
314
|
+
const _queryParams = {
|
|
315
|
+
version,
|
|
316
|
+
};
|
|
317
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
318
|
+
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);
|
|
370
319
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
371
320
|
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, `construe/codes/systems/${core.url.encodePathParam(codesystem)}`),
|
|
372
321
|
method: "DELETE",
|
|
@@ -404,21 +353,7 @@ export class Construe {
|
|
|
404
353
|
});
|
|
405
354
|
}
|
|
406
355
|
}
|
|
407
|
-
|
|
408
|
-
case "non-json":
|
|
409
|
-
throw new errors.phenomlError({
|
|
410
|
-
statusCode: _response.error.statusCode,
|
|
411
|
-
body: _response.error.rawBody,
|
|
412
|
-
rawResponse: _response.rawResponse,
|
|
413
|
-
});
|
|
414
|
-
case "timeout":
|
|
415
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /construe/codes/systems/{codesystem}.");
|
|
416
|
-
case "unknown":
|
|
417
|
-
throw new errors.phenomlError({
|
|
418
|
-
message: _response.error.errorMessage,
|
|
419
|
-
rawResponse: _response.rawResponse,
|
|
420
|
-
});
|
|
421
|
-
}
|
|
356
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/construe/codes/systems/{codesystem}");
|
|
422
357
|
});
|
|
423
358
|
}
|
|
424
359
|
/**
|
|
@@ -428,7 +363,7 @@ export class Construe {
|
|
|
428
363
|
*
|
|
429
364
|
* @param {string} codesystem - Code system name
|
|
430
365
|
* @param {phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest} request
|
|
431
|
-
* @param {
|
|
366
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
432
367
|
*
|
|
433
368
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
434
369
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -450,11 +385,11 @@ export class Construe {
|
|
|
450
385
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
451
386
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
452
387
|
const { version } = request;
|
|
453
|
-
const _queryParams = {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
388
|
+
const _queryParams = {
|
|
389
|
+
version,
|
|
390
|
+
};
|
|
391
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
392
|
+
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);
|
|
458
393
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
459
394
|
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, `construe/codes/systems/${core.url.encodePathParam(codesystem)}/export`),
|
|
460
395
|
method: "GET",
|
|
@@ -496,21 +431,7 @@ export class Construe {
|
|
|
496
431
|
});
|
|
497
432
|
}
|
|
498
433
|
}
|
|
499
|
-
|
|
500
|
-
case "non-json":
|
|
501
|
-
throw new errors.phenomlError({
|
|
502
|
-
statusCode: _response.error.statusCode,
|
|
503
|
-
body: _response.error.rawBody,
|
|
504
|
-
rawResponse: _response.rawResponse,
|
|
505
|
-
});
|
|
506
|
-
case "timeout":
|
|
507
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/systems/{codesystem}/export.");
|
|
508
|
-
case "unknown":
|
|
509
|
-
throw new errors.phenomlError({
|
|
510
|
-
message: _response.error.errorMessage,
|
|
511
|
-
rawResponse: _response.rawResponse,
|
|
512
|
-
});
|
|
513
|
-
}
|
|
434
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/systems/{codesystem}/export");
|
|
514
435
|
});
|
|
515
436
|
}
|
|
516
437
|
/**
|
|
@@ -520,7 +441,7 @@ export class Construe {
|
|
|
520
441
|
*
|
|
521
442
|
* @param {string} codesystem - Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
|
|
522
443
|
* @param {phenoml.construe.GetConstrueCodesCodesystemRequest} request
|
|
523
|
-
* @param {
|
|
444
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
524
445
|
*
|
|
525
446
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
526
447
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -541,17 +462,13 @@ export class Construe {
|
|
|
541
462
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
542
463
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
543
464
|
const { version, cursor, limit } = request;
|
|
544
|
-
const _queryParams = {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
if (limit != null) {
|
|
552
|
-
_queryParams.limit = limit.toString();
|
|
553
|
-
}
|
|
554
|
-
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);
|
|
465
|
+
const _queryParams = {
|
|
466
|
+
version,
|
|
467
|
+
cursor,
|
|
468
|
+
limit,
|
|
469
|
+
};
|
|
470
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
471
|
+
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);
|
|
555
472
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
556
473
|
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, `construe/codes/${core.url.encodePathParam(codesystem)}`),
|
|
557
474
|
method: "GET",
|
|
@@ -584,21 +501,7 @@ export class Construe {
|
|
|
584
501
|
});
|
|
585
502
|
}
|
|
586
503
|
}
|
|
587
|
-
|
|
588
|
-
case "non-json":
|
|
589
|
-
throw new errors.phenomlError({
|
|
590
|
-
statusCode: _response.error.statusCode,
|
|
591
|
-
body: _response.error.rawBody,
|
|
592
|
-
rawResponse: _response.rawResponse,
|
|
593
|
-
});
|
|
594
|
-
case "timeout":
|
|
595
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/{codesystem}.");
|
|
596
|
-
case "unknown":
|
|
597
|
-
throw new errors.phenomlError({
|
|
598
|
-
message: _response.error.errorMessage,
|
|
599
|
-
rawResponse: _response.rawResponse,
|
|
600
|
-
});
|
|
601
|
-
}
|
|
504
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}");
|
|
602
505
|
});
|
|
603
506
|
}
|
|
604
507
|
/**
|
|
@@ -609,7 +512,7 @@ export class Construe {
|
|
|
609
512
|
* @param {string} codesystem - Code system name
|
|
610
513
|
* @param {string} codeID - The code identifier
|
|
611
514
|
* @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
|
|
612
|
-
* @param {
|
|
515
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
613
516
|
*
|
|
614
517
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
615
518
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -628,11 +531,11 @@ export class Construe {
|
|
|
628
531
|
return __awaiter(this, arguments, void 0, function* (codesystem, codeID, request = {}, requestOptions) {
|
|
629
532
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
630
533
|
const { version } = request;
|
|
631
|
-
const _queryParams = {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
534
|
+
const _queryParams = {
|
|
535
|
+
version,
|
|
536
|
+
};
|
|
537
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
538
|
+
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);
|
|
636
539
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
637
540
|
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, `construe/codes/${core.url.encodePathParam(codesystem)}/${core.url.encodePathParam(codeID)}`),
|
|
638
541
|
method: "GET",
|
|
@@ -665,21 +568,7 @@ export class Construe {
|
|
|
665
568
|
});
|
|
666
569
|
}
|
|
667
570
|
}
|
|
668
|
-
|
|
669
|
-
case "non-json":
|
|
670
|
-
throw new errors.phenomlError({
|
|
671
|
-
statusCode: _response.error.statusCode,
|
|
672
|
-
body: _response.error.rawBody,
|
|
673
|
-
rawResponse: _response.rawResponse,
|
|
674
|
-
});
|
|
675
|
-
case "timeout":
|
|
676
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/{codesystem}/{codeID}.");
|
|
677
|
-
case "unknown":
|
|
678
|
-
throw new errors.phenomlError({
|
|
679
|
-
message: _response.error.errorMessage,
|
|
680
|
-
rawResponse: _response.rawResponse,
|
|
681
|
-
});
|
|
682
|
-
}
|
|
571
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/{codeID}");
|
|
683
572
|
});
|
|
684
573
|
}
|
|
685
574
|
/**
|
|
@@ -705,7 +594,7 @@ export class Construe {
|
|
|
705
594
|
*
|
|
706
595
|
* @param {string} codesystem - Code system name
|
|
707
596
|
* @param {phenoml.construe.GetConstrueCodesCodesystemSearchSemanticRequest} request
|
|
708
|
-
* @param {
|
|
597
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
709
598
|
*
|
|
710
599
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
711
600
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -726,15 +615,13 @@ export class Construe {
|
|
|
726
615
|
return __awaiter(this, void 0, void 0, function* () {
|
|
727
616
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
728
617
|
const { text, version, limit } = request;
|
|
729
|
-
const _queryParams = {
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
}
|
|
737
|
-
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);
|
|
618
|
+
const _queryParams = {
|
|
619
|
+
text,
|
|
620
|
+
version,
|
|
621
|
+
limit,
|
|
622
|
+
};
|
|
623
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
624
|
+
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);
|
|
738
625
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
739
626
|
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, `construe/codes/${core.url.encodePathParam(codesystem)}/search/semantic`),
|
|
740
627
|
method: "GET",
|
|
@@ -770,21 +657,7 @@ export class Construe {
|
|
|
770
657
|
});
|
|
771
658
|
}
|
|
772
659
|
}
|
|
773
|
-
|
|
774
|
-
case "non-json":
|
|
775
|
-
throw new errors.phenomlError({
|
|
776
|
-
statusCode: _response.error.statusCode,
|
|
777
|
-
body: _response.error.rawBody,
|
|
778
|
-
rawResponse: _response.rawResponse,
|
|
779
|
-
});
|
|
780
|
-
case "timeout":
|
|
781
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/{codesystem}/search/semantic.");
|
|
782
|
-
case "unknown":
|
|
783
|
-
throw new errors.phenomlError({
|
|
784
|
-
message: _response.error.errorMessage,
|
|
785
|
-
rawResponse: _response.rawResponse,
|
|
786
|
-
});
|
|
787
|
-
}
|
|
660
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/search/semantic");
|
|
788
661
|
});
|
|
789
662
|
}
|
|
790
663
|
/**
|
|
@@ -792,7 +665,7 @@ export class Construe {
|
|
|
792
665
|
* Feedback includes the full extraction result received and the result the user expected.
|
|
793
666
|
*
|
|
794
667
|
* @param {phenoml.construe.FeedbackRequest} request
|
|
795
|
-
* @param {
|
|
668
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
796
669
|
*
|
|
797
670
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
798
671
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -826,7 +699,8 @@ export class Construe {
|
|
|
826
699
|
__submitFeedbackOnExtractionResults(request, requestOptions) {
|
|
827
700
|
return __awaiter(this, void 0, void 0, function* () {
|
|
828
701
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
829
|
-
const
|
|
702
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
703
|
+
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);
|
|
830
704
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
831
705
|
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, "construe/feedback"),
|
|
832
706
|
method: "POST",
|
|
@@ -862,21 +736,7 @@ export class Construe {
|
|
|
862
736
|
});
|
|
863
737
|
}
|
|
864
738
|
}
|
|
865
|
-
|
|
866
|
-
case "non-json":
|
|
867
|
-
throw new errors.phenomlError({
|
|
868
|
-
statusCode: _response.error.statusCode,
|
|
869
|
-
body: _response.error.rawBody,
|
|
870
|
-
rawResponse: _response.rawResponse,
|
|
871
|
-
});
|
|
872
|
-
case "timeout":
|
|
873
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /construe/feedback.");
|
|
874
|
-
case "unknown":
|
|
875
|
-
throw new errors.phenomlError({
|
|
876
|
-
message: _response.error.errorMessage,
|
|
877
|
-
rawResponse: _response.rawResponse,
|
|
878
|
-
});
|
|
879
|
-
}
|
|
739
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/construe/feedback");
|
|
880
740
|
});
|
|
881
741
|
}
|
|
882
742
|
/**
|
|
@@ -907,7 +767,7 @@ export class Construe {
|
|
|
907
767
|
*
|
|
908
768
|
* @param {string} codesystem - Code system name
|
|
909
769
|
* @param {phenoml.construe.GetConstrueCodesCodesystemSearchTextRequest} request
|
|
910
|
-
* @param {
|
|
770
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
911
771
|
*
|
|
912
772
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
913
773
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -929,15 +789,13 @@ export class Construe {
|
|
|
929
789
|
return __awaiter(this, void 0, void 0, function* () {
|
|
930
790
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
931
791
|
const { q, version, limit } = request;
|
|
932
|
-
const _queryParams = {
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
}
|
|
940
|
-
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);
|
|
792
|
+
const _queryParams = {
|
|
793
|
+
q,
|
|
794
|
+
version,
|
|
795
|
+
limit,
|
|
796
|
+
};
|
|
797
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
798
|
+
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);
|
|
941
799
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
942
800
|
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, `construe/codes/${core.url.encodePathParam(codesystem)}/search/text`),
|
|
943
801
|
method: "GET",
|
|
@@ -972,26 +830,7 @@ export class Construe {
|
|
|
972
830
|
});
|
|
973
831
|
}
|
|
974
832
|
}
|
|
975
|
-
|
|
976
|
-
case "non-json":
|
|
977
|
-
throw new errors.phenomlError({
|
|
978
|
-
statusCode: _response.error.statusCode,
|
|
979
|
-
body: _response.error.rawBody,
|
|
980
|
-
rawResponse: _response.rawResponse,
|
|
981
|
-
});
|
|
982
|
-
case "timeout":
|
|
983
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/{codesystem}/search/text.");
|
|
984
|
-
case "unknown":
|
|
985
|
-
throw new errors.phenomlError({
|
|
986
|
-
message: _response.error.errorMessage,
|
|
987
|
-
rawResponse: _response.rawResponse,
|
|
988
|
-
});
|
|
989
|
-
}
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
_getAuthorizationHeader() {
|
|
993
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
994
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
833
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/search/text");
|
|
995
834
|
});
|
|
996
835
|
}
|
|
997
836
|
}
|
|
@@ -7,4 +7,4 @@ export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConst
|
|
|
7
7
|
export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.mjs";
|
|
8
8
|
export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.mjs";
|
|
9
9
|
export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.mjs";
|
|
10
|
-
export
|
|
10
|
+
export { UploadRequest } from "./UploadRequest.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { UploadRequest } from "./UploadRequest.mjs";
|
|
@@ -8,6 +8,10 @@ export class BadRequestError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
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 ConflictError 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 FailedDependencyError 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 GatewayTimeoutError 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
|
}
|