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
|
@@ -43,15 +43,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.ConstrueClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
47
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
48
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
49
50
|
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
50
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
51
53
|
const phenoml = __importStar(require("../../../index.js"));
|
|
52
|
-
class
|
|
53
|
-
constructor(
|
|
54
|
-
this._options =
|
|
54
|
+
class ConstrueClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* Upload a custom medical code system with codes and descriptions for use in code extraction. Requires a paid plan.
|
|
@@ -60,7 +62,7 @@ class Construe {
|
|
|
60
62
|
* transitions from "processing" to "ready" or "failed".
|
|
61
63
|
*
|
|
62
64
|
* @param {phenoml.construe.UploadRequest} request
|
|
63
|
-
* @param {
|
|
65
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
66
|
*
|
|
65
67
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
66
68
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -82,7 +84,8 @@ class Construe {
|
|
|
82
84
|
__uploadCodeSystem(request, requestOptions) {
|
|
83
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
86
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
85
|
-
const
|
|
87
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
88
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
86
89
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
87
90
|
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"),
|
|
88
91
|
method: "POST",
|
|
@@ -125,21 +128,7 @@ class Construe {
|
|
|
125
128
|
});
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
|
-
|
|
129
|
-
case "non-json":
|
|
130
|
-
throw new errors.phenomlError({
|
|
131
|
-
statusCode: _response.error.statusCode,
|
|
132
|
-
body: _response.error.rawBody,
|
|
133
|
-
rawResponse: _response.rawResponse,
|
|
134
|
-
});
|
|
135
|
-
case "timeout":
|
|
136
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /construe/upload.");
|
|
137
|
-
case "unknown":
|
|
138
|
-
throw new errors.phenomlError({
|
|
139
|
-
message: _response.error.errorMessage,
|
|
140
|
-
rawResponse: _response.rawResponse,
|
|
141
|
-
});
|
|
142
|
-
}
|
|
131
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/construe/upload");
|
|
143
132
|
});
|
|
144
133
|
}
|
|
145
134
|
/**
|
|
@@ -148,7 +137,7 @@ class Construe {
|
|
|
148
137
|
* Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
149
138
|
*
|
|
150
139
|
* @param {phenoml.construe.ExtractRequest} request
|
|
151
|
-
* @param {
|
|
140
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
141
|
*
|
|
153
142
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
154
143
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -168,7 +157,8 @@ class Construe {
|
|
|
168
157
|
__extractCodes(request, requestOptions) {
|
|
169
158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
159
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
171
|
-
const
|
|
160
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
161
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
172
162
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
173
163
|
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"),
|
|
174
164
|
method: "POST",
|
|
@@ -208,27 +198,13 @@ class Construe {
|
|
|
208
198
|
});
|
|
209
199
|
}
|
|
210
200
|
}
|
|
211
|
-
|
|
212
|
-
case "non-json":
|
|
213
|
-
throw new errors.phenomlError({
|
|
214
|
-
statusCode: _response.error.statusCode,
|
|
215
|
-
body: _response.error.rawBody,
|
|
216
|
-
rawResponse: _response.rawResponse,
|
|
217
|
-
});
|
|
218
|
-
case "timeout":
|
|
219
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /construe/extract.");
|
|
220
|
-
case "unknown":
|
|
221
|
-
throw new errors.phenomlError({
|
|
222
|
-
message: _response.error.errorMessage,
|
|
223
|
-
rawResponse: _response.rawResponse,
|
|
224
|
-
});
|
|
225
|
-
}
|
|
201
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/construe/extract");
|
|
226
202
|
});
|
|
227
203
|
}
|
|
228
204
|
/**
|
|
229
205
|
* Returns the terminology server's catalog of available code systems, including both built-in standard terminologies and custom uploaded systems.
|
|
230
206
|
*
|
|
231
|
-
* @param {
|
|
207
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
232
208
|
*
|
|
233
209
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
234
210
|
* @throws {@link phenoml.construe.InternalServerError}
|
|
@@ -242,7 +218,8 @@ class Construe {
|
|
|
242
218
|
__listAvailableCodeSystems(requestOptions) {
|
|
243
219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
244
220
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
245
|
-
const
|
|
221
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
222
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
246
223
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
247
224
|
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"),
|
|
248
225
|
method: "GET",
|
|
@@ -274,21 +251,7 @@ class Construe {
|
|
|
274
251
|
});
|
|
275
252
|
}
|
|
276
253
|
}
|
|
277
|
-
|
|
278
|
-
case "non-json":
|
|
279
|
-
throw new errors.phenomlError({
|
|
280
|
-
statusCode: _response.error.statusCode,
|
|
281
|
-
body: _response.error.rawBody,
|
|
282
|
-
rawResponse: _response.rawResponse,
|
|
283
|
-
});
|
|
284
|
-
case "timeout":
|
|
285
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/systems.");
|
|
286
|
-
case "unknown":
|
|
287
|
-
throw new errors.phenomlError({
|
|
288
|
-
message: _response.error.errorMessage,
|
|
289
|
-
rawResponse: _response.rawResponse,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
254
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/construe/codes/systems");
|
|
292
255
|
});
|
|
293
256
|
}
|
|
294
257
|
/**
|
|
@@ -296,7 +259,7 @@ class Construe {
|
|
|
296
259
|
*
|
|
297
260
|
* @param {string} codesystem - Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
|
|
298
261
|
* @param {phenoml.construe.GetConstrueCodesSystemsCodesystemRequest} request
|
|
299
|
-
* @param {
|
|
262
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
300
263
|
*
|
|
301
264
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
302
265
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -315,11 +278,11 @@ class Construe {
|
|
|
315
278
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
316
279
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
317
280
|
const { version } = request;
|
|
318
|
-
const _queryParams = {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
281
|
+
const _queryParams = {
|
|
282
|
+
version,
|
|
283
|
+
};
|
|
284
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
285
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
323
286
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
324
287
|
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)}`),
|
|
325
288
|
method: "GET",
|
|
@@ -355,21 +318,7 @@ class Construe {
|
|
|
355
318
|
});
|
|
356
319
|
}
|
|
357
320
|
}
|
|
358
|
-
|
|
359
|
-
case "non-json":
|
|
360
|
-
throw new errors.phenomlError({
|
|
361
|
-
statusCode: _response.error.statusCode,
|
|
362
|
-
body: _response.error.rawBody,
|
|
363
|
-
rawResponse: _response.rawResponse,
|
|
364
|
-
});
|
|
365
|
-
case "timeout":
|
|
366
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/systems/{codesystem}.");
|
|
367
|
-
case "unknown":
|
|
368
|
-
throw new errors.phenomlError({
|
|
369
|
-
message: _response.error.errorMessage,
|
|
370
|
-
rawResponse: _response.rawResponse,
|
|
371
|
-
});
|
|
372
|
-
}
|
|
321
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/construe/codes/systems/{codesystem}");
|
|
373
322
|
});
|
|
374
323
|
}
|
|
375
324
|
/**
|
|
@@ -378,7 +327,7 @@ class Construe {
|
|
|
378
327
|
*
|
|
379
328
|
* @param {string} codesystem - Code system name
|
|
380
329
|
* @param {phenoml.construe.DeleteConstrueCodesSystemsCodesystemRequest} request
|
|
381
|
-
* @param {
|
|
330
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
382
331
|
*
|
|
383
332
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
384
333
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -398,11 +347,11 @@ class Construe {
|
|
|
398
347
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
399
348
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
400
349
|
const { version } = request;
|
|
401
|
-
const _queryParams = {
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
350
|
+
const _queryParams = {
|
|
351
|
+
version,
|
|
352
|
+
};
|
|
353
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
354
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
406
355
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
407
356
|
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)}`),
|
|
408
357
|
method: "DELETE",
|
|
@@ -440,21 +389,7 @@ class Construe {
|
|
|
440
389
|
});
|
|
441
390
|
}
|
|
442
391
|
}
|
|
443
|
-
|
|
444
|
-
case "non-json":
|
|
445
|
-
throw new errors.phenomlError({
|
|
446
|
-
statusCode: _response.error.statusCode,
|
|
447
|
-
body: _response.error.rawBody,
|
|
448
|
-
rawResponse: _response.rawResponse,
|
|
449
|
-
});
|
|
450
|
-
case "timeout":
|
|
451
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /construe/codes/systems/{codesystem}.");
|
|
452
|
-
case "unknown":
|
|
453
|
-
throw new errors.phenomlError({
|
|
454
|
-
message: _response.error.errorMessage,
|
|
455
|
-
rawResponse: _response.rawResponse,
|
|
456
|
-
});
|
|
457
|
-
}
|
|
392
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/construe/codes/systems/{codesystem}");
|
|
458
393
|
});
|
|
459
394
|
}
|
|
460
395
|
/**
|
|
@@ -464,7 +399,7 @@ class Construe {
|
|
|
464
399
|
*
|
|
465
400
|
* @param {string} codesystem - Code system name
|
|
466
401
|
* @param {phenoml.construe.GetConstrueCodesSystemsCodesystemExportRequest} request
|
|
467
|
-
* @param {
|
|
402
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
468
403
|
*
|
|
469
404
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
470
405
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -486,11 +421,11 @@ class Construe {
|
|
|
486
421
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
487
422
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
488
423
|
const { version } = request;
|
|
489
|
-
const _queryParams = {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
424
|
+
const _queryParams = {
|
|
425
|
+
version,
|
|
426
|
+
};
|
|
427
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
428
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
494
429
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
495
430
|
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`),
|
|
496
431
|
method: "GET",
|
|
@@ -532,21 +467,7 @@ class Construe {
|
|
|
532
467
|
});
|
|
533
468
|
}
|
|
534
469
|
}
|
|
535
|
-
|
|
536
|
-
case "non-json":
|
|
537
|
-
throw new errors.phenomlError({
|
|
538
|
-
statusCode: _response.error.statusCode,
|
|
539
|
-
body: _response.error.rawBody,
|
|
540
|
-
rawResponse: _response.rawResponse,
|
|
541
|
-
});
|
|
542
|
-
case "timeout":
|
|
543
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/systems/{codesystem}/export.");
|
|
544
|
-
case "unknown":
|
|
545
|
-
throw new errors.phenomlError({
|
|
546
|
-
message: _response.error.errorMessage,
|
|
547
|
-
rawResponse: _response.rawResponse,
|
|
548
|
-
});
|
|
549
|
-
}
|
|
470
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/construe/codes/systems/{codesystem}/export");
|
|
550
471
|
});
|
|
551
472
|
}
|
|
552
473
|
/**
|
|
@@ -556,7 +477,7 @@ class Construe {
|
|
|
556
477
|
*
|
|
557
478
|
* @param {string} codesystem - Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
|
|
558
479
|
* @param {phenoml.construe.GetConstrueCodesCodesystemRequest} request
|
|
559
|
-
* @param {
|
|
480
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
560
481
|
*
|
|
561
482
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
562
483
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -577,17 +498,13 @@ class Construe {
|
|
|
577
498
|
return __awaiter(this, arguments, void 0, function* (codesystem, request = {}, requestOptions) {
|
|
578
499
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
579
500
|
const { version, cursor, limit } = request;
|
|
580
|
-
const _queryParams = {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
if (limit != null) {
|
|
588
|
-
_queryParams.limit = limit.toString();
|
|
589
|
-
}
|
|
590
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
501
|
+
const _queryParams = {
|
|
502
|
+
version,
|
|
503
|
+
cursor,
|
|
504
|
+
limit,
|
|
505
|
+
};
|
|
506
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
507
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
591
508
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
592
509
|
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)}`),
|
|
593
510
|
method: "GET",
|
|
@@ -620,21 +537,7 @@ class Construe {
|
|
|
620
537
|
});
|
|
621
538
|
}
|
|
622
539
|
}
|
|
623
|
-
|
|
624
|
-
case "non-json":
|
|
625
|
-
throw new errors.phenomlError({
|
|
626
|
-
statusCode: _response.error.statusCode,
|
|
627
|
-
body: _response.error.rawBody,
|
|
628
|
-
rawResponse: _response.rawResponse,
|
|
629
|
-
});
|
|
630
|
-
case "timeout":
|
|
631
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/{codesystem}.");
|
|
632
|
-
case "unknown":
|
|
633
|
-
throw new errors.phenomlError({
|
|
634
|
-
message: _response.error.errorMessage,
|
|
635
|
-
rawResponse: _response.rawResponse,
|
|
636
|
-
});
|
|
637
|
-
}
|
|
540
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}");
|
|
638
541
|
});
|
|
639
542
|
}
|
|
640
543
|
/**
|
|
@@ -645,7 +548,7 @@ class Construe {
|
|
|
645
548
|
* @param {string} codesystem - Code system name
|
|
646
549
|
* @param {string} codeID - The code identifier
|
|
647
550
|
* @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
|
|
648
|
-
* @param {
|
|
551
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
649
552
|
*
|
|
650
553
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
651
554
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -664,11 +567,11 @@ class Construe {
|
|
|
664
567
|
return __awaiter(this, arguments, void 0, function* (codesystem, codeID, request = {}, requestOptions) {
|
|
665
568
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
666
569
|
const { version } = request;
|
|
667
|
-
const _queryParams = {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
570
|
+
const _queryParams = {
|
|
571
|
+
version,
|
|
572
|
+
};
|
|
573
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
574
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
672
575
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
673
576
|
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)}`),
|
|
674
577
|
method: "GET",
|
|
@@ -701,21 +604,7 @@ class Construe {
|
|
|
701
604
|
});
|
|
702
605
|
}
|
|
703
606
|
}
|
|
704
|
-
|
|
705
|
-
case "non-json":
|
|
706
|
-
throw new errors.phenomlError({
|
|
707
|
-
statusCode: _response.error.statusCode,
|
|
708
|
-
body: _response.error.rawBody,
|
|
709
|
-
rawResponse: _response.rawResponse,
|
|
710
|
-
});
|
|
711
|
-
case "timeout":
|
|
712
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/{codesystem}/{codeID}.");
|
|
713
|
-
case "unknown":
|
|
714
|
-
throw new errors.phenomlError({
|
|
715
|
-
message: _response.error.errorMessage,
|
|
716
|
-
rawResponse: _response.rawResponse,
|
|
717
|
-
});
|
|
718
|
-
}
|
|
607
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/{codeID}");
|
|
719
608
|
});
|
|
720
609
|
}
|
|
721
610
|
/**
|
|
@@ -741,7 +630,7 @@ class Construe {
|
|
|
741
630
|
*
|
|
742
631
|
* @param {string} codesystem - Code system name
|
|
743
632
|
* @param {phenoml.construe.GetConstrueCodesCodesystemSearchSemanticRequest} request
|
|
744
|
-
* @param {
|
|
633
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
745
634
|
*
|
|
746
635
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
747
636
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -762,15 +651,13 @@ class Construe {
|
|
|
762
651
|
return __awaiter(this, void 0, void 0, function* () {
|
|
763
652
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
764
653
|
const { text, version, limit } = request;
|
|
765
|
-
const _queryParams = {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
}
|
|
773
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
654
|
+
const _queryParams = {
|
|
655
|
+
text,
|
|
656
|
+
version,
|
|
657
|
+
limit,
|
|
658
|
+
};
|
|
659
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
660
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
774
661
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
775
662
|
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`),
|
|
776
663
|
method: "GET",
|
|
@@ -806,21 +693,7 @@ class Construe {
|
|
|
806
693
|
});
|
|
807
694
|
}
|
|
808
695
|
}
|
|
809
|
-
|
|
810
|
-
case "non-json":
|
|
811
|
-
throw new errors.phenomlError({
|
|
812
|
-
statusCode: _response.error.statusCode,
|
|
813
|
-
body: _response.error.rawBody,
|
|
814
|
-
rawResponse: _response.rawResponse,
|
|
815
|
-
});
|
|
816
|
-
case "timeout":
|
|
817
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/{codesystem}/search/semantic.");
|
|
818
|
-
case "unknown":
|
|
819
|
-
throw new errors.phenomlError({
|
|
820
|
-
message: _response.error.errorMessage,
|
|
821
|
-
rawResponse: _response.rawResponse,
|
|
822
|
-
});
|
|
823
|
-
}
|
|
696
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/search/semantic");
|
|
824
697
|
});
|
|
825
698
|
}
|
|
826
699
|
/**
|
|
@@ -828,7 +701,7 @@ class Construe {
|
|
|
828
701
|
* Feedback includes the full extraction result received and the result the user expected.
|
|
829
702
|
*
|
|
830
703
|
* @param {phenoml.construe.FeedbackRequest} request
|
|
831
|
-
* @param {
|
|
704
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
832
705
|
*
|
|
833
706
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
834
707
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -862,7 +735,8 @@ class Construe {
|
|
|
862
735
|
__submitFeedbackOnExtractionResults(request, requestOptions) {
|
|
863
736
|
return __awaiter(this, void 0, void 0, function* () {
|
|
864
737
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
865
|
-
const
|
|
738
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
739
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
866
740
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
867
741
|
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"),
|
|
868
742
|
method: "POST",
|
|
@@ -898,21 +772,7 @@ class Construe {
|
|
|
898
772
|
});
|
|
899
773
|
}
|
|
900
774
|
}
|
|
901
|
-
|
|
902
|
-
case "non-json":
|
|
903
|
-
throw new errors.phenomlError({
|
|
904
|
-
statusCode: _response.error.statusCode,
|
|
905
|
-
body: _response.error.rawBody,
|
|
906
|
-
rawResponse: _response.rawResponse,
|
|
907
|
-
});
|
|
908
|
-
case "timeout":
|
|
909
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /construe/feedback.");
|
|
910
|
-
case "unknown":
|
|
911
|
-
throw new errors.phenomlError({
|
|
912
|
-
message: _response.error.errorMessage,
|
|
913
|
-
rawResponse: _response.rawResponse,
|
|
914
|
-
});
|
|
915
|
-
}
|
|
775
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/construe/feedback");
|
|
916
776
|
});
|
|
917
777
|
}
|
|
918
778
|
/**
|
|
@@ -943,7 +803,7 @@ class Construe {
|
|
|
943
803
|
*
|
|
944
804
|
* @param {string} codesystem - Code system name
|
|
945
805
|
* @param {phenoml.construe.GetConstrueCodesCodesystemSearchTextRequest} request
|
|
946
|
-
* @param {
|
|
806
|
+
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
947
807
|
*
|
|
948
808
|
* @throws {@link phenoml.construe.BadRequestError}
|
|
949
809
|
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
@@ -965,15 +825,13 @@ class Construe {
|
|
|
965
825
|
return __awaiter(this, void 0, void 0, function* () {
|
|
966
826
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
967
827
|
const { q, version, limit } = request;
|
|
968
|
-
const _queryParams = {
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
}
|
|
976
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
828
|
+
const _queryParams = {
|
|
829
|
+
q,
|
|
830
|
+
version,
|
|
831
|
+
limit,
|
|
832
|
+
};
|
|
833
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
834
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
977
835
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
978
836
|
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`),
|
|
979
837
|
method: "GET",
|
|
@@ -1008,27 +866,8 @@ class Construe {
|
|
|
1008
866
|
});
|
|
1009
867
|
}
|
|
1010
868
|
}
|
|
1011
|
-
|
|
1012
|
-
case "non-json":
|
|
1013
|
-
throw new errors.phenomlError({
|
|
1014
|
-
statusCode: _response.error.statusCode,
|
|
1015
|
-
body: _response.error.rawBody,
|
|
1016
|
-
rawResponse: _response.rawResponse,
|
|
1017
|
-
});
|
|
1018
|
-
case "timeout":
|
|
1019
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /construe/codes/{codesystem}/search/text.");
|
|
1020
|
-
case "unknown":
|
|
1021
|
-
throw new errors.phenomlError({
|
|
1022
|
-
message: _response.error.errorMessage,
|
|
1023
|
-
rawResponse: _response.rawResponse,
|
|
1024
|
-
});
|
|
1025
|
-
}
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
_getAuthorizationHeader() {
|
|
1029
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1030
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
869
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/construe/codes/{codesystem}/search/text");
|
|
1031
870
|
});
|
|
1032
871
|
}
|
|
1033
872
|
}
|
|
1034
|
-
exports.
|
|
873
|
+
exports.ConstrueClient = ConstrueClient;
|
|
@@ -7,4 +7,4 @@ export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConst
|
|
|
7
7
|
export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.js";
|
|
8
8
|
export type { GetConstrueCodesSystemsCodesystemExportRequest } from "./GetConstrueCodesSystemsCodesystemExportRequest.js";
|
|
9
9
|
export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.js";
|
|
10
|
-
export
|
|
10
|
+
export { UploadRequest } from "./UploadRequest.js";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UploadRequest = void 0;
|
|
4
|
+
var UploadRequest_js_1 = require("./UploadRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "UploadRequest", { enumerable: true, get: function () { return UploadRequest_js_1.UploadRequest; } });
|
|
@@ -44,7 +44,11 @@ class BadRequestError extends errors.phenomlError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.BadRequestError = BadRequestError;
|
|
@@ -44,7 +44,11 @@ class ConflictError extends errors.phenomlError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.ConflictError = ConflictError;
|
|
@@ -44,7 +44,11 @@ class FailedDependencyError extends errors.phenomlError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.FailedDependencyError = FailedDependencyError;
|
|
@@ -44,7 +44,11 @@ class ForbiddenError extends errors.phenomlError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.ForbiddenError = ForbiddenError;
|
|
@@ -44,7 +44,11 @@ class GatewayTimeoutError extends errors.phenomlError {
|
|
|
44
44
|
body: body,
|
|
45
45
|
rawResponse: rawResponse,
|
|
46
46
|
});
|
|
47
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
50
54
|
exports.GatewayTimeoutError = GatewayTimeoutError;
|