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 BadGatewayError 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 BadRequestError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class InternalServerError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class NotFoundError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class UnauthorizedError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -5,7 +5,7 @@ export interface ErrorResponse {
|
|
|
5
5
|
/** Human-readable error message */
|
|
6
6
|
message: string;
|
|
7
7
|
/** HTTP status code */
|
|
8
|
-
code?: number;
|
|
8
|
+
code?: number | undefined;
|
|
9
9
|
/** Additional error details */
|
|
10
|
-
data?: Record<string, unknown
|
|
10
|
+
data?: Record<string, unknown> | undefined;
|
|
11
11
|
}
|
|
@@ -9,7 +9,7 @@ export interface FhirBundle {
|
|
|
9
9
|
* Total number of resources that match the search criteria.
|
|
10
10
|
* Optional field as not all FHIR servers include it (e.g., Medplum).
|
|
11
11
|
*/
|
|
12
|
-
total?: number;
|
|
12
|
+
total?: number | undefined;
|
|
13
13
|
/** Array of bundle entries containing resources or operation results */
|
|
14
14
|
entry: FhirBundle.Entry.Item[];
|
|
15
15
|
}
|
|
@@ -18,19 +18,19 @@ export declare namespace FhirBundle {
|
|
|
18
18
|
namespace Entry {
|
|
19
19
|
interface Item {
|
|
20
20
|
/** The FHIR resource contained in this entry */
|
|
21
|
-
resource?: Record<string, unknown
|
|
21
|
+
resource?: Record<string, unknown> | undefined;
|
|
22
22
|
/** Request information for transaction/batch bundles */
|
|
23
|
-
request?: Item.Request;
|
|
23
|
+
request?: Item.Request | undefined;
|
|
24
24
|
/** Response information for transaction/batch bundle responses */
|
|
25
|
-
response?: Item.Response;
|
|
25
|
+
response?: Item.Response | undefined;
|
|
26
26
|
}
|
|
27
27
|
namespace Item {
|
|
28
28
|
/**
|
|
29
29
|
* Request information for transaction/batch bundles
|
|
30
30
|
*/
|
|
31
31
|
interface Request {
|
|
32
|
-
method?: Request.Method;
|
|
33
|
-
url?: string;
|
|
32
|
+
method?: Request.Method | undefined;
|
|
33
|
+
url?: string | undefined;
|
|
34
34
|
}
|
|
35
35
|
namespace Request {
|
|
36
36
|
const Method: {
|
|
@@ -46,8 +46,8 @@ export declare namespace FhirBundle {
|
|
|
46
46
|
* Response information for transaction/batch bundle responses
|
|
47
47
|
*/
|
|
48
48
|
interface Response {
|
|
49
|
-
status?: string;
|
|
50
|
-
location?: string;
|
|
49
|
+
status?: string | undefined;
|
|
50
|
+
location?: string | undefined;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -4,9 +4,9 @@ export interface FhirPatchRequestBodyItem {
|
|
|
4
4
|
/** JSON Pointer to the target location */
|
|
5
5
|
path: string;
|
|
6
6
|
/** The value to use (required for add, replace, test operations) */
|
|
7
|
-
value?: unknown;
|
|
7
|
+
value?: unknown | undefined;
|
|
8
8
|
/** Source location for move and copy operations (JSON Pointer) */
|
|
9
|
-
from?: string;
|
|
9
|
+
from?: string | undefined;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace FhirPatchRequestBodyItem {
|
|
12
12
|
/** The operation to perform */
|
|
@@ -6,9 +6,9 @@ export interface FhirResource {
|
|
|
6
6
|
/** The type of FHIR resource (e.g., Patient, Observation, etc.) */
|
|
7
7
|
resourceType: string;
|
|
8
8
|
/** Logical ID of the resource */
|
|
9
|
-
id?: string;
|
|
9
|
+
id?: string | undefined;
|
|
10
10
|
/** Metadata about the resource */
|
|
11
|
-
meta?: FhirResource.Meta;
|
|
11
|
+
meta?: FhirResource.Meta | undefined;
|
|
12
12
|
/** Accepts any additional properties */
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
}
|
|
@@ -17,8 +17,8 @@ export declare namespace FhirResource {
|
|
|
17
17
|
* Metadata about the resource
|
|
18
18
|
*/
|
|
19
19
|
interface Meta {
|
|
20
|
-
versionId?: string;
|
|
21
|
-
lastUpdated?: string;
|
|
22
|
-
profile?: string[];
|
|
20
|
+
versionId?: string | undefined;
|
|
21
|
+
lastUpdated?: string | undefined;
|
|
22
|
+
profile?: string[] | undefined;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
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 FhirProviderClient {
|
|
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 FhirProviderClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<FhirProviderClient.Options>;
|
|
12
|
+
constructor(options?: FhirProviderClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new FHIR provider configuration with authentication credentials.
|
|
15
15
|
*
|
|
16
16
|
* Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
|
|
17
17
|
*
|
|
18
18
|
* @param {phenoml.fhirProvider.FhirProviderCreateRequest} request
|
|
19
|
-
* @param {
|
|
19
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
20
20
|
*
|
|
21
21
|
* @throws {@link phenoml.fhirProvider.BadRequestError}
|
|
22
22
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
@@ -34,7 +34,7 @@ export declare class FhirProvider {
|
|
|
34
34
|
* }
|
|
35
35
|
* })
|
|
36
36
|
*/
|
|
37
|
-
create(request: phenoml.fhirProvider.FhirProviderCreateRequest, requestOptions?:
|
|
37
|
+
create(request: phenoml.fhirProvider.FhirProviderCreateRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
38
38
|
private __create;
|
|
39
39
|
/**
|
|
40
40
|
* Retrieves a list of all active FHIR providers for the authenticated user.
|
|
@@ -42,7 +42,7 @@ export declare class FhirProvider {
|
|
|
42
42
|
* On shared instances, only sandbox providers are returned.
|
|
43
43
|
* Sandbox providers return FhirProviderSandboxInfo.
|
|
44
44
|
*
|
|
45
|
-
* @param {
|
|
45
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
46
|
*
|
|
47
47
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
48
48
|
* @throws {@link phenoml.fhirProvider.InternalServerError}
|
|
@@ -50,7 +50,7 @@ export declare class FhirProvider {
|
|
|
50
50
|
* @example
|
|
51
51
|
* await client.fhirProvider.list()
|
|
52
52
|
*/
|
|
53
|
-
list(requestOptions?:
|
|
53
|
+
list(requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderListResponse>;
|
|
54
54
|
private __list;
|
|
55
55
|
/**
|
|
56
56
|
* Retrieves a specific FHIR provider configuration by its ID.
|
|
@@ -59,7 +59,7 @@ export declare class FhirProvider {
|
|
|
59
59
|
* On shared instances, only sandbox providers can be accessed.
|
|
60
60
|
*
|
|
61
61
|
* @param {string} fhir_provider_id - ID of the FHIR provider to retrieve
|
|
62
|
-
* @param {
|
|
62
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
63
|
*
|
|
64
64
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
65
65
|
* @throws {@link phenoml.fhirProvider.NotFoundError}
|
|
@@ -68,7 +68,7 @@ export declare class FhirProvider {
|
|
|
68
68
|
* @example
|
|
69
69
|
* await client.fhirProvider.get("fhir_provider_id")
|
|
70
70
|
*/
|
|
71
|
-
get(fhir_provider_id: string, requestOptions?:
|
|
71
|
+
get(fhir_provider_id: string, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
72
72
|
private __get;
|
|
73
73
|
/**
|
|
74
74
|
* Deletes a FHIR provider.
|
|
@@ -76,7 +76,7 @@ export declare class FhirProvider {
|
|
|
76
76
|
* Note: Sandbox providers cannot be deleted.
|
|
77
77
|
*
|
|
78
78
|
* @param {string} fhir_provider_id - ID of the FHIR provider to delete
|
|
79
|
-
* @param {
|
|
79
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
80
80
|
*
|
|
81
81
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
82
82
|
* @throws {@link phenoml.fhirProvider.ForbiddenError}
|
|
@@ -86,7 +86,7 @@ export declare class FhirProvider {
|
|
|
86
86
|
* @example
|
|
87
87
|
* await client.fhirProvider.delete("fhir_provider_id")
|
|
88
88
|
*/
|
|
89
|
-
delete(fhir_provider_id: string, requestOptions?:
|
|
89
|
+
delete(fhir_provider_id: string, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderDeleteResponse>;
|
|
90
90
|
private __delete;
|
|
91
91
|
/**
|
|
92
92
|
* Adds a new authentication configuration to an existing FHIR provider.
|
|
@@ -96,7 +96,7 @@ export declare class FhirProvider {
|
|
|
96
96
|
*
|
|
97
97
|
* @param {string} fhir_provider_id - ID of the FHIR provider to add auth config to
|
|
98
98
|
* @param {phenoml.fhirProvider.FhirProviderAddAuthConfigRequest} request
|
|
99
|
-
* @param {
|
|
99
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
100
100
|
*
|
|
101
101
|
* @throws {@link phenoml.fhirProvider.BadRequestError}
|
|
102
102
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
@@ -110,7 +110,7 @@ export declare class FhirProvider {
|
|
|
110
110
|
* client_id: "your-client-id"
|
|
111
111
|
* })
|
|
112
112
|
*/
|
|
113
|
-
addAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderAddAuthConfigRequest, requestOptions?:
|
|
113
|
+
addAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderAddAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
114
114
|
private __addAuthConfig;
|
|
115
115
|
/**
|
|
116
116
|
* Sets which authentication configuration should be active for a FHIR provider.
|
|
@@ -123,7 +123,7 @@ export declare class FhirProvider {
|
|
|
123
123
|
*
|
|
124
124
|
* @param {string} fhir_provider_id - ID of the FHIR provider
|
|
125
125
|
* @param {phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest} request
|
|
126
|
-
* @param {
|
|
126
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
127
|
*
|
|
128
128
|
* @throws {@link phenoml.fhirProvider.BadRequestError}
|
|
129
129
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
@@ -136,7 +136,7 @@ export declare class FhirProvider {
|
|
|
136
136
|
* auth_config_id: "auth-config-123"
|
|
137
137
|
* })
|
|
138
138
|
*/
|
|
139
|
-
setActiveAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest, requestOptions?:
|
|
139
|
+
setActiveAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
140
140
|
private __setActiveAuthConfig;
|
|
141
141
|
/**
|
|
142
142
|
* Removes an authentication configuration from a FHIR provider.
|
|
@@ -146,7 +146,7 @@ export declare class FhirProvider {
|
|
|
146
146
|
*
|
|
147
147
|
* @param {string} fhir_provider_id - ID of the FHIR provider
|
|
148
148
|
* @param {phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest} request
|
|
149
|
-
* @param {
|
|
149
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
150
150
|
*
|
|
151
151
|
* @throws {@link phenoml.fhirProvider.BadRequestError}
|
|
152
152
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
@@ -159,7 +159,6 @@ export declare class FhirProvider {
|
|
|
159
159
|
* auth_config_id: "auth-config-123"
|
|
160
160
|
* })
|
|
161
161
|
*/
|
|
162
|
-
removeAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest, requestOptions?:
|
|
162
|
+
removeAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderRemoveAuthConfigResponse>;
|
|
163
163
|
private __removeAuthConfig;
|
|
164
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
165
164
|
}
|
|
@@ -8,14 +8,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../core/index.mjs";
|
|
13
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
14
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
15
17
|
import * as phenoml from "../../../index.mjs";
|
|
16
|
-
export class
|
|
17
|
-
constructor(
|
|
18
|
-
this._options =
|
|
18
|
+
export class FhirProviderClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Creates a new FHIR provider configuration with authentication credentials.
|
|
@@ -23,7 +25,7 @@ export class FhirProvider {
|
|
|
23
25
|
* Note: The "sandbox" provider type cannot be created via this API - it is managed internally.
|
|
24
26
|
*
|
|
25
27
|
* @param {phenoml.fhirProvider.FhirProviderCreateRequest} request
|
|
26
|
-
* @param {
|
|
28
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
29
|
*
|
|
28
30
|
* @throws {@link phenoml.fhirProvider.BadRequestError}
|
|
29
31
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
@@ -47,7 +49,8 @@ export class FhirProvider {
|
|
|
47
49
|
__create(request, requestOptions) {
|
|
48
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
51
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
50
|
-
const
|
|
52
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
53
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
51
54
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
52
55
|
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"),
|
|
53
56
|
method: "POST",
|
|
@@ -86,21 +89,7 @@ export class FhirProvider {
|
|
|
86
89
|
});
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
|
-
|
|
90
|
-
case "non-json":
|
|
91
|
-
throw new errors.phenomlError({
|
|
92
|
-
statusCode: _response.error.statusCode,
|
|
93
|
-
body: _response.error.rawBody,
|
|
94
|
-
rawResponse: _response.rawResponse,
|
|
95
|
-
});
|
|
96
|
-
case "timeout":
|
|
97
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /fhir-provider.");
|
|
98
|
-
case "unknown":
|
|
99
|
-
throw new errors.phenomlError({
|
|
100
|
-
message: _response.error.errorMessage,
|
|
101
|
-
rawResponse: _response.rawResponse,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
92
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/fhir-provider");
|
|
104
93
|
});
|
|
105
94
|
}
|
|
106
95
|
/**
|
|
@@ -109,7 +98,7 @@ export class FhirProvider {
|
|
|
109
98
|
* On shared instances, only sandbox providers are returned.
|
|
110
99
|
* Sandbox providers return FhirProviderSandboxInfo.
|
|
111
100
|
*
|
|
112
|
-
* @param {
|
|
101
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
113
102
|
*
|
|
114
103
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
115
104
|
* @throws {@link phenoml.fhirProvider.InternalServerError}
|
|
@@ -123,7 +112,8 @@ export class FhirProvider {
|
|
|
123
112
|
__list(requestOptions) {
|
|
124
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
114
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
126
|
-
const
|
|
115
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
116
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
127
117
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
128
118
|
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/list"),
|
|
129
119
|
method: "GET",
|
|
@@ -155,21 +145,7 @@ export class FhirProvider {
|
|
|
155
145
|
});
|
|
156
146
|
}
|
|
157
147
|
}
|
|
158
|
-
|
|
159
|
-
case "non-json":
|
|
160
|
-
throw new errors.phenomlError({
|
|
161
|
-
statusCode: _response.error.statusCode,
|
|
162
|
-
body: _response.error.rawBody,
|
|
163
|
-
rawResponse: _response.rawResponse,
|
|
164
|
-
});
|
|
165
|
-
case "timeout":
|
|
166
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /fhir-provider/list.");
|
|
167
|
-
case "unknown":
|
|
168
|
-
throw new errors.phenomlError({
|
|
169
|
-
message: _response.error.errorMessage,
|
|
170
|
-
rawResponse: _response.rawResponse,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
148
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/fhir-provider/list");
|
|
173
149
|
});
|
|
174
150
|
}
|
|
175
151
|
/**
|
|
@@ -179,7 +155,7 @@ export class FhirProvider {
|
|
|
179
155
|
* On shared instances, only sandbox providers can be accessed.
|
|
180
156
|
*
|
|
181
157
|
* @param {string} fhir_provider_id - ID of the FHIR provider to retrieve
|
|
182
|
-
* @param {
|
|
158
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
183
159
|
*
|
|
184
160
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
185
161
|
* @throws {@link phenoml.fhirProvider.NotFoundError}
|
|
@@ -194,7 +170,8 @@ export class FhirProvider {
|
|
|
194
170
|
__get(fhir_provider_id, requestOptions) {
|
|
195
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
172
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
197
|
-
const
|
|
173
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
174
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
198
175
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
199
176
|
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)}`),
|
|
200
177
|
method: "GET",
|
|
@@ -228,21 +205,7 @@ export class FhirProvider {
|
|
|
228
205
|
});
|
|
229
206
|
}
|
|
230
207
|
}
|
|
231
|
-
|
|
232
|
-
case "non-json":
|
|
233
|
-
throw new errors.phenomlError({
|
|
234
|
-
statusCode: _response.error.statusCode,
|
|
235
|
-
body: _response.error.rawBody,
|
|
236
|
-
rawResponse: _response.rawResponse,
|
|
237
|
-
});
|
|
238
|
-
case "timeout":
|
|
239
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /fhir-provider/{fhir_provider_id}.");
|
|
240
|
-
case "unknown":
|
|
241
|
-
throw new errors.phenomlError({
|
|
242
|
-
message: _response.error.errorMessage,
|
|
243
|
-
rawResponse: _response.rawResponse,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
208
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/fhir-provider/{fhir_provider_id}");
|
|
246
209
|
});
|
|
247
210
|
}
|
|
248
211
|
/**
|
|
@@ -251,7 +214,7 @@ export class FhirProvider {
|
|
|
251
214
|
* Note: Sandbox providers cannot be deleted.
|
|
252
215
|
*
|
|
253
216
|
* @param {string} fhir_provider_id - ID of the FHIR provider to delete
|
|
254
|
-
* @param {
|
|
217
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
255
218
|
*
|
|
256
219
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
257
220
|
* @throws {@link phenoml.fhirProvider.ForbiddenError}
|
|
@@ -267,7 +230,8 @@ export class FhirProvider {
|
|
|
267
230
|
__delete(fhir_provider_id, requestOptions) {
|
|
268
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
269
232
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
270
|
-
const
|
|
233
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
234
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
271
235
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
272
236
|
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)}`),
|
|
273
237
|
method: "DELETE",
|
|
@@ -303,21 +267,7 @@ export class FhirProvider {
|
|
|
303
267
|
});
|
|
304
268
|
}
|
|
305
269
|
}
|
|
306
|
-
|
|
307
|
-
case "non-json":
|
|
308
|
-
throw new errors.phenomlError({
|
|
309
|
-
statusCode: _response.error.statusCode,
|
|
310
|
-
body: _response.error.rawBody,
|
|
311
|
-
rawResponse: _response.rawResponse,
|
|
312
|
-
});
|
|
313
|
-
case "timeout":
|
|
314
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /fhir-provider/{fhir_provider_id}.");
|
|
315
|
-
case "unknown":
|
|
316
|
-
throw new errors.phenomlError({
|
|
317
|
-
message: _response.error.errorMessage,
|
|
318
|
-
rawResponse: _response.rawResponse,
|
|
319
|
-
});
|
|
320
|
-
}
|
|
270
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/fhir-provider/{fhir_provider_id}");
|
|
321
271
|
});
|
|
322
272
|
}
|
|
323
273
|
/**
|
|
@@ -328,7 +278,7 @@ export class FhirProvider {
|
|
|
328
278
|
*
|
|
329
279
|
* @param {string} fhir_provider_id - ID of the FHIR provider to add auth config to
|
|
330
280
|
* @param {phenoml.fhirProvider.FhirProviderAddAuthConfigRequest} request
|
|
331
|
-
* @param {
|
|
281
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
332
282
|
*
|
|
333
283
|
* @throws {@link phenoml.fhirProvider.BadRequestError}
|
|
334
284
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
@@ -348,7 +298,8 @@ export class FhirProvider {
|
|
|
348
298
|
__addAuthConfig(fhir_provider_id, request, requestOptions) {
|
|
349
299
|
return __awaiter(this, void 0, void 0, function* () {
|
|
350
300
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
351
|
-
const
|
|
301
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
302
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
352
303
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
353
304
|
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)}/add-auth-config`),
|
|
354
305
|
method: "PATCH",
|
|
@@ -389,21 +340,7 @@ export class FhirProvider {
|
|
|
389
340
|
});
|
|
390
341
|
}
|
|
391
342
|
}
|
|
392
|
-
|
|
393
|
-
case "non-json":
|
|
394
|
-
throw new errors.phenomlError({
|
|
395
|
-
statusCode: _response.error.statusCode,
|
|
396
|
-
body: _response.error.rawBody,
|
|
397
|
-
rawResponse: _response.rawResponse,
|
|
398
|
-
});
|
|
399
|
-
case "timeout":
|
|
400
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PATCH /fhir-provider/{fhir_provider_id}/add-auth-config.");
|
|
401
|
-
case "unknown":
|
|
402
|
-
throw new errors.phenomlError({
|
|
403
|
-
message: _response.error.errorMessage,
|
|
404
|
-
rawResponse: _response.rawResponse,
|
|
405
|
-
});
|
|
406
|
-
}
|
|
343
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/fhir-provider/{fhir_provider_id}/add-auth-config");
|
|
407
344
|
});
|
|
408
345
|
}
|
|
409
346
|
/**
|
|
@@ -417,7 +354,7 @@ export class FhirProvider {
|
|
|
417
354
|
*
|
|
418
355
|
* @param {string} fhir_provider_id - ID of the FHIR provider
|
|
419
356
|
* @param {phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest} request
|
|
420
|
-
* @param {
|
|
357
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
421
358
|
*
|
|
422
359
|
* @throws {@link phenoml.fhirProvider.BadRequestError}
|
|
423
360
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
@@ -436,7 +373,8 @@ export class FhirProvider {
|
|
|
436
373
|
__setActiveAuthConfig(fhir_provider_id, request, requestOptions) {
|
|
437
374
|
return __awaiter(this, void 0, void 0, function* () {
|
|
438
375
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
439
|
-
const
|
|
376
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
377
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
440
378
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
441
379
|
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)}/set-active-auth-config`),
|
|
442
380
|
method: "PATCH",
|
|
@@ -477,21 +415,7 @@ export class FhirProvider {
|
|
|
477
415
|
});
|
|
478
416
|
}
|
|
479
417
|
}
|
|
480
|
-
|
|
481
|
-
case "non-json":
|
|
482
|
-
throw new errors.phenomlError({
|
|
483
|
-
statusCode: _response.error.statusCode,
|
|
484
|
-
body: _response.error.rawBody,
|
|
485
|
-
rawResponse: _response.rawResponse,
|
|
486
|
-
});
|
|
487
|
-
case "timeout":
|
|
488
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PATCH /fhir-provider/{fhir_provider_id}/set-active-auth-config.");
|
|
489
|
-
case "unknown":
|
|
490
|
-
throw new errors.phenomlError({
|
|
491
|
-
message: _response.error.errorMessage,
|
|
492
|
-
rawResponse: _response.rawResponse,
|
|
493
|
-
});
|
|
494
|
-
}
|
|
418
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/fhir-provider/{fhir_provider_id}/set-active-auth-config");
|
|
495
419
|
});
|
|
496
420
|
}
|
|
497
421
|
/**
|
|
@@ -502,7 +426,7 @@ export class FhirProvider {
|
|
|
502
426
|
*
|
|
503
427
|
* @param {string} fhir_provider_id - ID of the FHIR provider
|
|
504
428
|
* @param {phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest} request
|
|
505
|
-
* @param {
|
|
429
|
+
* @param {FhirProviderClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
506
430
|
*
|
|
507
431
|
* @throws {@link phenoml.fhirProvider.BadRequestError}
|
|
508
432
|
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
|
|
@@ -521,7 +445,8 @@ export class FhirProvider {
|
|
|
521
445
|
__removeAuthConfig(fhir_provider_id, request, requestOptions) {
|
|
522
446
|
return __awaiter(this, void 0, void 0, function* () {
|
|
523
447
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
524
|
-
const
|
|
448
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
449
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
525
450
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
526
451
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/remove-auth-config`),
|
|
527
452
|
method: "PATCH",
|
|
@@ -562,26 +487,7 @@ export class FhirProvider {
|
|
|
562
487
|
});
|
|
563
488
|
}
|
|
564
489
|
}
|
|
565
|
-
|
|
566
|
-
case "non-json":
|
|
567
|
-
throw new errors.phenomlError({
|
|
568
|
-
statusCode: _response.error.statusCode,
|
|
569
|
-
body: _response.error.rawBody,
|
|
570
|
-
rawResponse: _response.rawResponse,
|
|
571
|
-
});
|
|
572
|
-
case "timeout":
|
|
573
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PATCH /fhir-provider/{fhir_provider_id}/remove-auth-config.");
|
|
574
|
-
case "unknown":
|
|
575
|
-
throw new errors.phenomlError({
|
|
576
|
-
message: _response.error.errorMessage,
|
|
577
|
-
rawResponse: _response.rawResponse,
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
});
|
|
581
|
-
}
|
|
582
|
-
_getAuthorizationHeader() {
|
|
583
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
584
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
490
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/fhir-provider/{fhir_provider_id}/remove-auth-config");
|
|
585
491
|
});
|
|
586
492
|
}
|
|
587
493
|
}
|
|
@@ -8,6 +8,10 @@ export class BadRequestError extends errors.phenomlError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|