phenoml 17.7.0 → 17.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.d.ts +12 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +6 -0
- package/dist/cjs/Client.js +20 -10
- package/dist/cjs/api/resources/agent/client/Client.js +4 -3
- package/dist/cjs/api/resources/agent/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/agent/errors/ConflictError.js +1 -1
- package/dist/cjs/api/resources/agent/errors/ForbiddenError.js +1 -1
- package/dist/cjs/api/resources/agent/errors/GatewayTimeoutError.js +1 -1
- package/dist/cjs/api/resources/agent/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/agent/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/resources/agent/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/agent/resources/chat/client/Client.js +3 -2
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +4 -3
- package/dist/cjs/api/resources/authtoken/client/Client.js +2 -1
- package/dist/cjs/api/resources/authtoken/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/authtoken/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/authtoken/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/cohort/client/Client.js +2 -1
- package/dist/cjs/api/resources/cohort/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/cohort/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/cohort/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/construe/client/Client.js +2 -1
- package/dist/cjs/api/resources/construe/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/ConflictError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/FailedDependencyError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/ForbiddenError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/GatewayTimeoutError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/NotImplementedError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/ServiceUnavailableError.js +1 -1
- package/dist/cjs/api/resources/construe/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/Client.js +2 -1
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/DeleteRequest.d.ts +1 -1
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/ExportRequest.d.ts +1 -1
- package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/FindRequest.d.ts +1 -1
- package/dist/cjs/api/resources/construe/resources/codes/client/Client.d.ts +15 -0
- package/dist/cjs/api/resources/construe/resources/codes/client/Client.js +17 -1
- package/dist/cjs/api/resources/construe/resources/codes/client/requests/CodesListRequest.d.ts +1 -1
- package/dist/cjs/api/resources/construe/resources/codes/client/requests/ExtractRequest.d.ts +12 -0
- package/dist/cjs/api/resources/construe/resources/codes/client/requests/LookupRequest.d.ts +1 -1
- package/dist/cjs/api/resources/construe/resources/codes/client/requests/SearchSemanticRequest.d.ts +1 -1
- package/dist/cjs/api/resources/construe/resources/codes/client/requests/SearchTextRequest.d.ts +1 -1
- package/dist/cjs/api/resources/construe/types/ExtractRequestSystem.d.ts +11 -8
- package/dist/cjs/api/resources/fhir/client/Client.js +5 -4
- package/dist/cjs/api/resources/fhir2Omop/client/Client.js +2 -1
- package/dist/cjs/api/resources/fhir2Omop/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/fhir2Omop/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/fhir2Omop/errors/ServiceUnavailableError.js +1 -1
- package/dist/cjs/api/resources/fhir2Omop/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/fhir2Omop/types/CareSiteRow.d.ts +8 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/DeathRow.d.ts +9 -0
- package/dist/cjs/api/resources/fhir2Omop/types/DeathRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/LocationRow.d.ts +14 -0
- package/dist/cjs/api/resources/fhir2Omop/types/LocationRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ObservationPeriodRow.d.ts +7 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ObservationPeriodRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/OmopTables.d.ts +5 -0
- package/dist/cjs/api/resources/fhir2Omop/types/PersonRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ProviderRow.d.ts +15 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ProviderRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.ts +2 -0
- package/dist/cjs/api/resources/fhir2Omop/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/fhir2Omop/types/index.js +5 -0
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +2 -1
- package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.js +1 -1
- package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/Client.js +4 -3
- package/dist/cjs/api/resources/implementationGuides/client/Client.d.ts +12 -0
- package/dist/cjs/api/resources/implementationGuides/client/Client.js +16 -0
- package/dist/cjs/api/resources/implementationGuides/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/implementationGuides/client/index.js +2 -0
- package/dist/cjs/api/resources/implementationGuides/errors/BadRequestError.d.ts +5 -0
- package/dist/cjs/api/resources/implementationGuides/errors/BadRequestError.js +54 -0
- package/dist/cjs/api/resources/implementationGuides/errors/ForbiddenError.d.ts +5 -0
- package/dist/cjs/api/resources/implementationGuides/errors/ForbiddenError.js +54 -0
- package/dist/cjs/api/resources/implementationGuides/errors/InternalServerError.d.ts +5 -0
- package/dist/cjs/api/resources/implementationGuides/errors/InternalServerError.js +54 -0
- package/dist/cjs/api/resources/implementationGuides/errors/NotFoundError.d.ts +5 -0
- package/dist/cjs/api/resources/implementationGuides/errors/NotFoundError.js +54 -0
- package/dist/cjs/api/resources/implementationGuides/errors/UnauthorizedError.d.ts +5 -0
- package/dist/cjs/api/resources/implementationGuides/errors/UnauthorizedError.js +54 -0
- package/dist/cjs/api/resources/implementationGuides/errors/index.d.ts +5 -0
- package/dist/cjs/api/resources/implementationGuides/errors/index.js +21 -0
- package/dist/cjs/api/resources/implementationGuides/exports.d.ts +3 -0
- package/dist/cjs/api/resources/implementationGuides/exports.js +22 -0
- package/dist/cjs/api/resources/implementationGuides/index.d.ts +4 -0
- package/dist/cjs/api/resources/implementationGuides/index.js +20 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/Client.d.ts +91 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/Client.js +316 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/index.js +17 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/requests/UpdateImplementationGuideRequest.d.ts +8 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/requests/UpdateImplementationGuideRequest.js +3 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/exports.d.ts +2 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/exports.js +21 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/index.d.ts +1 -0
- package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/index.js +17 -0
- package/dist/cjs/api/resources/implementationGuides/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/implementationGuides/resources/index.js +41 -0
- package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideDetail.d.ts +5 -0
- package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideDetail.js +3 -0
- package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideListResponse.d.ts +4 -0
- package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideListResponse.js +3 -0
- package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideSummary.d.ts +15 -0
- package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideSummary.js +3 -0
- package/dist/cjs/api/resources/implementationGuides/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/implementationGuides/types/index.js +19 -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 +8 -0
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +15 -6
- package/dist/cjs/api/resources/lang2Fhir/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/ClientClosedRequestError.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/ForbiddenError.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/GatewayTimeoutError.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/errors/UnprocessableEntityError.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/types/CreateMultiResponse.d.ts +2 -0
- package/dist/cjs/api/resources/lang2Fhir/{client/requests → types}/ProfileUploadRequest.d.ts +2 -10
- package/dist/cjs/api/resources/lang2Fhir/types/ProfileUploadRequest.js +3 -0
- package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/lang2Fhir/types/index.js +1 -0
- package/dist/cjs/api/resources/profiles/client/Client.d.ts +12 -0
- package/dist/cjs/api/resources/profiles/client/Client.js +16 -0
- package/dist/cjs/api/resources/profiles/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/profiles/client/index.js +2 -0
- package/dist/cjs/api/resources/profiles/errors/BadRequestError.d.ts +5 -0
- package/dist/cjs/api/resources/profiles/errors/BadRequestError.js +54 -0
- package/dist/cjs/api/resources/profiles/errors/ForbiddenError.d.ts +5 -0
- package/dist/cjs/api/resources/profiles/errors/ForbiddenError.js +54 -0
- package/dist/cjs/api/resources/profiles/errors/InternalServerError.d.ts +5 -0
- package/dist/cjs/api/resources/profiles/errors/InternalServerError.js +54 -0
- package/dist/cjs/api/resources/profiles/errors/NotFoundError.d.ts +5 -0
- package/dist/cjs/api/resources/profiles/errors/NotFoundError.js +54 -0
- package/dist/cjs/api/resources/profiles/errors/UnauthorizedError.d.ts +5 -0
- package/dist/cjs/api/resources/profiles/errors/UnauthorizedError.js +54 -0
- package/dist/cjs/api/resources/profiles/errors/index.d.ts +5 -0
- package/dist/cjs/api/resources/profiles/errors/index.js +21 -0
- package/dist/cjs/api/resources/profiles/exports.d.ts +3 -0
- package/dist/cjs/api/resources/profiles/exports.js +22 -0
- package/dist/cjs/api/resources/profiles/index.d.ts +4 -0
- package/dist/cjs/api/resources/profiles/index.js +20 -0
- package/dist/cjs/api/resources/profiles/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/profiles/resources/index.js +41 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/client/Client.d.ts +127 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/client/Client.js +397 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/client/index.js +17 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/client/requests/ListRequest.d.ts +10 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/client/requests/ListRequest.js +3 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/exports.d.ts +2 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/exports.js +21 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/index.d.ts +1 -0
- package/dist/cjs/api/resources/profiles/resources/profiles/index.js +17 -0
- package/dist/cjs/api/resources/profiles/types/FhirResource.d.ts +4 -0
- package/dist/cjs/api/resources/profiles/types/FhirResource.js +3 -0
- package/dist/cjs/api/resources/profiles/types/ProfileGetResponse.d.ts +5 -0
- package/dist/cjs/api/resources/profiles/types/ProfileGetResponse.js +3 -0
- package/dist/cjs/api/resources/profiles/types/ProfileListResponse.d.ts +4 -0
- package/dist/cjs/api/resources/profiles/types/ProfileListResponse.js +3 -0
- package/dist/cjs/api/resources/profiles/types/ProfileSummary.d.ts +26 -0
- package/dist/cjs/api/resources/profiles/types/ProfileSummary.js +12 -0
- package/dist/cjs/api/resources/profiles/types/ProfileUploadRequest.d.ts +7 -0
- package/dist/cjs/api/resources/profiles/types/ProfileUploadRequest.js +3 -0
- package/dist/cjs/api/resources/profiles/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/profiles/types/index.js +21 -0
- package/dist/cjs/api/resources/summary/client/Client.js +2 -1
- package/dist/cjs/api/resources/summary/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/summary/errors/ForbiddenError.js +1 -1
- package/dist/cjs/api/resources/summary/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/summary/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/resources/summary/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/summary/resources/templates/client/Client.js +3 -2
- package/dist/cjs/api/resources/tools/client/Client.js +5 -4
- package/dist/cjs/api/resources/tools/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/tools/errors/ForbiddenError.js +1 -1
- package/dist/cjs/api/resources/tools/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/tools/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/resources/tools/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/tools/resources/mcpServers/client/Client.js +2 -1
- package/dist/cjs/api/resources/voice/errors/BadGatewayError.js +1 -1
- package/dist/cjs/api/resources/voice/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/voice/errors/ContentTooLargeError.js +1 -1
- package/dist/cjs/api/resources/voice/errors/GatewayTimeoutError.js +1 -1
- package/dist/cjs/api/resources/voice/errors/PaymentRequiredError.js +1 -1
- package/dist/cjs/api/resources/voice/errors/ServiceUnavailableError.js +1 -1
- package/dist/cjs/api/resources/voice/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/workflows/client/Client.js +4 -3
- package/dist/cjs/api/resources/workflows/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/resources/workflows/errors/ForbiddenError.js +1 -1
- package/dist/cjs/api/resources/workflows/errors/GatewayTimeoutError.js +1 -1
- package/dist/cjs/api/resources/workflows/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/resources/workflows/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/resources/workflows/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/core/file/file.js +3 -0
- package/dist/cjs/core/requestBody.d.ts +12 -0
- package/dist/cjs/core/requestBody.js +26 -0
- package/dist/cjs/core/stream/Stream.d.ts +45 -1
- package/dist/cjs/core/stream/Stream.js +323 -84
- package/dist/cjs/core/stream/index.d.ts +1 -0
- package/dist/cjs/core/url/qs.js +2 -2
- package/dist/cjs/errors/phenomlError.d.ts +1 -0
- package/dist/cjs/errors/phenomlError.js +5 -1
- package/dist/cjs/errors/phenomlTimeoutError.d.ts +2 -2
- package/dist/cjs/errors/phenomlTimeoutError.js +40 -6
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +12 -0
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +10 -0
- package/dist/esm/api/resources/agent/client/Client.mjs +4 -3
- package/dist/esm/api/resources/agent/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/agent/errors/ConflictError.mjs +1 -1
- package/dist/esm/api/resources/agent/errors/ForbiddenError.mjs +1 -1
- package/dist/esm/api/resources/agent/errors/GatewayTimeoutError.mjs +1 -1
- package/dist/esm/api/resources/agent/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/agent/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/resources/agent/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/agent/resources/chat/client/Client.mjs +3 -2
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +4 -3
- package/dist/esm/api/resources/authtoken/client/Client.mjs +2 -1
- package/dist/esm/api/resources/authtoken/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/authtoken/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/authtoken/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/cohort/client/Client.mjs +2 -1
- package/dist/esm/api/resources/cohort/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/cohort/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/cohort/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/construe/client/Client.mjs +2 -1
- package/dist/esm/api/resources/construe/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/ConflictError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/FailedDependencyError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/ForbiddenError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/GatewayTimeoutError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/NotImplementedError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/ServiceUnavailableError.mjs +1 -1
- package/dist/esm/api/resources/construe/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/construe/resources/codeSystems/client/Client.mjs +2 -1
- package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/DeleteRequest.d.mts +1 -1
- package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/ExportRequest.d.mts +1 -1
- package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/FindRequest.d.mts +1 -1
- package/dist/esm/api/resources/construe/resources/codes/client/Client.d.mts +15 -0
- package/dist/esm/api/resources/construe/resources/codes/client/Client.mjs +17 -1
- package/dist/esm/api/resources/construe/resources/codes/client/requests/CodesListRequest.d.mts +1 -1
- package/dist/esm/api/resources/construe/resources/codes/client/requests/ExtractRequest.d.mts +12 -0
- package/dist/esm/api/resources/construe/resources/codes/client/requests/LookupRequest.d.mts +1 -1
- package/dist/esm/api/resources/construe/resources/codes/client/requests/SearchSemanticRequest.d.mts +1 -1
- package/dist/esm/api/resources/construe/resources/codes/client/requests/SearchTextRequest.d.mts +1 -1
- package/dist/esm/api/resources/construe/types/ExtractRequestSystem.d.mts +11 -8
- package/dist/esm/api/resources/fhir/client/Client.mjs +5 -4
- package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +2 -1
- package/dist/esm/api/resources/fhir2Omop/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/fhir2Omop/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/fhir2Omop/errors/ServiceUnavailableError.mjs +1 -1
- package/dist/esm/api/resources/fhir2Omop/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/fhir2Omop/types/CareSiteRow.d.mts +8 -0
- package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/DeathRow.d.mts +9 -0
- package/dist/esm/api/resources/fhir2Omop/types/DeathRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/LocationRow.d.mts +14 -0
- package/dist/esm/api/resources/fhir2Omop/types/LocationRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/ObservationPeriodRow.d.mts +7 -0
- package/dist/esm/api/resources/fhir2Omop/types/ObservationPeriodRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/OmopTables.d.mts +5 -0
- package/dist/esm/api/resources/fhir2Omop/types/PersonRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/ProviderRow.d.mts +15 -0
- package/dist/esm/api/resources/fhir2Omop/types/ProviderRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.mts +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/index.d.mts +5 -0
- package/dist/esm/api/resources/fhir2Omop/types/index.mjs +5 -0
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +2 -1
- package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.mjs +1 -1
- package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/Client.mjs +4 -3
- package/dist/esm/api/resources/implementationGuides/client/Client.d.mts +12 -0
- package/dist/esm/api/resources/implementationGuides/client/Client.mjs +12 -0
- package/dist/esm/api/resources/implementationGuides/client/index.d.mts +1 -0
- package/dist/esm/api/resources/implementationGuides/client/index.mjs +1 -0
- package/dist/esm/api/resources/implementationGuides/errors/BadRequestError.d.mts +5 -0
- package/dist/esm/api/resources/implementationGuides/errors/BadRequestError.mjs +17 -0
- package/dist/esm/api/resources/implementationGuides/errors/ForbiddenError.d.mts +5 -0
- package/dist/esm/api/resources/implementationGuides/errors/ForbiddenError.mjs +17 -0
- package/dist/esm/api/resources/implementationGuides/errors/InternalServerError.d.mts +5 -0
- package/dist/esm/api/resources/implementationGuides/errors/InternalServerError.mjs +17 -0
- package/dist/esm/api/resources/implementationGuides/errors/NotFoundError.d.mts +5 -0
- package/dist/esm/api/resources/implementationGuides/errors/NotFoundError.mjs +17 -0
- package/dist/esm/api/resources/implementationGuides/errors/UnauthorizedError.d.mts +5 -0
- package/dist/esm/api/resources/implementationGuides/errors/UnauthorizedError.mjs +17 -0
- package/dist/esm/api/resources/implementationGuides/errors/index.d.mts +5 -0
- package/dist/esm/api/resources/implementationGuides/errors/index.mjs +5 -0
- package/dist/esm/api/resources/implementationGuides/exports.d.mts +3 -0
- package/dist/esm/api/resources/implementationGuides/exports.mjs +4 -0
- package/dist/esm/api/resources/implementationGuides/index.d.mts +4 -0
- package/dist/esm/api/resources/implementationGuides/index.mjs +4 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/Client.d.mts +91 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/Client.mjs +279 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/index.d.mts +1 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/index.mjs +1 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/requests/UpdateImplementationGuideRequest.d.mts +8 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/requests/UpdateImplementationGuideRequest.mjs +2 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/exports.d.mts +2 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/exports.mjs +3 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/index.d.mts +1 -0
- package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/index.mjs +1 -0
- package/dist/esm/api/resources/implementationGuides/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/implementationGuides/resources/index.mjs +2 -0
- package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideDetail.d.mts +5 -0
- package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideDetail.mjs +2 -0
- package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideListResponse.d.mts +4 -0
- package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideListResponse.mjs +2 -0
- package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideSummary.d.mts +15 -0
- package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideSummary.mjs +2 -0
- package/dist/esm/api/resources/implementationGuides/types/index.d.mts +3 -0
- package/dist/esm/api/resources/implementationGuides/types/index.mjs +3 -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 +8 -0
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +15 -6
- package/dist/esm/api/resources/lang2Fhir/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/lang2Fhir/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/ClientClosedRequestError.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/ForbiddenError.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/GatewayTimeoutError.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/errors/UnprocessableEntityError.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/types/CreateMultiResponse.d.mts +2 -0
- package/dist/esm/api/resources/lang2Fhir/{client/requests → types}/ProfileUploadRequest.d.mts +2 -10
- package/dist/esm/api/resources/lang2Fhir/types/ProfileUploadRequest.mjs +2 -0
- package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +1 -0
- package/dist/esm/api/resources/lang2Fhir/types/index.mjs +1 -0
- package/dist/esm/api/resources/profiles/client/Client.d.mts +12 -0
- package/dist/esm/api/resources/profiles/client/Client.mjs +12 -0
- package/dist/esm/api/resources/profiles/client/index.d.mts +1 -0
- package/dist/esm/api/resources/profiles/client/index.mjs +1 -0
- package/dist/esm/api/resources/profiles/errors/BadRequestError.d.mts +5 -0
- package/dist/esm/api/resources/profiles/errors/BadRequestError.mjs +17 -0
- package/dist/esm/api/resources/profiles/errors/ForbiddenError.d.mts +5 -0
- package/dist/esm/api/resources/profiles/errors/ForbiddenError.mjs +17 -0
- package/dist/esm/api/resources/profiles/errors/InternalServerError.d.mts +5 -0
- package/dist/esm/api/resources/profiles/errors/InternalServerError.mjs +17 -0
- package/dist/esm/api/resources/profiles/errors/NotFoundError.d.mts +5 -0
- package/dist/esm/api/resources/profiles/errors/NotFoundError.mjs +17 -0
- package/dist/esm/api/resources/profiles/errors/UnauthorizedError.d.mts +5 -0
- package/dist/esm/api/resources/profiles/errors/UnauthorizedError.mjs +17 -0
- package/dist/esm/api/resources/profiles/errors/index.d.mts +5 -0
- package/dist/esm/api/resources/profiles/errors/index.mjs +5 -0
- package/dist/esm/api/resources/profiles/exports.d.mts +3 -0
- package/dist/esm/api/resources/profiles/exports.mjs +4 -0
- package/dist/esm/api/resources/profiles/index.d.mts +4 -0
- package/dist/esm/api/resources/profiles/index.mjs +4 -0
- package/dist/esm/api/resources/profiles/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/profiles/resources/index.mjs +2 -0
- package/dist/esm/api/resources/profiles/resources/profiles/client/Client.d.mts +127 -0
- package/dist/esm/api/resources/profiles/resources/profiles/client/Client.mjs +360 -0
- package/dist/esm/api/resources/profiles/resources/profiles/client/index.d.mts +1 -0
- package/dist/esm/api/resources/profiles/resources/profiles/client/index.mjs +1 -0
- package/dist/esm/api/resources/profiles/resources/profiles/client/requests/ListRequest.d.mts +10 -0
- package/dist/esm/api/resources/profiles/resources/profiles/client/requests/ListRequest.mjs +2 -0
- package/dist/esm/api/resources/profiles/resources/profiles/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/profiles/resources/profiles/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/profiles/resources/profiles/exports.d.mts +2 -0
- package/dist/esm/api/resources/profiles/resources/profiles/exports.mjs +3 -0
- package/dist/esm/api/resources/profiles/resources/profiles/index.d.mts +1 -0
- package/dist/esm/api/resources/profiles/resources/profiles/index.mjs +1 -0
- package/dist/esm/api/resources/profiles/types/FhirResource.d.mts +4 -0
- package/dist/esm/api/resources/profiles/types/FhirResource.mjs +2 -0
- package/dist/esm/api/resources/profiles/types/ProfileGetResponse.d.mts +5 -0
- package/dist/esm/api/resources/profiles/types/ProfileGetResponse.mjs +2 -0
- package/dist/esm/api/resources/profiles/types/ProfileListResponse.d.mts +4 -0
- package/dist/esm/api/resources/profiles/types/ProfileListResponse.mjs +2 -0
- package/dist/esm/api/resources/profiles/types/ProfileSummary.d.mts +26 -0
- package/dist/esm/api/resources/profiles/types/ProfileSummary.mjs +9 -0
- package/dist/esm/api/resources/profiles/types/ProfileUploadRequest.d.mts +7 -0
- package/dist/esm/api/resources/profiles/types/ProfileUploadRequest.mjs +2 -0
- package/dist/esm/api/resources/profiles/types/index.d.mts +5 -0
- package/dist/esm/api/resources/profiles/types/index.mjs +5 -0
- package/dist/esm/api/resources/summary/client/Client.mjs +2 -1
- package/dist/esm/api/resources/summary/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/summary/errors/ForbiddenError.mjs +1 -1
- package/dist/esm/api/resources/summary/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/summary/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/resources/summary/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/summary/resources/templates/client/Client.mjs +3 -2
- package/dist/esm/api/resources/tools/client/Client.mjs +5 -4
- package/dist/esm/api/resources/tools/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/tools/errors/ForbiddenError.mjs +1 -1
- package/dist/esm/api/resources/tools/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/tools/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/resources/tools/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/mcpServers/client/Client.mjs +2 -1
- package/dist/esm/api/resources/voice/errors/BadGatewayError.mjs +1 -1
- package/dist/esm/api/resources/voice/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/voice/errors/ContentTooLargeError.mjs +1 -1
- package/dist/esm/api/resources/voice/errors/GatewayTimeoutError.mjs +1 -1
- package/dist/esm/api/resources/voice/errors/PaymentRequiredError.mjs +1 -1
- package/dist/esm/api/resources/voice/errors/ServiceUnavailableError.mjs +1 -1
- package/dist/esm/api/resources/voice/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/workflows/client/Client.mjs +4 -3
- package/dist/esm/api/resources/workflows/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/resources/workflows/errors/ForbiddenError.mjs +1 -1
- package/dist/esm/api/resources/workflows/errors/GatewayTimeoutError.mjs +1 -1
- package/dist/esm/api/resources/workflows/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/resources/workflows/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/resources/workflows/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/core/file/file.mjs +3 -0
- package/dist/esm/core/requestBody.d.mts +12 -0
- package/dist/esm/core/requestBody.mjs +23 -0
- package/dist/esm/core/stream/Stream.d.mts +45 -1
- package/dist/esm/core/stream/Stream.mjs +323 -84
- package/dist/esm/core/stream/index.d.mts +1 -0
- package/dist/esm/core/url/qs.mjs +2 -2
- package/dist/esm/errors/phenomlError.d.mts +1 -0
- package/dist/esm/errors/phenomlError.mjs +5 -1
- package/dist/esm/errors/phenomlTimeoutError.d.mts +2 -2
- package/dist/esm/errors/phenomlTimeoutError.mjs +7 -6
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/openapi/openapi.json +1204 -235
- package/package.json +23 -1
- package/reference.md +625 -1
- /package/dist/cjs/api/resources/{lang2Fhir/client/requests/ProfileUploadRequest.js → fhir2Omop/types/CareSiteRow.js} +0 -0
- /package/dist/esm/api/resources/{lang2Fhir/client/requests/ProfileUploadRequest.mjs → fhir2Omop/types/CareSiteRow.mjs} +0 -0
|
@@ -12,6 +12,23 @@ export declare namespace Stream {
|
|
|
12
12
|
* An abort signal to stop the stream.
|
|
13
13
|
*/
|
|
14
14
|
signal?: AbortSignal;
|
|
15
|
+
/**
|
|
16
|
+
* Whether transparent mid-stream reconnection is enabled on resumable
|
|
17
|
+
* SSE endpoints. Defaults to true. Has no effect on non-resumable endpoints.
|
|
18
|
+
*/
|
|
19
|
+
reconnectionEnabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Maximum number of consecutive failed reconnect attempts on resumable SSE
|
|
22
|
+
* endpoints before giving up. The counter resets to zero each time a
|
|
23
|
+
* reconnected stream successfully yields at least one event (i.e. makes
|
|
24
|
+
* progress). Has no effect on non-resumable endpoints.
|
|
25
|
+
*/
|
|
26
|
+
maxReconnectionAttempts?: number;
|
|
27
|
+
/**
|
|
28
|
+
* A function that re-issues the HTTP request with the Last-Event-ID header
|
|
29
|
+
* and returns the new response body stream. Required for reconnection to work.
|
|
30
|
+
*/
|
|
31
|
+
reconnect?: (lastEventId: string) => Promise<ReadableStream>;
|
|
15
32
|
}
|
|
16
33
|
interface JsonEvent {
|
|
17
34
|
type: "json";
|
|
@@ -21,8 +38,15 @@ export declare namespace Stream {
|
|
|
21
38
|
type: "sse";
|
|
22
39
|
streamTerminator?: string;
|
|
23
40
|
eventDiscriminator?: string;
|
|
41
|
+
resumable?: boolean;
|
|
24
42
|
}
|
|
25
43
|
}
|
|
44
|
+
export interface ServerSentEvent<T> {
|
|
45
|
+
data: T;
|
|
46
|
+
id?: string;
|
|
47
|
+
retry?: number;
|
|
48
|
+
event?: string;
|
|
49
|
+
}
|
|
26
50
|
export declare class Stream<T> implements AsyncIterable<T> {
|
|
27
51
|
private stream;
|
|
28
52
|
private parse;
|
|
@@ -34,9 +58,15 @@ export declare class Stream<T> implements AsyncIterable<T> {
|
|
|
34
58
|
private messageTerminator;
|
|
35
59
|
private streamTerminator;
|
|
36
60
|
private eventDiscriminator;
|
|
61
|
+
private resumable;
|
|
62
|
+
private reconnectionEnabled;
|
|
63
|
+
private maxReconnectionAttempts;
|
|
64
|
+
private reconnect;
|
|
37
65
|
private controller;
|
|
38
66
|
private decoder;
|
|
39
|
-
|
|
67
|
+
private externalSignal;
|
|
68
|
+
private onExternalAbort;
|
|
69
|
+
constructor({ stream, parse, eventShape, signal, reconnectionEnabled, maxReconnectionAttempts, reconnect, }: Stream.Args & {
|
|
40
70
|
parse: (val: unknown) => Promise<T>;
|
|
41
71
|
});
|
|
42
72
|
private iterMessages;
|
|
@@ -46,6 +76,20 @@ export declare class Stream<T> implements AsyncIterable<T> {
|
|
|
46
76
|
* Parses and returns a single SSE event, or returns null if the event is a stream terminator.
|
|
47
77
|
*/
|
|
48
78
|
private dispatchSseEvent;
|
|
79
|
+
/**
|
|
80
|
+
* Determines whether a reconnection attempt should be made.
|
|
81
|
+
*/
|
|
82
|
+
private shouldReconnect;
|
|
83
|
+
/**
|
|
84
|
+
* Delays before reconnecting, using a server-sent retry directive if provided
|
|
85
|
+
* (clamped to MAX_RECONNECT_DELAY_MS), otherwise falling back to
|
|
86
|
+
* DEFAULT_RECONNECT_DELAY_MS. The delay is abortable: if the stream's abort
|
|
87
|
+
* signal fires during the wait, the promise resolves immediately.
|
|
88
|
+
*/
|
|
89
|
+
private delayReconnect;
|
|
90
|
+
private createEmptyStream;
|
|
91
|
+
private removeAbortListener;
|
|
92
|
+
withMetadata(): AsyncIterable<ServerSentEvent<T>>;
|
|
49
93
|
private injectDiscriminator;
|
|
50
94
|
[Symbol.asyncIterator](): AsyncIterator<T, void, unknown>;
|
|
51
95
|
private decodeChunk;
|
|
@@ -40,8 +40,14 @@ const json_js_1 = require("../json.js");
|
|
|
40
40
|
const index_js_1 = require("../runtime/index.js");
|
|
41
41
|
const DATA_PREFIX = "data:";
|
|
42
42
|
const EVENT_PREFIX = "event:";
|
|
43
|
+
const ID_PREFIX = "id:";
|
|
44
|
+
const RETRY_PREFIX = "retry:";
|
|
45
|
+
const DEFAULT_MAX_RECONNECTION_ATTEMPTS = 5;
|
|
46
|
+
const DEFAULT_RECONNECT_DELAY_MS = 1000;
|
|
47
|
+
const MAX_RECONNECT_DELAY_MS = 30000;
|
|
43
48
|
class Stream {
|
|
44
|
-
constructor({ stream, parse, eventShape, signal }) {
|
|
49
|
+
constructor({ stream, parse, eventShape, signal, reconnectionEnabled, maxReconnectionAttempts, reconnect, }) {
|
|
50
|
+
var _a;
|
|
45
51
|
this.controller = new AbortController();
|
|
46
52
|
this.stream = stream;
|
|
47
53
|
this.parse = parse;
|
|
@@ -50,11 +56,20 @@ class Stream {
|
|
|
50
56
|
this.messageTerminator = "\n";
|
|
51
57
|
this.streamTerminator = eventShape.streamTerminator;
|
|
52
58
|
this.eventDiscriminator = eventShape.eventDiscriminator;
|
|
59
|
+
this.resumable = (_a = eventShape.resumable) !== null && _a !== void 0 ? _a : false;
|
|
53
60
|
}
|
|
54
61
|
else {
|
|
55
62
|
this.messageTerminator = eventShape.messageTerminator;
|
|
63
|
+
this.resumable = false;
|
|
64
|
+
}
|
|
65
|
+
this.reconnectionEnabled = reconnectionEnabled !== null && reconnectionEnabled !== void 0 ? reconnectionEnabled : true;
|
|
66
|
+
this.maxReconnectionAttempts = maxReconnectionAttempts !== null && maxReconnectionAttempts !== void 0 ? maxReconnectionAttempts : DEFAULT_MAX_RECONNECTION_ATTEMPTS;
|
|
67
|
+
this.reconnect = reconnect;
|
|
68
|
+
if (signal != null) {
|
|
69
|
+
this.externalSignal = signal;
|
|
70
|
+
this.onExternalAbort = () => this.controller.abort();
|
|
71
|
+
signal.addEventListener("abort", this.onExternalAbort, { once: true });
|
|
56
72
|
}
|
|
57
|
-
signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", () => this.controller.abort());
|
|
58
73
|
// Initialize shared TextDecoder
|
|
59
74
|
if (typeof TextDecoder !== "undefined") {
|
|
60
75
|
this.decoder = new TextDecoder("utf-8");
|
|
@@ -73,98 +88,227 @@ class Stream {
|
|
|
73
88
|
iterDataMessages() {
|
|
74
89
|
return __asyncGenerator(this, arguments, function* iterDataMessages_1() {
|
|
75
90
|
var _a, e_1, _b, _c;
|
|
76
|
-
|
|
77
|
-
let
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
let reconnectAttempts = 0;
|
|
92
|
+
let currentStream = this.stream;
|
|
93
|
+
let lastId;
|
|
94
|
+
// The id of the most recently *dispatched* event. Per the WHATWG
|
|
95
|
+
// EventSource spec, the "last event ID" is only committed when an event
|
|
96
|
+
// is dispatched, not when the `id:` line is parsed. Reconnecting with a
|
|
97
|
+
// parsed-but-undispatched id would skip an event that was never yielded
|
|
98
|
+
// (e.g. if the connection drops after `id:` but before the event's
|
|
99
|
+
// terminating blank line), so reconnection uses lastDispatchedId.
|
|
100
|
+
let lastDispatchedId;
|
|
101
|
+
let lastRetry;
|
|
102
|
+
while (true) {
|
|
103
|
+
const stream = readableStreamAsyncIterable(currentStream);
|
|
104
|
+
let buf = "";
|
|
105
|
+
let dataValue;
|
|
106
|
+
try {
|
|
107
|
+
for (var _d = true, stream_1 = (e_1 = void 0, __asyncValues(stream)), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) {
|
|
108
|
+
_c = stream_1_1.value;
|
|
109
|
+
_d = false;
|
|
110
|
+
const chunk = _c;
|
|
111
|
+
buf += this.decodeChunk(chunk);
|
|
112
|
+
let terminatorIndex;
|
|
113
|
+
while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
|
|
114
|
+
const line = buf.slice(0, terminatorIndex);
|
|
115
|
+
buf = buf.slice(terminatorIndex + this.messageTerminator.length);
|
|
116
|
+
if (!line.trim()) {
|
|
117
|
+
if (this.prefix != null && dataValue != null) {
|
|
118
|
+
if (this.streamTerminator != null && dataValue.includes(this.streamTerminator)) {
|
|
119
|
+
return yield __await(void 0);
|
|
120
|
+
}
|
|
121
|
+
const data = yield __await(this.parse((0, json_js_1.fromJson)(dataValue)));
|
|
122
|
+
yield yield __await({ data, id: lastId, retry: lastRetry, event: undefined });
|
|
123
|
+
lastDispatchedId = lastId;
|
|
124
|
+
reconnectAttempts = 0;
|
|
125
|
+
dataValue = undefined;
|
|
126
|
+
}
|
|
95
127
|
continue;
|
|
96
128
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
129
|
+
if (line.startsWith(ID_PREFIX)) {
|
|
130
|
+
const idValue = line.slice(ID_PREFIX.length).trim();
|
|
131
|
+
if (!idValue.includes("\0")) {
|
|
132
|
+
lastId = idValue;
|
|
133
|
+
}
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (line.startsWith(RETRY_PREFIX)) {
|
|
137
|
+
const retryValue = line.slice(RETRY_PREFIX.length).trim();
|
|
138
|
+
const parsed = parseInt(retryValue, 10);
|
|
139
|
+
if (!Number.isNaN(parsed) && String(parsed) === retryValue) {
|
|
140
|
+
lastRetry = parsed;
|
|
141
|
+
}
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
if (this.prefix != null) {
|
|
145
|
+
const prefixIndex = line.indexOf(this.prefix);
|
|
146
|
+
if (prefixIndex === -1) {
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const val = line.slice(prefixIndex + this.prefix.length).trim();
|
|
150
|
+
dataValue = dataValue != null ? `${dataValue}\n${val}` : val;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
if (this.streamTerminator != null && line.includes(this.streamTerminator)) {
|
|
154
|
+
return yield __await(void 0);
|
|
155
|
+
}
|
|
156
|
+
const data = yield __await(this.parse((0, json_js_1.fromJson)(line)));
|
|
157
|
+
yield yield __await({ data, id: lastId, retry: lastRetry, event: undefined });
|
|
158
|
+
lastDispatchedId = lastId;
|
|
159
|
+
reconnectAttempts = 0;
|
|
160
|
+
}
|
|
102
161
|
}
|
|
103
|
-
const message = yield __await(this.parse((0, json_js_1.fromJson)(line)));
|
|
104
|
-
yield yield __await(message);
|
|
105
|
-
prefixSeen = false;
|
|
106
162
|
}
|
|
107
163
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
164
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
165
|
+
finally {
|
|
166
|
+
try {
|
|
167
|
+
if (!_d && !_a && (_b = stream_1.return)) yield __await(_b.call(stream_1));
|
|
168
|
+
}
|
|
169
|
+
finally { if (e_1) throw e_1.error; }
|
|
170
|
+
}
|
|
171
|
+
if (this.prefix != null && dataValue != null) {
|
|
172
|
+
if (this.streamTerminator != null && dataValue.includes(this.streamTerminator)) {
|
|
173
|
+
return yield __await(void 0);
|
|
174
|
+
}
|
|
175
|
+
const data = yield __await(this.parse((0, json_js_1.fromJson)(dataValue)));
|
|
176
|
+
yield yield __await({ data, id: lastId, retry: lastRetry, event: undefined });
|
|
177
|
+
lastDispatchedId = lastId;
|
|
178
|
+
reconnectAttempts = 0;
|
|
179
|
+
}
|
|
180
|
+
if (!this.shouldReconnect(lastDispatchedId, reconnectAttempts)) {
|
|
181
|
+
return yield __await(void 0);
|
|
182
|
+
}
|
|
183
|
+
reconnectAttempts++;
|
|
184
|
+
yield __await(this.delayReconnect(lastRetry));
|
|
185
|
+
if (this.controller.signal.aborted) {
|
|
186
|
+
return yield __await(void 0);
|
|
187
|
+
}
|
|
188
|
+
// Re-check after async delay; needed for TypeScript narrowing.
|
|
189
|
+
const reconnectFn = this.reconnect;
|
|
190
|
+
if (reconnectFn == null || lastDispatchedId == null) {
|
|
191
|
+
return yield __await(void 0);
|
|
192
|
+
}
|
|
111
193
|
try {
|
|
112
|
-
|
|
194
|
+
const reconnected = yield __await(reconnectFn(lastDispatchedId));
|
|
195
|
+
if (reconnected == null) {
|
|
196
|
+
currentStream = this.createEmptyStream();
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
currentStream = reconnected;
|
|
200
|
+
}
|
|
201
|
+
catch (_e) {
|
|
202
|
+
// Failed reconnect (e.g. HTTP error); assign an empty stream
|
|
203
|
+
// so the next iteration is a safe no-op before shouldReconnect.
|
|
204
|
+
currentStream = this.createEmptyStream();
|
|
113
205
|
}
|
|
114
|
-
finally { if (e_1) throw e_1.error; }
|
|
115
206
|
}
|
|
116
207
|
});
|
|
117
208
|
}
|
|
118
209
|
iterSseEvents() {
|
|
119
210
|
return __asyncGenerator(this, arguments, function* iterSseEvents_1() {
|
|
120
211
|
var _a, e_2, _b, _c;
|
|
121
|
-
|
|
122
|
-
let
|
|
123
|
-
let
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
212
|
+
let reconnectAttempts = 0;
|
|
213
|
+
let currentStream = this.stream;
|
|
214
|
+
let lastId;
|
|
215
|
+
// See iterDataMessages: reconnection uses the last *dispatched* id (per
|
|
216
|
+
// the EventSource spec), not the last *parsed* id, to avoid skipping an
|
|
217
|
+
// event that was never yielded when a drop lands mid-event.
|
|
218
|
+
let lastDispatchedId;
|
|
219
|
+
let lastRetry;
|
|
220
|
+
while (true) {
|
|
221
|
+
const stream = readableStreamAsyncIterable(currentStream);
|
|
222
|
+
let buf = "";
|
|
223
|
+
let eventType;
|
|
224
|
+
let dataValue;
|
|
225
|
+
try {
|
|
226
|
+
for (var _d = true, stream_2 = (e_2 = void 0, __asyncValues(stream)), stream_2_1; stream_2_1 = yield __await(stream_2.next()), _a = stream_2_1.done, !_a; _d = true) {
|
|
227
|
+
_c = stream_2_1.value;
|
|
228
|
+
_d = false;
|
|
229
|
+
const chunk = _c;
|
|
230
|
+
buf += this.decodeChunk(chunk);
|
|
231
|
+
let terminatorIndex;
|
|
232
|
+
while ((terminatorIndex = buf.indexOf("\n")) >= 0) {
|
|
233
|
+
const line = buf.slice(0, terminatorIndex).replace(/\r$/, "");
|
|
234
|
+
buf = buf.slice(terminatorIndex + 1);
|
|
235
|
+
if (!line.trim()) {
|
|
236
|
+
if (dataValue != null) {
|
|
237
|
+
const data = yield __await(this.dispatchSseEvent(dataValue, eventType));
|
|
238
|
+
if (data == null) {
|
|
239
|
+
return yield __await(void 0);
|
|
240
|
+
}
|
|
241
|
+
yield yield __await({ data, id: lastId, retry: lastRetry, event: eventType });
|
|
242
|
+
lastDispatchedId = lastId;
|
|
243
|
+
reconnectAttempts = 0;
|
|
244
|
+
}
|
|
245
|
+
eventType = undefined;
|
|
246
|
+
dataValue = undefined;
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if (line.startsWith(EVENT_PREFIX)) {
|
|
250
|
+
eventType = line.slice(EVENT_PREFIX.length).trim();
|
|
251
|
+
}
|
|
252
|
+
else if (line.startsWith(DATA_PREFIX)) {
|
|
253
|
+
const val = line.slice(DATA_PREFIX.length).trim();
|
|
254
|
+
dataValue = dataValue != null ? `${dataValue}\n${val}` : val;
|
|
255
|
+
}
|
|
256
|
+
else if (line.startsWith(ID_PREFIX)) {
|
|
257
|
+
const idValue = line.slice(ID_PREFIX.length).trim();
|
|
258
|
+
if (!idValue.includes("\0")) {
|
|
259
|
+
lastId = idValue;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else if (line.startsWith(RETRY_PREFIX)) {
|
|
263
|
+
const retryValue = line.slice(RETRY_PREFIX.length).trim();
|
|
264
|
+
const parsed = parseInt(retryValue, 10);
|
|
265
|
+
if (!Number.isNaN(parsed) && String(parsed) === retryValue) {
|
|
266
|
+
lastRetry = parsed;
|
|
140
267
|
}
|
|
141
|
-
yield yield __await(message);
|
|
142
268
|
}
|
|
143
|
-
eventType = undefined;
|
|
144
|
-
dataValue = undefined;
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
if (line.startsWith(EVENT_PREFIX)) {
|
|
148
|
-
eventType = line.slice(EVENT_PREFIX.length).trim();
|
|
149
|
-
}
|
|
150
|
-
else if (line.startsWith(DATA_PREFIX)) {
|
|
151
|
-
const val = line.slice(DATA_PREFIX.length).trim();
|
|
152
|
-
dataValue = dataValue != null ? `${dataValue}\n${val}` : val;
|
|
153
269
|
}
|
|
154
270
|
}
|
|
155
271
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
272
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
273
|
+
finally {
|
|
274
|
+
try {
|
|
275
|
+
if (!_d && !_a && (_b = stream_2.return)) yield __await(_b.call(stream_2));
|
|
276
|
+
}
|
|
277
|
+
finally { if (e_2) throw e_2.error; }
|
|
278
|
+
}
|
|
279
|
+
if (dataValue != null) {
|
|
280
|
+
const data = yield __await(this.dispatchSseEvent(dataValue, eventType));
|
|
281
|
+
if (data != null) {
|
|
282
|
+
yield yield __await({ data, id: lastId, retry: lastRetry, event: eventType });
|
|
283
|
+
lastDispatchedId = lastId;
|
|
284
|
+
reconnectAttempts = 0;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (!this.shouldReconnect(lastDispatchedId, reconnectAttempts)) {
|
|
288
|
+
return yield __await(void 0);
|
|
289
|
+
}
|
|
290
|
+
reconnectAttempts++;
|
|
291
|
+
yield __await(this.delayReconnect(lastRetry));
|
|
292
|
+
if (this.controller.signal.aborted) {
|
|
293
|
+
return yield __await(void 0);
|
|
294
|
+
}
|
|
295
|
+
// Re-check after async delay; needed for TypeScript narrowing.
|
|
296
|
+
const reconnectFn = this.reconnect;
|
|
297
|
+
if (reconnectFn == null || lastDispatchedId == null) {
|
|
298
|
+
return yield __await(void 0);
|
|
299
|
+
}
|
|
159
300
|
try {
|
|
160
|
-
|
|
301
|
+
const reconnected = yield __await(reconnectFn(lastDispatchedId));
|
|
302
|
+
if (reconnected == null) {
|
|
303
|
+
currentStream = this.createEmptyStream();
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
currentStream = reconnected;
|
|
161
307
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (message != null) {
|
|
167
|
-
yield yield __await(message);
|
|
308
|
+
catch (_e) {
|
|
309
|
+
// Failed reconnect (e.g. HTTP error); assign an empty stream
|
|
310
|
+
// so the next iteration is a safe no-op before shouldReconnect.
|
|
311
|
+
currentStream = this.createEmptyStream();
|
|
168
312
|
}
|
|
169
313
|
}
|
|
170
314
|
});
|
|
@@ -180,6 +324,96 @@ class Stream {
|
|
|
180
324
|
return this.parse(this.injectDiscriminator((0, json_js_1.fromJson)(dataValue), eventType));
|
|
181
325
|
});
|
|
182
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* Determines whether a reconnection attempt should be made.
|
|
329
|
+
*/
|
|
330
|
+
shouldReconnect(lastId, reconnectAttempts) {
|
|
331
|
+
if (!this.resumable) {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
if (this.streamTerminator == null) {
|
|
335
|
+
// Without a terminator the client cannot distinguish a completed
|
|
336
|
+
// stream from a dropped connection, so reconnection is disabled.
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
// NOTE: When a terminator IS configured but the server never sends it
|
|
340
|
+
// (e.g. it drops the connection after emitting events every time),
|
|
341
|
+
// maxReconnectionAttempts is a per-consecutive-failure cap — each
|
|
342
|
+
// yielded event resets the counter. This matches EventSource semantics
|
|
343
|
+
// but means such a server can cause unbounded reconnections. Callers
|
|
344
|
+
// concerned about this should impose a wall-clock budget externally.
|
|
345
|
+
if (!this.reconnectionEnabled) {
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
if (this.reconnect == null) {
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
if (lastId == null || lastId === "") {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
if (reconnectAttempts >= this.maxReconnectionAttempts) {
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
if (this.controller.signal.aborted) {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
return true;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Delays before reconnecting, using a server-sent retry directive if provided
|
|
364
|
+
* (clamped to MAX_RECONNECT_DELAY_MS), otherwise falling back to
|
|
365
|
+
* DEFAULT_RECONNECT_DELAY_MS. The delay is abortable: if the stream's abort
|
|
366
|
+
* signal fires during the wait, the promise resolves immediately.
|
|
367
|
+
*/
|
|
368
|
+
delayReconnect(lastRetry) {
|
|
369
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
370
|
+
const base = lastRetry != null && lastRetry > 0 ? lastRetry : DEFAULT_RECONNECT_DELAY_MS;
|
|
371
|
+
const delay = Math.min(base, MAX_RECONNECT_DELAY_MS);
|
|
372
|
+
const signal = this.controller.signal;
|
|
373
|
+
if (signal.aborted) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
yield new Promise((resolve) => {
|
|
377
|
+
const timer = setTimeout(() => {
|
|
378
|
+
signal.removeEventListener("abort", onAbort);
|
|
379
|
+
resolve();
|
|
380
|
+
}, delay);
|
|
381
|
+
const onAbort = () => {
|
|
382
|
+
clearTimeout(timer);
|
|
383
|
+
resolve();
|
|
384
|
+
};
|
|
385
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
createEmptyStream() {
|
|
390
|
+
return new ReadableStream({
|
|
391
|
+
start(controller) {
|
|
392
|
+
controller.close();
|
|
393
|
+
},
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
removeAbortListener() {
|
|
397
|
+
if (this.externalSignal != null && this.onExternalAbort != null) {
|
|
398
|
+
this.externalSignal.removeEventListener("abort", this.onExternalAbort);
|
|
399
|
+
this.onExternalAbort = undefined;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
withMetadata() {
|
|
403
|
+
const self = this;
|
|
404
|
+
return {
|
|
405
|
+
[Symbol.asyncIterator]() {
|
|
406
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
407
|
+
try {
|
|
408
|
+
yield __await(yield* __asyncDelegator(__asyncValues(self.iterMessages())));
|
|
409
|
+
}
|
|
410
|
+
finally {
|
|
411
|
+
self.removeAbortListener();
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
},
|
|
415
|
+
};
|
|
416
|
+
}
|
|
183
417
|
injectDiscriminator(parsed, eventType) {
|
|
184
418
|
if (this.eventDiscriminator == null || eventType == null) {
|
|
185
419
|
return parsed;
|
|
@@ -197,19 +431,24 @@ class Stream {
|
|
|
197
431
|
return __asyncGenerator(this, arguments, function* _a() {
|
|
198
432
|
var _b, e_3, _c, _d;
|
|
199
433
|
try {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
434
|
+
try {
|
|
435
|
+
for (var _e = true, _f = __asyncValues(this.iterMessages()), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; _e = true) {
|
|
436
|
+
_d = _g.value;
|
|
437
|
+
_e = false;
|
|
438
|
+
const event = _d;
|
|
439
|
+
yield yield __await(event.data);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
443
|
+
finally {
|
|
444
|
+
try {
|
|
445
|
+
if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
|
|
446
|
+
}
|
|
447
|
+
finally { if (e_3) throw e_3.error; }
|
|
205
448
|
}
|
|
206
449
|
}
|
|
207
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
208
450
|
finally {
|
|
209
|
-
|
|
210
|
-
if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
|
|
211
|
-
}
|
|
212
|
-
finally { if (e_3) throw e_3.error; }
|
|
451
|
+
this.removeAbortListener();
|
|
213
452
|
}
|
|
214
453
|
});
|
|
215
454
|
}
|
package/dist/cjs/core/url/qs.js
CHANGED
|
@@ -19,7 +19,7 @@ function stringifyObject(obj, prefix = "", options) {
|
|
|
19
19
|
const parts = [];
|
|
20
20
|
for (const [key, value] of Object.entries(obj)) {
|
|
21
21
|
const fullKey = prefix ? `${prefix}[${key}]` : key;
|
|
22
|
-
if (value
|
|
22
|
+
if (value == null) {
|
|
23
23
|
continue;
|
|
24
24
|
}
|
|
25
25
|
if (Array.isArray(value)) {
|
|
@@ -39,7 +39,7 @@ function stringifyObject(obj, prefix = "", options) {
|
|
|
39
39
|
else {
|
|
40
40
|
for (let i = 0; i < value.length; i++) {
|
|
41
41
|
const item = value[i];
|
|
42
|
-
if (item
|
|
42
|
+
if (item == null) {
|
|
43
43
|
continue;
|
|
44
44
|
}
|
|
45
45
|
if (typeof item === "object" && !Array.isArray(item) && item !== null) {
|
|
@@ -10,7 +10,7 @@ class phenomlError extends Error {
|
|
|
10
10
|
if (Error.captureStackTrace) {
|
|
11
11
|
Error.captureStackTrace(this, this.constructor);
|
|
12
12
|
}
|
|
13
|
-
this.name =
|
|
13
|
+
this.name = "phenomlError";
|
|
14
14
|
this.statusCode = statusCode;
|
|
15
15
|
this.body = body;
|
|
16
16
|
this.rawResponse = rawResponse;
|
|
@@ -18,6 +18,10 @@ class phenomlError extends Error {
|
|
|
18
18
|
this.cause = cause;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
get requestId() {
|
|
22
|
+
var _a, _b, _c;
|
|
23
|
+
return (_c = (_b = (_a = this.rawResponse) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.get("x-request-id")) !== null && _c !== void 0 ? _c : undefined;
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
exports.phenomlError = phenomlError;
|
|
23
27
|
function buildMessage({ message, statusCode, body, }) {
|
|
@@ -1,18 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
3
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
37
|
exports.phenomlTimeoutError = void 0;
|
|
5
|
-
|
|
38
|
+
const errors = __importStar(require("./index.js"));
|
|
39
|
+
class phenomlTimeoutError extends errors.phenomlError {
|
|
6
40
|
constructor(message, opts) {
|
|
7
|
-
super(
|
|
41
|
+
super({
|
|
42
|
+
message: message,
|
|
43
|
+
cause: opts === null || opts === void 0 ? void 0 : opts.cause,
|
|
44
|
+
});
|
|
8
45
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
9
46
|
if (Error.captureStackTrace) {
|
|
10
47
|
Error.captureStackTrace(this, this.constructor);
|
|
11
48
|
}
|
|
12
|
-
this.name =
|
|
13
|
-
if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
|
|
14
|
-
this.cause = opts.cause;
|
|
15
|
-
}
|
|
49
|
+
this.name = "phenomlTimeoutError";
|
|
16
50
|
}
|
|
17
51
|
}
|
|
18
52
|
exports.phenomlTimeoutError = phenomlTimeoutError;
|