@corti/sdk 1.0.0-alpha → 1.0.0-alpha.1
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 +126 -44
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/errors/ForbiddenError.d.ts +1 -2
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +6 -0
- package/dist/cjs/api/errors/UnprocessableEntityError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +1 -0
- package/dist/cjs/api/errors/index.js +1 -0
- package/dist/cjs/api/resources/agents/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/agents/client/Client.js +42 -0
- package/dist/cjs/api/resources/codes/client/Client.d.ts +15 -3
- package/dist/cjs/api/resources/codes/client/Client.js +16 -10
- package/dist/cjs/api/resources/codes/client/requests/CodesGeneralPredictRequest.d.ts +16 -4
- package/dist/cjs/api/resources/documents/client/Client.js +5 -35
- package/dist/cjs/api/resources/interactions/client/Client.js +5 -35
- package/dist/cjs/api/resources/recordings/client/Client.js +4 -28
- package/dist/cjs/api/resources/stream/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/stream/client/Client.js +4 -2
- package/dist/cjs/api/resources/stream/client/Socket.d.ts +1 -1
- package/dist/cjs/api/resources/transcribe/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/transcribe/client/Client.js +4 -2
- package/dist/cjs/api/resources/transcribe/client/Socket.d.ts +1 -1
- package/dist/cjs/api/resources/transcripts/client/Client.js +4 -28
- package/dist/cjs/api/types/AgentsErrorResponse.d.ts +12 -0
- package/dist/cjs/api/types/AgentsErrorResponse.js +3 -0
- package/dist/cjs/api/types/AgentsValidationError.d.ts +8 -0
- package/dist/cjs/api/types/AgentsValidationError.js +3 -0
- package/dist/cjs/api/types/AgentsValidationErrorErrorsItem.d.ts +4 -0
- package/dist/cjs/api/types/AgentsValidationErrorErrorsItem.js +3 -0
- package/dist/cjs/api/types/AgentsValidationErrorResponse.d.ts +4 -0
- package/dist/cjs/api/types/AgentsValidationErrorResponse.js +3 -0
- package/dist/cjs/api/types/CodesFilter.d.ts +11 -0
- package/dist/cjs/api/types/CodesFilter.js +3 -0
- package/dist/cjs/api/types/CodesGeneralReadResponse.d.ts +2 -0
- package/dist/cjs/api/types/CodesGeneralReadResponseAlternativesItem.d.ts +9 -0
- package/dist/cjs/api/types/CodesGeneralReadResponseAlternativesItem.js +3 -0
- package/dist/cjs/api/types/CodesGeneralReadResponseEvidencesItem.d.ts +6 -2
- package/dist/cjs/api/types/CodesGeneralResponse.d.ts +2 -2
- package/dist/cjs/api/types/CommonCodingSystemEnum.d.ts +2 -1
- package/dist/cjs/api/types/CommonCodingSystemEnum.js +2 -1
- package/dist/cjs/api/types/StreamConfigMessage.d.ts +1 -1
- package/dist/cjs/api/types/StreamEndMessage.d.ts +1 -2
- package/dist/cjs/api/types/StreamEndedMessage.d.ts +1 -2
- package/dist/cjs/api/types/StreamErrorMessage.d.ts +1 -1
- package/dist/cjs/api/types/StreamFactsMessage.d.ts +1 -1
- package/dist/cjs/api/types/StreamFlushMessage.d.ts +1 -2
- package/dist/cjs/api/types/StreamFlushedMessage.d.ts +1 -2
- package/dist/cjs/api/types/StreamTranscriptMessage.d.ts +1 -1
- package/dist/cjs/api/types/StreamUsageMessage.d.ts +1 -2
- package/dist/cjs/api/types/TranscribeCommandMessage.d.ts +1 -1
- package/dist/cjs/api/types/TranscribeCommandVariable.d.ts +1 -2
- package/dist/cjs/api/types/TranscribeConfigMessage.d.ts +1 -1
- package/dist/cjs/api/types/TranscribeEndMessage.d.ts +1 -2
- package/dist/cjs/api/types/TranscribeEndedMessage.d.ts +1 -2
- package/dist/cjs/api/types/TranscribeErrorMessage.d.ts +1 -1
- package/dist/cjs/api/types/TranscribeFlushMessage.d.ts +1 -2
- package/dist/cjs/api/types/TranscribeFlushedMessage.d.ts +1 -2
- package/dist/cjs/api/types/TranscribeFormattingDates.d.ts +4 -4
- package/dist/cjs/api/types/TranscribeFormattingDates.js +4 -4
- package/dist/cjs/api/types/TranscribeFormattingNumbers.d.ts +2 -2
- package/dist/cjs/api/types/TranscribeFormattingNumbers.js +2 -2
- package/dist/cjs/api/types/TranscribeFormattingNumericRanges.d.ts +1 -1
- package/dist/cjs/api/types/TranscribeFormattingNumericRanges.js +1 -1
- package/dist/cjs/api/types/TranscribeFormattingOrdinals.d.ts +1 -0
- package/dist/cjs/api/types/TranscribeFormattingOrdinals.js +1 -0
- package/dist/cjs/api/types/TranscribeFormattingTimes.d.ts +3 -2
- package/dist/cjs/api/types/TranscribeFormattingTimes.js +3 -2
- package/dist/cjs/api/types/TranscribeTranscriptMessage.d.ts +1 -1
- package/dist/cjs/api/types/TranscribeUsageMessage.d.ts +1 -2
- package/dist/cjs/api/types/index.d.ts +6 -19
- package/dist/cjs/api/types/index.js +6 -19
- package/dist/cjs/auth/OAuthAuthProvider.d.ts +1 -99
- package/dist/cjs/auth/OAuthAuthProvider.js +4 -276
- package/dist/cjs/core/fetcher/index.d.ts +2 -11
- package/dist/cjs/core/fetcher/index.js +16 -15
- package/dist/cjs/custom/CortiClient.d.ts +15 -4
- package/dist/cjs/custom/CortiClient.js +8 -5
- package/dist/cjs/custom/CortiWebSocketProxyClient.d.ts +10 -40
- package/dist/cjs/custom/CortiWebSocketProxyClient.js +12 -74
- package/dist/cjs/custom/OAuthAuthProvider.d.ts +99 -0
- package/dist/cjs/custom/OAuthAuthProvider.js +290 -0
- package/dist/cjs/custom/auth/CortiAuth.d.ts +129 -0
- package/dist/cjs/custom/auth/CortiAuth.js +195 -0
- package/dist/cjs/custom/auth/OAuthAuthCodeAuthProvider.d.ts +23 -0
- package/dist/cjs/custom/auth/OAuthAuthCodeAuthProvider.js +164 -0
- package/dist/cjs/custom/auth/OAuthPkceAuthProvider.d.ts +23 -0
- package/dist/cjs/custom/auth/OAuthPkceAuthProvider.js +164 -0
- package/dist/cjs/custom/auth/OAuthRopcAuthProvider.d.ts +22 -0
- package/dist/cjs/custom/auth/OAuthRopcAuthProvider.js +137 -0
- package/dist/cjs/custom/fetcher.d.ts +3 -0
- package/dist/cjs/custom/fetcher.js +8 -0
- package/dist/cjs/custom/index.d.ts +10 -0
- package/dist/cjs/custom/index.js +55 -1
- package/dist/cjs/custom/overrides/OAuthAuthProvider.d.ts +99 -0
- package/dist/cjs/custom/overrides/OAuthAuthProvider.js +289 -0
- package/dist/cjs/custom/overrides/fetcher/index.d.ts +12 -0
- package/dist/cjs/custom/overrides/fetcher/index.js +18 -0
- package/dist/cjs/custom/overrides/index.d.ts +14 -0
- package/dist/cjs/custom/overrides/index.js +61 -0
- package/dist/cjs/custom/proxy/CustomProxyStream.d.ts +17 -0
- package/dist/cjs/custom/proxy/CustomProxyStream.js +18 -0
- package/dist/cjs/custom/proxy/CustomProxyTranscribe.d.ts +17 -0
- package/dist/cjs/custom/proxy/CustomProxyTranscribe.js +21 -0
- package/dist/cjs/custom/stream/CustomStream.d.ts +39 -0
- package/dist/cjs/custom/stream/CustomStream.js +183 -0
- package/dist/cjs/custom/stream/CustomStreamSocket.d.ts +7 -0
- package/dist/cjs/custom/stream/CustomStreamSocket.js +17 -0
- package/dist/cjs/custom/stream/parseStreamResponseType.d.ts +2 -0
- package/dist/cjs/custom/stream/parseStreamResponseType.js +49 -0
- package/dist/cjs/custom/transcribe/CustomTranscribe.d.ts +38 -0
- package/dist/cjs/custom/transcribe/CustomTranscribe.js +181 -0
- package/dist/cjs/custom/transcribe/CustomTranscribeSocket.d.ts +7 -0
- package/dist/cjs/custom/transcribe/CustomTranscribeSocket.js +17 -0
- package/dist/cjs/custom/transcribe/parseTranscribeResponseType.d.ts +2 -0
- package/dist/cjs/custom/transcribe/parseTranscribeResponseType.js +49 -0
- package/dist/cjs/custom/utils/encodeHeadersAsWsProtocols.d.ts +30 -0
- package/dist/cjs/custom/utils/encodeHeadersAsWsProtocols.js +102 -0
- package/dist/cjs/custom/utils/index.d.ts +3 -0
- package/dist/cjs/custom/utils/index.js +10 -0
- package/dist/cjs/custom/utils/localStorageHelpers.js +11 -9
- package/dist/cjs/custom/utils/withCredentialsConfig.d.ts +2 -0
- package/dist/cjs/custom/utils/withCredentialsConfig.js +15 -0
- package/dist/cjs/index.d.ts +1 -16
- package/dist/cjs/index.js +1 -47
- package/dist/cjs/serialization/resources/codes/client/requests/CodesGeneralPredictRequest.d.ts +2 -1
- package/dist/cjs/serialization/resources/codes/client/requests/CodesGeneralPredictRequest.js +2 -1
- package/dist/cjs/serialization/resources/stream/client/socket/StreamSocketResponse.d.ts +2 -2
- package/dist/cjs/serialization/resources/stream/client/socket/StreamSocketResponse.js +1 -1
- package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.ts +2 -2
- package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.js +1 -1
- package/dist/cjs/serialization/types/AgentsErrorResponse.d.ts +13 -0
- package/dist/cjs/serialization/types/AgentsErrorResponse.js +46 -0
- package/dist/cjs/serialization/types/AgentsValidationError.d.ts +14 -0
- package/dist/cjs/serialization/types/AgentsValidationError.js +46 -0
- package/dist/cjs/serialization/types/AgentsValidationErrorErrorsItem.d.ts +10 -0
- package/dist/cjs/serialization/types/AgentsValidationErrorErrorsItem.js +42 -0
- package/dist/cjs/serialization/types/AgentsValidationErrorResponse.d.ts +10 -0
- package/dist/cjs/serialization/types/AgentsValidationErrorResponse.js +45 -0
- package/dist/cjs/serialization/types/CodesFilter.d.ts +11 -0
- package/dist/cjs/serialization/types/CodesFilter.js +43 -0
- package/dist/cjs/serialization/types/CodesGeneralReadResponse.d.ts +2 -0
- package/dist/cjs/serialization/types/CodesGeneralReadResponse.js +2 -0
- package/dist/cjs/serialization/types/CodesGeneralReadResponseAlternativesItem.d.ts +10 -0
- package/dist/cjs/serialization/types/CodesGeneralReadResponseAlternativesItem.js +42 -0
- package/dist/cjs/serialization/types/CodesGeneralReadResponseEvidencesItem.d.ts +4 -2
- package/dist/cjs/serialization/types/CodesGeneralReadResponseEvidencesItem.js +4 -2
- package/dist/cjs/serialization/types/CommonCodingSystemEnum.d.ts +1 -1
- package/dist/cjs/serialization/types/CommonCodingSystemEnum.js +1 -1
- package/dist/cjs/serialization/types/StreamConfigMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamConfigMessage.js +1 -2
- package/dist/cjs/serialization/types/StreamEndMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamEndMessage.js +1 -2
- package/dist/cjs/serialization/types/StreamEndedMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamEndedMessage.js +1 -2
- package/dist/cjs/serialization/types/StreamErrorMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamErrorMessage.js +1 -2
- package/dist/cjs/serialization/types/StreamFactsMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamFactsMessage.js +1 -2
- package/dist/cjs/serialization/types/StreamFlushMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamFlushMessage.js +1 -2
- package/dist/cjs/serialization/types/StreamFlushedMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamFlushedMessage.js +1 -2
- package/dist/cjs/serialization/types/StreamTranscriptMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamTranscriptMessage.js +1 -2
- package/dist/cjs/serialization/types/StreamUsageMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/StreamUsageMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeCommandMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeCommandMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeCommandVariable.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeCommandVariable.js +1 -2
- package/dist/cjs/serialization/types/TranscribeConfigMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeConfigMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeEndMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeEndMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeEndedMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeEndedMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeErrorMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeErrorMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeFlushMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeFlushMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeFlushedMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeFlushedMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeFormattingDates.d.ts +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingDates.js +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingNumbers.d.ts +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingNumbers.js +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingNumericRanges.d.ts +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingNumericRanges.js +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingOrdinals.d.ts +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingOrdinals.js +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingTimes.d.ts +1 -1
- package/dist/cjs/serialization/types/TranscribeFormattingTimes.js +1 -1
- package/dist/cjs/serialization/types/TranscribeTranscriptMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeTranscriptMessage.js +1 -2
- package/dist/cjs/serialization/types/TranscribeUsageMessage.d.ts +1 -2
- package/dist/cjs/serialization/types/TranscribeUsageMessage.js +1 -2
- package/dist/cjs/serialization/types/index.d.ts +6 -19
- package/dist/cjs/serialization/types/index.js +6 -19
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/errors/ForbiddenError.d.mts +1 -2
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +6 -0
- package/dist/esm/api/errors/UnprocessableEntityError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +1 -0
- package/dist/esm/api/errors/index.mjs +1 -0
- package/dist/esm/api/resources/agents/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/agents/client/Client.mjs +42 -0
- package/dist/esm/api/resources/codes/client/Client.d.mts +15 -3
- package/dist/esm/api/resources/codes/client/Client.mjs +16 -10
- package/dist/esm/api/resources/codes/client/requests/CodesGeneralPredictRequest.d.mts +16 -4
- package/dist/esm/api/resources/documents/client/Client.mjs +5 -35
- package/dist/esm/api/resources/interactions/client/Client.mjs +5 -35
- package/dist/esm/api/resources/recordings/client/Client.mjs +4 -28
- package/dist/esm/api/resources/stream/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/stream/client/Client.mjs +5 -3
- package/dist/esm/api/resources/stream/client/Socket.d.mts +1 -1
- package/dist/esm/api/resources/transcribe/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/transcribe/client/Client.mjs +5 -3
- package/dist/esm/api/resources/transcribe/client/Socket.d.mts +1 -1
- package/dist/esm/api/resources/transcripts/client/Client.mjs +4 -28
- package/dist/esm/api/types/AgentsErrorResponse.d.mts +12 -0
- package/dist/esm/api/types/AgentsErrorResponse.mjs +2 -0
- package/dist/esm/api/types/AgentsValidationError.d.mts +8 -0
- package/dist/esm/api/types/AgentsValidationError.mjs +2 -0
- package/dist/esm/api/types/AgentsValidationErrorErrorsItem.d.mts +4 -0
- package/dist/esm/api/types/AgentsValidationErrorErrorsItem.mjs +2 -0
- package/dist/esm/api/types/AgentsValidationErrorResponse.d.mts +4 -0
- package/dist/esm/api/types/AgentsValidationErrorResponse.mjs +2 -0
- package/dist/esm/api/types/CodesFilter.d.mts +11 -0
- package/dist/esm/api/types/CodesFilter.mjs +2 -0
- package/dist/esm/api/types/CodesGeneralReadResponse.d.mts +2 -0
- package/dist/esm/api/types/CodesGeneralReadResponseAlternativesItem.d.mts +9 -0
- package/dist/esm/api/types/CodesGeneralReadResponseAlternativesItem.mjs +2 -0
- package/dist/esm/api/types/CodesGeneralReadResponseEvidencesItem.d.mts +6 -2
- package/dist/esm/api/types/CodesGeneralResponse.d.mts +2 -2
- package/dist/esm/api/types/CommonCodingSystemEnum.d.mts +2 -1
- package/dist/esm/api/types/CommonCodingSystemEnum.mjs +2 -1
- package/dist/esm/api/types/StreamConfigMessage.d.mts +1 -1
- package/dist/esm/api/types/StreamEndMessage.d.mts +1 -2
- package/dist/esm/api/types/StreamEndedMessage.d.mts +1 -2
- package/dist/esm/api/types/StreamErrorMessage.d.mts +1 -1
- package/dist/esm/api/types/StreamFactsMessage.d.mts +1 -1
- package/dist/esm/api/types/StreamFlushMessage.d.mts +1 -2
- package/dist/esm/api/types/StreamFlushedMessage.d.mts +1 -2
- package/dist/esm/api/types/StreamTranscriptMessage.d.mts +1 -1
- package/dist/esm/api/types/StreamUsageMessage.d.mts +1 -2
- package/dist/esm/api/types/TranscribeCommandMessage.d.mts +1 -1
- package/dist/esm/api/types/TranscribeCommandVariable.d.mts +1 -2
- package/dist/esm/api/types/TranscribeConfigMessage.d.mts +1 -1
- package/dist/esm/api/types/TranscribeEndMessage.d.mts +1 -2
- package/dist/esm/api/types/TranscribeEndedMessage.d.mts +1 -2
- package/dist/esm/api/types/TranscribeErrorMessage.d.mts +1 -1
- package/dist/esm/api/types/TranscribeFlushMessage.d.mts +1 -2
- package/dist/esm/api/types/TranscribeFlushedMessage.d.mts +1 -2
- package/dist/esm/api/types/TranscribeFormattingDates.d.mts +4 -4
- package/dist/esm/api/types/TranscribeFormattingDates.mjs +4 -4
- package/dist/esm/api/types/TranscribeFormattingNumbers.d.mts +2 -2
- package/dist/esm/api/types/TranscribeFormattingNumbers.mjs +2 -2
- package/dist/esm/api/types/TranscribeFormattingNumericRanges.d.mts +1 -1
- package/dist/esm/api/types/TranscribeFormattingNumericRanges.mjs +1 -1
- package/dist/esm/api/types/TranscribeFormattingOrdinals.d.mts +1 -0
- package/dist/esm/api/types/TranscribeFormattingOrdinals.mjs +1 -0
- package/dist/esm/api/types/TranscribeFormattingTimes.d.mts +3 -2
- package/dist/esm/api/types/TranscribeFormattingTimes.mjs +3 -2
- package/dist/esm/api/types/TranscribeTranscriptMessage.d.mts +1 -1
- package/dist/esm/api/types/TranscribeUsageMessage.d.mts +1 -2
- package/dist/esm/api/types/index.d.mts +6 -19
- package/dist/esm/api/types/index.mjs +6 -19
- package/dist/esm/auth/OAuthAuthProvider.d.mts +1 -99
- package/dist/esm/auth/OAuthAuthProvider.mjs +2 -239
- package/dist/esm/core/fetcher/index.d.mts +2 -11
- package/dist/esm/core/fetcher/index.mjs +2 -6
- package/dist/esm/custom/CortiClient.d.mts +15 -4
- package/dist/esm/custom/CortiClient.mjs +8 -5
- package/dist/esm/custom/CortiWebSocketProxyClient.d.mts +10 -40
- package/dist/esm/custom/CortiWebSocketProxyClient.mjs +10 -39
- package/dist/esm/custom/OAuthAuthProvider.d.mts +99 -0
- package/dist/esm/custom/OAuthAuthProvider.mjs +239 -0
- package/dist/esm/custom/auth/CortiAuth.d.mts +129 -0
- package/dist/esm/custom/auth/CortiAuth.mjs +158 -0
- package/dist/esm/custom/auth/OAuthAuthCodeAuthProvider.d.mts +23 -0
- package/dist/esm/custom/auth/OAuthAuthCodeAuthProvider.mjs +127 -0
- package/dist/esm/custom/auth/OAuthPkceAuthProvider.d.mts +23 -0
- package/dist/esm/custom/auth/OAuthPkceAuthProvider.mjs +127 -0
- package/dist/esm/custom/auth/OAuthRopcAuthProvider.d.mts +22 -0
- package/dist/esm/custom/auth/OAuthRopcAuthProvider.mjs +100 -0
- package/dist/esm/custom/fetcher.d.mts +3 -0
- package/dist/esm/custom/fetcher.mjs +4 -0
- package/dist/esm/custom/index.d.mts +10 -0
- package/dist/esm/custom/index.mjs +10 -0
- package/dist/esm/custom/overrides/OAuthAuthProvider.d.mts +99 -0
- package/dist/esm/custom/overrides/OAuthAuthProvider.mjs +238 -0
- package/dist/esm/custom/overrides/fetcher/index.d.mts +12 -0
- package/dist/esm/custom/overrides/fetcher/index.mjs +7 -0
- package/dist/esm/custom/overrides/index.d.mts +14 -0
- package/dist/esm/custom/overrides/index.mjs +14 -0
- package/dist/esm/custom/proxy/CustomProxyStream.d.mts +17 -0
- package/dist/esm/custom/proxy/CustomProxyStream.mjs +15 -0
- package/dist/esm/custom/proxy/CustomProxyTranscribe.d.mts +17 -0
- package/dist/esm/custom/proxy/CustomProxyTranscribe.mjs +18 -0
- package/dist/esm/custom/stream/CustomStream.d.mts +39 -0
- package/dist/esm/custom/stream/CustomStream.mjs +146 -0
- package/dist/esm/custom/stream/CustomStreamSocket.d.mts +7 -0
- package/dist/esm/custom/stream/CustomStreamSocket.mjs +13 -0
- package/dist/esm/custom/stream/parseStreamResponseType.d.mts +2 -0
- package/dist/esm/custom/stream/parseStreamResponseType.mjs +13 -0
- package/dist/esm/custom/transcribe/CustomTranscribe.d.mts +38 -0
- package/dist/esm/custom/transcribe/CustomTranscribe.mjs +144 -0
- package/dist/esm/custom/transcribe/CustomTranscribeSocket.d.mts +7 -0
- package/dist/esm/custom/transcribe/CustomTranscribeSocket.mjs +13 -0
- package/dist/esm/custom/transcribe/parseTranscribeResponseType.d.mts +2 -0
- package/dist/esm/custom/transcribe/parseTranscribeResponseType.mjs +13 -0
- package/dist/esm/custom/utils/encodeHeadersAsWsProtocols.d.mts +30 -0
- package/dist/esm/custom/utils/encodeHeadersAsWsProtocols.mjs +65 -0
- package/dist/esm/custom/utils/index.d.mts +3 -0
- package/dist/esm/custom/utils/index.mjs +3 -0
- package/dist/esm/custom/utils/localStorageHelpers.mjs +11 -9
- package/dist/esm/custom/utils/withCredentialsConfig.d.mts +2 -0
- package/dist/esm/custom/utils/withCredentialsConfig.mjs +11 -0
- package/dist/esm/index.d.mts +1 -16
- package/dist/esm/index.mjs +1 -15
- package/dist/esm/serialization/resources/codes/client/requests/CodesGeneralPredictRequest.d.mts +2 -1
- package/dist/esm/serialization/resources/codes/client/requests/CodesGeneralPredictRequest.mjs +2 -1
- package/dist/esm/serialization/resources/stream/client/socket/StreamSocketResponse.d.mts +2 -2
- package/dist/esm/serialization/resources/stream/client/socket/StreamSocketResponse.mjs +1 -1
- package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.mts +2 -2
- package/dist/esm/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.mjs +1 -1
- package/dist/esm/serialization/types/AgentsErrorResponse.d.mts +13 -0
- package/dist/esm/serialization/types/AgentsErrorResponse.mjs +10 -0
- package/dist/esm/serialization/types/AgentsValidationError.d.mts +14 -0
- package/dist/esm/serialization/types/AgentsValidationError.mjs +10 -0
- package/dist/esm/serialization/types/AgentsValidationErrorErrorsItem.d.mts +10 -0
- package/dist/esm/serialization/types/AgentsValidationErrorErrorsItem.mjs +6 -0
- package/dist/esm/serialization/types/AgentsValidationErrorResponse.d.mts +10 -0
- package/dist/esm/serialization/types/AgentsValidationErrorResponse.mjs +9 -0
- package/dist/esm/serialization/types/CodesFilter.d.mts +11 -0
- package/dist/esm/serialization/types/CodesFilter.mjs +7 -0
- package/dist/esm/serialization/types/CodesGeneralReadResponse.d.mts +2 -0
- package/dist/esm/serialization/types/CodesGeneralReadResponse.mjs +2 -0
- package/dist/esm/serialization/types/CodesGeneralReadResponseAlternativesItem.d.mts +10 -0
- package/dist/esm/serialization/types/CodesGeneralReadResponseAlternativesItem.mjs +6 -0
- package/dist/esm/serialization/types/CodesGeneralReadResponseEvidencesItem.d.mts +4 -2
- package/dist/esm/serialization/types/CodesGeneralReadResponseEvidencesItem.mjs +4 -2
- package/dist/esm/serialization/types/CommonCodingSystemEnum.d.mts +1 -1
- package/dist/esm/serialization/types/CommonCodingSystemEnum.mjs +1 -1
- package/dist/esm/serialization/types/StreamConfigMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamConfigMessage.mjs +1 -2
- package/dist/esm/serialization/types/StreamEndMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamEndMessage.mjs +1 -2
- package/dist/esm/serialization/types/StreamEndedMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamEndedMessage.mjs +1 -2
- package/dist/esm/serialization/types/StreamErrorMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamErrorMessage.mjs +1 -2
- package/dist/esm/serialization/types/StreamFactsMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamFactsMessage.mjs +1 -2
- package/dist/esm/serialization/types/StreamFlushMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamFlushMessage.mjs +1 -2
- package/dist/esm/serialization/types/StreamFlushedMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamFlushedMessage.mjs +1 -2
- package/dist/esm/serialization/types/StreamTranscriptMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamTranscriptMessage.mjs +1 -2
- package/dist/esm/serialization/types/StreamUsageMessage.d.mts +1 -2
- package/dist/esm/serialization/types/StreamUsageMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeCommandMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeCommandMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeCommandVariable.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeCommandVariable.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeConfigMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeConfigMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeEndMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeEndMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeEndedMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeEndedMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeErrorMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeErrorMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeFlushMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeFlushMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeFlushedMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeFlushedMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeFormattingDates.d.mts +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingDates.mjs +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingNumbers.d.mts +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingNumbers.mjs +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingNumericRanges.d.mts +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingNumericRanges.mjs +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingOrdinals.d.mts +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingOrdinals.mjs +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingTimes.d.mts +1 -1
- package/dist/esm/serialization/types/TranscribeFormattingTimes.mjs +1 -1
- package/dist/esm/serialization/types/TranscribeTranscriptMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeTranscriptMessage.mjs +1 -2
- package/dist/esm/serialization/types/TranscribeUsageMessage.d.mts +1 -2
- package/dist/esm/serialization/types/TranscribeUsageMessage.mjs +1 -2
- package/dist/esm/serialization/types/index.d.mts +6 -19
- package/dist/esm/serialization/types/index.mjs +6 -19
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +10 -120
- package/reference.md +0 -2748
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
45
|
+
var t = {};
|
|
46
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
47
|
+
t[p] = s[p];
|
|
48
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
49
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
50
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
51
|
+
t[p[i]] = s[p[i]];
|
|
52
|
+
}
|
|
53
|
+
return t;
|
|
54
|
+
};
|
|
55
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
+
exports.CustomTranscribe = void 0;
|
|
57
|
+
const Client_js_1 = require("../../api/resources/transcribe/client/Client.js");
|
|
58
|
+
const CustomTranscribeSocket_js_1 = require("./CustomTranscribeSocket.js");
|
|
59
|
+
const Corti = __importStar(require("../../api/index.js"));
|
|
60
|
+
const events_js_1 = require("../../core/websocket/events.js");
|
|
61
|
+
const parseTranscribeResponseType_js_1 = require("./parseTranscribeResponseType.js");
|
|
62
|
+
const core = __importStar(require("../../core/index.js"));
|
|
63
|
+
const encodeHeadersAsWsProtocols_js_1 = require("../utils/encodeHeadersAsWsProtocols.js");
|
|
64
|
+
const TRANSCRIBE_CONFIG_REJECTION_TYPES = [
|
|
65
|
+
Corti.TranscribeConfigStatusMessageType.ConfigDenied,
|
|
66
|
+
Corti.TranscribeConfigStatusMessageType.ConfigTimeout,
|
|
67
|
+
];
|
|
68
|
+
class CustomTranscribe extends Client_js_1.TranscribeClient {
|
|
69
|
+
constructor(options) {
|
|
70
|
+
super(options);
|
|
71
|
+
this._encodeHeadersAsWsProtocols = options.encodeHeadersAsWsProtocols;
|
|
72
|
+
}
|
|
73
|
+
connect(args) {
|
|
74
|
+
const _super = Object.create(null, {
|
|
75
|
+
connect: { get: () => super.connect }
|
|
76
|
+
});
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
79
|
+
const _j = args !== null && args !== void 0 ? args : {}, { configuration, awaitConfiguration = true, proxy } = _j, rest = __rest(_j, ["configuration", "awaitConfiguration", "proxy"]);
|
|
80
|
+
const useProxyPath = proxy || this._encodeHeadersAsWsProtocols;
|
|
81
|
+
const protocols = yield (0, encodeHeadersAsWsProtocols_js_1.getWsProtocols)(Object.assign(Object.assign({}, this._options), { encodeHeadersAsWsProtocols: this._encodeHeadersAsWsProtocols }), proxy === null || proxy === void 0 ? void 0 : proxy.protocols);
|
|
82
|
+
const socket = useProxyPath
|
|
83
|
+
? new core.ReconnectingWebSocket({
|
|
84
|
+
url: (_a = proxy === null || proxy === void 0 ? void 0 : proxy.url) !== null && _a !== void 0 ? _a : core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)).wss, "/transcribe"),
|
|
85
|
+
protocols,
|
|
86
|
+
queryParameters: (_c = proxy === null || proxy === void 0 ? void 0 : proxy.queryParameters) !== null && _c !== void 0 ? _c : {},
|
|
87
|
+
headers: (_d = rest.headers) !== null && _d !== void 0 ? _d : {},
|
|
88
|
+
options: { debug: (_e = rest.debug) !== null && _e !== void 0 ? _e : false, maxRetries: (_f = rest.reconnectAttempts) !== null && _f !== void 0 ? _f : 30 },
|
|
89
|
+
})
|
|
90
|
+
: (yield _super.connect.call(this, Object.assign(Object.assign({}, rest), { token: ((_h = (yield ((_g = this._options.authProvider) === null || _g === void 0 ? void 0 : _g.getAuthRequest()))) === null || _h === void 0 ? void 0 : _h.headers.Authorization) || "", tenantName: yield core.Supplier.get(this._options.tenantName) }))).socket;
|
|
91
|
+
const ws = new CustomTranscribeSocket_js_1.CustomTranscribeSocket({ socket });
|
|
92
|
+
if (!configuration) {
|
|
93
|
+
return ws;
|
|
94
|
+
}
|
|
95
|
+
if (awaitConfiguration) {
|
|
96
|
+
return this._connectWithConfigAck(ws, configuration);
|
|
97
|
+
}
|
|
98
|
+
return this._connectWithConfigListeners(ws, configuration);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Sends configuration on open, then resolves after CONFIG_ACCEPTED.
|
|
103
|
+
* Rejects and closes socket on CONFIG_DENIED / CONFIG_TIMEOUT /
|
|
104
|
+
* connection error / ended.
|
|
105
|
+
*/
|
|
106
|
+
_connectWithConfigAck(socket, configuration) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const configAck = this._buildConfigAckPromise(socket);
|
|
109
|
+
yield socket.waitForOpen();
|
|
110
|
+
socket.sendConfiguration({ type: "config", configuration });
|
|
111
|
+
try {
|
|
112
|
+
yield configAck;
|
|
113
|
+
}
|
|
114
|
+
catch (err) {
|
|
115
|
+
socket.close();
|
|
116
|
+
throw err;
|
|
117
|
+
}
|
|
118
|
+
// Persistent listener re-sends config on each reconnect
|
|
119
|
+
socket.socket.addEventListener("open", () => {
|
|
120
|
+
socket.sendConfiguration({ type: "config", configuration });
|
|
121
|
+
});
|
|
122
|
+
return socket;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Sends configuration on open and returns the socket immediately.
|
|
127
|
+
* Config errors are dispatched as ErrorEvent and the socket is closed.
|
|
128
|
+
*/
|
|
129
|
+
_connectWithConfigListeners(socket, configuration) {
|
|
130
|
+
socket.socket.addEventListener("open", () => {
|
|
131
|
+
socket.sendConfiguration({ type: "config", configuration });
|
|
132
|
+
});
|
|
133
|
+
socket.socket.addEventListener("message", (event) => {
|
|
134
|
+
const type = (0, parseTranscribeResponseType_js_1.parseTranscribeResponseType)(event.data);
|
|
135
|
+
if (type == null || type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (TRANSCRIBE_CONFIG_REJECTION_TYPES.includes(type) || type === "error") {
|
|
139
|
+
socket.socket.dispatchEvent(new events_js_1.ErrorEvent(new Error(type), socket.socket));
|
|
140
|
+
socket.close();
|
|
141
|
+
}
|
|
142
|
+
else if (type === "ended") {
|
|
143
|
+
socket.close();
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
return socket;
|
|
147
|
+
}
|
|
148
|
+
/** Resolves on CONFIG_ACCEPTED; rejects on rejection types, socket error, or ended. */
|
|
149
|
+
_buildConfigAckPromise(socket) {
|
|
150
|
+
return new Promise((resolve, reject) => {
|
|
151
|
+
const cleanup = () => {
|
|
152
|
+
socket.socket.removeEventListener("message", onMessage);
|
|
153
|
+
socket.socket.removeEventListener("error", onError);
|
|
154
|
+
};
|
|
155
|
+
const onError = (event) => {
|
|
156
|
+
cleanup();
|
|
157
|
+
reject(new Error(event.message));
|
|
158
|
+
};
|
|
159
|
+
const onMessage = (event) => {
|
|
160
|
+
const type = (0, parseTranscribeResponseType_js_1.parseTranscribeResponseType)(event.data);
|
|
161
|
+
if (type == null)
|
|
162
|
+
return;
|
|
163
|
+
if (type === Corti.TranscribeConfigStatusMessageType.ConfigAccepted) {
|
|
164
|
+
cleanup();
|
|
165
|
+
resolve();
|
|
166
|
+
}
|
|
167
|
+
else if (TRANSCRIBE_CONFIG_REJECTION_TYPES.includes(type)) {
|
|
168
|
+
cleanup();
|
|
169
|
+
reject(new Error(type));
|
|
170
|
+
}
|
|
171
|
+
else if (type === "ended") {
|
|
172
|
+
cleanup();
|
|
173
|
+
reject(new Error("Connection ended before config was accepted"));
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
socket.socket.addEventListener("message", onMessage);
|
|
177
|
+
socket.socket.addEventListener("error", onError);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
exports.CustomTranscribe = CustomTranscribe;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TranscribeSocket } from "../../api/resources/transcribe/client/Socket.js";
|
|
2
|
+
export declare class CustomTranscribeSocket extends TranscribeSocket {
|
|
3
|
+
/** Remove the handler for an event. If callback is supplied, only removes if it matches. */
|
|
4
|
+
off<T extends keyof TranscribeSocket.EventHandlers>(event: T, callback?: TranscribeSocket.EventHandlers[T]): void;
|
|
5
|
+
/** Send raw data directly on the underlying WebSocket (e.g. binary audio, custom frames). */
|
|
6
|
+
send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomTranscribeSocket = void 0;
|
|
4
|
+
const Socket_js_1 = require("../../api/resources/transcribe/client/Socket.js");
|
|
5
|
+
class CustomTranscribeSocket extends Socket_js_1.TranscribeSocket {
|
|
6
|
+
/** Remove the handler for an event. If callback is supplied, only removes if it matches. */
|
|
7
|
+
off(event, callback) {
|
|
8
|
+
if (callback === undefined || this.eventHandlers[event] === callback) {
|
|
9
|
+
this.eventHandlers[event] = undefined;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** Send raw data directly on the underlying WebSocket (e.g. binary audio, custom frames). */
|
|
13
|
+
send(data) {
|
|
14
|
+
this.socket.send(data);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.CustomTranscribeSocket = CustomTranscribeSocket;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.parseTranscribeResponseType = parseTranscribeResponseType;
|
|
37
|
+
const json_js_1 = require("../../core/json.js");
|
|
38
|
+
const serializers = __importStar(require("../../serialization/index.js"));
|
|
39
|
+
/** Parses a raw WebSocket message and returns its type string, or null on failure. */
|
|
40
|
+
function parseTranscribeResponseType(raw) {
|
|
41
|
+
const parsed = serializers.TranscribeSocketResponse.parse((0, json_js_1.fromJson)(raw), {
|
|
42
|
+
unrecognizedObjectKeys: "passthrough",
|
|
43
|
+
allowUnrecognizedUnionMembers: true,
|
|
44
|
+
allowUnrecognizedEnumValues: true,
|
|
45
|
+
skipValidation: true,
|
|
46
|
+
omitUndefined: true,
|
|
47
|
+
});
|
|
48
|
+
return parsed.ok ? parsed.value.type : null;
|
|
49
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities to encode client headers as WebSocket subprotocols (for proxy scenarios).
|
|
3
|
+
* Format: [headerName1, encodeURIComponent(value1), headerName2, encodeURIComponent(value2), ...]
|
|
4
|
+
*/
|
|
5
|
+
import * as core from "../../core/index.js";
|
|
6
|
+
export type HeadersRecord = Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Resolves header values (including suppliers/functions) and returns a flat array
|
|
9
|
+
* of [name, encodeURIComponent(value)] for each header, skipping undefined/empty values.
|
|
10
|
+
* When filterSdkHeaders is true, SDK-added headers are excluded.
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildProtocolsFromHeaders(headers: HeadersRecord | undefined, filterSdkHeaders?: boolean): Promise<string[]>;
|
|
13
|
+
/** Options shape for getWsProtocols (encodeHeadersAsWsProtocols + headers). */
|
|
14
|
+
export type WsProtocolsOptions = {
|
|
15
|
+
encodeHeadersAsWsProtocols?: boolean;
|
|
16
|
+
headers?: HeadersRecord;
|
|
17
|
+
};
|
|
18
|
+
/** Proxy protocols as array (pass-through) or object (encoded like headers). */
|
|
19
|
+
export type ProxyProtocolsInput = string[] | HeadersRecord;
|
|
20
|
+
export type ProxyOptions = {
|
|
21
|
+
url: string;
|
|
22
|
+
/** string[] passed as-is; Record → encoded as [name, encodeURIComponent(value), ...] pairs. */
|
|
23
|
+
protocols?: ProxyProtocolsInput;
|
|
24
|
+
queryParameters?: Record<string, string>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Returns WebSocket protocols array for connect (header-derived + proxy protocols).
|
|
28
|
+
* proxyProtocols: array is passed as-is; object is encoded like headers.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getWsProtocols(options: WsProtocolsOptions, proxyProtocols?: ProxyProtocolsInput): Promise<string[]>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Utilities to encode client headers as WebSocket subprotocols (for proxy scenarios).
|
|
4
|
+
* Format: [headerName1, encodeURIComponent(value1), headerName2, encodeURIComponent(value2), ...]
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
40
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
41
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
43
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
44
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
45
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.buildProtocolsFromHeaders = buildProtocolsFromHeaders;
|
|
50
|
+
exports.getWsProtocols = getWsProtocols;
|
|
51
|
+
const core = __importStar(require("../../core/index.js"));
|
|
52
|
+
/** Headers added by the SDK; exclude these when filterSdkHeaders is true (e.g. merged client headers). */
|
|
53
|
+
const SDK_HEADER_NAMES = new Set([
|
|
54
|
+
"Tenant-Name",
|
|
55
|
+
"X-Fern-Language",
|
|
56
|
+
"X-Fern-SDK-Name",
|
|
57
|
+
"X-Fern-SDK-Version",
|
|
58
|
+
"User-Agent",
|
|
59
|
+
"X-Fern-Runtime",
|
|
60
|
+
"X-Fern-Runtime-Version",
|
|
61
|
+
]);
|
|
62
|
+
/**
|
|
63
|
+
* Resolves header values (including suppliers/functions) and returns a flat array
|
|
64
|
+
* of [name, encodeURIComponent(value)] for each header, skipping undefined/empty values.
|
|
65
|
+
* When filterSdkHeaders is true, SDK-added headers are excluded.
|
|
66
|
+
*/
|
|
67
|
+
function buildProtocolsFromHeaders(headers_1) {
|
|
68
|
+
return __awaiter(this, arguments, void 0, function* (headers, filterSdkHeaders = false) {
|
|
69
|
+
if (!headers || Object.keys(headers).length === 0) {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
const protocols = [];
|
|
73
|
+
for (const [name, valueOrSupplier] of Object.entries(headers)) {
|
|
74
|
+
if (filterSdkHeaders && SDK_HEADER_NAMES.has(name)) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const value = yield core.Supplier.get(valueOrSupplier);
|
|
78
|
+
if (value != null && value !== "") {
|
|
79
|
+
protocols.push(name, encodeURIComponent(value));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return protocols;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Returns WebSocket protocols array for connect (header-derived + proxy protocols).
|
|
87
|
+
* proxyProtocols: array is passed as-is; object is encoded like headers.
|
|
88
|
+
*/
|
|
89
|
+
function getWsProtocols(options, proxyProtocols) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const headerProtocols = options.encodeHeadersAsWsProtocols && options.headers
|
|
92
|
+
? yield buildProtocolsFromHeaders(options.headers, true)
|
|
93
|
+
: [];
|
|
94
|
+
const resolvedProxy = proxyProtocols == null
|
|
95
|
+
? []
|
|
96
|
+
: Array.isArray(proxyProtocols)
|
|
97
|
+
? proxyProtocols
|
|
98
|
+
: yield buildProtocolsFromHeaders(proxyProtocols, false);
|
|
99
|
+
const combined = [...headerProtocols, ...resolvedProxy];
|
|
100
|
+
return combined.length > 0 ? combined : [];
|
|
101
|
+
});
|
|
102
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEnvironment = exports.generateCodeVerifier = exports.generateCodeChallenge = exports.decodeToken = void 0;
|
|
4
|
+
var decodeToken_js_1 = require("./decodeToken.js");
|
|
5
|
+
Object.defineProperty(exports, "decodeToken", { enumerable: true, get: function () { return decodeToken_js_1.decodeToken; } });
|
|
6
|
+
var pkceHelpers_js_1 = require("./pkceHelpers.js");
|
|
7
|
+
Object.defineProperty(exports, "generateCodeChallenge", { enumerable: true, get: function () { return pkceHelpers_js_1.generateCodeChallenge; } });
|
|
8
|
+
Object.defineProperty(exports, "generateCodeVerifier", { enumerable: true, get: function () { return pkceHelpers_js_1.generateCodeVerifier; } });
|
|
9
|
+
var environment_js_1 = require("./environment.js");
|
|
10
|
+
Object.defineProperty(exports, "getEnvironment", { enumerable: true, get: function () { return environment_js_1.getEnvironment; } });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLocalStorageItem = exports.setLocalStorageItem = exports.requireLocalStorage = exports.CODE_VERIFIER_KEY = void 0;
|
|
4
|
-
const
|
|
4
|
+
const CortiSDKError_js_1 = require("../CortiSDKError.js");
|
|
5
5
|
exports.CODE_VERIFIER_KEY = "corti_pkce_code_verifier";
|
|
6
6
|
const requireLocalStorage = () => {
|
|
7
7
|
if (typeof window === "undefined" || !window.localStorage) {
|
|
8
|
-
throw new
|
|
9
|
-
|
|
8
|
+
throw new CortiSDKError_js_1.CortiSDKError("LocalStorage operation failed: storage is not available in this environment.", {
|
|
9
|
+
code: CortiSDKError_js_1.CortiSDKErrorCodes.LOCAL_STORAGE_ERROR,
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
return window.localStorage;
|
|
@@ -17,9 +17,10 @@ const setLocalStorageItem = (key, value) => {
|
|
|
17
17
|
try {
|
|
18
18
|
storage.setItem(key, value);
|
|
19
19
|
}
|
|
20
|
-
catch (
|
|
21
|
-
throw new
|
|
22
|
-
|
|
20
|
+
catch (error) {
|
|
21
|
+
throw new CortiSDKError_js_1.CortiSDKError("LocalStorage set operation failed.", {
|
|
22
|
+
code: CortiSDKError_js_1.CortiSDKErrorCodes.LOCAL_STORAGE_ERROR,
|
|
23
|
+
cause: error,
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
};
|
|
@@ -29,9 +30,10 @@ const getLocalStorageItem = (key) => {
|
|
|
29
30
|
try {
|
|
30
31
|
return storage.getItem(key);
|
|
31
32
|
}
|
|
32
|
-
catch (
|
|
33
|
-
throw new
|
|
34
|
-
|
|
33
|
+
catch (error) {
|
|
34
|
+
throw new CortiSDKError_js_1.CortiSDKError("LocalStorage get operation failed.", {
|
|
35
|
+
code: CortiSDKError_js_1.CortiSDKErrorCodes.LOCAL_STORAGE_ERROR,
|
|
36
|
+
cause: error,
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
39
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultWithCredentials = getDefaultWithCredentials;
|
|
4
|
+
exports.setDefaultWithCredentials = setDefaultWithCredentials;
|
|
5
|
+
/**
|
|
6
|
+
* Global default for fetcher withCredentials. Set by CortiClient when withCredentials
|
|
7
|
+
* is passed in options; the core fetcher reads this when args.withCredentials is undefined.
|
|
8
|
+
*/
|
|
9
|
+
let defaultWithCredentials = undefined;
|
|
10
|
+
function getDefaultWithCredentials() {
|
|
11
|
+
return defaultWithCredentials;
|
|
12
|
+
}
|
|
13
|
+
function setDefaultWithCredentials(value) {
|
|
14
|
+
defaultWithCredentials = value;
|
|
15
|
+
}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
export *
|
|
2
|
-
export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
3
|
-
/** Patch: Export custom auth client (real token endpoint, optional ctor auth). */
|
|
4
|
-
export { CortiAuth } from "./custom/CortiAuth.js";
|
|
5
|
-
/** Patch: Export custom client (auth object, auth getter returns CortiAuth). */
|
|
6
|
-
export { CortiClient } from "./custom/CortiClient.js";
|
|
7
|
-
/** Patch: Export token decode utility. */
|
|
8
|
-
export { decodeToken } from "./custom/utils/decodeToken.js";
|
|
9
|
-
/** Patch: Export environment utilities. */
|
|
10
|
-
export { type CortiInternalEnvironment, type Environment, getEnvironment } from "./custom/utils/environment.js";
|
|
11
|
-
/** Patch: Export PKCE helpers for browser-side code verifier/challenge generation. */
|
|
12
|
-
export { generateCodeChallenge, generateCodeVerifier } from "./custom/utils/pkceHelpers.js";
|
|
13
|
-
export { CortiEnvironment, type CortiEnvironmentUrls } from "./environments.js";
|
|
14
|
-
export { CortiError, CortiTimeoutError } from "./errors/index.js";
|
|
15
|
-
export * from "./exports.js";
|
|
16
|
-
export * as serialization from "./serialization/index.js";
|
|
1
|
+
export * from "./custom/overrides/index.js";
|
package/dist/cjs/index.js
CHANGED
|
@@ -10,54 +10,8 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
15
|
};
|
|
38
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
|
|
40
|
-
exports.Corti = __importStar(require("./api/index.js"));
|
|
41
|
-
/** Patch: Export custom auth client (real token endpoint, optional ctor auth). */
|
|
42
|
-
var CortiAuth_js_1 = require("./custom/CortiAuth.js");
|
|
43
|
-
Object.defineProperty(exports, "CortiAuth", { enumerable: true, get: function () { return CortiAuth_js_1.CortiAuth; } });
|
|
44
|
-
/** Patch: Export custom client (auth object, auth getter returns CortiAuth). */
|
|
45
|
-
var CortiClient_js_1 = require("./custom/CortiClient.js");
|
|
46
|
-
Object.defineProperty(exports, "CortiClient", { enumerable: true, get: function () { return CortiClient_js_1.CortiClient; } });
|
|
47
|
-
/** Patch: Export token decode utility. */
|
|
48
|
-
var decodeToken_js_1 = require("./custom/utils/decodeToken.js");
|
|
49
|
-
Object.defineProperty(exports, "decodeToken", { enumerable: true, get: function () { return decodeToken_js_1.decodeToken; } });
|
|
50
|
-
/** Patch: Export environment utilities. */
|
|
51
|
-
var environment_js_1 = require("./custom/utils/environment.js");
|
|
52
|
-
Object.defineProperty(exports, "getEnvironment", { enumerable: true, get: function () { return environment_js_1.getEnvironment; } });
|
|
53
|
-
/** Patch: Export PKCE helpers for browser-side code verifier/challenge generation. */
|
|
54
|
-
var pkceHelpers_js_1 = require("./custom/utils/pkceHelpers.js");
|
|
55
|
-
Object.defineProperty(exports, "generateCodeChallenge", { enumerable: true, get: function () { return pkceHelpers_js_1.generateCodeChallenge; } });
|
|
56
|
-
Object.defineProperty(exports, "generateCodeVerifier", { enumerable: true, get: function () { return pkceHelpers_js_1.generateCodeVerifier; } });
|
|
57
|
-
var environments_js_1 = require("./environments.js");
|
|
58
|
-
Object.defineProperty(exports, "CortiEnvironment", { enumerable: true, get: function () { return environments_js_1.CortiEnvironment; } });
|
|
59
|
-
var index_js_1 = require("./errors/index.js");
|
|
60
|
-
Object.defineProperty(exports, "CortiError", { enumerable: true, get: function () { return index_js_1.CortiError; } });
|
|
61
|
-
Object.defineProperty(exports, "CortiTimeoutError", { enumerable: true, get: function () { return index_js_1.CortiTimeoutError; } });
|
|
62
|
-
__exportStar(require("./exports.js"), exports);
|
|
63
|
-
exports.serialization = __importStar(require("./serialization/index.js"));
|
|
17
|
+
__exportStar(require("./custom/overrides/index.js"), exports);
|
package/dist/cjs/serialization/resources/codes/client/requests/CodesGeneralPredictRequest.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as Corti from "../../../../../api/index.js";
|
|
2
2
|
import * as core from "../../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../../index.js";
|
|
4
|
+
import { CodesFilter } from "../../../../types/CodesFilter.js";
|
|
4
5
|
import { CommonAiContext } from "../../../../types/CommonAiContext.js";
|
|
5
6
|
import { CommonCodingSystemEnum } from "../../../../types/CommonCodingSystemEnum.js";
|
|
6
7
|
export declare const CodesGeneralPredictRequest: core.serialization.Schema<serializers.CodesGeneralPredictRequest.Raw, Corti.CodesGeneralPredictRequest>;
|
|
@@ -8,6 +9,6 @@ export declare namespace CodesGeneralPredictRequest {
|
|
|
8
9
|
interface Raw {
|
|
9
10
|
system: CommonCodingSystemEnum.Raw[];
|
|
10
11
|
context: CommonAiContext.Raw[];
|
|
11
|
-
|
|
12
|
+
filter?: CodesFilter.Raw | null;
|
|
12
13
|
}
|
|
13
14
|
}
|
package/dist/cjs/serialization/resources/codes/client/requests/CodesGeneralPredictRequest.js
CHANGED
|
@@ -36,10 +36,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.CodesGeneralPredictRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../../core/index.js"));
|
|
39
|
+
const CodesFilter_js_1 = require("../../../../types/CodesFilter.js");
|
|
39
40
|
const CommonAiContext_js_1 = require("../../../../types/CommonAiContext.js");
|
|
40
41
|
const CommonCodingSystemEnum_js_1 = require("../../../../types/CommonCodingSystemEnum.js");
|
|
41
42
|
exports.CodesGeneralPredictRequest = core.serialization.object({
|
|
42
43
|
system: core.serialization.list(CommonCodingSystemEnum_js_1.CommonCodingSystemEnum),
|
|
43
44
|
context: core.serialization.list(CommonAiContext_js_1.CommonAiContext),
|
|
44
|
-
|
|
45
|
+
filter: CodesFilter_js_1.CodesFilter.optional(),
|
|
45
46
|
});
|
|
@@ -8,7 +8,7 @@ import { StreamFactsMessage } from "../../../../types/StreamFactsMessage.js";
|
|
|
8
8
|
import { StreamFlushedMessage } from "../../../../types/StreamFlushedMessage.js";
|
|
9
9
|
import { StreamTranscriptMessage } from "../../../../types/StreamTranscriptMessage.js";
|
|
10
10
|
import { StreamUsageMessage } from "../../../../types/StreamUsageMessage.js";
|
|
11
|
-
export declare const StreamSocketResponse: core.serialization.Schema<serializers.StreamSocketResponse.Raw, Corti.
|
|
11
|
+
export declare const StreamSocketResponse: core.serialization.Schema<serializers.StreamSocketResponse.Raw, Corti.StreamTranscriptMessage | Corti.StreamFactsMessage | Corti.StreamFlushedMessage | Corti.StreamEndedMessage | Corti.StreamUsageMessage | Corti.StreamErrorMessage | Corti.StreamConfigStatusMessage>;
|
|
12
12
|
export declare namespace StreamSocketResponse {
|
|
13
|
-
type Raw =
|
|
13
|
+
type Raw = StreamTranscriptMessage.Raw | StreamFactsMessage.Raw | StreamFlushedMessage.Raw | StreamEndedMessage.Raw | StreamUsageMessage.Raw | StreamErrorMessage.Raw | StreamConfigStatusMessage.Raw;
|
|
14
14
|
}
|
|
@@ -44,11 +44,11 @@ const StreamFlushedMessage_js_1 = require("../../../../types/StreamFlushedMessag
|
|
|
44
44
|
const StreamTranscriptMessage_js_1 = require("../../../../types/StreamTranscriptMessage.js");
|
|
45
45
|
const StreamUsageMessage_js_1 = require("../../../../types/StreamUsageMessage.js");
|
|
46
46
|
exports.StreamSocketResponse = core.serialization.undiscriminatedUnion([
|
|
47
|
-
StreamConfigStatusMessage_js_1.StreamConfigStatusMessage,
|
|
48
47
|
StreamTranscriptMessage_js_1.StreamTranscriptMessage,
|
|
49
48
|
StreamFactsMessage_js_1.StreamFactsMessage,
|
|
50
49
|
StreamFlushedMessage_js_1.StreamFlushedMessage,
|
|
51
50
|
StreamEndedMessage_js_1.StreamEndedMessage,
|
|
52
51
|
StreamUsageMessage_js_1.StreamUsageMessage,
|
|
53
52
|
StreamErrorMessage_js_1.StreamErrorMessage,
|
|
53
|
+
StreamConfigStatusMessage_js_1.StreamConfigStatusMessage,
|
|
54
54
|
]);
|
package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { TranscribeErrorMessage } from "../../../../types/TranscribeErrorMessage
|
|
|
8
8
|
import { TranscribeFlushedMessage } from "../../../../types/TranscribeFlushedMessage.js";
|
|
9
9
|
import { TranscribeTranscriptMessage } from "../../../../types/TranscribeTranscriptMessage.js";
|
|
10
10
|
import { TranscribeUsageMessage } from "../../../../types/TranscribeUsageMessage.js";
|
|
11
|
-
export declare const TranscribeSocketResponse: core.serialization.Schema<serializers.TranscribeSocketResponse.Raw, Corti.
|
|
11
|
+
export declare const TranscribeSocketResponse: core.serialization.Schema<serializers.TranscribeSocketResponse.Raw, Corti.TranscribeUsageMessage | Corti.TranscribeFlushedMessage | Corti.TranscribeEndedMessage | Corti.TranscribeErrorMessage | Corti.TranscribeTranscriptMessage | Corti.TranscribeCommandMessage | Corti.TranscribeConfigStatusMessage>;
|
|
12
12
|
export declare namespace TranscribeSocketResponse {
|
|
13
|
-
type Raw =
|
|
13
|
+
type Raw = TranscribeUsageMessage.Raw | TranscribeFlushedMessage.Raw | TranscribeEndedMessage.Raw | TranscribeErrorMessage.Raw | TranscribeTranscriptMessage.Raw | TranscribeCommandMessage.Raw | TranscribeConfigStatusMessage.Raw;
|
|
14
14
|
}
|
package/dist/cjs/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.js
CHANGED
|
@@ -44,11 +44,11 @@ const TranscribeFlushedMessage_js_1 = require("../../../../types/TranscribeFlush
|
|
|
44
44
|
const TranscribeTranscriptMessage_js_1 = require("../../../../types/TranscribeTranscriptMessage.js");
|
|
45
45
|
const TranscribeUsageMessage_js_1 = require("../../../../types/TranscribeUsageMessage.js");
|
|
46
46
|
exports.TranscribeSocketResponse = core.serialization.undiscriminatedUnion([
|
|
47
|
-
TranscribeConfigStatusMessage_js_1.TranscribeConfigStatusMessage,
|
|
48
47
|
TranscribeUsageMessage_js_1.TranscribeUsageMessage,
|
|
49
48
|
TranscribeFlushedMessage_js_1.TranscribeFlushedMessage,
|
|
50
49
|
TranscribeEndedMessage_js_1.TranscribeEndedMessage,
|
|
51
50
|
TranscribeErrorMessage_js_1.TranscribeErrorMessage,
|
|
52
51
|
TranscribeTranscriptMessage_js_1.TranscribeTranscriptMessage,
|
|
53
52
|
TranscribeCommandMessage_js_1.TranscribeCommandMessage,
|
|
53
|
+
TranscribeConfigStatusMessage_js_1.TranscribeConfigStatusMessage,
|
|
54
54
|
]);
|