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,6 +8,10 @@ export class NotFoundError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class NotImplementedError 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 ServiceUnavailableError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class UnauthorizedError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
export interface ExtractRequestConfig {
|
|
2
2
|
/** Method for splitting input text into chunks before code extraction */
|
|
3
|
-
chunking_method?: ExtractRequestConfig.ChunkingMethod;
|
|
3
|
+
chunking_method?: ExtractRequestConfig.ChunkingMethod | undefined;
|
|
4
4
|
/**
|
|
5
5
|
* Maximum number of codes to extract per chunk. If not specified, uses system-specific defaults:
|
|
6
6
|
* * SNOMED: 10
|
|
7
7
|
* * LOINC, HPO, RXNORM: 20
|
|
8
8
|
* * All other systems: 5
|
|
9
9
|
*/
|
|
10
|
-
max_codes_per_chunk?: number;
|
|
10
|
+
max_codes_per_chunk?: number | undefined;
|
|
11
11
|
/** Threshold for filtering similar codes (0.0-1.0) */
|
|
12
|
-
code_similarity_filter?: number;
|
|
12
|
+
code_similarity_filter?: number | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* Method for validating extracted codes:
|
|
15
15
|
* * none - No validation, returns all candidate codes
|
|
16
16
|
* * simple - LLM-based validation
|
|
17
17
|
* * medication_search - LLM-based validation tailored for medication concepts
|
|
18
18
|
*/
|
|
19
|
-
validation_method?: ExtractRequestConfig.ValidationMethod;
|
|
19
|
+
validation_method?: ExtractRequestConfig.ValidationMethod | undefined;
|
|
20
20
|
/** Whether to include explanations for why each code was extracted */
|
|
21
|
-
include_rationale?: boolean;
|
|
21
|
+
include_rationale?: boolean | undefined;
|
|
22
22
|
/** Whether to include ancestor/parent codes in the results */
|
|
23
|
-
include_ancestors?: boolean;
|
|
23
|
+
include_ancestors?: boolean | undefined;
|
|
24
24
|
/** Whether to include codes that failed validation in the results */
|
|
25
|
-
include_invalid?: boolean;
|
|
25
|
+
include_invalid?: boolean | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Whether to include source text citations for each extracted code.
|
|
28
28
|
* Citations show the exact text spans (with character offsets) that led to each code.
|
|
@@ -30,7 +30,7 @@ export interface ExtractRequestConfig {
|
|
|
30
30
|
* The "none" method returns full text as one chunk (not useful for citations).
|
|
31
31
|
* LLM-based chunking (paragraphs, topics) does not support citations.
|
|
32
32
|
*/
|
|
33
|
-
include_citations?: boolean;
|
|
33
|
+
include_citations?: boolean | undefined;
|
|
34
34
|
}
|
|
35
35
|
export declare namespace ExtractRequestConfig {
|
|
36
36
|
/** Method for splitting input text into chunks before code extraction */
|
|
@@ -16,7 +16,7 @@ export interface ExtractRequestSystem {
|
|
|
16
16
|
*
|
|
17
17
|
* Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
18
18
|
*/
|
|
19
|
-
name?: string;
|
|
19
|
+
name?: string | undefined;
|
|
20
20
|
/** Code system version. Must match the version available in your environment. */
|
|
21
|
-
version?: string;
|
|
21
|
+
version?: string | undefined;
|
|
22
22
|
}
|
|
@@ -7,16 +7,16 @@ export interface ExtractedCodeResult {
|
|
|
7
7
|
/** Whether the code passed validation. Always true unless include_invalid is set to true, in which case invalid codes will have this set to false. */
|
|
8
8
|
valid: boolean;
|
|
9
9
|
/** Explanation for why this code was extracted (if include_rationale is true) */
|
|
10
|
-
reason?: string;
|
|
10
|
+
reason?: string | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Whether this code is an ancestor (parent) of an extracted code rather than directly extracted.
|
|
13
13
|
* Only present when include_ancestors is true.
|
|
14
14
|
*/
|
|
15
|
-
is_ancestor?: boolean;
|
|
15
|
+
is_ancestor?: boolean | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Source text references showing where this code was found in the input.
|
|
18
18
|
* Only present when include_citations is true and chunking method supports it.
|
|
19
19
|
* Ancestor codes do not receive citations.
|
|
20
20
|
*/
|
|
21
|
-
citations?: phenoml.construe.Citation[];
|
|
21
|
+
citations?: phenoml.construe.Citation[] | undefined;
|
|
22
22
|
}
|
|
@@ -3,7 +3,7 @@ export interface ListCodesResponse {
|
|
|
3
3
|
system: phenoml.construe.CodeSystemInfo;
|
|
4
4
|
codes: phenoml.construe.CodeResponse[];
|
|
5
5
|
/** Cursor for fetching the next page (null if no more results) */
|
|
6
|
-
next_cursor?: string;
|
|
6
|
+
next_cursor?: string | undefined;
|
|
7
7
|
/** Whether there are more results available */
|
|
8
8
|
has_more: boolean;
|
|
9
9
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
2
3
|
import * as core from "../../../../core/index.mjs";
|
|
3
4
|
import * as phenoml from "../../../index.mjs";
|
|
4
|
-
export declare namespace
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
export declare namespace FhirClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
10
|
+
export declare class FhirClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<FhirClient.Options>;
|
|
12
|
+
constructor(options?: FhirClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Retrieves FHIR resources from the specified provider. Supports both individual resource retrieval and search operations based on the FHIR path and query parameters.
|
|
15
15
|
*
|
|
@@ -24,7 +24,7 @@ export declare class Fhir {
|
|
|
24
24
|
* - "Patient/123" (for specific resource operations)
|
|
25
25
|
* - "Patient/123/_history" (for history operations)
|
|
26
26
|
* @param {phenoml.fhir.FhirSearchRequest} request
|
|
27
|
-
* @param {
|
|
27
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
30
30
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -38,7 +38,7 @@ export declare class Fhir {
|
|
|
38
38
|
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c..."
|
|
39
39
|
* })
|
|
40
40
|
*/
|
|
41
|
-
search(fhir_provider_id: string, fhir_path: string, request?: phenoml.fhir.FhirSearchRequest, requestOptions?:
|
|
41
|
+
search(fhir_provider_id: string, fhir_path: string, request?: phenoml.fhir.FhirSearchRequest, requestOptions?: FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirSearchResponse>;
|
|
42
42
|
private __search;
|
|
43
43
|
/**
|
|
44
44
|
* Creates a new FHIR resource on the specified provider. The request body should contain a valid FHIR resource in JSON format.
|
|
@@ -54,7 +54,7 @@ export declare class Fhir {
|
|
|
54
54
|
* - "Patient/123" (for specific resource operations)
|
|
55
55
|
* - "Patient/123/_history" (for history operations)
|
|
56
56
|
* @param {phenoml.fhir.FhirCreateRequest} request
|
|
57
|
-
* @param {
|
|
57
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
58
|
*
|
|
59
59
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
60
60
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -80,7 +80,7 @@ export declare class Fhir {
|
|
|
80
80
|
* }
|
|
81
81
|
* })
|
|
82
82
|
*/
|
|
83
|
-
create(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirCreateRequest, requestOptions?:
|
|
83
|
+
create(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirCreateRequest, requestOptions?: FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirResource>;
|
|
84
84
|
private __create;
|
|
85
85
|
/**
|
|
86
86
|
* Creates or updates a FHIR resource on the specified provider. If the resource exists, it will be updated; otherwise, it will be created.
|
|
@@ -96,7 +96,7 @@ export declare class Fhir {
|
|
|
96
96
|
* - "Patient/123" (for specific resource operations)
|
|
97
97
|
* - "Patient/123/_history" (for history operations)
|
|
98
98
|
* @param {phenoml.fhir.FhirUpsertRequest} request
|
|
99
|
-
* @param {
|
|
99
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
100
100
|
*
|
|
101
101
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
102
102
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -124,7 +124,7 @@ export declare class Fhir {
|
|
|
124
124
|
* }
|
|
125
125
|
* })
|
|
126
126
|
*/
|
|
127
|
-
upsert(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirUpsertRequest, requestOptions?:
|
|
127
|
+
upsert(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirUpsertRequest, requestOptions?: FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirResource>;
|
|
128
128
|
private __upsert;
|
|
129
129
|
/**
|
|
130
130
|
* Deletes a FHIR resource from the specified provider.
|
|
@@ -140,7 +140,7 @@ export declare class Fhir {
|
|
|
140
140
|
* - "Patient/123" (for specific resource operations)
|
|
141
141
|
* - "Patient/123/_history" (for history operations)
|
|
142
142
|
* @param {phenoml.fhir.FhirDeleteRequest} request
|
|
143
|
-
* @param {
|
|
143
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
144
|
*
|
|
145
145
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
146
146
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -154,7 +154,7 @@ export declare class Fhir {
|
|
|
154
154
|
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c..."
|
|
155
155
|
* })
|
|
156
156
|
*/
|
|
157
|
-
delete(fhir_provider_id: string, fhir_path: string, request?: phenoml.fhir.FhirDeleteRequest, requestOptions?:
|
|
157
|
+
delete(fhir_provider_id: string, fhir_path: string, request?: phenoml.fhir.FhirDeleteRequest, requestOptions?: FhirClient.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
158
158
|
private __delete;
|
|
159
159
|
/**
|
|
160
160
|
* Partially updates a FHIR resource on the specified provider using JSON Patch operations as defined in RFC 6902.
|
|
@@ -175,7 +175,7 @@ export declare class Fhir {
|
|
|
175
175
|
* - "Patient/123" (for specific resource operations)
|
|
176
176
|
* - "Patient/123/_history" (for history operations)
|
|
177
177
|
* @param {phenoml.fhir.FhirPatchRequest} request
|
|
178
|
-
* @param {
|
|
178
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
179
179
|
*
|
|
180
180
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
181
181
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -245,7 +245,7 @@ export declare class Fhir {
|
|
|
245
245
|
* }]
|
|
246
246
|
* })
|
|
247
247
|
*/
|
|
248
|
-
patch(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirPatchRequest, requestOptions?:
|
|
248
|
+
patch(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirPatchRequest, requestOptions?: FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirResource>;
|
|
249
249
|
private __patch;
|
|
250
250
|
/**
|
|
251
251
|
* Executes a FHIR Bundle transaction or batch operation on the specified provider. This allows multiple FHIR resources to be processed in a single request.
|
|
@@ -258,7 +258,7 @@ export declare class Fhir {
|
|
|
258
258
|
* - A UUID representing the provider ID
|
|
259
259
|
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
260
260
|
* @param {phenoml.fhir.FhirExecuteBundleRequest} request
|
|
261
|
-
* @param {
|
|
261
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
262
262
|
*
|
|
263
263
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
264
264
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -303,7 +303,6 @@ export declare class Fhir {
|
|
|
303
303
|
* }
|
|
304
304
|
* })
|
|
305
305
|
*/
|
|
306
|
-
executeBundle(fhir_provider_id: string, request: phenoml.fhir.FhirExecuteBundleRequest, requestOptions?:
|
|
306
|
+
executeBundle(fhir_provider_id: string, request: phenoml.fhir.FhirExecuteBundleRequest, requestOptions?: FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirBundle>;
|
|
307
307
|
private __executeBundle;
|
|
308
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
309
308
|
}
|
|
@@ -8,15 +8,17 @@ 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 { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
11
12
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../core/index.mjs";
|
|
13
14
|
import { toJson } from "../../../../core/json.mjs";
|
|
14
15
|
import * as environments from "../../../../environments.mjs";
|
|
16
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
15
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
16
18
|
import * as phenoml from "../../../index.mjs";
|
|
17
|
-
export class
|
|
18
|
-
constructor(
|
|
19
|
-
this._options =
|
|
19
|
+
export class FhirClient {
|
|
20
|
+
constructor(options = {}) {
|
|
21
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* Retrieves FHIR resources from the specified provider. Supports both individual resource retrieval and search operations based on the FHIR path and query parameters.
|
|
@@ -32,7 +34,7 @@ export class Fhir {
|
|
|
32
34
|
* - "Patient/123" (for specific resource operations)
|
|
33
35
|
* - "Patient/123/_history" (for history operations)
|
|
34
36
|
* @param {phenoml.fhir.FhirSearchRequest} request
|
|
35
|
-
* @param {
|
|
37
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
38
|
*
|
|
37
39
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
38
40
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -53,14 +55,13 @@ export class Fhir {
|
|
|
53
55
|
return __awaiter(this, arguments, void 0, function* (fhir_provider_id, fhir_path, request = {}, requestOptions) {
|
|
54
56
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
55
57
|
const { query_parameters: queryParameters, "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, } = request;
|
|
56
|
-
const _queryParams = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
61
|
-
|
|
62
|
-
"X-Phenoml-
|
|
63
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider != null ? phenomlFhirProvider : undefined,
|
|
58
|
+
const _queryParams = {
|
|
59
|
+
query_parameters: queryParameters != null ? toJson(queryParameters) : undefined,
|
|
60
|
+
};
|
|
61
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
62
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
63
|
+
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
64
|
+
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
64
65
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
65
66
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
66
67
|
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, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
@@ -96,21 +97,7 @@ export class Fhir {
|
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
-
case "non-json":
|
|
101
|
-
throw new errors.phenomlError({
|
|
102
|
-
statusCode: _response.error.statusCode,
|
|
103
|
-
body: _response.error.rawBody,
|
|
104
|
-
rawResponse: _response.rawResponse,
|
|
105
|
-
});
|
|
106
|
-
case "timeout":
|
|
107
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /fhir-provider/{fhir_provider_id}/fhir/{fhir_path}.");
|
|
108
|
-
case "unknown":
|
|
109
|
-
throw new errors.phenomlError({
|
|
110
|
-
message: _response.error.errorMessage,
|
|
111
|
-
rawResponse: _response.rawResponse,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
100
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/fhir-provider/{fhir_provider_id}/fhir/{fhir_path}");
|
|
114
101
|
});
|
|
115
102
|
}
|
|
116
103
|
/**
|
|
@@ -127,7 +114,7 @@ export class Fhir {
|
|
|
127
114
|
* - "Patient/123" (for specific resource operations)
|
|
128
115
|
* - "Patient/123/_history" (for history operations)
|
|
129
116
|
* @param {phenoml.fhir.FhirCreateRequest} request
|
|
130
|
-
* @param {
|
|
117
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
118
|
*
|
|
132
119
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
133
120
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -160,10 +147,10 @@ export class Fhir {
|
|
|
160
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
148
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
162
149
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf
|
|
166
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider
|
|
150
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
151
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
152
|
+
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
153
|
+
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
167
154
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
168
155
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
169
156
|
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, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
@@ -200,21 +187,7 @@ export class Fhir {
|
|
|
200
187
|
});
|
|
201
188
|
}
|
|
202
189
|
}
|
|
203
|
-
|
|
204
|
-
case "non-json":
|
|
205
|
-
throw new errors.phenomlError({
|
|
206
|
-
statusCode: _response.error.statusCode,
|
|
207
|
-
body: _response.error.rawBody,
|
|
208
|
-
rawResponse: _response.rawResponse,
|
|
209
|
-
});
|
|
210
|
-
case "timeout":
|
|
211
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /fhir-provider/{fhir_provider_id}/fhir/{fhir_path}.");
|
|
212
|
-
case "unknown":
|
|
213
|
-
throw new errors.phenomlError({
|
|
214
|
-
message: _response.error.errorMessage,
|
|
215
|
-
rawResponse: _response.rawResponse,
|
|
216
|
-
});
|
|
217
|
-
}
|
|
190
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/fhir-provider/{fhir_provider_id}/fhir/{fhir_path}");
|
|
218
191
|
});
|
|
219
192
|
}
|
|
220
193
|
/**
|
|
@@ -231,7 +204,7 @@ export class Fhir {
|
|
|
231
204
|
* - "Patient/123" (for specific resource operations)
|
|
232
205
|
* - "Patient/123/_history" (for history operations)
|
|
233
206
|
* @param {phenoml.fhir.FhirUpsertRequest} request
|
|
234
|
-
* @param {
|
|
207
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
235
208
|
*
|
|
236
209
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
237
210
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -266,10 +239,10 @@ export class Fhir {
|
|
|
266
239
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
240
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
268
241
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf
|
|
272
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider
|
|
242
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
243
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
244
|
+
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
245
|
+
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
273
246
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
274
247
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
275
248
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
@@ -306,21 +279,7 @@ export class Fhir {
|
|
|
306
279
|
});
|
|
307
280
|
}
|
|
308
281
|
}
|
|
309
|
-
|
|
310
|
-
case "non-json":
|
|
311
|
-
throw new errors.phenomlError({
|
|
312
|
-
statusCode: _response.error.statusCode,
|
|
313
|
-
body: _response.error.rawBody,
|
|
314
|
-
rawResponse: _response.rawResponse,
|
|
315
|
-
});
|
|
316
|
-
case "timeout":
|
|
317
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PUT /fhir-provider/{fhir_provider_id}/fhir/{fhir_path}.");
|
|
318
|
-
case "unknown":
|
|
319
|
-
throw new errors.phenomlError({
|
|
320
|
-
message: _response.error.errorMessage,
|
|
321
|
-
rawResponse: _response.rawResponse,
|
|
322
|
-
});
|
|
323
|
-
}
|
|
282
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/fhir-provider/{fhir_provider_id}/fhir/{fhir_path}");
|
|
324
283
|
});
|
|
325
284
|
}
|
|
326
285
|
/**
|
|
@@ -337,7 +296,7 @@ export class Fhir {
|
|
|
337
296
|
* - "Patient/123" (for specific resource operations)
|
|
338
297
|
* - "Patient/123/_history" (for history operations)
|
|
339
298
|
* @param {phenoml.fhir.FhirDeleteRequest} request
|
|
340
|
-
* @param {
|
|
299
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
341
300
|
*
|
|
342
301
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
343
302
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -358,10 +317,10 @@ export class Fhir {
|
|
|
358
317
|
return __awaiter(this, arguments, void 0, function* (fhir_provider_id, fhir_path, request = {}, requestOptions) {
|
|
359
318
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
360
319
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider } = request;
|
|
361
|
-
const
|
|
362
|
-
|
|
363
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf
|
|
364
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider
|
|
320
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
321
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
322
|
+
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
323
|
+
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
365
324
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
366
325
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
367
326
|
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, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
@@ -397,21 +356,7 @@ export class Fhir {
|
|
|
397
356
|
});
|
|
398
357
|
}
|
|
399
358
|
}
|
|
400
|
-
|
|
401
|
-
case "non-json":
|
|
402
|
-
throw new errors.phenomlError({
|
|
403
|
-
statusCode: _response.error.statusCode,
|
|
404
|
-
body: _response.error.rawBody,
|
|
405
|
-
rawResponse: _response.rawResponse,
|
|
406
|
-
});
|
|
407
|
-
case "timeout":
|
|
408
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /fhir-provider/{fhir_provider_id}/fhir/{fhir_path}.");
|
|
409
|
-
case "unknown":
|
|
410
|
-
throw new errors.phenomlError({
|
|
411
|
-
message: _response.error.errorMessage,
|
|
412
|
-
rawResponse: _response.rawResponse,
|
|
413
|
-
});
|
|
414
|
-
}
|
|
359
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/fhir-provider/{fhir_provider_id}/fhir/{fhir_path}");
|
|
415
360
|
});
|
|
416
361
|
}
|
|
417
362
|
/**
|
|
@@ -433,7 +378,7 @@ export class Fhir {
|
|
|
433
378
|
* - "Patient/123" (for specific resource operations)
|
|
434
379
|
* - "Patient/123/_history" (for history operations)
|
|
435
380
|
* @param {phenoml.fhir.FhirPatchRequest} request
|
|
436
|
-
* @param {
|
|
381
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
437
382
|
*
|
|
438
383
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
439
384
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -510,10 +455,10 @@ export class Fhir {
|
|
|
510
455
|
return __awaiter(this, void 0, void 0, function* () {
|
|
511
456
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
512
457
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf
|
|
516
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider
|
|
458
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
459
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
460
|
+
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
461
|
+
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
517
462
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
518
463
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
519
464
|
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, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
@@ -552,21 +497,7 @@ export class Fhir {
|
|
|
552
497
|
});
|
|
553
498
|
}
|
|
554
499
|
}
|
|
555
|
-
|
|
556
|
-
case "non-json":
|
|
557
|
-
throw new errors.phenomlError({
|
|
558
|
-
statusCode: _response.error.statusCode,
|
|
559
|
-
body: _response.error.rawBody,
|
|
560
|
-
rawResponse: _response.rawResponse,
|
|
561
|
-
});
|
|
562
|
-
case "timeout":
|
|
563
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PATCH /fhir-provider/{fhir_provider_id}/fhir/{fhir_path}.");
|
|
564
|
-
case "unknown":
|
|
565
|
-
throw new errors.phenomlError({
|
|
566
|
-
message: _response.error.errorMessage,
|
|
567
|
-
rawResponse: _response.rawResponse,
|
|
568
|
-
});
|
|
569
|
-
}
|
|
500
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/fhir-provider/{fhir_provider_id}/fhir/{fhir_path}");
|
|
570
501
|
});
|
|
571
502
|
}
|
|
572
503
|
/**
|
|
@@ -580,7 +511,7 @@ export class Fhir {
|
|
|
580
511
|
* - A UUID representing the provider ID
|
|
581
512
|
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
582
513
|
* @param {phenoml.fhir.FhirExecuteBundleRequest} request
|
|
583
|
-
* @param {
|
|
514
|
+
* @param {FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
584
515
|
*
|
|
585
516
|
* @throws {@link phenoml.fhir.BadRequestError}
|
|
586
517
|
* @throws {@link phenoml.fhir.UnauthorizedError}
|
|
@@ -632,10 +563,10 @@ export class Fhir {
|
|
|
632
563
|
return __awaiter(this, void 0, void 0, function* () {
|
|
633
564
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
634
565
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf
|
|
638
|
-
"X-Phenoml-Fhir-Provider": phenomlFhirProvider
|
|
566
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
567
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
568
|
+
"X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf,
|
|
569
|
+
"X-Phenoml-Fhir-Provider": phenomlFhirProvider,
|
|
639
570
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
640
571
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
641
572
|
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, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir`),
|
|
@@ -672,26 +603,7 @@ export class Fhir {
|
|
|
672
603
|
});
|
|
673
604
|
}
|
|
674
605
|
}
|
|
675
|
-
|
|
676
|
-
case "non-json":
|
|
677
|
-
throw new errors.phenomlError({
|
|
678
|
-
statusCode: _response.error.statusCode,
|
|
679
|
-
body: _response.error.rawBody,
|
|
680
|
-
rawResponse: _response.rawResponse,
|
|
681
|
-
});
|
|
682
|
-
case "timeout":
|
|
683
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /fhir-provider/{fhir_provider_id}/fhir.");
|
|
684
|
-
case "unknown":
|
|
685
|
-
throw new errors.phenomlError({
|
|
686
|
-
message: _response.error.errorMessage,
|
|
687
|
-
rawResponse: _response.rawResponse,
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
_getAuthorizationHeader() {
|
|
693
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
694
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
606
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/fhir-provider/{fhir_provider_id}/fhir");
|
|
695
607
|
});
|
|
696
608
|
}
|
|
697
609
|
}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
|
|
5
|
-
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c..."
|
|
6
|
-
* }
|
|
7
|
-
*
|
|
8
2
|
* @example
|
|
9
3
|
* {
|
|
10
4
|
* "X-Phenoml-On-Behalf-Of": "Patient/550e8400-e29b-41d4-a716-446655440000",
|