phenoml 0.0.2 → 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/README.md +1 -1
- 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 +2 -3
- 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
|
@@ -17,7 +17,7 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.
|
|
|
17
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
18
18
|
import { McpServer } from "../resources/mcpServer/client/Client.mjs";
|
|
19
19
|
export class Tools {
|
|
20
|
-
constructor(_options) {
|
|
20
|
+
constructor(_options = {}) {
|
|
21
21
|
this._options = _options;
|
|
22
22
|
}
|
|
23
23
|
get mcpServer() {
|
|
@@ -197,7 +197,7 @@ export class Tools {
|
|
|
197
197
|
* @example
|
|
198
198
|
* await client.tools.analyzeCohort({
|
|
199
199
|
* text: "female patients over 20 with diabetes but not hypertension",
|
|
200
|
-
* provider: "
|
|
200
|
+
* provider: "550e8400-e29b-41d4-a716-446655440000"
|
|
201
201
|
* })
|
|
202
202
|
*/
|
|
203
203
|
analyzeCohort(request, requestOptions) {
|
|
@@ -259,7 +259,11 @@ export class Tools {
|
|
|
259
259
|
}
|
|
260
260
|
_getAuthorizationHeader() {
|
|
261
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
|
|
262
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
263
|
+
if (bearer != null) {
|
|
264
|
+
return `Bearer ${bearer}`;
|
|
265
|
+
}
|
|
266
|
+
return undefined;
|
|
263
267
|
});
|
|
264
268
|
}
|
|
265
269
|
}
|
|
@@ -1,30 +1,16 @@
|
|
|
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
|
* {
|
|
8
7
|
* text: "female patients over 20 with diabetes but not hypertension",
|
|
9
|
-
* provider: "
|
|
8
|
+
* provider: "550e8400-e29b-41d4-a716-446655440000"
|
|
10
9
|
* }
|
|
11
10
|
*/
|
|
12
11
|
export interface CohortRequest {
|
|
13
12
|
/** Natural language text describing the patient cohort criteria */
|
|
14
13
|
text: string;
|
|
15
|
-
/** FHIR provider
|
|
16
|
-
provider:
|
|
17
|
-
meta?: phenoml.tools.FhirClientConfig;
|
|
18
|
-
}
|
|
19
|
-
export declare namespace CohortRequest {
|
|
20
|
-
/**
|
|
21
|
-
* FHIR provider to use for searching
|
|
22
|
-
*/
|
|
23
|
-
type Provider = "medplum" | "google_healthcare" | "canvas" | "hapi";
|
|
24
|
-
const Provider: {
|
|
25
|
-
readonly Medplum: "medplum";
|
|
26
|
-
readonly GoogleHealthcare: "google_healthcare";
|
|
27
|
-
readonly Canvas: "canvas";
|
|
28
|
-
readonly Hapi: "hapi";
|
|
29
|
-
};
|
|
14
|
+
/** FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum) */
|
|
15
|
+
provider: string;
|
|
30
16
|
}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
(function (CohortRequest) {
|
|
6
|
-
CohortRequest.Provider = {
|
|
7
|
-
Medplum: "medplum",
|
|
8
|
-
GoogleHealthcare: "google_healthcare",
|
|
9
|
-
Canvas: "canvas",
|
|
10
|
-
Hapi: "hapi",
|
|
11
|
-
};
|
|
12
|
-
})(CohortRequest || (CohortRequest = {}));
|
|
4
|
+
export {};
|
|
@@ -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
|
* {
|
|
@@ -14,9 +13,8 @@ export interface Lang2FhirAndCreateRequest {
|
|
|
14
13
|
resource: Lang2FhirAndCreateRequest.Resource;
|
|
15
14
|
/** Natural language text to convert to FHIR resource */
|
|
16
15
|
text: string;
|
|
17
|
-
/** FHIR provider
|
|
18
|
-
provider?:
|
|
19
|
-
meta?: phenoml.tools.FhirClientConfig;
|
|
16
|
+
/** FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum) */
|
|
17
|
+
provider?: string;
|
|
20
18
|
}
|
|
21
19
|
export declare namespace Lang2FhirAndCreateRequest {
|
|
22
20
|
/**
|
|
@@ -41,14 +39,4 @@ export declare namespace Lang2FhirAndCreateRequest {
|
|
|
41
39
|
readonly SimpleObservation: "simple-observation";
|
|
42
40
|
readonly VitalSigns: "vital-signs";
|
|
43
41
|
};
|
|
44
|
-
/**
|
|
45
|
-
* FHIR provider to use for storing the resource
|
|
46
|
-
*/
|
|
47
|
-
type Provider = "medplum" | "google_healthcare" | "canvas" | "hapi";
|
|
48
|
-
const Provider: {
|
|
49
|
-
readonly Medplum: "medplum";
|
|
50
|
-
readonly GoogleHealthcare: "google_healthcare";
|
|
51
|
-
readonly Canvas: "canvas";
|
|
52
|
-
readonly Hapi: "hapi";
|
|
53
|
-
};
|
|
54
42
|
}
|
|
@@ -21,10 +21,4 @@ export var Lang2FhirAndCreateRequest;
|
|
|
21
21
|
SimpleObservation: "simple-observation",
|
|
22
22
|
VitalSigns: "vital-signs",
|
|
23
23
|
};
|
|
24
|
-
Lang2FhirAndCreateRequest.Provider = {
|
|
25
|
-
Medplum: "medplum",
|
|
26
|
-
GoogleHealthcare: "google_healthcare",
|
|
27
|
-
Canvas: "canvas",
|
|
28
|
-
Hapi: "hapi",
|
|
29
|
-
};
|
|
30
24
|
})(Lang2FhirAndCreateRequest || (Lang2FhirAndCreateRequest = {}));
|
|
@@ -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
|
* {
|
|
@@ -17,19 +16,6 @@ export interface Lang2FhirAndSearchRequest {
|
|
|
17
16
|
practitioner_id?: string;
|
|
18
17
|
/** Maximum number of results to return */
|
|
19
18
|
count?: number;
|
|
20
|
-
/** FHIR provider
|
|
21
|
-
provider?:
|
|
22
|
-
meta?: phenoml.tools.FhirClientConfig;
|
|
23
|
-
}
|
|
24
|
-
export declare namespace Lang2FhirAndSearchRequest {
|
|
25
|
-
/**
|
|
26
|
-
* FHIR provider to use for searching
|
|
27
|
-
*/
|
|
28
|
-
type Provider = "medplum" | "google_healthcare" | "canvas" | "hapi";
|
|
29
|
-
const Provider: {
|
|
30
|
-
readonly Medplum: "medplum";
|
|
31
|
-
readonly GoogleHealthcare: "google_healthcare";
|
|
32
|
-
readonly Canvas: "canvas";
|
|
33
|
-
readonly Hapi: "hapi";
|
|
34
|
-
};
|
|
19
|
+
/** FHIR provider ID - must be a valid UUID from existing FHIR providers. also supports provider by name (e.g. medplum) */
|
|
20
|
+
provider?: string;
|
|
35
21
|
}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
(function (Lang2FhirAndSearchRequest) {
|
|
6
|
-
Lang2FhirAndSearchRequest.Provider = {
|
|
7
|
-
Medplum: "medplum",
|
|
8
|
-
GoogleHealthcare: "google_healthcare",
|
|
9
|
-
Canvas: "canvas",
|
|
10
|
-
Hapi: "hapi",
|
|
11
|
-
};
|
|
12
|
-
})(Lang2FhirAndSearchRequest || (Lang2FhirAndSearchRequest = {}));
|
|
4
|
+
export {};
|
|
@@ -10,9 +10,9 @@ export declare namespace McpServer {
|
|
|
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 McpServer {
|
|
|
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 McpServer {
|
|
32
32
|
protected readonly _options: McpServer.Options;
|
|
33
33
|
protected _tools: Tools | undefined;
|
|
34
|
-
constructor(_options
|
|
34
|
+
constructor(_options?: McpServer.Options);
|
|
35
35
|
get tools(): Tools;
|
|
36
36
|
/**
|
|
37
37
|
* Creates a new MCP server
|
|
@@ -96,5 +96,5 @@ export declare class McpServer {
|
|
|
96
96
|
*/
|
|
97
97
|
delete(mcpServerId: string, requestOptions?: McpServer.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerResponse>;
|
|
98
98
|
private __delete;
|
|
99
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
99
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
100
100
|
}
|
|
@@ -17,7 +17,7 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he
|
|
|
17
17
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
18
|
import { Tools } from "../resources/tools/client/Client.mjs";
|
|
19
19
|
export class McpServer {
|
|
20
|
-
constructor(_options) {
|
|
20
|
+
constructor(_options = {}) {
|
|
21
21
|
this._options = _options;
|
|
22
22
|
}
|
|
23
23
|
get tools() {
|
|
@@ -294,7 +294,11 @@ export class McpServer {
|
|
|
294
294
|
}
|
|
295
295
|
_getAuthorizationHeader() {
|
|
296
296
|
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
-
|
|
297
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
298
|
+
if (bearer != null) {
|
|
299
|
+
return `Bearer ${bearer}`;
|
|
300
|
+
}
|
|
301
|
+
return undefined;
|
|
298
302
|
});
|
|
299
303
|
}
|
|
300
304
|
}
|
package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts
CHANGED
|
@@ -9,9 +9,9 @@ export declare namespace Tools {
|
|
|
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 Tools {
|
|
|
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 Tools {
|
|
31
31
|
protected readonly _options: Tools.Options;
|
|
32
|
-
constructor(_options
|
|
32
|
+
constructor(_options?: Tools.Options);
|
|
33
33
|
/**
|
|
34
34
|
* Lists all MCP server tools for a specific MCP server
|
|
35
35
|
*
|
|
@@ -96,5 +96,5 @@ export declare class Tools {
|
|
|
96
96
|
*/
|
|
97
97
|
call(mcpServerToolId: string, request: phenoml.tools.mcpServer.McpServerToolCallRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<phenoml.tools.McpServerToolCallResponse>;
|
|
98
98
|
private __call;
|
|
99
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
99
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
100
100
|
}
|
|
@@ -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 Tools {
|
|
19
|
-
constructor(_options) {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -295,7 +295,11 @@ export class Tools {
|
|
|
295
295
|
}
|
|
296
296
|
_getAuthorizationHeader() {
|
|
297
297
|
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
-
|
|
298
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
299
|
+
if (bearer != null) {
|
|
300
|
+
return `Bearer ${bearer}`;
|
|
301
|
+
}
|
|
302
|
+
return undefined;
|
|
299
303
|
});
|
|
300
304
|
}
|
|
301
305
|
}
|
|
@@ -6,7 +6,7 @@ export declare namespace Fetcher {
|
|
|
6
6
|
url: string;
|
|
7
7
|
method: string;
|
|
8
8
|
contentType?: string;
|
|
9
|
-
headers?: Record<string, string | Supplier<string | undefined> | undefined>;
|
|
9
|
+
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
10
10
|
queryParameters?: Record<string, unknown>;
|
|
11
11
|
body?: unknown;
|
|
12
12
|
timeoutMs?: number;
|
|
@@ -11,21 +11,57 @@ const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
|
11
11
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
12
12
|
const DEFAULT_MAX_RETRIES = 2;
|
|
13
13
|
const JITTER_FACTOR = 0.2; // 20% random jitter
|
|
14
|
-
function
|
|
15
|
-
// Generate a random value between
|
|
16
|
-
const jitterMultiplier = 1 +
|
|
14
|
+
function addPositiveJitter(delay) {
|
|
15
|
+
// Generate a random value between 0 and +JITTER_FACTOR
|
|
16
|
+
const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;
|
|
17
17
|
return delay * jitterMultiplier;
|
|
18
18
|
}
|
|
19
|
+
function addSymmetricJitter(delay) {
|
|
20
|
+
// Generate a random value in a JITTER_FACTOR-sized percentage range around delay
|
|
21
|
+
const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR;
|
|
22
|
+
return delay * jitterMultiplier;
|
|
23
|
+
}
|
|
24
|
+
function getRetryDelayFromHeaders(response, retryAttempt) {
|
|
25
|
+
// Check for Retry-After header first (RFC 7231), with no jitter
|
|
26
|
+
const retryAfter = response.headers.get("Retry-After");
|
|
27
|
+
if (retryAfter) {
|
|
28
|
+
// Parse as number of seconds...
|
|
29
|
+
const retryAfterSeconds = parseInt(retryAfter, 10);
|
|
30
|
+
if (!isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {
|
|
31
|
+
return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);
|
|
32
|
+
}
|
|
33
|
+
// ...or as an HTTP date; both are valid
|
|
34
|
+
const retryAfterDate = new Date(retryAfter);
|
|
35
|
+
if (!isNaN(retryAfterDate.getTime())) {
|
|
36
|
+
const delay = retryAfterDate.getTime() - Date.now();
|
|
37
|
+
if (delay > 0) {
|
|
38
|
+
return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Then check for industry-standard X-RateLimit-Reset header, with positive jitter
|
|
43
|
+
const rateLimitReset = response.headers.get("X-RateLimit-Reset");
|
|
44
|
+
if (rateLimitReset) {
|
|
45
|
+
const resetTime = parseInt(rateLimitReset, 10);
|
|
46
|
+
if (!isNaN(resetTime)) {
|
|
47
|
+
// Assume Unix timestamp in epoch seconds
|
|
48
|
+
const delay = resetTime * 1000 - Date.now();
|
|
49
|
+
if (delay > 0) {
|
|
50
|
+
return addPositiveJitter(Math.min(delay, MAX_RETRY_DELAY));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Fall back to exponential backoff, with symmetric jitter
|
|
55
|
+
return addSymmetricJitter(Math.min(INITIAL_RETRY_DELAY * Math.pow(2, retryAttempt), MAX_RETRY_DELAY));
|
|
56
|
+
}
|
|
19
57
|
export function requestWithRetries(requestFn_1) {
|
|
20
58
|
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
21
59
|
let response = yield requestFn();
|
|
22
60
|
for (let i = 0; i < maxRetries; ++i) {
|
|
23
61
|
if ([408, 429].includes(response.status) || response.status >= 500) {
|
|
24
|
-
//
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const delayWithJitter = addJitter(baseDelay);
|
|
28
|
-
yield new Promise((resolve) => setTimeout(resolve, delayWithJitter));
|
|
62
|
+
// Get delay with appropriate jitter applied
|
|
63
|
+
const delay = getRetryDelayFromHeaders(response, i);
|
|
64
|
+
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
29
65
|
response = yield requestFn();
|
|
30
66
|
}
|
|
31
67
|
else {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as core from "./index.mjs";
|
|
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/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.4";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.4";
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phenoml",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"private": false,
|
|
5
|
-
"repository": "github:
|
|
5
|
+
"repository": "github:phenoml/phenoml-ts-sdk",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "./dist/cjs/index.js",
|
|
8
8
|
"module": "./dist/esm/index.mjs",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm",
|
|
36
36
|
"test": "jest --config jest.config.mjs",
|
|
37
37
|
"test:unit": "jest --selectProjects unit",
|
|
38
|
-
"test:browser": "jest --selectProjects browser",
|
|
39
38
|
"test:wire": "jest --selectProjects wire"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|