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,23 +1,23 @@
|
|
|
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
|
-
import {
|
|
5
|
-
export declare namespace
|
|
6
|
-
|
|
7
|
-
}
|
|
5
|
+
import { ToolsClient } from "../resources/tools/client/Client.js";
|
|
6
|
+
export declare namespace McpServerClient {
|
|
7
|
+
type Options = BaseClientOptions;
|
|
8
8
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
export declare class
|
|
12
|
-
protected readonly _options:
|
|
13
|
-
protected _tools:
|
|
14
|
-
constructor(
|
|
15
|
-
get tools():
|
|
11
|
+
export declare class McpServerClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<McpServerClient.Options>;
|
|
13
|
+
protected _tools: ToolsClient | undefined;
|
|
14
|
+
constructor(options?: McpServerClient.Options);
|
|
15
|
+
get tools(): ToolsClient;
|
|
16
16
|
/**
|
|
17
17
|
* Creates a new MCP server
|
|
18
18
|
*
|
|
19
19
|
* @param {phenoml.tools.McpServerCreateRequest} request
|
|
20
|
-
* @param {
|
|
20
|
+
* @param {McpServerClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
21
|
*
|
|
22
22
|
* @throws {@link phenoml.tools.BadRequestError}
|
|
23
23
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
@@ -30,12 +30,12 @@ export declare class McpServer {
|
|
|
30
30
|
* mcp_server_url: "https://mcp.example.com"
|
|
31
31
|
* })
|
|
32
32
|
*/
|
|
33
|
-
create(request: phenoml.tools.McpServerCreateRequest, requestOptions?:
|
|
33
|
+
create(request: phenoml.tools.McpServerCreateRequest, requestOptions?: McpServerClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
|
|
34
34
|
private __create;
|
|
35
35
|
/**
|
|
36
36
|
* Lists all MCP servers for a specific user
|
|
37
37
|
*
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {McpServerClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
41
41
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -44,13 +44,13 @@ export declare class McpServer {
|
|
|
44
44
|
* @example
|
|
45
45
|
* await client.tools.mcpServer.list()
|
|
46
46
|
*/
|
|
47
|
-
list(requestOptions?:
|
|
47
|
+
list(requestOptions?: McpServerClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
|
|
48
48
|
private __list;
|
|
49
49
|
/**
|
|
50
50
|
* Gets a MCP server by ID
|
|
51
51
|
*
|
|
52
52
|
* @param {string} mcp_server_id - ID of the MCP server to retrieve
|
|
53
|
-
* @param {
|
|
53
|
+
* @param {McpServerClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
54
|
*
|
|
55
55
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
56
56
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -59,13 +59,13 @@ export declare class McpServer {
|
|
|
59
59
|
* @example
|
|
60
60
|
* await client.tools.mcpServer.get("mcp_server_id")
|
|
61
61
|
*/
|
|
62
|
-
get(mcp_server_id: string, requestOptions?:
|
|
62
|
+
get(mcp_server_id: string, requestOptions?: McpServerClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
|
|
63
63
|
private __get;
|
|
64
64
|
/**
|
|
65
65
|
* Deletes a MCP server by ID
|
|
66
66
|
*
|
|
67
67
|
* @param {string} mcp_server_id - ID of the MCP server to delete
|
|
68
|
-
* @param {
|
|
68
|
+
* @param {McpServerClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
69
|
*
|
|
70
70
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
71
71
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -74,7 +74,6 @@ export declare class McpServer {
|
|
|
74
74
|
* @example
|
|
75
75
|
* await client.tools.mcpServer.delete("mcp_server_id")
|
|
76
76
|
*/
|
|
77
|
-
delete(mcp_server_id: string, requestOptions?:
|
|
77
|
+
delete(mcp_server_id: string, requestOptions?: McpServerClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
|
|
78
78
|
private __delete;
|
|
79
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
80
79
|
}
|
|
@@ -43,26 +43,28 @@ 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.McpServerClient = 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
54
|
const Client_js_1 = require("../resources/tools/client/Client.js");
|
|
53
|
-
class
|
|
54
|
-
constructor(
|
|
55
|
-
this._options =
|
|
55
|
+
class McpServerClient {
|
|
56
|
+
constructor(options = {}) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
56
58
|
}
|
|
57
59
|
get tools() {
|
|
58
60
|
var _a;
|
|
59
|
-
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_1.
|
|
61
|
+
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_1.ToolsClient(this._options)));
|
|
60
62
|
}
|
|
61
63
|
/**
|
|
62
64
|
* Creates a new MCP server
|
|
63
65
|
*
|
|
64
66
|
* @param {phenoml.tools.McpServerCreateRequest} request
|
|
65
|
-
* @param {
|
|
67
|
+
* @param {McpServerClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
68
|
*
|
|
67
69
|
* @throws {@link phenoml.tools.BadRequestError}
|
|
68
70
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
@@ -81,7 +83,8 @@ class McpServer {
|
|
|
81
83
|
__create(request, requestOptions) {
|
|
82
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
85
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
84
|
-
const
|
|
86
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
87
|
+
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);
|
|
85
88
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
86
89
|
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, "tools/mcp-server/create"),
|
|
87
90
|
method: "POST",
|
|
@@ -117,27 +120,13 @@ class McpServer {
|
|
|
117
120
|
});
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
|
-
|
|
121
|
-
case "non-json":
|
|
122
|
-
throw new errors.phenomlError({
|
|
123
|
-
statusCode: _response.error.statusCode,
|
|
124
|
-
body: _response.error.rawBody,
|
|
125
|
-
rawResponse: _response.rawResponse,
|
|
126
|
-
});
|
|
127
|
-
case "timeout":
|
|
128
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /tools/mcp-server/create.");
|
|
129
|
-
case "unknown":
|
|
130
|
-
throw new errors.phenomlError({
|
|
131
|
-
message: _response.error.errorMessage,
|
|
132
|
-
rawResponse: _response.rawResponse,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
123
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/tools/mcp-server/create");
|
|
135
124
|
});
|
|
136
125
|
}
|
|
137
126
|
/**
|
|
138
127
|
* Lists all MCP servers for a specific user
|
|
139
128
|
*
|
|
140
|
-
* @param {
|
|
129
|
+
* @param {McpServerClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
130
|
*
|
|
142
131
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
143
132
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -152,7 +141,8 @@ class McpServer {
|
|
|
152
141
|
__list(requestOptions) {
|
|
153
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
154
143
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
155
|
-
const
|
|
144
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
145
|
+
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);
|
|
156
146
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
157
147
|
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, "tools/mcp-server/list"),
|
|
158
148
|
method: "GET",
|
|
@@ -183,28 +173,14 @@ class McpServer {
|
|
|
183
173
|
});
|
|
184
174
|
}
|
|
185
175
|
}
|
|
186
|
-
|
|
187
|
-
case "non-json":
|
|
188
|
-
throw new errors.phenomlError({
|
|
189
|
-
statusCode: _response.error.statusCode,
|
|
190
|
-
body: _response.error.rawBody,
|
|
191
|
-
rawResponse: _response.rawResponse,
|
|
192
|
-
});
|
|
193
|
-
case "timeout":
|
|
194
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /tools/mcp-server/list.");
|
|
195
|
-
case "unknown":
|
|
196
|
-
throw new errors.phenomlError({
|
|
197
|
-
message: _response.error.errorMessage,
|
|
198
|
-
rawResponse: _response.rawResponse,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
176
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/tools/mcp-server/list");
|
|
201
177
|
});
|
|
202
178
|
}
|
|
203
179
|
/**
|
|
204
180
|
* Gets a MCP server by ID
|
|
205
181
|
*
|
|
206
182
|
* @param {string} mcp_server_id - ID of the MCP server to retrieve
|
|
207
|
-
* @param {
|
|
183
|
+
* @param {McpServerClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
208
184
|
*
|
|
209
185
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
210
186
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -219,7 +195,8 @@ class McpServer {
|
|
|
219
195
|
__get(mcp_server_id, requestOptions) {
|
|
220
196
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
197
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
222
|
-
const
|
|
198
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
199
|
+
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);
|
|
223
200
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
224
201
|
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, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}`),
|
|
225
202
|
method: "GET",
|
|
@@ -250,28 +227,14 @@ class McpServer {
|
|
|
250
227
|
});
|
|
251
228
|
}
|
|
252
229
|
}
|
|
253
|
-
|
|
254
|
-
case "non-json":
|
|
255
|
-
throw new errors.phenomlError({
|
|
256
|
-
statusCode: _response.error.statusCode,
|
|
257
|
-
body: _response.error.rawBody,
|
|
258
|
-
rawResponse: _response.rawResponse,
|
|
259
|
-
});
|
|
260
|
-
case "timeout":
|
|
261
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /tools/mcp-server/{mcp_server_id}.");
|
|
262
|
-
case "unknown":
|
|
263
|
-
throw new errors.phenomlError({
|
|
264
|
-
message: _response.error.errorMessage,
|
|
265
|
-
rawResponse: _response.rawResponse,
|
|
266
|
-
});
|
|
267
|
-
}
|
|
230
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/tools/mcp-server/{mcp_server_id}");
|
|
268
231
|
});
|
|
269
232
|
}
|
|
270
233
|
/**
|
|
271
234
|
* Deletes a MCP server by ID
|
|
272
235
|
*
|
|
273
236
|
* @param {string} mcp_server_id - ID of the MCP server to delete
|
|
274
|
-
* @param {
|
|
237
|
+
* @param {McpServerClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
275
238
|
*
|
|
276
239
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
277
240
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -286,7 +249,8 @@ class McpServer {
|
|
|
286
249
|
__delete(mcp_server_id, requestOptions) {
|
|
287
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
288
251
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
289
|
-
const
|
|
252
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
253
|
+
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);
|
|
290
254
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
291
255
|
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, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}`),
|
|
292
256
|
method: "DELETE",
|
|
@@ -317,27 +281,8 @@ class McpServer {
|
|
|
317
281
|
});
|
|
318
282
|
}
|
|
319
283
|
}
|
|
320
|
-
|
|
321
|
-
case "non-json":
|
|
322
|
-
throw new errors.phenomlError({
|
|
323
|
-
statusCode: _response.error.statusCode,
|
|
324
|
-
body: _response.error.rawBody,
|
|
325
|
-
rawResponse: _response.rawResponse,
|
|
326
|
-
});
|
|
327
|
-
case "timeout":
|
|
328
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /tools/mcp-server/{mcp_server_id}.");
|
|
329
|
-
case "unknown":
|
|
330
|
-
throw new errors.phenomlError({
|
|
331
|
-
message: _response.error.errorMessage,
|
|
332
|
-
rawResponse: _response.rawResponse,
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
_getAuthorizationHeader() {
|
|
338
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
284
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/tools/mcp-server/{mcp_server_id}");
|
|
340
285
|
});
|
|
341
286
|
}
|
|
342
287
|
}
|
|
343
|
-
exports.
|
|
288
|
+
exports.McpServerClient = McpServerClient;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.McpServerClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "McpServerClient", { enumerable: true, get: function () { return Client_js_1.McpServerClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
22
|
+
__exportStar(require("./resources/index.js"), exports);
|
|
@@ -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 ToolsClient {
|
|
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 ToolsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ToolsClient.Options>;
|
|
12
|
+
constructor(options?: ToolsClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Lists all MCP server tools for a specific MCP server
|
|
15
15
|
*
|
|
16
16
|
* @param {string} mcp_server_id - ID of the MCP server to list tools for
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
18
|
*
|
|
19
19
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
20
20
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -23,13 +23,13 @@ export declare class Tools {
|
|
|
23
23
|
* @example
|
|
24
24
|
* await client.tools.mcpServer.tools.list("mcp_server_id")
|
|
25
25
|
*/
|
|
26
|
-
list(mcp_server_id: string, requestOptions?:
|
|
26
|
+
list(mcp_server_id: string, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
|
|
27
27
|
private __list;
|
|
28
28
|
/**
|
|
29
29
|
* Gets a MCP server tool by ID
|
|
30
30
|
*
|
|
31
31
|
* @param {string} mcp_server_tool_id - ID of the MCP server tool to retrieve
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
33
|
*
|
|
34
34
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
35
35
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -38,13 +38,13 @@ export declare class Tools {
|
|
|
38
38
|
* @example
|
|
39
39
|
* await client.tools.mcpServer.tools.get("mcp_server_tool_id")
|
|
40
40
|
*/
|
|
41
|
-
get(mcp_server_tool_id: string, requestOptions?:
|
|
41
|
+
get(mcp_server_tool_id: string, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
|
|
42
42
|
private __get;
|
|
43
43
|
/**
|
|
44
44
|
* Deletes a MCP server tool by ID
|
|
45
45
|
*
|
|
46
46
|
* @param {string} mcp_server_tool_id - ID of the MCP server tool to delete
|
|
47
|
-
* @param {
|
|
47
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
48
|
*
|
|
49
49
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
50
50
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -53,14 +53,14 @@ export declare class Tools {
|
|
|
53
53
|
* @example
|
|
54
54
|
* await client.tools.mcpServer.tools.delete("mcp_server_tool_id")
|
|
55
55
|
*/
|
|
56
|
-
delete(mcp_server_tool_id: string, requestOptions?:
|
|
56
|
+
delete(mcp_server_tool_id: string, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolResponse>;
|
|
57
57
|
private __delete;
|
|
58
58
|
/**
|
|
59
59
|
* Calls a MCP server tool
|
|
60
60
|
*
|
|
61
61
|
* @param {string} mcp_server_tool_id - ID of the MCP server tool to call
|
|
62
62
|
* @param {phenoml.tools.mcpServer.McpServerToolCallRequest} request
|
|
63
|
-
* @param {
|
|
63
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
64
|
*
|
|
65
65
|
* @throws {@link phenoml.tools.BadRequestError}
|
|
66
66
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
@@ -74,7 +74,6 @@ export declare class Tools {
|
|
|
74
74
|
* }
|
|
75
75
|
* })
|
|
76
76
|
*/
|
|
77
|
-
call(mcp_server_tool_id: string, request: phenoml.tools.mcpServer.McpServerToolCallRequest, requestOptions?:
|
|
77
|
+
call(mcp_server_tool_id: string, request: phenoml.tools.mcpServer.McpServerToolCallRequest, requestOptions?: ToolsClient.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolCallResponse>;
|
|
78
78
|
private __call;
|
|
79
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
80
79
|
}
|
|
@@ -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.ToolsClient = 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 ToolsClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* Lists all MCP server tools for a specific MCP server
|
|
58
60
|
*
|
|
59
61
|
* @param {string} mcp_server_id - ID of the MCP server to list tools for
|
|
60
|
-
* @param {
|
|
62
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
63
|
*
|
|
62
64
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
63
65
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -72,7 +74,8 @@ class Tools {
|
|
|
72
74
|
__list(mcp_server_id, requestOptions) {
|
|
73
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
76
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
75
|
-
const
|
|
77
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
78
|
+
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);
|
|
76
79
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
77
80
|
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, `tools/mcp-server/${core.url.encodePathParam(mcp_server_id)}/list`),
|
|
78
81
|
method: "GET",
|
|
@@ -103,28 +106,14 @@ class Tools {
|
|
|
103
106
|
});
|
|
104
107
|
}
|
|
105
108
|
}
|
|
106
|
-
|
|
107
|
-
case "non-json":
|
|
108
|
-
throw new errors.phenomlError({
|
|
109
|
-
statusCode: _response.error.statusCode,
|
|
110
|
-
body: _response.error.rawBody,
|
|
111
|
-
rawResponse: _response.rawResponse,
|
|
112
|
-
});
|
|
113
|
-
case "timeout":
|
|
114
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /tools/mcp-server/{mcp_server_id}/list.");
|
|
115
|
-
case "unknown":
|
|
116
|
-
throw new errors.phenomlError({
|
|
117
|
-
message: _response.error.errorMessage,
|
|
118
|
-
rawResponse: _response.rawResponse,
|
|
119
|
-
});
|
|
120
|
-
}
|
|
109
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/tools/mcp-server/{mcp_server_id}/list");
|
|
121
110
|
});
|
|
122
111
|
}
|
|
123
112
|
/**
|
|
124
113
|
* Gets a MCP server tool by ID
|
|
125
114
|
*
|
|
126
115
|
* @param {string} mcp_server_tool_id - ID of the MCP server tool to retrieve
|
|
127
|
-
* @param {
|
|
116
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
128
117
|
*
|
|
129
118
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
130
119
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -139,7 +128,8 @@ class Tools {
|
|
|
139
128
|
__get(mcp_server_tool_id, requestOptions) {
|
|
140
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
130
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
142
|
-
const
|
|
131
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
132
|
+
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);
|
|
143
133
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
144
134
|
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, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}`),
|
|
145
135
|
method: "GET",
|
|
@@ -170,28 +160,14 @@ class Tools {
|
|
|
170
160
|
});
|
|
171
161
|
}
|
|
172
162
|
}
|
|
173
|
-
|
|
174
|
-
case "non-json":
|
|
175
|
-
throw new errors.phenomlError({
|
|
176
|
-
statusCode: _response.error.statusCode,
|
|
177
|
-
body: _response.error.rawBody,
|
|
178
|
-
rawResponse: _response.rawResponse,
|
|
179
|
-
});
|
|
180
|
-
case "timeout":
|
|
181
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /tools/mcp-server/tool/{mcp_server_tool_id}.");
|
|
182
|
-
case "unknown":
|
|
183
|
-
throw new errors.phenomlError({
|
|
184
|
-
message: _response.error.errorMessage,
|
|
185
|
-
rawResponse: _response.rawResponse,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
163
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/tools/mcp-server/tool/{mcp_server_tool_id}");
|
|
188
164
|
});
|
|
189
165
|
}
|
|
190
166
|
/**
|
|
191
167
|
* Deletes a MCP server tool by ID
|
|
192
168
|
*
|
|
193
169
|
* @param {string} mcp_server_tool_id - ID of the MCP server tool to delete
|
|
194
|
-
* @param {
|
|
170
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
171
|
*
|
|
196
172
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
197
173
|
* @throws {@link phenoml.tools.ForbiddenError}
|
|
@@ -206,7 +182,8 @@ class Tools {
|
|
|
206
182
|
__delete(mcp_server_tool_id, requestOptions) {
|
|
207
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
208
184
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
209
|
-
const
|
|
185
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
186
|
+
const _headers = (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);
|
|
210
187
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
211
188
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}`),
|
|
212
189
|
method: "DELETE",
|
|
@@ -237,21 +214,7 @@ class Tools {
|
|
|
237
214
|
});
|
|
238
215
|
}
|
|
239
216
|
}
|
|
240
|
-
|
|
241
|
-
case "non-json":
|
|
242
|
-
throw new errors.phenomlError({
|
|
243
|
-
statusCode: _response.error.statusCode,
|
|
244
|
-
body: _response.error.rawBody,
|
|
245
|
-
rawResponse: _response.rawResponse,
|
|
246
|
-
});
|
|
247
|
-
case "timeout":
|
|
248
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /tools/mcp-server/tool/{mcp_server_tool_id}.");
|
|
249
|
-
case "unknown":
|
|
250
|
-
throw new errors.phenomlError({
|
|
251
|
-
message: _response.error.errorMessage,
|
|
252
|
-
rawResponse: _response.rawResponse,
|
|
253
|
-
});
|
|
254
|
-
}
|
|
217
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/tools/mcp-server/tool/{mcp_server_tool_id}");
|
|
255
218
|
});
|
|
256
219
|
}
|
|
257
220
|
/**
|
|
@@ -259,7 +222,7 @@ class Tools {
|
|
|
259
222
|
*
|
|
260
223
|
* @param {string} mcp_server_tool_id - ID of the MCP server tool to call
|
|
261
224
|
* @param {phenoml.tools.mcpServer.McpServerToolCallRequest} request
|
|
262
|
-
* @param {
|
|
225
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
263
226
|
*
|
|
264
227
|
* @throws {@link phenoml.tools.BadRequestError}
|
|
265
228
|
* @throws {@link phenoml.tools.UnauthorizedError}
|
|
@@ -279,7 +242,8 @@ class Tools {
|
|
|
279
242
|
__call(mcp_server_tool_id, request, requestOptions) {
|
|
280
243
|
return __awaiter(this, void 0, void 0, function* () {
|
|
281
244
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
282
|
-
const
|
|
245
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
246
|
+
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);
|
|
283
247
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
284
248
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `tools/mcp-server/tool/${core.url.encodePathParam(mcp_server_tool_id)}/call`),
|
|
285
249
|
method: "POST",
|
|
@@ -318,27 +282,8 @@ class Tools {
|
|
|
318
282
|
});
|
|
319
283
|
}
|
|
320
284
|
}
|
|
321
|
-
|
|
322
|
-
case "non-json":
|
|
323
|
-
throw new errors.phenomlError({
|
|
324
|
-
statusCode: _response.error.statusCode,
|
|
325
|
-
body: _response.error.rawBody,
|
|
326
|
-
rawResponse: _response.rawResponse,
|
|
327
|
-
});
|
|
328
|
-
case "timeout":
|
|
329
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /tools/mcp-server/tool/{mcp_server_tool_id}/call.");
|
|
330
|
-
case "unknown":
|
|
331
|
-
throw new errors.phenomlError({
|
|
332
|
-
message: _response.error.errorMessage,
|
|
333
|
-
rawResponse: _response.rawResponse,
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
_getAuthorizationHeader() {
|
|
339
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
285
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/tools/mcp-server/tool/{mcp_server_tool_id}/call");
|
|
341
286
|
});
|
|
342
287
|
}
|
|
343
288
|
}
|
|
344
|
-
exports.
|
|
289
|
+
exports.ToolsClient = ToolsClient;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ToolsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "ToolsClient", { enumerable: true, get: function () { return Client_js_1.ToolsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.js";
|
|
2
2
|
export interface CohortResponse {
|
|
3
3
|
/** Whether the cohort analysis was successful */
|
|
4
|
-
success?: boolean;
|
|
4
|
+
success?: boolean | undefined;
|
|
5
5
|
/** Status message with details about the analysis */
|
|
6
|
-
message?: string;
|
|
6
|
+
message?: string | undefined;
|
|
7
7
|
/** Array of patient IDs that match the cohort criteria */
|
|
8
|
-
patientIds?: string[];
|
|
8
|
+
patientIds?: string[] | undefined;
|
|
9
9
|
/** Total number of patients in the cohort */
|
|
10
|
-
patientCount?: number;
|
|
10
|
+
patientCount?: number | undefined;
|
|
11
11
|
/** Individual search concepts that were identified and executed */
|
|
12
|
-
queries?: phenoml.tools.SearchConcept[];
|
|
12
|
+
queries?: phenoml.tools.SearchConcept[] | undefined;
|
|
13
13
|
}
|