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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.js";
|
|
2
2
|
export interface FhirProviderRemoveAuthConfigResponse {
|
|
3
|
-
success?: boolean;
|
|
4
|
-
message?: string;
|
|
5
|
-
data?: phenoml.fhirProvider.FhirProviderTemplate;
|
|
3
|
+
success?: boolean | undefined;
|
|
4
|
+
message?: string | undefined;
|
|
5
|
+
data?: phenoml.fhirProvider.FhirProviderTemplate | undefined;
|
|
6
6
|
}
|
|
@@ -3,10 +3,10 @@ import type * as phenoml from "../../../index.js";
|
|
|
3
3
|
* Response payload for a single FHIR Provider operation.
|
|
4
4
|
*/
|
|
5
5
|
export interface FhirProviderResponse {
|
|
6
|
-
success?: boolean;
|
|
7
|
-
message?: string;
|
|
6
|
+
success?: boolean | undefined;
|
|
7
|
+
message?: string | undefined;
|
|
8
8
|
/** Provider details. Sandbox providers return FhirProviderSandboxInfo. */
|
|
9
|
-
data?: FhirProviderResponse.Data;
|
|
9
|
+
data?: FhirProviderResponse.Data | undefined;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace FhirProviderResponse {
|
|
12
12
|
/**
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface FhirProviderSandboxInfo {
|
|
5
5
|
/** Unique identifier for the FHIR provider */
|
|
6
|
-
id?: string;
|
|
6
|
+
id?: string | undefined;
|
|
7
7
|
/** Display name for the FHIR provider */
|
|
8
|
-
name?: string;
|
|
8
|
+
name?: string | undefined;
|
|
9
9
|
/** Optional description of the FHIR provider */
|
|
10
|
-
description?: string;
|
|
10
|
+
description?: string | undefined;
|
|
11
11
|
/** Provider type (always "sandbox" for this schema) */
|
|
12
|
-
provider?: "sandbox";
|
|
12
|
+
provider?: "sandbox" | undefined;
|
|
13
13
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.js";
|
|
2
2
|
export interface FhirProviderTemplate {
|
|
3
3
|
/** Unique identifier for the FHIR provider */
|
|
4
|
-
id?: string;
|
|
4
|
+
id?: string | undefined;
|
|
5
5
|
/** Display name for the FHIR provider */
|
|
6
|
-
name?: string;
|
|
6
|
+
name?: string | undefined;
|
|
7
7
|
/** Optional description of the FHIR provider */
|
|
8
|
-
description?: string;
|
|
9
|
-
provider?: phenoml.fhirProvider.Provider;
|
|
8
|
+
description?: string | undefined;
|
|
9
|
+
provider?: phenoml.fhirProvider.Provider | undefined;
|
|
10
10
|
/** Base URL of the FHIR server */
|
|
11
|
-
base_url?: string;
|
|
11
|
+
base_url?: string | undefined;
|
|
12
12
|
/** OAuth client ID. Deprecated: use client_id on FhirProviderAuthConfig instead. Retained for backward compatibility with existing providers. */
|
|
13
|
-
client_id?: string;
|
|
13
|
+
client_id?: string | undefined;
|
|
14
14
|
/** Map of authentication configurations (key is auth_config_id) */
|
|
15
|
-
auth_configs?: Record<string, phenoml.fhirProvider.FhirProviderAuthConfig
|
|
15
|
+
auth_configs?: Record<string, phenoml.fhirProvider.FhirProviderAuthConfig> | undefined;
|
|
16
16
|
/** Timestamp when the provider was last updated */
|
|
17
|
-
last_updated?: string;
|
|
17
|
+
last_updated?: string | undefined;
|
|
18
18
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface FhirQueryResponse {
|
|
2
|
-
success?: boolean;
|
|
2
|
+
success?: boolean | undefined;
|
|
3
3
|
/** HTTP status code from the FHIR server response */
|
|
4
|
-
status?: number;
|
|
5
|
-
message?: string;
|
|
6
|
-
data?: FhirQueryResponse.Data;
|
|
4
|
+
status?: number | undefined;
|
|
5
|
+
message?: string | undefined;
|
|
6
|
+
data?: FhirQueryResponse.Data | undefined;
|
|
7
7
|
}
|
|
8
8
|
export declare namespace FhirQueryResponse {
|
|
9
9
|
type Data =
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface JsonWebKey {
|
|
5
5
|
/** Key Type */
|
|
6
|
-
kty?: string;
|
|
6
|
+
kty?: string | undefined;
|
|
7
7
|
/** Usage (sig for signature) */
|
|
8
|
-
use?: string;
|
|
8
|
+
use?: string | undefined;
|
|
9
9
|
/** Key ID - SHA256 hash of the public key PEM (including headers) encoded as base64url. Generated by taking the public key in PEM format, hashing with SHA256, then base64url encoding (replacing + with -, / with _, and removing padding). */
|
|
10
|
-
kid?: string;
|
|
10
|
+
kid?: string | undefined;
|
|
11
11
|
/** Algorithm used for JWT signing (RSA with SHA-384) */
|
|
12
|
-
alg?: string;
|
|
12
|
+
alg?: string | undefined;
|
|
13
13
|
/** RSA Modulus (base64url encoded) */
|
|
14
|
-
n?: string;
|
|
14
|
+
n?: string | undefined;
|
|
15
15
|
/** RSA Exponent (base64url encoded) */
|
|
16
|
-
e?: string;
|
|
16
|
+
e?: string | undefined;
|
|
17
17
|
}
|
|
@@ -3,8 +3,8 @@ export interface JwtAuth {
|
|
|
3
3
|
/** OAuth client ID */
|
|
4
4
|
client_id: string;
|
|
5
5
|
/** Expiry time for JWT credentials. If omitted, a default expiry is used. */
|
|
6
|
-
credential_expiry?: string;
|
|
7
|
-
role?: phenoml.fhirProvider.Role;
|
|
6
|
+
credential_expiry?: string | undefined;
|
|
7
|
+
role?: phenoml.fhirProvider.Role | undefined;
|
|
8
8
|
/** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. */
|
|
9
|
-
scopes?: string;
|
|
9
|
+
scopes?: string | undefined;
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ export interface OnBehalfOfAuth {
|
|
|
4
4
|
client_id: string;
|
|
5
5
|
/** OAuth client secret */
|
|
6
6
|
client_secret: string;
|
|
7
|
-
role?: phenoml.fhirProvider.Role;
|
|
7
|
+
role?: phenoml.fhirProvider.Role | undefined;
|
|
8
8
|
/** OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. */
|
|
9
|
-
scopes?: string;
|
|
9
|
+
scopes?: string | undefined;
|
|
10
10
|
}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface ServiceAccountMetadata {
|
|
5
5
|
/** Account type (always "service_account") */
|
|
6
|
-
type?: string;
|
|
6
|
+
type?: string | undefined;
|
|
7
7
|
/** Google Cloud project ID */
|
|
8
|
-
project_id?: string;
|
|
8
|
+
project_id?: string | undefined;
|
|
9
9
|
/** Service account email address */
|
|
10
|
-
client_email?: string;
|
|
10
|
+
client_email?: string | undefined;
|
|
11
11
|
/** Service account client ID */
|
|
12
|
-
client_id?: string;
|
|
12
|
+
client_id?: string | undefined;
|
|
13
13
|
}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface SmartConfiguration {
|
|
5
5
|
/** OAuth2 authorization endpoint */
|
|
6
|
-
authorization_endpoint?: string;
|
|
6
|
+
authorization_endpoint?: string | undefined;
|
|
7
7
|
/** OAuth2 token endpoint */
|
|
8
|
-
token_endpoint?: string;
|
|
8
|
+
token_endpoint?: string | undefined;
|
|
9
9
|
/** OIDC issuer URL */
|
|
10
|
-
issuer?: string;
|
|
10
|
+
issuer?: string | undefined;
|
|
11
11
|
/** JSON Web Key Set URI */
|
|
12
|
-
jwks_uri?: string;
|
|
12
|
+
jwks_uri?: string | undefined;
|
|
13
13
|
/** List of supported scopes */
|
|
14
|
-
scopes_supported?: string[];
|
|
14
|
+
scopes_supported?: string[] | undefined;
|
|
15
15
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../core/index.js";
|
|
3
4
|
import * as phenoml from "../../../index.js";
|
|
4
|
-
export declare namespace
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
export declare namespace Lang2FhirClient {
|
|
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 Lang2FhirClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<Lang2FhirClient.Options>;
|
|
12
|
+
constructor(options?: Lang2FhirClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Converts natural language text into a structured FHIR resource
|
|
15
15
|
*
|
|
16
16
|
* @param {phenoml.lang2Fhir.CreateRequest} request
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
18
|
*
|
|
19
19
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
20
20
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -27,7 +27,7 @@ export declare class Lang2Fhir {
|
|
|
27
27
|
* text: "Patient has severe asthma with acute exacerbation"
|
|
28
28
|
* })
|
|
29
29
|
*/
|
|
30
|
-
create(request: phenoml.lang2Fhir.CreateRequest, requestOptions?:
|
|
30
|
+
create(request: phenoml.lang2Fhir.CreateRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.FhirResource>;
|
|
31
31
|
private __create;
|
|
32
32
|
/**
|
|
33
33
|
* Analyzes natural language text and extracts multiple FHIR resources, returning them as a transaction Bundle.
|
|
@@ -35,7 +35,7 @@ export declare class Lang2Fhir {
|
|
|
35
35
|
* Resources are linked with proper references (e.g., Conditions reference the Patient).
|
|
36
36
|
*
|
|
37
37
|
* @param {phenoml.lang2Fhir.CreateMultiRequest} request
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
41
41
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -46,7 +46,7 @@ export declare class Lang2Fhir {
|
|
|
46
46
|
* text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
|
|
47
47
|
* })
|
|
48
48
|
*/
|
|
49
|
-
createMulti(request: phenoml.lang2Fhir.CreateMultiRequest, requestOptions?:
|
|
49
|
+
createMulti(request: phenoml.lang2Fhir.CreateMultiRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.CreateMultiResponse>;
|
|
50
50
|
private __createMulti;
|
|
51
51
|
/**
|
|
52
52
|
* Converts natural language text into FHIR search parameters.
|
|
@@ -59,7 +59,7 @@ export declare class Lang2Fhir {
|
|
|
59
59
|
* Schedule, ServiceRequest, Slot, and Specimen.
|
|
60
60
|
*
|
|
61
61
|
* @param {phenoml.lang2Fhir.SearchRequest} request
|
|
62
|
-
* @param {
|
|
62
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
63
|
*
|
|
64
64
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
65
65
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -71,7 +71,7 @@ export declare class Lang2Fhir {
|
|
|
71
71
|
* text: "Appointments between March 2-9, 2025"
|
|
72
72
|
* })
|
|
73
73
|
*/
|
|
74
|
-
search(request: phenoml.lang2Fhir.SearchRequest, requestOptions?:
|
|
74
|
+
search(request: phenoml.lang2Fhir.SearchRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.SearchResponse>;
|
|
75
75
|
private __search;
|
|
76
76
|
/**
|
|
77
77
|
* Upload a custom FHIR StructureDefinition profile for use with the lang2fhir service.
|
|
@@ -86,7 +86,7 @@ export declare class Lang2Fhir {
|
|
|
86
86
|
* - A custom profile with the same url has already been uploaded
|
|
87
87
|
*
|
|
88
88
|
* @param {phenoml.lang2Fhir.ProfileUploadRequest} request
|
|
89
|
-
* @param {
|
|
89
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
90
|
*
|
|
91
91
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
92
92
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -98,13 +98,13 @@ export declare class Lang2Fhir {
|
|
|
98
98
|
* profile: "(base64 encoded FHIR StructureDefinition JSON)"
|
|
99
99
|
* })
|
|
100
100
|
*/
|
|
101
|
-
uploadProfile(request: phenoml.lang2Fhir.ProfileUploadRequest, requestOptions?:
|
|
101
|
+
uploadProfile(request: phenoml.lang2Fhir.ProfileUploadRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.Lang2FhirUploadProfileResponse>;
|
|
102
102
|
private __uploadProfile;
|
|
103
103
|
/**
|
|
104
104
|
* Extracts text from a document (PDF or image) and converts it into a structured FHIR resource
|
|
105
105
|
*
|
|
106
106
|
* @param {phenoml.lang2Fhir.DocumentRequest} request
|
|
107
|
-
* @param {
|
|
107
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
108
|
*
|
|
109
109
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
110
110
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -117,7 +117,7 @@ export declare class Lang2Fhir {
|
|
|
117
117
|
* content: "content"
|
|
118
118
|
* })
|
|
119
119
|
*/
|
|
120
|
-
document(request: phenoml.lang2Fhir.DocumentRequest, requestOptions?:
|
|
120
|
+
document(request: phenoml.lang2Fhir.DocumentRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.FhirResource>;
|
|
121
121
|
private __document;
|
|
122
122
|
/**
|
|
123
123
|
* Extracts text from a document (PDF or image) and converts it into multiple FHIR resources,
|
|
@@ -126,7 +126,7 @@ export declare class Lang2Fhir {
|
|
|
126
126
|
* Resources are linked with proper references (e.g., Conditions reference the Patient).
|
|
127
127
|
*
|
|
128
128
|
* @param {phenoml.lang2Fhir.DocumentMultiRequest} request
|
|
129
|
-
* @param {
|
|
129
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
130
130
|
*
|
|
131
131
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
132
132
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -139,7 +139,6 @@ export declare class Lang2Fhir {
|
|
|
139
139
|
* content: "content"
|
|
140
140
|
* })
|
|
141
141
|
*/
|
|
142
|
-
extractMultipleFhirResourcesFromADocument(request: phenoml.lang2Fhir.DocumentMultiRequest, requestOptions?:
|
|
142
|
+
extractMultipleFhirResourcesFromADocument(request: phenoml.lang2Fhir.DocumentMultiRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.CreateMultiResponse>;
|
|
143
143
|
private __extractMultipleFhirResourcesFromADocument;
|
|
144
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
145
144
|
}
|
|
@@ -43,21 +43,23 @@ 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.Lang2FhirClient = 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 Lang2FhirClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* Converts natural language text into a structured FHIR resource
|
|
58
60
|
*
|
|
59
61
|
* @param {phenoml.lang2Fhir.CreateRequest} request
|
|
60
|
-
* @param {
|
|
62
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
63
|
*
|
|
62
64
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
63
65
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -76,7 +78,8 @@ class Lang2Fhir {
|
|
|
76
78
|
__create(request, requestOptions) {
|
|
77
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
80
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
79
|
-
const
|
|
81
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
82
|
+
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);
|
|
80
83
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
81
84
|
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, "lang2fhir/create"),
|
|
82
85
|
method: "POST",
|
|
@@ -110,21 +113,7 @@ class Lang2Fhir {
|
|
|
110
113
|
});
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
|
-
|
|
114
|
-
case "non-json":
|
|
115
|
-
throw new errors.phenomlError({
|
|
116
|
-
statusCode: _response.error.statusCode,
|
|
117
|
-
body: _response.error.rawBody,
|
|
118
|
-
rawResponse: _response.rawResponse,
|
|
119
|
-
});
|
|
120
|
-
case "timeout":
|
|
121
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /lang2fhir/create.");
|
|
122
|
-
case "unknown":
|
|
123
|
-
throw new errors.phenomlError({
|
|
124
|
-
message: _response.error.errorMessage,
|
|
125
|
-
rawResponse: _response.rawResponse,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
116
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/lang2fhir/create");
|
|
128
117
|
});
|
|
129
118
|
}
|
|
130
119
|
/**
|
|
@@ -133,7 +122,7 @@ class Lang2Fhir {
|
|
|
133
122
|
* Resources are linked with proper references (e.g., Conditions reference the Patient).
|
|
134
123
|
*
|
|
135
124
|
* @param {phenoml.lang2Fhir.CreateMultiRequest} request
|
|
136
|
-
* @param {
|
|
125
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
137
126
|
*
|
|
138
127
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
139
128
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -150,7 +139,8 @@ class Lang2Fhir {
|
|
|
150
139
|
__createMulti(request, requestOptions) {
|
|
151
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
141
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
153
|
-
const
|
|
142
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
143
|
+
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);
|
|
154
144
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
155
145
|
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, "lang2fhir/create/multi"),
|
|
156
146
|
method: "POST",
|
|
@@ -187,21 +177,7 @@ class Lang2Fhir {
|
|
|
187
177
|
});
|
|
188
178
|
}
|
|
189
179
|
}
|
|
190
|
-
|
|
191
|
-
case "non-json":
|
|
192
|
-
throw new errors.phenomlError({
|
|
193
|
-
statusCode: _response.error.statusCode,
|
|
194
|
-
body: _response.error.rawBody,
|
|
195
|
-
rawResponse: _response.rawResponse,
|
|
196
|
-
});
|
|
197
|
-
case "timeout":
|
|
198
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /lang2fhir/create/multi.");
|
|
199
|
-
case "unknown":
|
|
200
|
-
throw new errors.phenomlError({
|
|
201
|
-
message: _response.error.errorMessage,
|
|
202
|
-
rawResponse: _response.rawResponse,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
180
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/lang2fhir/create/multi");
|
|
205
181
|
});
|
|
206
182
|
}
|
|
207
183
|
/**
|
|
@@ -215,7 +191,7 @@ class Lang2Fhir {
|
|
|
215
191
|
* Schedule, ServiceRequest, Slot, and Specimen.
|
|
216
192
|
*
|
|
217
193
|
* @param {phenoml.lang2Fhir.SearchRequest} request
|
|
218
|
-
* @param {
|
|
194
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
219
195
|
*
|
|
220
196
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
221
197
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -233,7 +209,8 @@ class Lang2Fhir {
|
|
|
233
209
|
__search(request, requestOptions) {
|
|
234
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
235
211
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
236
|
-
const
|
|
212
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
213
|
+
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);
|
|
237
214
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
238
215
|
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, "lang2fhir/search"),
|
|
239
216
|
method: "POST",
|
|
@@ -269,21 +246,7 @@ class Lang2Fhir {
|
|
|
269
246
|
});
|
|
270
247
|
}
|
|
271
248
|
}
|
|
272
|
-
|
|
273
|
-
case "non-json":
|
|
274
|
-
throw new errors.phenomlError({
|
|
275
|
-
statusCode: _response.error.statusCode,
|
|
276
|
-
body: _response.error.rawBody,
|
|
277
|
-
rawResponse: _response.rawResponse,
|
|
278
|
-
});
|
|
279
|
-
case "timeout":
|
|
280
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /lang2fhir/search.");
|
|
281
|
-
case "unknown":
|
|
282
|
-
throw new errors.phenomlError({
|
|
283
|
-
message: _response.error.errorMessage,
|
|
284
|
-
rawResponse: _response.rawResponse,
|
|
285
|
-
});
|
|
286
|
-
}
|
|
249
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/lang2fhir/search");
|
|
287
250
|
});
|
|
288
251
|
}
|
|
289
252
|
/**
|
|
@@ -299,7 +262,7 @@ class Lang2Fhir {
|
|
|
299
262
|
* - A custom profile with the same url has already been uploaded
|
|
300
263
|
*
|
|
301
264
|
* @param {phenoml.lang2Fhir.ProfileUploadRequest} request
|
|
302
|
-
* @param {
|
|
265
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
303
266
|
*
|
|
304
267
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
305
268
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -317,7 +280,8 @@ class Lang2Fhir {
|
|
|
317
280
|
__uploadProfile(request, requestOptions) {
|
|
318
281
|
return __awaiter(this, void 0, void 0, function* () {
|
|
319
282
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
320
|
-
const
|
|
283
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
284
|
+
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);
|
|
321
285
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
322
286
|
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, "lang2fhir/profile/upload"),
|
|
323
287
|
method: "POST",
|
|
@@ -356,28 +320,14 @@ class Lang2Fhir {
|
|
|
356
320
|
});
|
|
357
321
|
}
|
|
358
322
|
}
|
|
359
|
-
|
|
360
|
-
case "non-json":
|
|
361
|
-
throw new errors.phenomlError({
|
|
362
|
-
statusCode: _response.error.statusCode,
|
|
363
|
-
body: _response.error.rawBody,
|
|
364
|
-
rawResponse: _response.rawResponse,
|
|
365
|
-
});
|
|
366
|
-
case "timeout":
|
|
367
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /lang2fhir/profile/upload.");
|
|
368
|
-
case "unknown":
|
|
369
|
-
throw new errors.phenomlError({
|
|
370
|
-
message: _response.error.errorMessage,
|
|
371
|
-
rawResponse: _response.rawResponse,
|
|
372
|
-
});
|
|
373
|
-
}
|
|
323
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/lang2fhir/profile/upload");
|
|
374
324
|
});
|
|
375
325
|
}
|
|
376
326
|
/**
|
|
377
327
|
* Extracts text from a document (PDF or image) and converts it into a structured FHIR resource
|
|
378
328
|
*
|
|
379
329
|
* @param {phenoml.lang2Fhir.DocumentRequest} request
|
|
380
|
-
* @param {
|
|
330
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
381
331
|
*
|
|
382
332
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
383
333
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -396,7 +346,8 @@ class Lang2Fhir {
|
|
|
396
346
|
__document(request, requestOptions) {
|
|
397
347
|
return __awaiter(this, void 0, void 0, function* () {
|
|
398
348
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
399
|
-
const
|
|
349
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
350
|
+
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);
|
|
400
351
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
401
352
|
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, "lang2fhir/document"),
|
|
402
353
|
method: "POST",
|
|
@@ -430,21 +381,7 @@ class Lang2Fhir {
|
|
|
430
381
|
});
|
|
431
382
|
}
|
|
432
383
|
}
|
|
433
|
-
|
|
434
|
-
case "non-json":
|
|
435
|
-
throw new errors.phenomlError({
|
|
436
|
-
statusCode: _response.error.statusCode,
|
|
437
|
-
body: _response.error.rawBody,
|
|
438
|
-
rawResponse: _response.rawResponse,
|
|
439
|
-
});
|
|
440
|
-
case "timeout":
|
|
441
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /lang2fhir/document.");
|
|
442
|
-
case "unknown":
|
|
443
|
-
throw new errors.phenomlError({
|
|
444
|
-
message: _response.error.errorMessage,
|
|
445
|
-
rawResponse: _response.rawResponse,
|
|
446
|
-
});
|
|
447
|
-
}
|
|
384
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/lang2fhir/document");
|
|
448
385
|
});
|
|
449
386
|
}
|
|
450
387
|
/**
|
|
@@ -454,7 +391,7 @@ class Lang2Fhir {
|
|
|
454
391
|
* Resources are linked with proper references (e.g., Conditions reference the Patient).
|
|
455
392
|
*
|
|
456
393
|
* @param {phenoml.lang2Fhir.DocumentMultiRequest} request
|
|
457
|
-
* @param {
|
|
394
|
+
* @param {Lang2FhirClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
458
395
|
*
|
|
459
396
|
* @throws {@link phenoml.lang2Fhir.BadRequestError}
|
|
460
397
|
* @throws {@link phenoml.lang2Fhir.UnauthorizedError}
|
|
@@ -473,7 +410,8 @@ class Lang2Fhir {
|
|
|
473
410
|
__extractMultipleFhirResourcesFromADocument(request, requestOptions) {
|
|
474
411
|
return __awaiter(this, void 0, void 0, function* () {
|
|
475
412
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
476
|
-
const
|
|
413
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
414
|
+
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);
|
|
477
415
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
478
416
|
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, "lang2fhir/document/multi"),
|
|
479
417
|
method: "POST",
|
|
@@ -512,27 +450,8 @@ class Lang2Fhir {
|
|
|
512
450
|
});
|
|
513
451
|
}
|
|
514
452
|
}
|
|
515
|
-
|
|
516
|
-
case "non-json":
|
|
517
|
-
throw new errors.phenomlError({
|
|
518
|
-
statusCode: _response.error.statusCode,
|
|
519
|
-
body: _response.error.rawBody,
|
|
520
|
-
rawResponse: _response.rawResponse,
|
|
521
|
-
});
|
|
522
|
-
case "timeout":
|
|
523
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /lang2fhir/document/multi.");
|
|
524
|
-
case "unknown":
|
|
525
|
-
throw new errors.phenomlError({
|
|
526
|
-
message: _response.error.errorMessage,
|
|
527
|
-
rawResponse: _response.rawResponse,
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
_getAuthorizationHeader() {
|
|
533
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
534
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
453
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/lang2fhir/document/multi");
|
|
535
454
|
});
|
|
536
455
|
}
|
|
537
456
|
}
|
|
538
|
-
exports.
|
|
457
|
+
exports.Lang2FhirClient = Lang2FhirClient;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { CreateMultiRequest } from "./CreateMultiRequest.js";
|
|
2
|
-
export
|
|
2
|
+
export { CreateRequest } from "./CreateRequest.js";
|
|
3
3
|
export type { DocumentMultiRequest } from "./DocumentMultiRequest.js";
|
|
4
4
|
export type { DocumentRequest } from "./DocumentRequest.js";
|
|
5
5
|
export type { ProfileUploadRequest } from "./ProfileUploadRequest.js";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateRequest = void 0;
|
|
4
|
+
var CreateRequest_js_1 = require("./CreateRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "CreateRequest", { enumerable: true, get: function () { return CreateRequest_js_1.CreateRequest; } });
|
|
@@ -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 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 InternalServerError 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.InternalServerError = InternalServerError;
|