phenoml 0.0.3 → 0.0.4
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/Client.d.ts +10 -4
- package/dist/cjs/Client.js +17 -7
- package/dist/cjs/api/resources/agent/client/Client.d.ts +12 -8
- package/dist/cjs/api/resources/agent/client/Client.js +15 -7
- package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +0 -3
- package/dist/cjs/api/resources/agent/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +6 -2
- package/dist/cjs/api/resources/agent/{client/requests → types}/AgentCreateRequest.d.ts +14 -12
- package/dist/cjs/api/resources/agent/types/AgentTemplate.d.ts +14 -4
- package/dist/cjs/api/resources/agent/types/index.d.ts +1 -4
- package/dist/cjs/api/resources/agent/types/index.js +1 -4
- package/dist/cjs/api/resources/authtoken/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/authtoken/client/Client.js +1 -1
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +1 -1
- package/dist/cjs/api/resources/cohort/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/cohort/client/Client.js +6 -2
- package/dist/cjs/api/resources/construe/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/construe/client/Client.js +6 -2
- package/dist/cjs/api/resources/fhir/client/Client.d.ts +293 -0
- package/dist/cjs/api/resources/fhir/client/Client.js +674 -0
- package/dist/cjs/api/resources/fhir/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/fhir/client/index.js +17 -0
- package/dist/cjs/api/resources/fhir/client/requests/FhirCreateRequest.d.ts +18 -0
- package/dist/cjs/api/resources/fhir/client/requests/FhirDeleteRequest.d.ts +13 -0
- package/dist/cjs/api/resources/fhir/client/requests/FhirExecuteBundleRequest.d.ts +47 -0
- package/dist/cjs/api/resources/fhir/client/requests/FhirPatchRequest.d.ts +69 -0
- package/dist/cjs/api/resources/fhir/client/requests/FhirSearchRequest.d.ts +26 -0
- package/dist/cjs/api/resources/fhir/client/requests/FhirUpsertRequest.d.ts +19 -0
- package/dist/cjs/api/resources/fhir/client/requests/FhirUpsertRequest.js +5 -0
- package/dist/cjs/api/resources/fhir/client/requests/index.d.ts +6 -0
- package/dist/cjs/api/resources/fhir/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/fhir/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/resources/fhir/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/resources/fhir/errors/InternalServerError.d.ts +8 -0
- package/dist/cjs/api/resources/fhir/errors/InternalServerError.js +52 -0
- package/dist/cjs/api/resources/fhir/errors/NotFoundError.d.ts +8 -0
- package/dist/cjs/api/resources/fhir/errors/NotFoundError.js +52 -0
- package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/resources/fhir/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/resources/fhir/errors/index.d.ts +4 -0
- package/dist/cjs/api/resources/fhir/errors/index.js +20 -0
- package/dist/cjs/api/resources/fhir/index.d.ts +3 -0
- package/dist/cjs/api/resources/fhir/index.js +19 -0
- package/dist/cjs/api/resources/fhir/types/ErrorResponse.d.ts +14 -0
- package/dist/cjs/api/resources/fhir/types/ErrorResponse.js +5 -0
- package/dist/cjs/api/resources/fhir/types/FhirBundle.d.ts +57 -0
- package/dist/cjs/api/resources/fhir/types/FhirBundle.js +25 -0
- package/dist/cjs/api/resources/fhir/types/FhirPatchRequestBodyItem.d.ts +26 -0
- package/dist/cjs/api/resources/fhir/types/FhirPatchRequestBodyItem.js +17 -0
- package/dist/cjs/api/resources/fhir/types/FhirResource.d.ts +27 -0
- package/dist/cjs/api/resources/fhir/types/FhirResource.js +5 -0
- package/dist/cjs/api/resources/fhir/types/FhirSearchResponse.d.ts +5 -0
- package/dist/cjs/api/resources/fhir/types/FhirSearchResponse.js +5 -0
- package/dist/cjs/api/resources/fhir/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/fhir/types/index.js +21 -0
- package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +161 -0
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +596 -0
- package/dist/cjs/api/resources/fhirProvider/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/fhirProvider/client/index.js +17 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.d.ts +20 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.ts +30 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.ts +13 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.ts +13 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/fhirProvider/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.d.ts +8 -0
- package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.js +52 -0
- package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.d.ts +8 -0
- package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.js +52 -0
- package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.d.ts +8 -0
- package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.js +52 -0
- package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.d.ts +8 -0
- package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.js +52 -0
- package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.d.ts +8 -0
- package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.js +52 -0
- package/dist/cjs/api/resources/fhirProvider/errors/index.d.ts +5 -0
- package/dist/cjs/api/resources/fhirProvider/errors/index.js +21 -0
- package/dist/cjs/api/resources/fhirProvider/index.d.ts +3 -0
- package/dist/cjs/api/resources/fhirProvider/index.js +19 -0
- package/dist/cjs/api/resources/fhirProvider/types/AuthMethod.d.ts +14 -0
- package/dist/cjs/api/resources/fhirProvider/types/AuthMethod.js +13 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.ts +22 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderAuthConfig.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.ts +7 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderDeleteResponse.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.d.ts +9 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderListResponse.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.ts +9 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.d.ts +9 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderResponse.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.ts +9 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +25 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirQueryResponse.d.ts +19 -0
- package/dist/cjs/api/resources/fhirProvider/types/FhirQueryResponse.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/JsonWebKey.d.ts +20 -0
- package/dist/cjs/api/resources/fhirProvider/types/JsonWebKey.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/Provider.d.ts +17 -0
- package/dist/cjs/api/resources/{agent/types/ProviderType.js → fhirProvider/types/Provider.js} +8 -4
- package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountKey.d.ts +19 -0
- package/dist/cjs/api/resources/fhirProvider/types/ServiceAccountKey.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/SmartConfiguration.d.ts +18 -0
- package/dist/cjs/api/resources/fhirProvider/types/SmartConfiguration.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/types/index.d.ts +13 -0
- package/dist/cjs/api/resources/fhirProvider/types/index.js +29 -0
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +6 -2
- package/dist/cjs/api/resources/tools/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/tools/client/Client.js +7 -3
- package/dist/cjs/api/resources/tools/client/requests/CohortRequest.d.ts +3 -17
- package/dist/cjs/api/resources/tools/client/requests/CohortRequest.js +0 -10
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.ts +2 -14
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.js +0 -6
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +2 -16
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.js +0 -10
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +6 -2
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +6 -2
- package/dist/cjs/api/resources/tools/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/tools/types/index.js +0 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +10 -4
- package/dist/esm/Client.mjs +13 -3
- package/dist/esm/api/resources/agent/client/Client.d.mts +12 -8
- package/dist/esm/api/resources/agent/client/Client.mjs +15 -7
- package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +0 -3
- package/dist/esm/api/resources/agent/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +6 -2
- package/dist/esm/api/resources/agent/{client/requests → types}/AgentCreateRequest.d.mts +14 -12
- package/dist/esm/api/resources/agent/types/AgentTemplate.d.mts +14 -4
- package/dist/esm/api/resources/agent/types/index.d.mts +1 -4
- package/dist/esm/api/resources/agent/types/index.mjs +1 -4
- package/dist/esm/api/resources/authtoken/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/authtoken/client/Client.mjs +1 -1
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +1 -1
- package/dist/esm/api/resources/cohort/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/cohort/client/Client.mjs +6 -2
- package/dist/esm/api/resources/construe/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/construe/client/Client.mjs +6 -2
- package/dist/esm/api/resources/fhir/client/Client.d.mts +293 -0
- package/dist/esm/api/resources/fhir/client/Client.mjs +637 -0
- package/dist/esm/api/resources/fhir/client/index.d.mts +2 -0
- package/dist/esm/api/resources/fhir/client/index.mjs +1 -0
- package/dist/esm/api/resources/fhir/client/requests/FhirCreateRequest.d.mts +18 -0
- package/dist/esm/api/resources/fhir/client/requests/FhirDeleteRequest.d.mts +13 -0
- package/dist/esm/api/resources/fhir/client/requests/FhirExecuteBundleRequest.d.mts +47 -0
- package/dist/esm/api/resources/fhir/client/requests/FhirPatchRequest.d.mts +69 -0
- package/dist/esm/api/resources/fhir/client/requests/FhirSearchRequest.d.mts +26 -0
- package/dist/esm/api/resources/fhir/client/requests/FhirUpsertRequest.d.mts +19 -0
- package/dist/esm/api/resources/fhir/client/requests/FhirUpsertRequest.mjs +4 -0
- package/dist/esm/api/resources/fhir/client/requests/index.d.mts +6 -0
- package/dist/esm/api/resources/fhir/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/fhir/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/resources/fhir/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/resources/fhir/errors/InternalServerError.d.mts +8 -0
- package/dist/esm/api/resources/fhir/errors/InternalServerError.mjs +15 -0
- package/dist/esm/api/resources/fhir/errors/NotFoundError.d.mts +8 -0
- package/dist/esm/api/resources/fhir/errors/NotFoundError.mjs +15 -0
- package/dist/esm/api/resources/fhir/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/resources/fhir/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/resources/fhir/errors/index.d.mts +4 -0
- package/dist/esm/api/resources/fhir/errors/index.mjs +4 -0
- package/dist/esm/api/resources/fhir/index.d.mts +3 -0
- package/dist/esm/api/resources/fhir/index.mjs +3 -0
- package/dist/esm/api/resources/fhir/types/ErrorResponse.d.mts +14 -0
- package/dist/esm/api/resources/fhir/types/ErrorResponse.mjs +4 -0
- package/dist/esm/api/resources/fhir/types/FhirBundle.d.mts +57 -0
- package/dist/esm/api/resources/fhir/types/FhirBundle.mjs +22 -0
- package/dist/esm/api/resources/fhir/types/FhirPatchRequestBodyItem.d.mts +26 -0
- package/dist/esm/api/resources/fhir/types/FhirPatchRequestBodyItem.mjs +14 -0
- package/dist/esm/api/resources/fhir/types/FhirResource.d.mts +27 -0
- package/dist/esm/api/resources/fhir/types/FhirResource.mjs +4 -0
- package/dist/esm/api/resources/fhir/types/FhirSearchResponse.d.mts +5 -0
- package/dist/esm/api/resources/fhir/types/FhirSearchResponse.mjs +4 -0
- package/dist/esm/api/resources/fhir/types/index.d.mts +5 -0
- package/dist/esm/api/resources/fhir/types/index.mjs +5 -0
- package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +161 -0
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +559 -0
- package/dist/esm/api/resources/fhirProvider/client/index.d.mts +2 -0
- package/dist/esm/api/resources/fhirProvider/client/index.mjs +1 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.d.mts +20 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderAddAuthConfigRequest.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.mts +30 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.mts +13 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.mts +13 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/fhirProvider/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.d.mts +8 -0
- package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.mjs +15 -0
- package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.d.mts +8 -0
- package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.mjs +15 -0
- package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.d.mts +8 -0
- package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.mjs +15 -0
- package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.d.mts +8 -0
- package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.mjs +15 -0
- package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.d.mts +8 -0
- package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.mjs +15 -0
- package/dist/esm/api/resources/fhirProvider/errors/index.d.mts +5 -0
- package/dist/esm/api/resources/fhirProvider/errors/index.mjs +5 -0
- package/dist/esm/api/resources/fhirProvider/index.d.mts +3 -0
- package/dist/esm/api/resources/fhirProvider/index.mjs +3 -0
- package/dist/esm/api/resources/fhirProvider/types/AuthMethod.d.mts +14 -0
- package/dist/esm/api/resources/fhirProvider/types/AuthMethod.mjs +10 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.d.mts +22 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderAuthConfig.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.d.mts +7 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderDeleteResponse.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.d.mts +9 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderListResponse.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.d.mts +9 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderRemoveAuthConfigResponse.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.d.mts +9 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderResponse.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.d.mts +9 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderSetActiveAuthConfigResponse.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +25 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirQueryResponse.d.mts +19 -0
- package/dist/esm/api/resources/fhirProvider/types/FhirQueryResponse.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/JsonWebKey.d.mts +20 -0
- package/dist/esm/api/resources/fhirProvider/types/JsonWebKey.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/Provider.d.mts +17 -0
- package/dist/esm/api/resources/{agent/types/ProviderType.mjs → fhirProvider/types/Provider.mjs} +7 -3
- package/dist/esm/api/resources/fhirProvider/types/ServiceAccountKey.d.mts +19 -0
- package/dist/esm/api/resources/fhirProvider/types/ServiceAccountKey.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/SmartConfiguration.d.mts +18 -0
- package/dist/esm/api/resources/fhirProvider/types/SmartConfiguration.mjs +4 -0
- package/dist/esm/api/resources/fhirProvider/types/index.d.mts +13 -0
- package/dist/esm/api/resources/fhirProvider/types/index.mjs +13 -0
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +6 -2
- package/dist/esm/api/resources/tools/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/tools/client/Client.mjs +7 -3
- package/dist/esm/api/resources/tools/client/requests/CohortRequest.d.mts +3 -17
- package/dist/esm/api/resources/tools/client/requests/CohortRequest.mjs +1 -9
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.mts +2 -14
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.mjs +0 -6
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +2 -16
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.mjs +1 -9
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +6 -2
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +6 -2
- package/dist/esm/api/resources/tools/types/index.d.mts +0 -1
- package/dist/esm/api/resources/tools/types/index.mjs +0 -1
- package/dist/esm/core/fetcher/Fetcher.d.mts +1 -1
- package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -2
- package/reference.md +1090 -4
- package/LICENSE +0 -21
- package/dist/cjs/api/resources/agent/client/requests/AgentUpdateRequest.d.ts +0 -25
- package/dist/cjs/api/resources/agent/types/AgentFhirConfig.d.ts +0 -12
- package/dist/cjs/api/resources/agent/types/AgentProvider.d.ts +0 -11
- package/dist/cjs/api/resources/agent/types/ChatFhirClientConfig.d.ts +0 -12
- package/dist/cjs/api/resources/agent/types/ProviderType.d.ts +0 -13
- package/dist/cjs/api/resources/tools/types/FhirClientConfig.d.ts +0 -12
- package/dist/esm/api/resources/agent/client/requests/AgentUpdateRequest.d.mts +0 -25
- package/dist/esm/api/resources/agent/types/AgentFhirConfig.d.mts +0 -12
- package/dist/esm/api/resources/agent/types/AgentProvider.d.mts +0 -11
- package/dist/esm/api/resources/agent/types/ChatFhirClientConfig.d.mts +0 -12
- package/dist/esm/api/resources/agent/types/ProviderType.d.mts +0 -13
- package/dist/esm/api/resources/tools/types/FhirClientConfig.d.mts +0 -12
- /package/dist/cjs/api/resources/agent/{client/requests → types}/AgentCreateRequest.js +0 -0
- /package/dist/cjs/api/resources/{agent/client/requests/AgentUpdateRequest.js → fhir/client/requests/FhirCreateRequest.js} +0 -0
- /package/dist/cjs/api/resources/{agent/types/AgentFhirConfig.js → fhir/client/requests/FhirDeleteRequest.js} +0 -0
- /package/dist/cjs/api/resources/{agent/types/AgentProvider.js → fhir/client/requests/FhirExecuteBundleRequest.js} +0 -0
- /package/dist/cjs/api/resources/{agent/types/ChatFhirClientConfig.js → fhir/client/requests/FhirPatchRequest.js} +0 -0
- /package/dist/cjs/api/resources/{tools/types/FhirClientConfig.js → fhir/client/requests/FhirSearchRequest.js} +0 -0
- /package/dist/esm/api/resources/agent/{client/requests → types}/AgentCreateRequest.mjs +0 -0
- /package/dist/esm/api/resources/{agent/client/requests/AgentUpdateRequest.mjs → fhir/client/requests/FhirCreateRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{agent/types/AgentFhirConfig.mjs → fhir/client/requests/FhirDeleteRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{agent/types/AgentProvider.mjs → fhir/client/requests/FhirExecuteBundleRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{agent/types/ChatFhirClientConfig.mjs → fhir/client/requests/FhirPatchRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{tools/types/FhirClientConfig.mjs → fhir/client/requests/FhirSearchRequest.mjs} +0 -0
|
@@ -14,21 +14,57 @@ const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
|
14
14
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
15
15
|
const DEFAULT_MAX_RETRIES = 2;
|
|
16
16
|
const JITTER_FACTOR = 0.2; // 20% random jitter
|
|
17
|
-
function
|
|
18
|
-
// Generate a random value between
|
|
19
|
-
const jitterMultiplier = 1 +
|
|
17
|
+
function addPositiveJitter(delay) {
|
|
18
|
+
// Generate a random value between 0 and +JITTER_FACTOR
|
|
19
|
+
const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;
|
|
20
20
|
return delay * jitterMultiplier;
|
|
21
21
|
}
|
|
22
|
+
function addSymmetricJitter(delay) {
|
|
23
|
+
// Generate a random value in a JITTER_FACTOR-sized percentage range around delay
|
|
24
|
+
const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR;
|
|
25
|
+
return delay * jitterMultiplier;
|
|
26
|
+
}
|
|
27
|
+
function getRetryDelayFromHeaders(response, retryAttempt) {
|
|
28
|
+
// Check for Retry-After header first (RFC 7231), with no jitter
|
|
29
|
+
const retryAfter = response.headers.get("Retry-After");
|
|
30
|
+
if (retryAfter) {
|
|
31
|
+
// Parse as number of seconds...
|
|
32
|
+
const retryAfterSeconds = parseInt(retryAfter, 10);
|
|
33
|
+
if (!isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {
|
|
34
|
+
return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);
|
|
35
|
+
}
|
|
36
|
+
// ...or as an HTTP date; both are valid
|
|
37
|
+
const retryAfterDate = new Date(retryAfter);
|
|
38
|
+
if (!isNaN(retryAfterDate.getTime())) {
|
|
39
|
+
const delay = retryAfterDate.getTime() - Date.now();
|
|
40
|
+
if (delay > 0) {
|
|
41
|
+
return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// Then check for industry-standard X-RateLimit-Reset header, with positive jitter
|
|
46
|
+
const rateLimitReset = response.headers.get("X-RateLimit-Reset");
|
|
47
|
+
if (rateLimitReset) {
|
|
48
|
+
const resetTime = parseInt(rateLimitReset, 10);
|
|
49
|
+
if (!isNaN(resetTime)) {
|
|
50
|
+
// Assume Unix timestamp in epoch seconds
|
|
51
|
+
const delay = resetTime * 1000 - Date.now();
|
|
52
|
+
if (delay > 0) {
|
|
53
|
+
return addPositiveJitter(Math.min(delay, MAX_RETRY_DELAY));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Fall back to exponential backoff, with symmetric jitter
|
|
58
|
+
return addSymmetricJitter(Math.min(INITIAL_RETRY_DELAY * Math.pow(2, retryAttempt), MAX_RETRY_DELAY));
|
|
59
|
+
}
|
|
22
60
|
function requestWithRetries(requestFn_1) {
|
|
23
61
|
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
24
62
|
let response = yield requestFn();
|
|
25
63
|
for (let i = 0; i < maxRetries; ++i) {
|
|
26
64
|
if ([408, 429].includes(response.status) || response.status >= 500) {
|
|
27
|
-
//
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const delayWithJitter = addJitter(baseDelay);
|
|
31
|
-
yield new Promise((resolve) => setTimeout(resolve, delayWithJitter));
|
|
65
|
+
// Get delay with appropriate jitter applied
|
|
66
|
+
const delay = getRetryDelayFromHeaders(response, i);
|
|
67
|
+
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
32
68
|
response = yield requestFn();
|
|
33
69
|
}
|
|
34
70
|
else {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as core from "./index.js";
|
|
2
|
-
export declare function mergeHeaders(...headersArray: (Record<string, string | core.Supplier<string | undefined> | undefined> | undefined)[]): Record<string, string | core.Supplier<string | undefined>>;
|
|
3
|
-
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, string | core.Supplier<string | undefined> | undefined> | undefined)[]): Record<string, string | core.Supplier<string | undefined>>;
|
|
2
|
+
export declare function mergeHeaders(...headersArray: (Record<string, string | core.Supplier<string | null | undefined> | null | undefined> | null | undefined)[]): Record<string, string | core.Supplier<string | null | undefined>>;
|
|
3
|
+
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, string | core.Supplier<string | null | undefined> | null | undefined> | null | undefined)[]): Record<string, string | core.Supplier<string | null | undefined>>;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.4";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.d.mts
CHANGED
|
@@ -7,6 +7,8 @@ import { Agent } from "./api/resources/agent/client/Client.mjs";
|
|
|
7
7
|
import { Authtoken } from "./api/resources/authtoken/client/Client.mjs";
|
|
8
8
|
import { Cohort } from "./api/resources/cohort/client/Client.mjs";
|
|
9
9
|
import { Construe } from "./api/resources/construe/client/Client.mjs";
|
|
10
|
+
import { Fhir } from "./api/resources/fhir/client/Client.mjs";
|
|
11
|
+
import { FhirProvider } from "./api/resources/fhirProvider/client/Client.mjs";
|
|
10
12
|
import { Lang2Fhir } from "./api/resources/lang2Fhir/client/Client.mjs";
|
|
11
13
|
import { Tools } from "./api/resources/tools/client/Client.mjs";
|
|
12
14
|
export declare namespace phenomlClient {
|
|
@@ -14,9 +16,9 @@ export declare namespace phenomlClient {
|
|
|
14
16
|
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
15
17
|
/** Specify a custom URL to connect the client to. */
|
|
16
18
|
baseUrl?: core.Supplier<string>;
|
|
17
|
-
token
|
|
19
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
18
20
|
/** Additional headers to include in requests. */
|
|
19
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
21
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
20
22
|
fetcher?: core.FetchFunction;
|
|
21
23
|
}
|
|
22
24
|
interface RequestOptions {
|
|
@@ -29,7 +31,7 @@ export declare namespace phenomlClient {
|
|
|
29
31
|
/** Additional query string parameters to include in the request. */
|
|
30
32
|
queryParams?: Record<string, unknown>;
|
|
31
33
|
/** Additional headers to include in the request. */
|
|
32
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
34
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
export declare class phenomlClient {
|
|
@@ -38,13 +40,17 @@ export declare class phenomlClient {
|
|
|
38
40
|
protected _authtoken: Authtoken | undefined;
|
|
39
41
|
protected _cohort: Cohort | undefined;
|
|
40
42
|
protected _construe: Construe | undefined;
|
|
43
|
+
protected _fhir: Fhir | undefined;
|
|
44
|
+
protected _fhirProvider: FhirProvider | undefined;
|
|
41
45
|
protected _lang2Fhir: Lang2Fhir | undefined;
|
|
42
46
|
protected _tools: Tools | undefined;
|
|
43
|
-
constructor(_options
|
|
47
|
+
constructor(_options?: phenomlClient.Options);
|
|
44
48
|
get agent(): Agent;
|
|
45
49
|
get authtoken(): Authtoken;
|
|
46
50
|
get cohort(): Cohort;
|
|
47
51
|
get construe(): Construe;
|
|
52
|
+
get fhir(): Fhir;
|
|
53
|
+
get fhirProvider(): FhirProvider;
|
|
48
54
|
get lang2Fhir(): Lang2Fhir;
|
|
49
55
|
get tools(): Tools;
|
|
50
56
|
}
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -7,15 +7,17 @@ import { Agent } from "./api/resources/agent/client/Client.mjs";
|
|
|
7
7
|
import { Authtoken } from "./api/resources/authtoken/client/Client.mjs";
|
|
8
8
|
import { Cohort } from "./api/resources/cohort/client/Client.mjs";
|
|
9
9
|
import { Construe } from "./api/resources/construe/client/Client.mjs";
|
|
10
|
+
import { Fhir } from "./api/resources/fhir/client/Client.mjs";
|
|
11
|
+
import { FhirProvider } from "./api/resources/fhirProvider/client/Client.mjs";
|
|
10
12
|
import { Lang2Fhir } from "./api/resources/lang2Fhir/client/Client.mjs";
|
|
11
13
|
import { Tools } from "./api/resources/tools/client/Client.mjs";
|
|
12
14
|
export class phenomlClient {
|
|
13
|
-
constructor(_options) {
|
|
15
|
+
constructor(_options = {}) {
|
|
14
16
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
15
17
|
"X-Fern-Language": "JavaScript",
|
|
16
18
|
"X-Fern-SDK-Name": "phenoml",
|
|
17
|
-
"X-Fern-SDK-Version": "0.0.
|
|
18
|
-
"User-Agent": "phenoml/0.0.
|
|
19
|
+
"X-Fern-SDK-Version": "0.0.4",
|
|
20
|
+
"User-Agent": "phenoml/0.0.4",
|
|
19
21
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
20
22
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
21
23
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -36,6 +38,14 @@ export class phenomlClient {
|
|
|
36
38
|
var _a;
|
|
37
39
|
return ((_a = this._construe) !== null && _a !== void 0 ? _a : (this._construe = new Construe(this._options)));
|
|
38
40
|
}
|
|
41
|
+
get fhir() {
|
|
42
|
+
var _a;
|
|
43
|
+
return ((_a = this._fhir) !== null && _a !== void 0 ? _a : (this._fhir = new Fhir(this._options)));
|
|
44
|
+
}
|
|
45
|
+
get fhirProvider() {
|
|
46
|
+
var _a;
|
|
47
|
+
return ((_a = this._fhirProvider) !== null && _a !== void 0 ? _a : (this._fhirProvider = new FhirProvider(this._options)));
|
|
48
|
+
}
|
|
39
49
|
get lang2Fhir() {
|
|
40
50
|
var _a;
|
|
41
51
|
return ((_a = this._lang2Fhir) !== null && _a !== void 0 ? _a : (this._lang2Fhir = new Lang2Fhir(this._options)));
|
|
@@ -10,9 +10,9 @@ export declare namespace Agent {
|
|
|
10
10
|
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
11
11
|
/** Specify a custom URL to connect the client to. */
|
|
12
12
|
baseUrl?: core.Supplier<string>;
|
|
13
|
-
token
|
|
13
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
14
14
|
/** Additional headers to include in requests. */
|
|
15
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
16
16
|
fetcher?: core.FetchFunction;
|
|
17
17
|
}
|
|
18
18
|
interface RequestOptions {
|
|
@@ -25,13 +25,13 @@ export declare namespace Agent {
|
|
|
25
25
|
/** Additional query string parameters to include in the request. */
|
|
26
26
|
queryParams?: Record<string, unknown>;
|
|
27
27
|
/** Additional headers to include in the request. */
|
|
28
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
28
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
export declare class Agent {
|
|
32
32
|
protected readonly _options: Agent.Options;
|
|
33
33
|
protected _prompts: Prompts | undefined;
|
|
34
|
-
constructor(_options
|
|
34
|
+
constructor(_options?: Agent.Options);
|
|
35
35
|
get prompts(): Prompts;
|
|
36
36
|
/**
|
|
37
37
|
* Creates a new PhenoAgent with specified configuration
|
|
@@ -88,7 +88,7 @@ export declare class Agent {
|
|
|
88
88
|
* Updates an existing agent's configuration
|
|
89
89
|
*
|
|
90
90
|
* @param {string} id - Agent ID
|
|
91
|
-
* @param {phenoml.agent.
|
|
91
|
+
* @param {phenoml.agent.AgentCreateRequest} request
|
|
92
92
|
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
93
93
|
*
|
|
94
94
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
@@ -98,9 +98,13 @@ export declare class Agent {
|
|
|
98
98
|
* @throws {@link phenoml.agent.InternalServerError}
|
|
99
99
|
*
|
|
100
100
|
* @example
|
|
101
|
-
* await client.agent.update("id"
|
|
101
|
+
* await client.agent.update("id", {
|
|
102
|
+
* name: "name",
|
|
103
|
+
* prompts: ["prompt_123", "prompt_456"],
|
|
104
|
+
* is_active: true
|
|
105
|
+
* })
|
|
102
106
|
*/
|
|
103
|
-
update(id: string, request
|
|
107
|
+
update(id: string, request: phenoml.agent.AgentCreateRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentResponse>;
|
|
104
108
|
private __update;
|
|
105
109
|
/**
|
|
106
110
|
* Deletes an existing agent
|
|
@@ -183,5 +187,5 @@ export declare class Agent {
|
|
|
183
187
|
*/
|
|
184
188
|
getChatMessages(request: phenoml.agent.AgentGetChatMessagesRequest, requestOptions?: Agent.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentGetChatMessagesResponse>;
|
|
185
189
|
private __getChatMessages;
|
|
186
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
190
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
187
191
|
}
|
|
@@ -17,7 +17,7 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.
|
|
|
17
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
18
18
|
import { Prompts } from "../resources/prompts/client/Client.mjs";
|
|
19
19
|
export class Agent {
|
|
20
|
-
constructor(_options) {
|
|
20
|
+
constructor(_options = {}) {
|
|
21
21
|
this._options = _options;
|
|
22
22
|
}
|
|
23
23
|
get prompts() {
|
|
@@ -244,7 +244,7 @@ export class Agent {
|
|
|
244
244
|
* Updates an existing agent's configuration
|
|
245
245
|
*
|
|
246
246
|
* @param {string} id - Agent ID
|
|
247
|
-
* @param {phenoml.agent.
|
|
247
|
+
* @param {phenoml.agent.AgentCreateRequest} request
|
|
248
248
|
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
|
|
249
249
|
*
|
|
250
250
|
* @throws {@link phenoml.agent.BadRequestError}
|
|
@@ -254,13 +254,17 @@ export class Agent {
|
|
|
254
254
|
* @throws {@link phenoml.agent.InternalServerError}
|
|
255
255
|
*
|
|
256
256
|
* @example
|
|
257
|
-
* await client.agent.update("id"
|
|
257
|
+
* await client.agent.update("id", {
|
|
258
|
+
* name: "name",
|
|
259
|
+
* prompts: ["prompt_123", "prompt_456"],
|
|
260
|
+
* is_active: true
|
|
261
|
+
* })
|
|
258
262
|
*/
|
|
259
|
-
update(id, request
|
|
263
|
+
update(id, request, requestOptions) {
|
|
260
264
|
return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
|
|
261
265
|
}
|
|
262
|
-
__update(
|
|
263
|
-
return __awaiter(this,
|
|
266
|
+
__update(id, request, requestOptions) {
|
|
267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
264
268
|
var _a, _b, _c, _d;
|
|
265
269
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
266
270
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -627,7 +631,11 @@ export class Agent {
|
|
|
627
631
|
}
|
|
628
632
|
_getAuthorizationHeader() {
|
|
629
633
|
return __awaiter(this, void 0, void 0, function* () {
|
|
630
|
-
|
|
634
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
635
|
+
if (bearer != null) {
|
|
636
|
+
return `Bearer ${bearer}`;
|
|
637
|
+
}
|
|
638
|
+
return undefined;
|
|
631
639
|
});
|
|
632
640
|
}
|
|
633
641
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as phenoml from "../../../../index.mjs";
|
|
5
4
|
/**
|
|
6
5
|
* @example
|
|
7
6
|
* {
|
|
@@ -18,6 +17,4 @@ export interface AgentChatRequest {
|
|
|
18
17
|
session_id?: string;
|
|
19
18
|
/** The ID of the agent to chat with */
|
|
20
19
|
agent_id: string;
|
|
21
|
-
/** Optional user-specific FHIR configuration overrides */
|
|
22
|
-
meta?: phenoml.agent.ChatFhirClientConfig;
|
|
23
20
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { type AgentCreateRequest } from "./AgentCreateRequest.mjs";
|
|
2
1
|
export { type AgentListRequest } from "./AgentListRequest.mjs";
|
|
3
|
-
export { type AgentUpdateRequest } from "./AgentUpdateRequest.mjs";
|
|
4
2
|
export { type AgentChatRequest } from "./AgentChatRequest.mjs";
|
|
5
3
|
export { type AgentGetChatMessagesRequest } from "./AgentGetChatMessagesRequest.mjs";
|
|
@@ -9,9 +9,9 @@ export declare namespace Prompts {
|
|
|
9
9
|
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
fetcher?: core.FetchFunction;
|
|
16
16
|
}
|
|
17
17
|
interface RequestOptions {
|
|
@@ -24,12 +24,12 @@ export declare namespace Prompts {
|
|
|
24
24
|
/** Additional query string parameters to include in the request. */
|
|
25
25
|
queryParams?: Record<string, unknown>;
|
|
26
26
|
/** Additional headers to include in the request. */
|
|
27
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
export declare class Prompts {
|
|
31
31
|
protected readonly _options: Prompts.Options;
|
|
32
|
-
constructor(_options
|
|
32
|
+
constructor(_options?: Prompts.Options);
|
|
33
33
|
/**
|
|
34
34
|
* Creates a new agent prompt
|
|
35
35
|
*
|
|
@@ -157,5 +157,5 @@ export declare class Prompts {
|
|
|
157
157
|
*/
|
|
158
158
|
loadDefaults(requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<phenoml.agent.SuccessResponse>;
|
|
159
159
|
private __loadDefaults;
|
|
160
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
160
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
161
161
|
}
|
|
@@ -16,7 +16,7 @@ import * as phenoml from "../../../../../index.mjs";
|
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
18
|
export class Prompts {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -521,7 +521,11 @@ export class Prompts {
|
|
|
521
521
|
}
|
|
522
522
|
_getAuthorizationHeader() {
|
|
523
523
|
return __awaiter(this, void 0, void 0, function* () {
|
|
524
|
-
|
|
524
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
525
|
+
if (bearer != null) {
|
|
526
|
+
return `Bearer ${bearer}`;
|
|
527
|
+
}
|
|
528
|
+
return undefined;
|
|
525
529
|
});
|
|
526
530
|
}
|
|
527
531
|
}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as phenoml from "../../../../index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* name: "name",
|
|
9
|
-
* prompts: ["prompt_123", "prompt_456"],
|
|
10
|
-
* is_active: true
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
4
|
export interface AgentCreateRequest {
|
|
14
5
|
/** Agent name */
|
|
15
6
|
name: string;
|
|
@@ -23,7 +14,18 @@ export interface AgentCreateRequest {
|
|
|
23
14
|
is_active: boolean;
|
|
24
15
|
/** Tags for categorizing the agent */
|
|
25
16
|
tags?: string[];
|
|
26
|
-
/** FHIR provider
|
|
27
|
-
provider?:
|
|
28
|
-
|
|
17
|
+
/** FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers */
|
|
18
|
+
provider?: AgentCreateRequest.Provider;
|
|
19
|
+
}
|
|
20
|
+
export declare namespace AgentCreateRequest {
|
|
21
|
+
/**
|
|
22
|
+
* FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers
|
|
23
|
+
*/
|
|
24
|
+
type Provider =
|
|
25
|
+
/**
|
|
26
|
+
* Single FHIR provider ID */
|
|
27
|
+
string
|
|
28
|
+
/**
|
|
29
|
+
* Array of FHIR provider IDs */
|
|
30
|
+
| string[];
|
|
29
31
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as phenoml from "../../../index.mjs";
|
|
5
4
|
export interface AgentTemplate {
|
|
6
5
|
/** Agent ID */
|
|
7
6
|
id?: string;
|
|
@@ -17,7 +16,18 @@ export interface AgentTemplate {
|
|
|
17
16
|
is_active?: boolean;
|
|
18
17
|
/** Tags for categorizing the agent */
|
|
19
18
|
tags?: string[];
|
|
20
|
-
/** FHIR provider
|
|
21
|
-
provider?:
|
|
22
|
-
|
|
19
|
+
/** FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers */
|
|
20
|
+
provider?: AgentTemplate.Provider;
|
|
21
|
+
}
|
|
22
|
+
export declare namespace AgentTemplate {
|
|
23
|
+
/**
|
|
24
|
+
* FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers
|
|
25
|
+
*/
|
|
26
|
+
type Provider =
|
|
27
|
+
/**
|
|
28
|
+
* Single FHIR provider ID */
|
|
29
|
+
string
|
|
30
|
+
/**
|
|
31
|
+
* Array of FHIR provider IDs */
|
|
32
|
+
| string[];
|
|
23
33
|
}
|
|
@@ -2,17 +2,14 @@ export * from "./AgentListResponse.mjs";
|
|
|
2
2
|
export * from "./AgentDeleteResponse.mjs";
|
|
3
3
|
export * from "./AgentGetChatMessagesRequestOrder.mjs";
|
|
4
4
|
export * from "./AgentGetChatMessagesResponse.mjs";
|
|
5
|
+
export * from "./AgentCreateRequest.mjs";
|
|
5
6
|
export * from "./AgentTemplate.mjs";
|
|
6
7
|
export * from "./AgentResponse.mjs";
|
|
7
8
|
export * from "./AgentChatResponse.mjs";
|
|
8
9
|
export * from "./PromptTemplate.mjs";
|
|
9
10
|
export * from "./AgentPromptsResponse.mjs";
|
|
10
|
-
export * from "./AgentFhirConfig.mjs";
|
|
11
|
-
export * from "./ChatFhirClientConfig.mjs";
|
|
12
11
|
export * from "./ChatMessageTemplate.mjs";
|
|
13
12
|
export * from "./ChatSessionTemplate.mjs";
|
|
14
13
|
export * from "./SuccessResponse.mjs";
|
|
15
14
|
export * from "./JsonPatch.mjs";
|
|
16
15
|
export * from "./JsonPatchOperation.mjs";
|
|
17
|
-
export * from "./ProviderType.mjs";
|
|
18
|
-
export * from "./AgentProvider.mjs";
|
|
@@ -2,17 +2,14 @@ export * from "./AgentListResponse.mjs";
|
|
|
2
2
|
export * from "./AgentDeleteResponse.mjs";
|
|
3
3
|
export * from "./AgentGetChatMessagesRequestOrder.mjs";
|
|
4
4
|
export * from "./AgentGetChatMessagesResponse.mjs";
|
|
5
|
+
export * from "./AgentCreateRequest.mjs";
|
|
5
6
|
export * from "./AgentTemplate.mjs";
|
|
6
7
|
export * from "./AgentResponse.mjs";
|
|
7
8
|
export * from "./AgentChatResponse.mjs";
|
|
8
9
|
export * from "./PromptTemplate.mjs";
|
|
9
10
|
export * from "./AgentPromptsResponse.mjs";
|
|
10
|
-
export * from "./AgentFhirConfig.mjs";
|
|
11
|
-
export * from "./ChatFhirClientConfig.mjs";
|
|
12
11
|
export * from "./ChatMessageTemplate.mjs";
|
|
13
12
|
export * from "./ChatSessionTemplate.mjs";
|
|
14
13
|
export * from "./SuccessResponse.mjs";
|
|
15
14
|
export * from "./JsonPatch.mjs";
|
|
16
15
|
export * from "./JsonPatchOperation.mjs";
|
|
17
|
-
export * from "./ProviderType.mjs";
|
|
18
|
-
export * from "./AgentProvider.mjs";
|
|
@@ -9,15 +9,15 @@ export declare namespace Authtoken {
|
|
|
9
9
|
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
fetcher?: core.FetchFunction;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
export declare class Authtoken {
|
|
19
19
|
protected readonly _options: Authtoken.Options;
|
|
20
20
|
protected _auth: Auth | undefined;
|
|
21
|
-
constructor(_options
|
|
21
|
+
constructor(_options?: Authtoken.Options);
|
|
22
22
|
get auth(): Auth;
|
|
23
23
|
}
|
|
@@ -10,7 +10,7 @@ export declare namespace Auth {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
/** Additional headers to include in requests. */
|
|
13
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
13
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
14
14
|
fetcher?: core.FetchFunction;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
@@ -23,7 +23,7 @@ export declare namespace Auth {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Auth {
|
|
@@ -97,7 +97,7 @@ export class Auth {
|
|
|
97
97
|
}
|
|
98
98
|
const basicAuthHeader = core.BasicAuth.toAuthorizationHeader({
|
|
99
99
|
username: request.username,
|
|
100
|
-
password: request.password
|
|
100
|
+
password: request.password,
|
|
101
101
|
});
|
|
102
102
|
if (!basicAuthHeader) {
|
|
103
103
|
throw new Error("Failed to create basic auth header from username/password");
|
|
@@ -9,9 +9,9 @@ export declare namespace Cohort {
|
|
|
9
9
|
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
fetcher?: core.FetchFunction;
|
|
16
16
|
}
|
|
17
17
|
interface RequestOptions {
|
|
@@ -24,12 +24,12 @@ export declare namespace Cohort {
|
|
|
24
24
|
/** Additional query string parameters to include in the request. */
|
|
25
25
|
queryParams?: Record<string, unknown>;
|
|
26
26
|
/** Additional headers to include in the request. */
|
|
27
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
export declare class Cohort {
|
|
31
31
|
protected readonly _options: Cohort.Options;
|
|
32
|
-
constructor(_options
|
|
32
|
+
constructor(_options?: Cohort.Options);
|
|
33
33
|
/**
|
|
34
34
|
* Converts natural language text into structured FHIR search queries for patient cohort analysis
|
|
35
35
|
*
|
|
@@ -47,5 +47,5 @@ export declare class Cohort {
|
|
|
47
47
|
*/
|
|
48
48
|
analyze(request: phenoml.cohort.CohortRequest, requestOptions?: Cohort.RequestOptions): core.HttpResponsePromise<phenoml.cohort.CohortResponse>;
|
|
49
49
|
private __analyze;
|
|
50
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
50
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
51
51
|
}
|
|
@@ -16,7 +16,7 @@ import * as phenoml from "../../../index.mjs";
|
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
18
18
|
export class Cohort {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -91,7 +91,11 @@ export class Cohort {
|
|
|
91
91
|
}
|
|
92
92
|
_getAuthorizationHeader() {
|
|
93
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
|
|
94
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
95
|
+
if (bearer != null) {
|
|
96
|
+
return `Bearer ${bearer}`;
|
|
97
|
+
}
|
|
98
|
+
return undefined;
|
|
95
99
|
});
|
|
96
100
|
}
|
|
97
101
|
}
|
|
@@ -9,9 +9,9 @@ export declare namespace Construe {
|
|
|
9
9
|
environment?: core.Supplier<environments.phenomlEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
fetcher?: core.FetchFunction;
|
|
16
16
|
}
|
|
17
17
|
interface RequestOptions {
|
|
@@ -24,12 +24,12 @@ export declare namespace Construe {
|
|
|
24
24
|
/** Additional query string parameters to include in the request. */
|
|
25
25
|
queryParams?: Record<string, unknown>;
|
|
26
26
|
/** Additional headers to include in the request. */
|
|
27
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
export declare class Construe {
|
|
31
31
|
protected readonly _options: Construe.Options;
|
|
32
|
-
constructor(_options
|
|
32
|
+
constructor(_options?: Construe.Options);
|
|
33
33
|
/**
|
|
34
34
|
* Upload a custom medical code system with codes and descriptions for use in code extraction.
|
|
35
35
|
* Upon upload, construe generates embeddings for all of the codes in the code system and stores them in the vector database so you can
|
|
@@ -90,5 +90,5 @@ export declare class Construe {
|
|
|
90
90
|
*/
|
|
91
91
|
cohort(request: phenoml.construe.ConstrueCohortRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ConstrueCohortResponse>;
|
|
92
92
|
private __cohort;
|
|
93
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
93
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
94
94
|
}
|
|
@@ -16,7 +16,7 @@ import * as phenoml from "../../../index.mjs";
|
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
18
18
|
export class Construe {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -252,7 +252,11 @@ export class Construe {
|
|
|
252
252
|
}
|
|
253
253
|
_getAuthorizationHeader() {
|
|
254
254
|
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
-
|
|
255
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
256
|
+
if (bearer != null) {
|
|
257
|
+
return `Bearer ${bearer}`;
|
|
258
|
+
}
|
|
259
|
+
return undefined;
|
|
256
260
|
});
|
|
257
261
|
}
|
|
258
262
|
}
|