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,20 +8,22 @@ 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 PromptsClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Creates a new agent prompt
|
|
22
24
|
*
|
|
23
25
|
* @param {phenoml.agent.AgentPromptsCreateRequest} request
|
|
24
|
-
* @param {
|
|
26
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
27
|
*
|
|
26
28
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
27
29
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -40,7 +42,8 @@ export class Prompts {
|
|
|
40
42
|
__create(request, requestOptions) {
|
|
41
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
44
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
43
|
-
const
|
|
45
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
46
|
+
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);
|
|
44
47
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
45
48
|
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, "agent/prompts"),
|
|
46
49
|
method: "POST",
|
|
@@ -76,27 +79,13 @@ export class Prompts {
|
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
|
-
|
|
80
|
-
case "non-json":
|
|
81
|
-
throw new errors.phenomlError({
|
|
82
|
-
statusCode: _response.error.statusCode,
|
|
83
|
-
body: _response.error.rawBody,
|
|
84
|
-
rawResponse: _response.rawResponse,
|
|
85
|
-
});
|
|
86
|
-
case "timeout":
|
|
87
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /agent/prompts.");
|
|
88
|
-
case "unknown":
|
|
89
|
-
throw new errors.phenomlError({
|
|
90
|
-
message: _response.error.errorMessage,
|
|
91
|
-
rawResponse: _response.rawResponse,
|
|
92
|
-
});
|
|
93
|
-
}
|
|
82
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/agent/prompts");
|
|
94
83
|
});
|
|
95
84
|
}
|
|
96
85
|
/**
|
|
97
86
|
* Retrieves a list of agent prompts belonging to the authenticated user
|
|
98
87
|
*
|
|
99
|
-
* @param {
|
|
88
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
100
89
|
*
|
|
101
90
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
102
91
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -111,7 +100,8 @@ export class Prompts {
|
|
|
111
100
|
__list(requestOptions) {
|
|
112
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
113
102
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
114
|
-
const
|
|
103
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
104
|
+
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);
|
|
115
105
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
116
106
|
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, "agent/prompts/list"),
|
|
117
107
|
method: "GET",
|
|
@@ -142,28 +132,14 @@ export class Prompts {
|
|
|
142
132
|
});
|
|
143
133
|
}
|
|
144
134
|
}
|
|
145
|
-
|
|
146
|
-
case "non-json":
|
|
147
|
-
throw new errors.phenomlError({
|
|
148
|
-
statusCode: _response.error.statusCode,
|
|
149
|
-
body: _response.error.rawBody,
|
|
150
|
-
rawResponse: _response.rawResponse,
|
|
151
|
-
});
|
|
152
|
-
case "timeout":
|
|
153
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /agent/prompts/list.");
|
|
154
|
-
case "unknown":
|
|
155
|
-
throw new errors.phenomlError({
|
|
156
|
-
message: _response.error.errorMessage,
|
|
157
|
-
rawResponse: _response.rawResponse,
|
|
158
|
-
});
|
|
159
|
-
}
|
|
135
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/agent/prompts/list");
|
|
160
136
|
});
|
|
161
137
|
}
|
|
162
138
|
/**
|
|
163
139
|
* Retrieves a specific prompt by its ID
|
|
164
140
|
*
|
|
165
141
|
* @param {string} id - Prompt ID
|
|
166
|
-
* @param {
|
|
142
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
143
|
*
|
|
168
144
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
169
145
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -179,7 +155,8 @@ export class Prompts {
|
|
|
179
155
|
__get(id, requestOptions) {
|
|
180
156
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
157
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
182
|
-
const
|
|
158
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
159
|
+
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);
|
|
183
160
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
184
161
|
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, `agent/prompts/${core.url.encodePathParam(id)}`),
|
|
185
162
|
method: "GET",
|
|
@@ -212,21 +189,7 @@ export class Prompts {
|
|
|
212
189
|
});
|
|
213
190
|
}
|
|
214
191
|
}
|
|
215
|
-
|
|
216
|
-
case "non-json":
|
|
217
|
-
throw new errors.phenomlError({
|
|
218
|
-
statusCode: _response.error.statusCode,
|
|
219
|
-
body: _response.error.rawBody,
|
|
220
|
-
rawResponse: _response.rawResponse,
|
|
221
|
-
});
|
|
222
|
-
case "timeout":
|
|
223
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling GET /agent/prompts/{id}.");
|
|
224
|
-
case "unknown":
|
|
225
|
-
throw new errors.phenomlError({
|
|
226
|
-
message: _response.error.errorMessage,
|
|
227
|
-
rawResponse: _response.rawResponse,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
192
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/agent/prompts/{id}");
|
|
230
193
|
});
|
|
231
194
|
}
|
|
232
195
|
/**
|
|
@@ -234,7 +197,7 @@ export class Prompts {
|
|
|
234
197
|
*
|
|
235
198
|
* @param {string} id - Prompt ID
|
|
236
199
|
* @param {phenoml.agent.AgentPromptsUpdateRequest} request
|
|
237
|
-
* @param {
|
|
200
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
238
201
|
*
|
|
239
202
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
240
203
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -251,7 +214,8 @@ export class Prompts {
|
|
|
251
214
|
__update(id_1) {
|
|
252
215
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
253
216
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
254
|
-
const
|
|
217
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
218
|
+
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);
|
|
255
219
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
256
220
|
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, `agent/prompts/${core.url.encodePathParam(id)}`),
|
|
257
221
|
method: "PUT",
|
|
@@ -289,28 +253,14 @@ export class Prompts {
|
|
|
289
253
|
});
|
|
290
254
|
}
|
|
291
255
|
}
|
|
292
|
-
|
|
293
|
-
case "non-json":
|
|
294
|
-
throw new errors.phenomlError({
|
|
295
|
-
statusCode: _response.error.statusCode,
|
|
296
|
-
body: _response.error.rawBody,
|
|
297
|
-
rawResponse: _response.rawResponse,
|
|
298
|
-
});
|
|
299
|
-
case "timeout":
|
|
300
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PUT /agent/prompts/{id}.");
|
|
301
|
-
case "unknown":
|
|
302
|
-
throw new errors.phenomlError({
|
|
303
|
-
message: _response.error.errorMessage,
|
|
304
|
-
rawResponse: _response.rawResponse,
|
|
305
|
-
});
|
|
306
|
-
}
|
|
256
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/agent/prompts/{id}");
|
|
307
257
|
});
|
|
308
258
|
}
|
|
309
259
|
/**
|
|
310
260
|
* Deletes a prompt
|
|
311
261
|
*
|
|
312
262
|
* @param {string} id - Prompt ID
|
|
313
|
-
* @param {
|
|
263
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
314
264
|
*
|
|
315
265
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
316
266
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -326,7 +276,8 @@ export class Prompts {
|
|
|
326
276
|
__delete(id, requestOptions) {
|
|
327
277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
328
278
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
329
|
-
const
|
|
279
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
280
|
+
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);
|
|
330
281
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
331
282
|
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, `agent/prompts/${core.url.encodePathParam(id)}`),
|
|
332
283
|
method: "DELETE",
|
|
@@ -359,21 +310,7 @@ export class Prompts {
|
|
|
359
310
|
});
|
|
360
311
|
}
|
|
361
312
|
}
|
|
362
|
-
|
|
363
|
-
case "non-json":
|
|
364
|
-
throw new errors.phenomlError({
|
|
365
|
-
statusCode: _response.error.statusCode,
|
|
366
|
-
body: _response.error.rawBody,
|
|
367
|
-
rawResponse: _response.rawResponse,
|
|
368
|
-
});
|
|
369
|
-
case "timeout":
|
|
370
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling DELETE /agent/prompts/{id}.");
|
|
371
|
-
case "unknown":
|
|
372
|
-
throw new errors.phenomlError({
|
|
373
|
-
message: _response.error.errorMessage,
|
|
374
|
-
rawResponse: _response.rawResponse,
|
|
375
|
-
});
|
|
376
|
-
}
|
|
313
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/agent/prompts/{id}");
|
|
377
314
|
});
|
|
378
315
|
}
|
|
379
316
|
/**
|
|
@@ -381,7 +318,7 @@ export class Prompts {
|
|
|
381
318
|
*
|
|
382
319
|
* @param {string} id - Agent Prompt ID
|
|
383
320
|
* @param {phenoml.agent.JsonPatch} request
|
|
384
|
-
* @param {
|
|
321
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
385
322
|
*
|
|
386
323
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
387
324
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
@@ -409,7 +346,8 @@ export class Prompts {
|
|
|
409
346
|
__patch(id, request, requestOptions) {
|
|
410
347
|
return __awaiter(this, void 0, void 0, function* () {
|
|
411
348
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
412
|
-
const
|
|
349
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
350
|
+
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);
|
|
413
351
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
414
352
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `agent/prompts/${core.url.encodePathParam(id)}`),
|
|
415
353
|
method: "PATCH",
|
|
@@ -447,27 +385,13 @@ export class Prompts {
|
|
|
447
385
|
});
|
|
448
386
|
}
|
|
449
387
|
}
|
|
450
|
-
|
|
451
|
-
case "non-json":
|
|
452
|
-
throw new errors.phenomlError({
|
|
453
|
-
statusCode: _response.error.statusCode,
|
|
454
|
-
body: _response.error.rawBody,
|
|
455
|
-
rawResponse: _response.rawResponse,
|
|
456
|
-
});
|
|
457
|
-
case "timeout":
|
|
458
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling PATCH /agent/prompts/{id}.");
|
|
459
|
-
case "unknown":
|
|
460
|
-
throw new errors.phenomlError({
|
|
461
|
-
message: _response.error.errorMessage,
|
|
462
|
-
rawResponse: _response.rawResponse,
|
|
463
|
-
});
|
|
464
|
-
}
|
|
388
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/agent/prompts/{id}");
|
|
465
389
|
});
|
|
466
390
|
}
|
|
467
391
|
/**
|
|
468
392
|
* Loads default agent prompts for the authenticated user
|
|
469
393
|
*
|
|
470
|
-
* @param {
|
|
394
|
+
* @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
471
395
|
*
|
|
472
396
|
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
473
397
|
* @throws {@link phenoml.agent.ForbiddenError}
|
|
@@ -482,7 +406,8 @@ export class Prompts {
|
|
|
482
406
|
__loadDefaults(requestOptions) {
|
|
483
407
|
return __awaiter(this, void 0, void 0, function* () {
|
|
484
408
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
485
|
-
const
|
|
409
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
410
|
+
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);
|
|
486
411
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
487
412
|
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, "agent/prompts/load-defaults"),
|
|
488
413
|
method: "POST",
|
|
@@ -513,26 +438,7 @@ export class Prompts {
|
|
|
513
438
|
});
|
|
514
439
|
}
|
|
515
440
|
}
|
|
516
|
-
|
|
517
|
-
case "non-json":
|
|
518
|
-
throw new errors.phenomlError({
|
|
519
|
-
statusCode: _response.error.statusCode,
|
|
520
|
-
body: _response.error.rawBody,
|
|
521
|
-
rawResponse: _response.rawResponse,
|
|
522
|
-
});
|
|
523
|
-
case "timeout":
|
|
524
|
-
throw new errors.phenomlTimeoutError("Timeout exceeded when calling POST /agent/prompts/load-defaults.");
|
|
525
|
-
case "unknown":
|
|
526
|
-
throw new errors.phenomlError({
|
|
527
|
-
message: _response.error.errorMessage,
|
|
528
|
-
rawResponse: _response.rawResponse,
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
_getAuthorizationHeader() {
|
|
534
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
535
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
441
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/agent/prompts/load-defaults");
|
|
536
442
|
});
|
|
537
443
|
}
|
|
538
444
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as phenoml from "../../../../../index.mjs";
|
|
2
2
|
export interface PromptsListResponse {
|
|
3
|
-
success?: boolean;
|
|
4
|
-
message?: string;
|
|
5
|
-
prompts?: phenoml.agent.PromptTemplate[];
|
|
3
|
+
success?: boolean | undefined;
|
|
4
|
+
message?: string | undefined;
|
|
5
|
+
prompts?: phenoml.agent.PromptTemplate[] | undefined;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface AgentChatResponse {
|
|
2
2
|
/** Agent's response */
|
|
3
|
-
response?: string;
|
|
4
|
-
success?: boolean;
|
|
3
|
+
response?: string | undefined;
|
|
4
|
+
success?: boolean | undefined;
|
|
5
5
|
/** Status message */
|
|
6
|
-
message?: string;
|
|
6
|
+
message?: string | undefined;
|
|
7
7
|
/** Chat session ID */
|
|
8
|
-
session_id?: string;
|
|
8
|
+
session_id?: string | undefined;
|
|
9
9
|
}
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export interface AgentChatStreamEvent {
|
|
8
8
|
/** The event type */
|
|
9
|
-
type?: AgentChatStreamEvent.Type;
|
|
9
|
+
type?: AgentChatStreamEvent.Type | undefined;
|
|
10
10
|
/** Chat session ID */
|
|
11
|
-
session_id?: string;
|
|
11
|
+
session_id?: string | undefined;
|
|
12
12
|
/** Incremental text content (present in content_delta events) */
|
|
13
|
-
content?: string;
|
|
13
|
+
content?: string | undefined;
|
|
14
14
|
/** Whether the operation was successful */
|
|
15
|
-
success?: boolean;
|
|
15
|
+
success?: boolean | undefined;
|
|
16
16
|
/** Status message */
|
|
17
|
-
message?: string;
|
|
17
|
+
message?: string | undefined;
|
|
18
18
|
/** Tool/function name (present in tool_use and tool_result events) */
|
|
19
|
-
function_name?: string;
|
|
19
|
+
function_name?: string | undefined;
|
|
20
20
|
/** Tool arguments (present in tool_use events) */
|
|
21
|
-
function_args?: Record<string, unknown
|
|
21
|
+
function_args?: Record<string, unknown> | undefined;
|
|
22
22
|
/** Tool execution result (present in tool_result events) */
|
|
23
|
-
function_result?: Record<string, unknown
|
|
23
|
+
function_result?: Record<string, unknown> | undefined;
|
|
24
24
|
}
|
|
25
25
|
export declare namespace AgentChatStreamEvent {
|
|
26
26
|
/** The event type */
|
|
@@ -2,15 +2,15 @@ export interface AgentCreateRequest {
|
|
|
2
2
|
/** Agent name */
|
|
3
3
|
name: string;
|
|
4
4
|
/** Agent description */
|
|
5
|
-
description?: string;
|
|
5
|
+
description?: string | undefined;
|
|
6
6
|
/** Array of prompt IDs to use for this agent */
|
|
7
7
|
prompts: string[];
|
|
8
8
|
/** Array of MCP server tool IDs to use for this agent */
|
|
9
|
-
tools?: string[];
|
|
9
|
+
tools?: string[] | undefined;
|
|
10
10
|
/** Array of workflow IDs to expose as tools for this agent */
|
|
11
|
-
workflows?: string[];
|
|
11
|
+
workflows?: string[] | undefined;
|
|
12
12
|
/** Tags for categorizing the agent */
|
|
13
|
-
tags?: string[];
|
|
13
|
+
tags?: string[] | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* FHIR provider ID(s) for this agent. Required.
|
|
16
16
|
* In shared/experiment environments, the default sandbox provider is used if a different provider is not explicitly specified.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.mjs";
|
|
2
2
|
export interface AgentGetChatMessagesResponse {
|
|
3
|
-
messages?: phenoml.agent.ChatMessageTemplate[];
|
|
4
|
-
total?: number;
|
|
5
|
-
session_id?: string;
|
|
3
|
+
messages?: phenoml.agent.ChatMessageTemplate[] | undefined;
|
|
4
|
+
total?: number | undefined;
|
|
5
|
+
session_id?: string | undefined;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.mjs";
|
|
2
2
|
export interface AgentListResponse {
|
|
3
|
-
success?: boolean;
|
|
4
|
-
message?: string;
|
|
5
|
-
agents?: phenoml.agent.AgentTemplate[];
|
|
3
|
+
success?: boolean | undefined;
|
|
4
|
+
message?: string | undefined;
|
|
5
|
+
agents?: phenoml.agent.AgentTemplate[] | undefined;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.mjs";
|
|
2
2
|
export interface AgentPromptsResponse {
|
|
3
|
-
success?: boolean;
|
|
4
|
-
message?: string;
|
|
5
|
-
data?: phenoml.agent.PromptTemplate;
|
|
3
|
+
success?: boolean | undefined;
|
|
4
|
+
message?: string | undefined;
|
|
5
|
+
data?: phenoml.agent.PromptTemplate | undefined;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.mjs";
|
|
2
2
|
export interface AgentResponse {
|
|
3
|
-
success?: boolean;
|
|
4
|
-
message?: string;
|
|
5
|
-
data?: phenoml.agent.AgentTemplate;
|
|
3
|
+
success?: boolean | undefined;
|
|
4
|
+
message?: string | undefined;
|
|
5
|
+
data?: phenoml.agent.AgentTemplate | undefined;
|
|
6
6
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export interface AgentTemplate {
|
|
2
2
|
/** Agent ID */
|
|
3
|
-
id?: string;
|
|
3
|
+
id?: string | undefined;
|
|
4
4
|
/** Agent name */
|
|
5
|
-
name?: string;
|
|
5
|
+
name?: string | undefined;
|
|
6
6
|
/** Agent description */
|
|
7
|
-
description?: string;
|
|
7
|
+
description?: string | undefined;
|
|
8
8
|
/** Array of prompt IDs used by this agent */
|
|
9
|
-
prompts?: string[];
|
|
9
|
+
prompts?: string[] | undefined;
|
|
10
10
|
/** Array of MCP server tool IDs used by this agent */
|
|
11
|
-
tools?: string[];
|
|
11
|
+
tools?: string[] | undefined;
|
|
12
12
|
/** Array of workflow IDs exposed as tools by this agent */
|
|
13
|
-
workflows?: string[];
|
|
13
|
+
workflows?: string[] | undefined;
|
|
14
14
|
/** Tags for categorizing the agent */
|
|
15
|
-
tags?: string[];
|
|
15
|
+
tags?: string[] | undefined;
|
|
16
16
|
/** FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers */
|
|
17
|
-
provider?: AgentTemplate.Provider;
|
|
17
|
+
provider?: AgentTemplate.Provider | undefined;
|
|
18
18
|
}
|
|
19
19
|
export declare namespace AgentTemplate {
|
|
20
20
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface ChatMessageTemplate {
|
|
2
2
|
/** Chat message ID */
|
|
3
|
-
id?: string;
|
|
3
|
+
id?: string | undefined;
|
|
4
4
|
/** Chat session ID */
|
|
5
|
-
session_id?: string;
|
|
5
|
+
session_id?: string | undefined;
|
|
6
6
|
/**
|
|
7
7
|
* Message role indicating the source/type of the message:
|
|
8
8
|
* - `user` - Messages from the user
|
|
@@ -10,21 +10,21 @@ export interface ChatMessageTemplate {
|
|
|
10
10
|
* - `model` - Function/tool call requests to the model
|
|
11
11
|
* - `function` - Function/tool call results
|
|
12
12
|
*/
|
|
13
|
-
role?: ChatMessageTemplate.Role;
|
|
13
|
+
role?: ChatMessageTemplate.Role | undefined;
|
|
14
14
|
/** Message content */
|
|
15
|
-
content?: string;
|
|
15
|
+
content?: string | undefined;
|
|
16
16
|
/** Message created time */
|
|
17
|
-
created?: string;
|
|
17
|
+
created?: string | undefined;
|
|
18
18
|
/** Message updated time */
|
|
19
|
-
updated?: string;
|
|
19
|
+
updated?: string | undefined;
|
|
20
20
|
/** Function name */
|
|
21
|
-
function_name?: string;
|
|
21
|
+
function_name?: string | undefined;
|
|
22
22
|
/** Function arguments */
|
|
23
|
-
function_args?: Record<string, unknown
|
|
23
|
+
function_args?: Record<string, unknown> | undefined;
|
|
24
24
|
/** Function result */
|
|
25
|
-
function_result?: Record<string, unknown
|
|
25
|
+
function_result?: Record<string, unknown> | undefined;
|
|
26
26
|
/** Message order */
|
|
27
|
-
message_order?: number;
|
|
27
|
+
message_order?: number | undefined;
|
|
28
28
|
}
|
|
29
29
|
export declare namespace ChatMessageTemplate {
|
|
30
30
|
/**
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export interface ChatSessionTemplate {
|
|
2
2
|
/** Chat session ID */
|
|
3
|
-
id?: string;
|
|
3
|
+
id?: string | undefined;
|
|
4
4
|
/** Chat session ID */
|
|
5
|
-
session_id?: string;
|
|
5
|
+
session_id?: string | undefined;
|
|
6
6
|
/** Chat session status */
|
|
7
|
-
status?: string;
|
|
7
|
+
status?: string | undefined;
|
|
8
8
|
/** System prompt */
|
|
9
|
-
system_prompt?: string;
|
|
9
|
+
system_prompt?: string | undefined;
|
|
10
10
|
/** Chat session title */
|
|
11
|
-
title?: string;
|
|
11
|
+
title?: string | undefined;
|
|
12
12
|
/** Agent ID */
|
|
13
|
-
agent_id?: string;
|
|
13
|
+
agent_id?: string | undefined;
|
|
14
14
|
/** Chat session created time */
|
|
15
|
-
created?: string;
|
|
15
|
+
created?: string | undefined;
|
|
16
16
|
/** Chat session last message time */
|
|
17
|
-
last_message_at?: string;
|
|
17
|
+
last_message_at?: string | undefined;
|
|
18
18
|
/** Chat session updated time */
|
|
19
|
-
updated?: string;
|
|
19
|
+
updated?: string | undefined;
|
|
20
20
|
}
|
|
@@ -4,9 +4,9 @@ export interface JsonPatchOperation {
|
|
|
4
4
|
/** A JSON Pointer string specifying a location within the target document */
|
|
5
5
|
path: string;
|
|
6
6
|
/** The value to be used within the operations */
|
|
7
|
-
value?: unknown;
|
|
7
|
+
value?: unknown | undefined;
|
|
8
8
|
/** A JSON Pointer string specifying the location in the target document to move the value from (used with move and copy operations) */
|
|
9
|
-
from?: string;
|
|
9
|
+
from?: string | undefined;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace JsonPatchOperation {
|
|
12
12
|
/** The operation to be performed */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export interface PromptTemplate {
|
|
2
2
|
/** Prompt ID */
|
|
3
|
-
id?: string;
|
|
3
|
+
id?: string | undefined;
|
|
4
4
|
/** Prompt name */
|
|
5
|
-
name?: string;
|
|
5
|
+
name?: string | undefined;
|
|
6
6
|
/** Prompt description */
|
|
7
|
-
description?: string;
|
|
7
|
+
description?: string | undefined;
|
|
8
8
|
/** Prompt content */
|
|
9
|
-
content?: string;
|
|
9
|
+
content?: string | undefined;
|
|
10
10
|
/** Whether this is a default prompt */
|
|
11
|
-
is_default?: boolean;
|
|
11
|
+
is_default?: boolean | undefined;
|
|
12
12
|
/** Tags for categorizing the prompt */
|
|
13
|
-
tags?: string[];
|
|
13
|
+
tags?: string[] | undefined;
|
|
14
14
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { BaseClientOptions } from "../../../../BaseClient.mjs";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
+
import { AuthClient } from "../resources/auth/client/Client.mjs";
|
|
4
|
+
export declare namespace AuthtokenClient {
|
|
5
|
+
type Options = BaseClientOptions;
|
|
6
6
|
}
|
|
7
|
-
export declare class
|
|
8
|
-
protected readonly _options:
|
|
9
|
-
protected _auth:
|
|
10
|
-
constructor(
|
|
11
|
-
get auth():
|
|
7
|
+
export declare class AuthtokenClient {
|
|
8
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AuthtokenClient.Options>;
|
|
9
|
+
protected _auth: AuthClient | undefined;
|
|
10
|
+
constructor(options?: AuthtokenClient.Options);
|
|
11
|
+
get auth(): AuthClient;
|
|
12
12
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
+
import { AuthClient } from "../resources/auth/client/Client.mjs";
|
|
4
|
+
export class AuthtokenClient {
|
|
5
|
+
constructor(options = {}) {
|
|
6
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
6
7
|
}
|
|
7
8
|
get auth() {
|
|
8
9
|
var _a;
|
|
9
|
-
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new
|
|
10
|
+
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new AuthClient(this._options)));
|
|
10
11
|
}
|
|
11
12
|
}
|