phenoml 0.0.2
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/LICENSE +21 -0
- package/README.md +185 -0
- package/dist/cjs/Client.d.ts +50 -0
- package/dist/cjs/Client.js +84 -0
- package/dist/cjs/WrapperClient.d.ts +21 -0
- package/dist/cjs/WrapperClient.js +111 -0
- package/dist/cjs/api/index.d.ts +1 -0
- package/dist/cjs/api/index.js +17 -0
- package/dist/cjs/api/resources/agent/client/Client.d.ts +187 -0
- package/dist/cjs/api/resources/agent/client/Client.js +670 -0
- package/dist/cjs/api/resources/agent/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/agent/client/index.js +17 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +23 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.js +5 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentCreateRequest.d.ts +29 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentCreateRequest.js +5 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentGetChatMessagesRequest.d.ts +20 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentGetChatMessagesRequest.js +5 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentListRequest.d.ts +13 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentListRequest.js +5 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentUpdateRequest.d.ts +25 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentUpdateRequest.js +5 -0
- package/dist/cjs/api/resources/agent/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/agent/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/agent/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/resources/agent/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/resources/agent/errors/ForbiddenError.d.ts +8 -0
- package/dist/cjs/api/resources/agent/errors/ForbiddenError.js +52 -0
- package/dist/cjs/api/resources/agent/errors/InternalServerError.d.ts +8 -0
- package/dist/cjs/api/resources/agent/errors/InternalServerError.js +52 -0
- package/dist/cjs/api/resources/agent/errors/NotFoundError.d.ts +8 -0
- package/dist/cjs/api/resources/agent/errors/NotFoundError.js +52 -0
- package/dist/cjs/api/resources/agent/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/resources/agent/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/resources/agent/errors/index.d.ts +5 -0
- package/dist/cjs/api/resources/agent/errors/index.js +21 -0
- package/dist/cjs/api/resources/agent/index.d.ts +4 -0
- package/dist/cjs/api/resources/agent/index.js +20 -0
- package/dist/cjs/api/resources/agent/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/agent/resources/index.js +42 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +161 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +564 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/index.js +17 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.ts +25 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.js +5 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.ts +21 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.js +5 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/agent/resources/prompts/index.d.ts +2 -0
- package/dist/cjs/api/resources/agent/resources/prompts/index.js +18 -0
- package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsDeleteResponse.d.ts +7 -0
- package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsDeleteResponse.js +5 -0
- package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsListResponse.d.ts +9 -0
- package/dist/cjs/api/resources/agent/resources/prompts/types/PromptsListResponse.js +5 -0
- package/dist/cjs/api/resources/agent/resources/prompts/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/agent/resources/prompts/types/index.js +18 -0
- package/dist/cjs/api/resources/agent/types/AgentChatResponse.d.ts +12 -0
- package/dist/cjs/api/resources/agent/types/AgentChatResponse.js +5 -0
- package/dist/cjs/api/resources/agent/types/AgentDeleteResponse.d.ts +7 -0
- package/dist/cjs/api/resources/agent/types/AgentDeleteResponse.js +5 -0
- package/dist/cjs/api/resources/agent/types/AgentFhirConfig.d.ts +12 -0
- package/dist/cjs/api/resources/agent/types/AgentFhirConfig.js +5 -0
- package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestOrder.d.ts +8 -0
- package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesRequestOrder.js +10 -0
- package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesResponse.d.ts +9 -0
- package/dist/cjs/api/resources/agent/types/AgentGetChatMessagesResponse.js +5 -0
- package/dist/cjs/api/resources/agent/types/AgentListResponse.d.ts +9 -0
- package/dist/cjs/api/resources/agent/types/AgentListResponse.js +5 -0
- package/dist/cjs/api/resources/agent/types/AgentPromptsResponse.d.ts +9 -0
- package/dist/cjs/api/resources/agent/types/AgentPromptsResponse.js +5 -0
- package/dist/cjs/api/resources/agent/types/AgentProvider.d.ts +11 -0
- package/dist/cjs/api/resources/agent/types/AgentProvider.js +5 -0
- package/dist/cjs/api/resources/agent/types/AgentResponse.d.ts +9 -0
- package/dist/cjs/api/resources/agent/types/AgentResponse.js +5 -0
- package/dist/cjs/api/resources/agent/types/AgentTemplate.d.ts +23 -0
- package/dist/cjs/api/resources/agent/types/AgentTemplate.js +5 -0
- package/dist/cjs/api/resources/agent/types/ChatFhirClientConfig.d.ts +12 -0
- package/dist/cjs/api/resources/agent/types/ChatFhirClientConfig.js +5 -0
- package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.d.ts +27 -0
- package/dist/cjs/api/resources/agent/types/ChatMessageTemplate.js +5 -0
- package/dist/cjs/api/resources/agent/types/ChatSessionTemplate.d.ts +25 -0
- package/dist/cjs/api/resources/agent/types/ChatSessionTemplate.js +5 -0
- package/dist/cjs/api/resources/agent/types/JsonPatch.d.ts +8 -0
- package/dist/cjs/api/resources/agent/types/JsonPatch.js +5 -0
- package/dist/cjs/api/resources/agent/types/JsonPatchOperation.d.ts +26 -0
- package/dist/cjs/api/resources/agent/types/JsonPatchOperation.js +17 -0
- package/dist/cjs/api/resources/agent/types/PromptTemplate.d.ts +19 -0
- package/dist/cjs/api/resources/agent/types/PromptTemplate.js +5 -0
- package/dist/cjs/api/resources/agent/types/ProviderType.d.ts +13 -0
- package/dist/cjs/api/resources/agent/types/ProviderType.js +12 -0
- package/dist/cjs/api/resources/agent/types/SuccessResponse.d.ts +7 -0
- package/dist/cjs/api/resources/agent/types/SuccessResponse.js +5 -0
- package/dist/cjs/api/resources/agent/types/index.d.ts +18 -0
- package/dist/cjs/api/resources/agent/types/index.js +34 -0
- package/dist/cjs/api/resources/authtoken/client/Client.d.ts +23 -0
- package/dist/cjs/api/resources/authtoken/client/Client.js +17 -0
- package/dist/cjs/api/resources/authtoken/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/authtoken/client/index.js +2 -0
- package/dist/cjs/api/resources/authtoken/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/resources/authtoken/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/resources/authtoken/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/resources/authtoken/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/resources/authtoken/errors/index.d.ts +2 -0
- package/dist/cjs/api/resources/authtoken/errors/index.js +18 -0
- package/dist/cjs/api/resources/authtoken/index.d.ts +4 -0
- package/dist/cjs/api/resources/authtoken/index.js +20 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +50 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +145 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/index.js +17 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/AuthGenerateTokenRequest.d.ts +16 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/AuthGenerateTokenRequest.js +5 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/index.d.ts +2 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/index.js +18 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/types/AuthGenerateTokenResponse.d.ts +7 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/types/AuthGenerateTokenResponse.js +5 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/authtoken/resources/auth/types/index.js +17 -0
- package/dist/cjs/api/resources/authtoken/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/authtoken/resources/index.js +42 -0
- package/dist/cjs/api/resources/authtoken/types/BadRequestErrorBody.d.ts +8 -0
- package/dist/cjs/api/resources/authtoken/types/BadRequestErrorBody.js +5 -0
- package/dist/cjs/api/resources/authtoken/types/UnauthorizedErrorBody.d.ts +8 -0
- package/dist/cjs/api/resources/authtoken/types/UnauthorizedErrorBody.js +5 -0
- package/dist/cjs/api/resources/authtoken/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/authtoken/types/index.js +18 -0
- package/dist/cjs/api/resources/cohort/client/Client.d.ts +51 -0
- package/dist/cjs/api/resources/cohort/client/Client.js +134 -0
- package/dist/cjs/api/resources/cohort/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/cohort/client/index.js +17 -0
- package/dist/cjs/api/resources/cohort/client/requests/CohortRequest.d.ts +13 -0
- package/dist/cjs/api/resources/cohort/client/requests/CohortRequest.js +5 -0
- package/dist/cjs/api/resources/cohort/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/cohort/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/cohort/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/resources/cohort/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/resources/cohort/errors/InternalServerError.d.ts +8 -0
- package/dist/cjs/api/resources/cohort/errors/InternalServerError.js +52 -0
- package/dist/cjs/api/resources/cohort/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/resources/cohort/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/resources/cohort/errors/index.d.ts +3 -0
- package/dist/cjs/api/resources/cohort/errors/index.js +19 -0
- package/dist/cjs/api/resources/cohort/index.d.ts +3 -0
- package/dist/cjs/api/resources/cohort/index.js +19 -0
- package/dist/cjs/api/resources/cohort/types/CohortResponse.d.ts +12 -0
- package/dist/cjs/api/resources/cohort/types/CohortResponse.js +5 -0
- package/dist/cjs/api/resources/cohort/types/SearchConcept.d.ts +13 -0
- package/dist/cjs/api/resources/cohort/types/SearchConcept.js +5 -0
- package/dist/cjs/api/resources/cohort/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/cohort/types/index.js +18 -0
- package/dist/cjs/api/resources/construe/client/Client.d.ts +94 -0
- package/dist/cjs/api/resources/construe/client/Client.js +295 -0
- package/dist/cjs/api/resources/construe/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/construe/client/index.js +17 -0
- package/dist/cjs/api/resources/construe/client/requests/ConstrueCohortRequest.d.ts +26 -0
- package/dist/cjs/api/resources/construe/client/requests/ConstrueCohortRequest.js +5 -0
- package/dist/cjs/api/resources/construe/client/requests/ExtractRequest.d.ts +16 -0
- package/dist/cjs/api/resources/construe/client/requests/ExtractRequest.js +5 -0
- package/dist/cjs/api/resources/construe/client/requests/UploadRequest.d.ts +40 -0
- package/dist/cjs/api/resources/construe/client/requests/UploadRequest.js +13 -0
- package/dist/cjs/api/resources/construe/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/construe/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/construe/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/resources/construe/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/resources/construe/errors/ConflictError.d.ts +8 -0
- package/dist/cjs/api/resources/construe/errors/ConflictError.js +52 -0
- package/dist/cjs/api/resources/construe/errors/FailedDependencyError.d.ts +8 -0
- package/dist/cjs/api/resources/construe/errors/FailedDependencyError.js +52 -0
- package/dist/cjs/api/resources/construe/errors/InternalServerError.d.ts +8 -0
- package/dist/cjs/api/resources/construe/errors/InternalServerError.js +52 -0
- package/dist/cjs/api/resources/construe/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/resources/construe/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/resources/construe/errors/index.d.ts +5 -0
- package/dist/cjs/api/resources/construe/errors/index.js +21 -0
- package/dist/cjs/api/resources/construe/index.d.ts +3 -0
- package/dist/cjs/api/resources/construe/index.js +19 -0
- package/dist/cjs/api/resources/construe/types/BadRequestErrorBody.d.ts +9 -0
- package/dist/cjs/api/resources/construe/types/BadRequestErrorBody.js +5 -0
- package/dist/cjs/api/resources/construe/types/ConstrueCohortResponse.d.ts +49 -0
- package/dist/cjs/api/resources/construe/types/ConstrueCohortResponse.js +5 -0
- package/dist/cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.ts +6 -0
- package/dist/cjs/api/resources/construe/types/ConstrueUploadCodeSystemResponse.js +5 -0
- package/dist/cjs/api/resources/construe/types/ExtractCodesResult.d.ts +8 -0
- package/dist/cjs/api/resources/construe/types/ExtractCodesResult.js +5 -0
- package/dist/cjs/api/resources/construe/types/ExtractRequestConfig.d.ts +18 -0
- package/dist/cjs/api/resources/construe/types/ExtractRequestConfig.js +15 -0
- package/dist/cjs/api/resources/construe/types/ExtractRequestSystem.d.ts +21 -0
- package/dist/cjs/api/resources/construe/types/ExtractRequestSystem.js +5 -0
- package/dist/cjs/api/resources/construe/types/ExtractedCodeResult.d.ts +13 -0
- package/dist/cjs/api/resources/construe/types/ExtractedCodeResult.js +5 -0
- package/dist/cjs/api/resources/construe/types/InternalServerErrorBody.d.ts +9 -0
- package/dist/cjs/api/resources/construe/types/InternalServerErrorBody.js +5 -0
- package/dist/cjs/api/resources/construe/types/UnauthorizedErrorBody.d.ts +9 -0
- package/dist/cjs/api/resources/construe/types/UnauthorizedErrorBody.js +5 -0
- package/dist/cjs/api/resources/construe/types/index.d.ts +9 -0
- package/dist/cjs/api/resources/construe/types/index.js +25 -0
- package/dist/cjs/api/resources/index.d.ts +6 -0
- package/dist/cjs/api/resources/index.js +42 -0
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +111 -0
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +360 -0
- package/dist/cjs/api/resources/lang2Fhir/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/lang2Fhir/client/index.js +17 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateRequest.d.ts +43 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateRequest.js +27 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.d.ts +42 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.js +19 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.ts +19 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.js +5 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/SearchRequest.d.ts +13 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/SearchRequest.js +5 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/lang2Fhir/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.d.ts +8 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/FailedDependencyError.js +52 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/ForbiddenError.d.ts +8 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/ForbiddenError.js +52 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/InternalServerError.d.ts +8 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/InternalServerError.js +52 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/index.d.ts +5 -0
- package/dist/cjs/api/resources/lang2Fhir/errors/index.js +21 -0
- package/dist/cjs/api/resources/lang2Fhir/index.d.ts +3 -0
- package/dist/cjs/api/resources/lang2Fhir/index.js +19 -0
- package/dist/cjs/api/resources/lang2Fhir/types/FhirResource.d.ts +7 -0
- package/dist/cjs/api/resources/lang2Fhir/types/FhirResource.js +5 -0
- package/dist/cjs/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.d.ts +10 -0
- package/dist/cjs/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.js +5 -0
- package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +9 -0
- package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.js +5 -0
- package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/lang2Fhir/types/index.js +19 -0
- package/dist/cjs/api/resources/tools/client/Client.d.ts +95 -0
- package/dist/cjs/api/resources/tools/client/Client.js +302 -0
- package/dist/cjs/api/resources/tools/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/client/index.js +17 -0
- package/dist/cjs/api/resources/tools/client/requests/CohortRequest.d.ts +30 -0
- package/dist/cjs/api/resources/tools/client/requests/CohortRequest.js +15 -0
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.ts +54 -0
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.js +33 -0
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +35 -0
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.js +15 -0
- package/dist/cjs/api/resources/tools/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/tools/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tools/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/resources/tools/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/resources/tools/errors/FailedDependencyError.d.ts +8 -0
- package/dist/cjs/api/resources/tools/errors/FailedDependencyError.js +52 -0
- package/dist/cjs/api/resources/tools/errors/ForbiddenError.d.ts +8 -0
- package/dist/cjs/api/resources/tools/errors/ForbiddenError.js +52 -0
- package/dist/cjs/api/resources/tools/errors/InternalServerError.d.ts +8 -0
- package/dist/cjs/api/resources/tools/errors/InternalServerError.js +52 -0
- package/dist/cjs/api/resources/tools/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/resources/tools/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/resources/tools/errors/index.d.ts +5 -0
- package/dist/cjs/api/resources/tools/errors/index.js +21 -0
- package/dist/cjs/api/resources/tools/index.d.ts +4 -0
- package/dist/cjs/api/resources/tools/index.js +20 -0
- package/dist/cjs/api/resources/tools/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/index.js +41 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.d.ts +100 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +337 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/index.js +17 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/requests/McpServerCreateRequest.d.ts +16 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/requests/McpServerCreateRequest.js +5 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/index.js +18 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/index.js +41 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +100 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +338 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/index.js +17 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/requests/McpServerToolCallRequest.d.ts +15 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/requests/McpServerToolCallRequest.js +5 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/index.d.ts +1 -0
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/index.js +17 -0
- package/dist/cjs/api/resources/tools/types/CohortResponse.d.ts +16 -0
- package/dist/cjs/api/resources/tools/types/CohortResponse.js +5 -0
- package/dist/cjs/api/resources/tools/types/FhirClientConfig.d.ts +12 -0
- package/dist/cjs/api/resources/tools/types/FhirClientConfig.js +5 -0
- package/dist/cjs/api/resources/tools/types/Lang2FhirAndCreateResponse.d.ts +12 -0
- package/dist/cjs/api/resources/tools/types/Lang2FhirAndCreateResponse.js +5 -0
- package/dist/cjs/api/resources/tools/types/Lang2FhirAndSearchResponse.d.ts +14 -0
- package/dist/cjs/api/resources/tools/types/Lang2FhirAndSearchResponse.js +5 -0
- package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +30 -0
- package/dist/cjs/api/resources/tools/types/McpServerResponse.js +5 -0
- package/dist/cjs/api/resources/tools/types/McpServerToolCallResponse.d.ts +13 -0
- package/dist/cjs/api/resources/tools/types/McpServerToolCallResponse.js +5 -0
- package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +34 -0
- package/dist/cjs/api/resources/tools/types/McpServerToolResponse.js +5 -0
- package/dist/cjs/api/resources/tools/types/SearchConcept.d.ts +16 -0
- package/dist/cjs/api/resources/tools/types/SearchConcept.js +5 -0
- package/dist/cjs/api/resources/tools/types/index.d.ts +8 -0
- package/dist/cjs/api/resources/tools/types/index.js +24 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +26 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +5 -0
- package/dist/cjs/core/auth/BearerToken.js +15 -0
- package/dist/cjs/core/auth/index.d.ts +4 -0
- package/dist/cjs/core/auth/index.js +7 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/APIResponse.js +2 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +40 -0
- package/dist/cjs/core/fetcher/Fetcher.js +120 -0
- package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
- package/dist/cjs/core/fetcher/Headers.js +84 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/cjs/core/fetcher/RawResponse.js +44 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +4 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.js +6 -0
- package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/dist/cjs/core/fetcher/Supplier.js +22 -0
- package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +44 -0
- package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
- package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/dist/cjs/core/fetcher/getHeader.js +11 -0
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/cjs/core/fetcher/getRequestBody.js +23 -0
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +55 -0
- package/dist/cjs/core/fetcher/index.d.ts +9 -0
- package/dist/cjs/core/fetcher/index.js +15 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/cjs/core/fetcher/makeRequest.js +42 -0
- package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/cjs/core/fetcher/requestWithRetries.js +40 -0
- package/dist/cjs/core/fetcher/signals.d.ts +11 -0
- package/dist/cjs/core/fetcher/signals.js +36 -0
- package/dist/cjs/core/headers.d.ts +3 -0
- package/dist/cjs/core/headers.js +29 -0
- package/dist/cjs/core/index.d.ts +5 -0
- package/dist/cjs/core/index.js +44 -0
- package/dist/cjs/core/json.d.ts +15 -0
- package/dist/cjs/core/json.js +24 -0
- package/dist/cjs/core/runtime/index.d.ts +1 -0
- package/dist/cjs/core/runtime/index.js +5 -0
- package/dist/cjs/core/runtime/runtime.d.ts +9 -0
- package/dist/cjs/core/runtime/runtime.js +102 -0
- package/dist/cjs/core/url/index.d.ts +2 -0
- package/dist/cjs/core/url/index.js +7 -0
- package/dist/cjs/core/url/join.d.ts +1 -0
- package/dist/cjs/core/url/join.js +69 -0
- package/dist/cjs/core/url/qs.d.ts +6 -0
- package/dist/cjs/core/url/qs.js +64 -0
- package/dist/cjs/environments.d.ts +7 -0
- package/dist/cjs/environments.js +9 -0
- package/dist/cjs/errors/index.d.ts +2 -0
- package/dist/cjs/errors/index.js +7 -0
- package/dist/cjs/errors/phenomlError.d.ts +15 -0
- package/dist/cjs/errors/phenomlError.js +30 -0
- package/dist/cjs/errors/phenomlTimeoutError.d.ts +6 -0
- package/dist/cjs/errors/phenomlTimeoutError.js +13 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +44 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/Client.d.mts +50 -0
- package/dist/esm/Client.mjs +47 -0
- package/dist/esm/WrapperClient.d.mts +21 -0
- package/dist/esm/WrapperClient.mjs +74 -0
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +1 -0
- package/dist/esm/api/resources/agent/client/Client.d.mts +187 -0
- package/dist/esm/api/resources/agent/client/Client.mjs +633 -0
- package/dist/esm/api/resources/agent/client/index.d.mts +2 -0
- package/dist/esm/api/resources/agent/client/index.mjs +1 -0
- package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +23 -0
- package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.mjs +4 -0
- package/dist/esm/api/resources/agent/client/requests/AgentCreateRequest.d.mts +29 -0
- package/dist/esm/api/resources/agent/client/requests/AgentCreateRequest.mjs +4 -0
- package/dist/esm/api/resources/agent/client/requests/AgentGetChatMessagesRequest.d.mts +20 -0
- package/dist/esm/api/resources/agent/client/requests/AgentGetChatMessagesRequest.mjs +4 -0
- package/dist/esm/api/resources/agent/client/requests/AgentListRequest.d.mts +13 -0
- package/dist/esm/api/resources/agent/client/requests/AgentListRequest.mjs +4 -0
- package/dist/esm/api/resources/agent/client/requests/AgentUpdateRequest.d.mts +25 -0
- package/dist/esm/api/resources/agent/client/requests/AgentUpdateRequest.mjs +4 -0
- package/dist/esm/api/resources/agent/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/agent/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/agent/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/resources/agent/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/resources/agent/errors/ForbiddenError.d.mts +8 -0
- package/dist/esm/api/resources/agent/errors/ForbiddenError.mjs +15 -0
- package/dist/esm/api/resources/agent/errors/InternalServerError.d.mts +8 -0
- package/dist/esm/api/resources/agent/errors/InternalServerError.mjs +15 -0
- package/dist/esm/api/resources/agent/errors/NotFoundError.d.mts +8 -0
- package/dist/esm/api/resources/agent/errors/NotFoundError.mjs +15 -0
- package/dist/esm/api/resources/agent/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/resources/agent/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/resources/agent/errors/index.d.mts +5 -0
- package/dist/esm/api/resources/agent/errors/index.mjs +5 -0
- package/dist/esm/api/resources/agent/index.d.mts +4 -0
- package/dist/esm/api/resources/agent/index.mjs +4 -0
- package/dist/esm/api/resources/agent/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/agent/resources/index.mjs +3 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +161 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +527 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/index.d.mts +2 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/index.mjs +1 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.mts +25 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.mjs +4 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.mts +21 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.mjs +4 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/agent/resources/prompts/index.d.mts +2 -0
- package/dist/esm/api/resources/agent/resources/prompts/index.mjs +2 -0
- package/dist/esm/api/resources/agent/resources/prompts/types/PromptsDeleteResponse.d.mts +7 -0
- package/dist/esm/api/resources/agent/resources/prompts/types/PromptsDeleteResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/resources/prompts/types/PromptsListResponse.d.mts +9 -0
- package/dist/esm/api/resources/agent/resources/prompts/types/PromptsListResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/resources/prompts/types/index.d.mts +2 -0
- package/dist/esm/api/resources/agent/resources/prompts/types/index.mjs +2 -0
- package/dist/esm/api/resources/agent/types/AgentChatResponse.d.mts +12 -0
- package/dist/esm/api/resources/agent/types/AgentChatResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/types/AgentDeleteResponse.d.mts +7 -0
- package/dist/esm/api/resources/agent/types/AgentDeleteResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/types/AgentFhirConfig.d.mts +12 -0
- package/dist/esm/api/resources/agent/types/AgentFhirConfig.mjs +4 -0
- package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestOrder.d.mts +8 -0
- package/dist/esm/api/resources/agent/types/AgentGetChatMessagesRequestOrder.mjs +7 -0
- package/dist/esm/api/resources/agent/types/AgentGetChatMessagesResponse.d.mts +9 -0
- package/dist/esm/api/resources/agent/types/AgentGetChatMessagesResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/types/AgentListResponse.d.mts +9 -0
- package/dist/esm/api/resources/agent/types/AgentListResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/types/AgentPromptsResponse.d.mts +9 -0
- package/dist/esm/api/resources/agent/types/AgentPromptsResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/types/AgentProvider.d.mts +11 -0
- package/dist/esm/api/resources/agent/types/AgentProvider.mjs +4 -0
- package/dist/esm/api/resources/agent/types/AgentResponse.d.mts +9 -0
- package/dist/esm/api/resources/agent/types/AgentResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/types/AgentTemplate.d.mts +23 -0
- package/dist/esm/api/resources/agent/types/AgentTemplate.mjs +4 -0
- package/dist/esm/api/resources/agent/types/ChatFhirClientConfig.d.mts +12 -0
- package/dist/esm/api/resources/agent/types/ChatFhirClientConfig.mjs +4 -0
- package/dist/esm/api/resources/agent/types/ChatMessageTemplate.d.mts +27 -0
- package/dist/esm/api/resources/agent/types/ChatMessageTemplate.mjs +4 -0
- package/dist/esm/api/resources/agent/types/ChatSessionTemplate.d.mts +25 -0
- package/dist/esm/api/resources/agent/types/ChatSessionTemplate.mjs +4 -0
- package/dist/esm/api/resources/agent/types/JsonPatch.d.mts +8 -0
- package/dist/esm/api/resources/agent/types/JsonPatch.mjs +4 -0
- package/dist/esm/api/resources/agent/types/JsonPatchOperation.d.mts +26 -0
- package/dist/esm/api/resources/agent/types/JsonPatchOperation.mjs +14 -0
- package/dist/esm/api/resources/agent/types/PromptTemplate.d.mts +19 -0
- package/dist/esm/api/resources/agent/types/PromptTemplate.mjs +4 -0
- package/dist/esm/api/resources/agent/types/ProviderType.d.mts +13 -0
- package/dist/esm/api/resources/agent/types/ProviderType.mjs +9 -0
- package/dist/esm/api/resources/agent/types/SuccessResponse.d.mts +7 -0
- package/dist/esm/api/resources/agent/types/SuccessResponse.mjs +4 -0
- package/dist/esm/api/resources/agent/types/index.d.mts +18 -0
- package/dist/esm/api/resources/agent/types/index.mjs +18 -0
- package/dist/esm/api/resources/authtoken/client/Client.d.mts +23 -0
- package/dist/esm/api/resources/authtoken/client/Client.mjs +13 -0
- package/dist/esm/api/resources/authtoken/client/index.d.mts +1 -0
- package/dist/esm/api/resources/authtoken/client/index.mjs +1 -0
- package/dist/esm/api/resources/authtoken/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/resources/authtoken/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/resources/authtoken/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/resources/authtoken/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/resources/authtoken/errors/index.d.mts +2 -0
- package/dist/esm/api/resources/authtoken/errors/index.mjs +2 -0
- package/dist/esm/api/resources/authtoken/index.d.mts +4 -0
- package/dist/esm/api/resources/authtoken/index.mjs +4 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +50 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +108 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/index.d.mts +2 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/index.mjs +1 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/AuthGenerateTokenRequest.d.mts +16 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/AuthGenerateTokenRequest.mjs +4 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/authtoken/resources/auth/index.d.mts +2 -0
- package/dist/esm/api/resources/authtoken/resources/auth/index.mjs +2 -0
- package/dist/esm/api/resources/authtoken/resources/auth/types/AuthGenerateTokenResponse.d.mts +7 -0
- package/dist/esm/api/resources/authtoken/resources/auth/types/AuthGenerateTokenResponse.mjs +4 -0
- package/dist/esm/api/resources/authtoken/resources/auth/types/index.d.mts +1 -0
- package/dist/esm/api/resources/authtoken/resources/auth/types/index.mjs +1 -0
- package/dist/esm/api/resources/authtoken/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/authtoken/resources/index.mjs +3 -0
- package/dist/esm/api/resources/authtoken/types/BadRequestErrorBody.d.mts +8 -0
- package/dist/esm/api/resources/authtoken/types/BadRequestErrorBody.mjs +4 -0
- package/dist/esm/api/resources/authtoken/types/UnauthorizedErrorBody.d.mts +8 -0
- package/dist/esm/api/resources/authtoken/types/UnauthorizedErrorBody.mjs +4 -0
- 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 +51 -0
- package/dist/esm/api/resources/cohort/client/Client.mjs +97 -0
- package/dist/esm/api/resources/cohort/client/index.d.mts +2 -0
- package/dist/esm/api/resources/cohort/client/index.mjs +1 -0
- package/dist/esm/api/resources/cohort/client/requests/CohortRequest.d.mts +13 -0
- package/dist/esm/api/resources/cohort/client/requests/CohortRequest.mjs +4 -0
- package/dist/esm/api/resources/cohort/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/cohort/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/cohort/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/resources/cohort/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/resources/cohort/errors/InternalServerError.d.mts +8 -0
- package/dist/esm/api/resources/cohort/errors/InternalServerError.mjs +15 -0
- package/dist/esm/api/resources/cohort/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/resources/cohort/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/resources/cohort/errors/index.d.mts +3 -0
- package/dist/esm/api/resources/cohort/errors/index.mjs +3 -0
- package/dist/esm/api/resources/cohort/index.d.mts +3 -0
- package/dist/esm/api/resources/cohort/index.mjs +3 -0
- package/dist/esm/api/resources/cohort/types/CohortResponse.d.mts +12 -0
- package/dist/esm/api/resources/cohort/types/CohortResponse.mjs +4 -0
- package/dist/esm/api/resources/cohort/types/SearchConcept.d.mts +13 -0
- package/dist/esm/api/resources/cohort/types/SearchConcept.mjs +4 -0
- package/dist/esm/api/resources/cohort/types/index.d.mts +2 -0
- package/dist/esm/api/resources/cohort/types/index.mjs +2 -0
- package/dist/esm/api/resources/construe/client/Client.d.mts +94 -0
- package/dist/esm/api/resources/construe/client/Client.mjs +258 -0
- package/dist/esm/api/resources/construe/client/index.d.mts +2 -0
- package/dist/esm/api/resources/construe/client/index.mjs +1 -0
- package/dist/esm/api/resources/construe/client/requests/ConstrueCohortRequest.d.mts +26 -0
- package/dist/esm/api/resources/construe/client/requests/ConstrueCohortRequest.mjs +4 -0
- package/dist/esm/api/resources/construe/client/requests/ExtractRequest.d.mts +16 -0
- package/dist/esm/api/resources/construe/client/requests/ExtractRequest.mjs +4 -0
- package/dist/esm/api/resources/construe/client/requests/UploadRequest.d.mts +40 -0
- package/dist/esm/api/resources/construe/client/requests/UploadRequest.mjs +10 -0
- package/dist/esm/api/resources/construe/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/construe/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/construe/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/resources/construe/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/resources/construe/errors/ConflictError.d.mts +8 -0
- package/dist/esm/api/resources/construe/errors/ConflictError.mjs +15 -0
- package/dist/esm/api/resources/construe/errors/FailedDependencyError.d.mts +8 -0
- package/dist/esm/api/resources/construe/errors/FailedDependencyError.mjs +15 -0
- package/dist/esm/api/resources/construe/errors/InternalServerError.d.mts +8 -0
- package/dist/esm/api/resources/construe/errors/InternalServerError.mjs +15 -0
- package/dist/esm/api/resources/construe/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/resources/construe/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/resources/construe/errors/index.d.mts +5 -0
- package/dist/esm/api/resources/construe/errors/index.mjs +5 -0
- package/dist/esm/api/resources/construe/index.d.mts +3 -0
- package/dist/esm/api/resources/construe/index.mjs +3 -0
- package/dist/esm/api/resources/construe/types/BadRequestErrorBody.d.mts +9 -0
- package/dist/esm/api/resources/construe/types/BadRequestErrorBody.mjs +4 -0
- package/dist/esm/api/resources/construe/types/ConstrueCohortResponse.d.mts +49 -0
- package/dist/esm/api/resources/construe/types/ConstrueCohortResponse.mjs +4 -0
- package/dist/esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.d.mts +6 -0
- package/dist/esm/api/resources/construe/types/ConstrueUploadCodeSystemResponse.mjs +4 -0
- package/dist/esm/api/resources/construe/types/ExtractCodesResult.d.mts +8 -0
- package/dist/esm/api/resources/construe/types/ExtractCodesResult.mjs +4 -0
- package/dist/esm/api/resources/construe/types/ExtractRequestConfig.d.mts +18 -0
- package/dist/esm/api/resources/construe/types/ExtractRequestConfig.mjs +12 -0
- package/dist/esm/api/resources/construe/types/ExtractRequestSystem.d.mts +21 -0
- package/dist/esm/api/resources/construe/types/ExtractRequestSystem.mjs +4 -0
- package/dist/esm/api/resources/construe/types/ExtractedCodeResult.d.mts +13 -0
- package/dist/esm/api/resources/construe/types/ExtractedCodeResult.mjs +4 -0
- package/dist/esm/api/resources/construe/types/InternalServerErrorBody.d.mts +9 -0
- package/dist/esm/api/resources/construe/types/InternalServerErrorBody.mjs +4 -0
- package/dist/esm/api/resources/construe/types/UnauthorizedErrorBody.d.mts +9 -0
- package/dist/esm/api/resources/construe/types/UnauthorizedErrorBody.mjs +4 -0
- package/dist/esm/api/resources/construe/types/index.d.mts +9 -0
- package/dist/esm/api/resources/construe/types/index.mjs +9 -0
- package/dist/esm/api/resources/index.d.mts +6 -0
- package/dist/esm/api/resources/index.mjs +6 -0
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +111 -0
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +323 -0
- package/dist/esm/api/resources/lang2Fhir/client/index.d.mts +2 -0
- package/dist/esm/api/resources/lang2Fhir/client/index.mjs +1 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/CreateRequest.d.mts +43 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/CreateRequest.mjs +24 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.d.mts +42 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.mjs +16 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.mts +19 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.mjs +4 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/SearchRequest.d.mts +13 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/SearchRequest.mjs +4 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/lang2Fhir/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/lang2Fhir/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/resources/lang2Fhir/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.d.mts +8 -0
- package/dist/esm/api/resources/lang2Fhir/errors/FailedDependencyError.mjs +15 -0
- package/dist/esm/api/resources/lang2Fhir/errors/ForbiddenError.d.mts +8 -0
- package/dist/esm/api/resources/lang2Fhir/errors/ForbiddenError.mjs +15 -0
- package/dist/esm/api/resources/lang2Fhir/errors/InternalServerError.d.mts +8 -0
- package/dist/esm/api/resources/lang2Fhir/errors/InternalServerError.mjs +15 -0
- package/dist/esm/api/resources/lang2Fhir/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/resources/lang2Fhir/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/resources/lang2Fhir/errors/index.d.mts +5 -0
- package/dist/esm/api/resources/lang2Fhir/errors/index.mjs +5 -0
- package/dist/esm/api/resources/lang2Fhir/index.d.mts +3 -0
- package/dist/esm/api/resources/lang2Fhir/index.mjs +3 -0
- package/dist/esm/api/resources/lang2Fhir/types/FhirResource.d.mts +7 -0
- package/dist/esm/api/resources/lang2Fhir/types/FhirResource.mjs +4 -0
- package/dist/esm/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.d.mts +10 -0
- package/dist/esm/api/resources/lang2Fhir/types/Lang2FhirUploadProfileResponse.mjs +4 -0
- package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +9 -0
- package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.mjs +4 -0
- package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +3 -0
- package/dist/esm/api/resources/lang2Fhir/types/index.mjs +3 -0
- package/dist/esm/api/resources/tools/client/Client.d.mts +95 -0
- package/dist/esm/api/resources/tools/client/Client.mjs +265 -0
- package/dist/esm/api/resources/tools/client/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/client/index.mjs +1 -0
- package/dist/esm/api/resources/tools/client/requests/CohortRequest.d.mts +30 -0
- package/dist/esm/api/resources/tools/client/requests/CohortRequest.mjs +12 -0
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.mts +54 -0
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.mjs +30 -0
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +35 -0
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.mjs +12 -0
- package/dist/esm/api/resources/tools/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/tools/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tools/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/resources/tools/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/resources/tools/errors/FailedDependencyError.d.mts +8 -0
- package/dist/esm/api/resources/tools/errors/FailedDependencyError.mjs +15 -0
- package/dist/esm/api/resources/tools/errors/ForbiddenError.d.mts +8 -0
- package/dist/esm/api/resources/tools/errors/ForbiddenError.mjs +15 -0
- package/dist/esm/api/resources/tools/errors/InternalServerError.d.mts +8 -0
- package/dist/esm/api/resources/tools/errors/InternalServerError.mjs +15 -0
- package/dist/esm/api/resources/tools/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/resources/tools/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/resources/tools/errors/index.d.mts +5 -0
- package/dist/esm/api/resources/tools/errors/index.mjs +5 -0
- package/dist/esm/api/resources/tools/index.d.mts +4 -0
- package/dist/esm/api/resources/tools/index.mjs +4 -0
- package/dist/esm/api/resources/tools/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/index.mjs +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.d.mts +100 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +300 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/requests/McpServerCreateRequest.d.mts +16 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/requests/McpServerCreateRequest.mjs +4 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/index.mjs +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/index.mjs +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +100 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +301 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/requests/McpServerToolCallRequest.d.mts +15 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/requests/McpServerToolCallRequest.mjs +4 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/index.mjs +1 -0
- package/dist/esm/api/resources/tools/types/CohortResponse.d.mts +16 -0
- package/dist/esm/api/resources/tools/types/CohortResponse.mjs +4 -0
- package/dist/esm/api/resources/tools/types/FhirClientConfig.d.mts +12 -0
- package/dist/esm/api/resources/tools/types/FhirClientConfig.mjs +4 -0
- package/dist/esm/api/resources/tools/types/Lang2FhirAndCreateResponse.d.mts +12 -0
- package/dist/esm/api/resources/tools/types/Lang2FhirAndCreateResponse.mjs +4 -0
- package/dist/esm/api/resources/tools/types/Lang2FhirAndSearchResponse.d.mts +14 -0
- package/dist/esm/api/resources/tools/types/Lang2FhirAndSearchResponse.mjs +4 -0
- package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +30 -0
- package/dist/esm/api/resources/tools/types/McpServerResponse.mjs +4 -0
- package/dist/esm/api/resources/tools/types/McpServerToolCallResponse.d.mts +13 -0
- package/dist/esm/api/resources/tools/types/McpServerToolCallResponse.mjs +4 -0
- package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +34 -0
- package/dist/esm/api/resources/tools/types/McpServerToolResponse.mjs +4 -0
- package/dist/esm/api/resources/tools/types/SearchConcept.d.mts +16 -0
- package/dist/esm/api/resources/tools/types/SearchConcept.mjs +4 -0
- package/dist/esm/api/resources/tools/types/index.d.mts +8 -0
- package/dist/esm/api/resources/tools/types/index.mjs +8 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +23 -0
- package/dist/esm/core/auth/BearerToken.d.mts +5 -0
- package/dist/esm/core/auth/BearerToken.mjs +12 -0
- package/dist/esm/core/auth/index.d.mts +4 -0
- package/dist/esm/core/auth/index.mjs +2 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +40 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +116 -0
- package/dist/esm/core/fetcher/Headers.d.mts +2 -0
- package/dist/esm/core/fetcher/Headers.mjs +82 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +4 -0
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +3 -0
- package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
- package/dist/esm/core/fetcher/Supplier.mjs +19 -0
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +41 -0
- package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
- package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
- package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
- package/dist/esm/core/fetcher/getHeader.mjs +8 -0
- package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/dist/esm/core/fetcher/getRequestBody.mjs +20 -0
- package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +52 -0
- package/dist/esm/core/fetcher/index.d.mts +9 -0
- package/dist/esm/core/fetcher/index.mjs +5 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
- package/dist/esm/core/fetcher/makeRequest.mjs +38 -0
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/dist/esm/core/fetcher/requestWithRetries.mjs +37 -0
- package/dist/esm/core/fetcher/signals.d.mts +11 -0
- package/dist/esm/core/fetcher/signals.mjs +32 -0
- package/dist/esm/core/headers.d.mts +3 -0
- package/dist/esm/core/headers.mjs +25 -0
- package/dist/esm/core/index.d.mts +5 -0
- package/dist/esm/core/index.mjs +5 -0
- package/dist/esm/core/json.d.mts +15 -0
- package/dist/esm/core/json.mjs +19 -0
- package/dist/esm/core/runtime/index.d.mts +1 -0
- package/dist/esm/core/runtime/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.d.mts +9 -0
- package/dist/esm/core/runtime/runtime.mjs +99 -0
- package/dist/esm/core/url/index.d.mts +2 -0
- package/dist/esm/core/url/index.mjs +2 -0
- package/dist/esm/core/url/join.d.mts +1 -0
- package/dist/esm/core/url/join.mjs +66 -0
- package/dist/esm/core/url/qs.d.mts +6 -0
- package/dist/esm/core/url/qs.mjs +61 -0
- package/dist/esm/environments.d.mts +7 -0
- package/dist/esm/environments.mjs +6 -0
- package/dist/esm/errors/index.d.mts +2 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/errors/phenomlError.d.mts +15 -0
- package/dist/esm/errors/phenomlError.mjs +26 -0
- package/dist/esm/errors/phenomlTimeoutError.d.mts +6 -0
- package/dist/esm/errors/phenomlTimeoutError.mjs +9 -0
- package/dist/esm/index.d.mts +4 -0
- package/dist/esm/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +65 -0
- package/reference.md +2330 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 phenoml
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Phenoml TypeScript Library
|
|
2
|
+
|
|
3
|
+
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ffern-demo%2Fphenoml-ts-sdk)
|
|
4
|
+
[](https://www.npmjs.com/package/phenoml)
|
|
5
|
+
|
|
6
|
+
The Phenoml TypeScript library provides convenient access to the Phenoml APIs from TypeScript.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm i -s phenoml
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Reference
|
|
15
|
+
|
|
16
|
+
A full reference for this library is available [here](https://github.com/fern-demo/phenoml-ts-sdk/blob/HEAD/./reference.md).
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Instantiate and use the client with the following:
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { PhenoMLClient } from "phenoml";
|
|
24
|
+
|
|
25
|
+
const client = new PhenoMLClient({
|
|
26
|
+
username: "your_username",
|
|
27
|
+
password: "your_password",
|
|
28
|
+
baseUrl: "https://your-phenoml-instance.com"
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
await client.agent.create({
|
|
33
|
+
name: "name",
|
|
34
|
+
prompts: ["prompt_123", "prompt_456"],
|
|
35
|
+
is_active: true,
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Request And Response Types
|
|
40
|
+
|
|
41
|
+
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
42
|
+
following namespace:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { phenoml } from "phenoml";
|
|
46
|
+
|
|
47
|
+
const request: phenoml.AgentCreateRequest = {
|
|
48
|
+
...
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Exception Handling
|
|
53
|
+
|
|
54
|
+
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
|
|
55
|
+
will be thrown.
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { phenomlError } from "phenoml";
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
await client.agent.create(...);
|
|
62
|
+
} catch (err) {
|
|
63
|
+
if (err instanceof phenomlError) {
|
|
64
|
+
console.log(err.statusCode);
|
|
65
|
+
console.log(err.message);
|
|
66
|
+
console.log(err.body);
|
|
67
|
+
console.log(err.rawResponse);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Advanced
|
|
73
|
+
|
|
74
|
+
### Additional Headers
|
|
75
|
+
|
|
76
|
+
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
const response = await client.agent.create(..., {
|
|
80
|
+
headers: {
|
|
81
|
+
'X-Custom-Header': 'custom value'
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Additional Query String Parameters
|
|
87
|
+
|
|
88
|
+
If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
const response = await client.agent.create(..., {
|
|
92
|
+
queryParams: {
|
|
93
|
+
'customQueryParamKey': 'custom query param value'
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Retries
|
|
99
|
+
|
|
100
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
101
|
+
as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
|
|
102
|
+
retry limit (default: 2).
|
|
103
|
+
|
|
104
|
+
A request is deemed retryable when any of the following HTTP status codes is returned:
|
|
105
|
+
|
|
106
|
+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
107
|
+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
108
|
+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
109
|
+
|
|
110
|
+
Use the `maxRetries` request option to configure this behavior.
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
const response = await client.agent.create(..., {
|
|
114
|
+
maxRetries: 0 // override maxRetries at the request level
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Timeouts
|
|
119
|
+
|
|
120
|
+
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
const response = await client.agent.create(..., {
|
|
124
|
+
timeoutInSeconds: 30 // override timeout to 30s
|
|
125
|
+
});
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Aborting Requests
|
|
129
|
+
|
|
130
|
+
The SDK allows users to abort requests at any point by passing in an abort signal.
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
const controller = new AbortController();
|
|
134
|
+
const response = await client.agent.create(..., {
|
|
135
|
+
abortSignal: controller.signal
|
|
136
|
+
});
|
|
137
|
+
controller.abort(); // aborts the request
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Access Raw Response Data
|
|
141
|
+
|
|
142
|
+
The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
|
|
143
|
+
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
const { data, rawResponse } = await client.agent.create(...).withRawResponse();
|
|
147
|
+
|
|
148
|
+
console.log(data);
|
|
149
|
+
console.log(rawResponse.headers['X-My-Header']);
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Runtime Compatibility
|
|
153
|
+
|
|
154
|
+
The SDK works in the following runtimes:
|
|
155
|
+
|
|
156
|
+
- Node.js 18+
|
|
157
|
+
- Vercel
|
|
158
|
+
- Cloudflare Workers
|
|
159
|
+
- Deno v1.25+
|
|
160
|
+
- Bun 1.0+
|
|
161
|
+
- React Native
|
|
162
|
+
|
|
163
|
+
### Customizing Fetch Client
|
|
164
|
+
|
|
165
|
+
The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
|
|
166
|
+
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
import { phenomlClient } from "phenoml";
|
|
170
|
+
|
|
171
|
+
const client = new phenomlClient({
|
|
172
|
+
...
|
|
173
|
+
fetcher: // provide your implementation here
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Contributing
|
|
178
|
+
|
|
179
|
+
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
180
|
+
Additions made directly to this library would have to be moved over to our generation code,
|
|
181
|
+
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
|
|
182
|
+
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
|
183
|
+
an issue first to discuss with us!
|
|
184
|
+
|
|
185
|
+
On the other hand, contributions to the README are always very welcome!
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "./environments.js";
|
|
5
|
+
import * as core from "./core/index.js";
|
|
6
|
+
import { Agent } from "./api/resources/agent/client/Client.js";
|
|
7
|
+
import { Authtoken } from "./api/resources/authtoken/client/Client.js";
|
|
8
|
+
import { Cohort } from "./api/resources/cohort/client/Client.js";
|
|
9
|
+
import { Construe } from "./api/resources/construe/client/Client.js";
|
|
10
|
+
import { Lang2Fhir } from "./api/resources/lang2Fhir/client/Client.js";
|
|
11
|
+
import { Tools } from "./api/resources/tools/client/Client.js";
|
|
12
|
+
export declare namespace phenomlClient {
|
|
13
|
+
interface Options {
|
|
14
|
+
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
15
|
+
/** Specify a custom URL to connect the client to. */
|
|
16
|
+
baseUrl?: core.Supplier<string>;
|
|
17
|
+
token: core.Supplier<core.BearerToken>;
|
|
18
|
+
/** Additional headers to include in requests. */
|
|
19
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
20
|
+
fetcher?: core.FetchFunction;
|
|
21
|
+
}
|
|
22
|
+
interface RequestOptions {
|
|
23
|
+
/** The maximum time to wait for a response in seconds. */
|
|
24
|
+
timeoutInSeconds?: number;
|
|
25
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
26
|
+
maxRetries?: number;
|
|
27
|
+
/** A hook to abort the request. */
|
|
28
|
+
abortSignal?: AbortSignal;
|
|
29
|
+
/** Additional query string parameters to include in the request. */
|
|
30
|
+
queryParams?: Record<string, unknown>;
|
|
31
|
+
/** Additional headers to include in the request. */
|
|
32
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export declare class phenomlClient {
|
|
36
|
+
protected readonly _options: phenomlClient.Options;
|
|
37
|
+
protected _agent: Agent | undefined;
|
|
38
|
+
protected _authtoken: Authtoken | undefined;
|
|
39
|
+
protected _cohort: Cohort | undefined;
|
|
40
|
+
protected _construe: Construe | undefined;
|
|
41
|
+
protected _lang2Fhir: Lang2Fhir | undefined;
|
|
42
|
+
protected _tools: Tools | undefined;
|
|
43
|
+
constructor(_options: phenomlClient.Options);
|
|
44
|
+
get agent(): Agent;
|
|
45
|
+
get authtoken(): Authtoken;
|
|
46
|
+
get cohort(): Cohort;
|
|
47
|
+
get construe(): Construe;
|
|
48
|
+
get lang2Fhir(): Lang2Fhir;
|
|
49
|
+
get tools(): Tools;
|
|
50
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.phenomlClient = void 0;
|
|
40
|
+
const core = __importStar(require("./core/index.js"));
|
|
41
|
+
const headers_js_1 = require("./core/headers.js");
|
|
42
|
+
const Client_js_1 = require("./api/resources/agent/client/Client.js");
|
|
43
|
+
const Client_js_2 = require("./api/resources/authtoken/client/Client.js");
|
|
44
|
+
const Client_js_3 = require("./api/resources/cohort/client/Client.js");
|
|
45
|
+
const Client_js_4 = require("./api/resources/construe/client/Client.js");
|
|
46
|
+
const Client_js_5 = require("./api/resources/lang2Fhir/client/Client.js");
|
|
47
|
+
const Client_js_6 = require("./api/resources/tools/client/Client.js");
|
|
48
|
+
class phenomlClient {
|
|
49
|
+
constructor(_options) {
|
|
50
|
+
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
51
|
+
"X-Fern-Language": "JavaScript",
|
|
52
|
+
"X-Fern-SDK-Name": "phenoml",
|
|
53
|
+
"X-Fern-SDK-Version": "0.0.2",
|
|
54
|
+
"User-Agent": "phenoml/0.0.2",
|
|
55
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
|
+
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
58
|
+
}
|
|
59
|
+
get agent() {
|
|
60
|
+
var _a;
|
|
61
|
+
return ((_a = this._agent) !== null && _a !== void 0 ? _a : (this._agent = new Client_js_1.Agent(this._options)));
|
|
62
|
+
}
|
|
63
|
+
get authtoken() {
|
|
64
|
+
var _a;
|
|
65
|
+
return ((_a = this._authtoken) !== null && _a !== void 0 ? _a : (this._authtoken = new Client_js_2.Authtoken(this._options)));
|
|
66
|
+
}
|
|
67
|
+
get cohort() {
|
|
68
|
+
var _a;
|
|
69
|
+
return ((_a = this._cohort) !== null && _a !== void 0 ? _a : (this._cohort = new Client_js_3.Cohort(this._options)));
|
|
70
|
+
}
|
|
71
|
+
get construe() {
|
|
72
|
+
var _a;
|
|
73
|
+
return ((_a = this._construe) !== null && _a !== void 0 ? _a : (this._construe = new Client_js_4.Construe(this._options)));
|
|
74
|
+
}
|
|
75
|
+
get lang2Fhir() {
|
|
76
|
+
var _a;
|
|
77
|
+
return ((_a = this._lang2Fhir) !== null && _a !== void 0 ? _a : (this._lang2Fhir = new Client_js_5.Lang2Fhir(this._options)));
|
|
78
|
+
}
|
|
79
|
+
get tools() {
|
|
80
|
+
var _a;
|
|
81
|
+
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_6.Tools(this._options)));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.phenomlClient = phenomlClient;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple wrapper client that extends phenomlClient with username/password authentication.
|
|
3
|
+
* Generates token lazily on first API call when username/password are provided.
|
|
4
|
+
*/
|
|
5
|
+
import * as environments from "./environments.js";
|
|
6
|
+
import * as core from "./core/index.js";
|
|
7
|
+
import { phenomlClient } from "./Client.js";
|
|
8
|
+
export declare namespace PhenoMLClient {
|
|
9
|
+
interface Options {
|
|
10
|
+
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
username?: string;
|
|
13
|
+
password?: string;
|
|
14
|
+
token?: core.Supplier<core.BearerToken>;
|
|
15
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export declare class PhenoMLClient extends phenomlClient {
|
|
20
|
+
constructor(options: PhenoMLClient.Options);
|
|
21
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Simple wrapper client that extends phenomlClient with username/password authentication.
|
|
4
|
+
* Generates token lazily on first API call when username/password are provided.
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
40
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
41
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
43
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
44
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
45
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.PhenoMLClient = void 0;
|
|
50
|
+
const environments = __importStar(require("./environments.js"));
|
|
51
|
+
const Client_js_1 = require("./Client.js");
|
|
52
|
+
const Client_js_2 = require("./api/resources/authtoken/resources/auth/client/Client.js");
|
|
53
|
+
// Create a token supplier that generates tokens on-demand
|
|
54
|
+
class TokenSupplier {
|
|
55
|
+
constructor(username, password, baseUrl, fetcher) {
|
|
56
|
+
this._username = username;
|
|
57
|
+
this._password = password;
|
|
58
|
+
this._baseUrl = baseUrl;
|
|
59
|
+
this._fetcher = fetcher;
|
|
60
|
+
}
|
|
61
|
+
get() {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
if (this._cachedToken) {
|
|
64
|
+
return this._cachedToken;
|
|
65
|
+
}
|
|
66
|
+
if (this._tokenPromise) {
|
|
67
|
+
this._cachedToken = yield this._tokenPromise;
|
|
68
|
+
return this._cachedToken;
|
|
69
|
+
}
|
|
70
|
+
this._tokenPromise = this._generateToken();
|
|
71
|
+
this._cachedToken = yield this._tokenPromise;
|
|
72
|
+
return this._cachedToken;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
_generateToken() {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const authClient = new Client_js_2.Auth({
|
|
78
|
+
baseUrl: this._baseUrl,
|
|
79
|
+
fetcher: this._fetcher,
|
|
80
|
+
});
|
|
81
|
+
const response = yield authClient.generateToken({
|
|
82
|
+
username: this._username,
|
|
83
|
+
password: this._password,
|
|
84
|
+
});
|
|
85
|
+
return response.token;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
class PhenoMLClient extends Client_js_1.phenomlClient {
|
|
90
|
+
constructor(options) {
|
|
91
|
+
if (options.token && (options.username || options.password)) {
|
|
92
|
+
throw new Error("Cannot provide both 'token' and 'username'/'password'");
|
|
93
|
+
}
|
|
94
|
+
// If token provided, use directly
|
|
95
|
+
if (options.token) {
|
|
96
|
+
super(options);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
// Validate auth options
|
|
100
|
+
if (!options.username || !options.password) {
|
|
101
|
+
throw new Error("Must provide both 'username' and 'password'");
|
|
102
|
+
}
|
|
103
|
+
// Create token supplier for username/password
|
|
104
|
+
const baseUrl = (typeof options.baseUrl === "string" ? options.baseUrl : undefined) ||
|
|
105
|
+
(typeof options.environment === "string" ? options.environment : undefined) ||
|
|
106
|
+
environments.phenomlEnvironment.Default;
|
|
107
|
+
const tokenSupplier = new TokenSupplier(options.username, options.password, baseUrl, options.fetcher);
|
|
108
|
+
super(Object.assign(Object.assign({}, options), { token: tokenSupplier.get.bind(tokenSupplier), username: undefined, password: undefined }));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.PhenoMLClient = PhenoMLClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./resources/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./resources/index.js"), exports);
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../core/index.js";
|
|
6
|
+
import * as phenoml from "../../../index.js";
|
|
7
|
+
import { Prompts } from "../resources/prompts/client/Client.js";
|
|
8
|
+
export declare namespace Agent {
|
|
9
|
+
interface Options {
|
|
10
|
+
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
11
|
+
/** Specify a custom URL to connect the client to. */
|
|
12
|
+
baseUrl?: core.Supplier<string>;
|
|
13
|
+
token: core.Supplier<core.BearerToken>;
|
|
14
|
+
/** Additional headers to include in requests. */
|
|
15
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
20
|
+
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
/** Additional query string parameters to include in the request. */
|
|
26
|
+
queryParams?: Record<string, unknown>;
|
|
27
|
+
/** Additional headers to include in the request. */
|
|
28
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export declare class Agent {
|
|
32
|
+
protected readonly _options: Agent.Options;
|
|
33
|
+
protected _prompts: Prompts | undefined;
|
|
34
|
+
constructor(_options: Agent.Options);
|
|
35
|
+
get prompts(): Prompts;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a new PhenoAgent with specified configuration
|
|
38
|
+
*
|
|
39
|
+
* @param {phenoml.agent.AgentCreateRequest} request
|
|
40
|
+
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link phenoml.agent.BadRequestError}
|
|
43
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
44
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
45
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.agent.create({
|
|
49
|
+
* name: "name",
|
|
50
|
+
* prompts: ["prompt_123", "prompt_456"],
|
|
51
|
+
* is_active: true
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
create(request: phenoml.agent.AgentCreateRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentResponse>;
|
|
55
|
+
private __create;
|
|
56
|
+
/**
|
|
57
|
+
* Retrieves a list of PhenoAgents belonging to the authenticated user
|
|
58
|
+
*
|
|
59
|
+
* @param {phenoml.agent.AgentListRequest} request
|
|
60
|
+
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
63
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
64
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.agent.list()
|
|
68
|
+
*/
|
|
69
|
+
list(request?: phenoml.agent.AgentListRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentListResponse>;
|
|
70
|
+
private __list;
|
|
71
|
+
/**
|
|
72
|
+
* Retrieves a specific agent by its ID
|
|
73
|
+
*
|
|
74
|
+
* @param {string} id - Agent ID
|
|
75
|
+
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
78
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
79
|
+
* @throws {@link phenoml.agent.NotFoundError}
|
|
80
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.agent.get("id")
|
|
84
|
+
*/
|
|
85
|
+
get(id: string, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentResponse>;
|
|
86
|
+
private __get;
|
|
87
|
+
/**
|
|
88
|
+
* Updates an existing agent's configuration
|
|
89
|
+
*
|
|
90
|
+
* @param {string} id - Agent ID
|
|
91
|
+
* @param {phenoml.agent.AgentUpdateRequest} request
|
|
92
|
+
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link phenoml.agent.BadRequestError}
|
|
95
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
96
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
97
|
+
* @throws {@link phenoml.agent.NotFoundError}
|
|
98
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* await client.agent.update("id")
|
|
102
|
+
*/
|
|
103
|
+
update(id: string, request?: phenoml.agent.AgentUpdateRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentResponse>;
|
|
104
|
+
private __update;
|
|
105
|
+
/**
|
|
106
|
+
* Deletes an existing agent
|
|
107
|
+
*
|
|
108
|
+
* @param {string} id - Agent ID
|
|
109
|
+
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
112
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
113
|
+
* @throws {@link phenoml.agent.NotFoundError}
|
|
114
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* await client.agent.delete("id")
|
|
118
|
+
*/
|
|
119
|
+
delete(id: string, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentDeleteResponse>;
|
|
120
|
+
private __delete;
|
|
121
|
+
/**
|
|
122
|
+
* Patches an existing agent's configuration
|
|
123
|
+
*
|
|
124
|
+
* @param {string} id - Agent ID
|
|
125
|
+
* @param {phenoml.agent.JsonPatch} request
|
|
126
|
+
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
|
+
*
|
|
128
|
+
* @throws {@link phenoml.agent.BadRequestError}
|
|
129
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
130
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
131
|
+
* @throws {@link phenoml.agent.NotFoundError}
|
|
132
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* await client.agent.patch("id", [{
|
|
136
|
+
* op: "replace",
|
|
137
|
+
* path: "/name",
|
|
138
|
+
* value: "Updated Agent Name"
|
|
139
|
+
* }, {
|
|
140
|
+
* op: "add",
|
|
141
|
+
* path: "/tags/-",
|
|
142
|
+
* value: "new-tag"
|
|
143
|
+
* }, {
|
|
144
|
+
* op: "remove",
|
|
145
|
+
* path: "/description"
|
|
146
|
+
* }])
|
|
147
|
+
*/
|
|
148
|
+
patch(id: string, request: phenoml.agent.JsonPatch, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentResponse>;
|
|
149
|
+
private __patch;
|
|
150
|
+
/**
|
|
151
|
+
* Send a message to an agent and receive a response
|
|
152
|
+
*
|
|
153
|
+
* @param {phenoml.agent.AgentChatRequest} request
|
|
154
|
+
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
155
|
+
*
|
|
156
|
+
* @throws {@link phenoml.agent.BadRequestError}
|
|
157
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
158
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
159
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* await client.agent.chat({
|
|
163
|
+
* message: "What is the patient's current condition?",
|
|
164
|
+
* agent_id: "agent-123"
|
|
165
|
+
* })
|
|
166
|
+
*/
|
|
167
|
+
chat(request: phenoml.agent.AgentChatRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentChatResponse>;
|
|
168
|
+
private __chat;
|
|
169
|
+
/**
|
|
170
|
+
* Retrieves a list of chat messages for a given chat session
|
|
171
|
+
*
|
|
172
|
+
* @param {phenoml.agent.AgentGetChatMessagesRequest} request
|
|
173
|
+
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
174
|
+
*
|
|
175
|
+
* @throws {@link phenoml.agent.UnauthorizedError}
|
|
176
|
+
* @throws {@link phenoml.agent.ForbiddenError}
|
|
177
|
+
* @throws {@link phenoml.agent.InternalServerError}
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* await client.agent.getChatMessages({
|
|
181
|
+
* chat_session_id: "chat_session_id"
|
|
182
|
+
* })
|
|
183
|
+
*/
|
|
184
|
+
getChatMessages(request: phenoml.agent.AgentGetChatMessagesRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentGetChatMessagesResponse>;
|
|
185
|
+
private __getChatMessages;
|
|
186
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
187
|
+
}
|