@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,195 @@
|
|
|
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.CortiAuth = void 0;
|
|
57
|
+
const Client_js_1 = require("../../api/resources/auth/client/Client.js");
|
|
58
|
+
const core = __importStar(require("../../core/index.js"));
|
|
59
|
+
const index_js_1 = require("../../core/schemas/index.js");
|
|
60
|
+
const buildTokenRequestBody_js_1 = require("../utils/buildTokenRequestBody.js");
|
|
61
|
+
const environment_js_1 = require("../utils/environment.js");
|
|
62
|
+
const localStorageHelpers_js_1 = require("../utils/localStorageHelpers.js");
|
|
63
|
+
const pkceHelpers_js_1 = require("../utils/pkceHelpers.js");
|
|
64
|
+
class CortiAuth extends Client_js_1.AuthClient {
|
|
65
|
+
/** No-op auth provider so super.token() does not trigger OAuth refresh. When auth is omitted, a dummy token is passed so the base constructor does not throw. */
|
|
66
|
+
constructor(options) {
|
|
67
|
+
var _a;
|
|
68
|
+
const { environment } = options, rest = __rest(options, ["environment"]);
|
|
69
|
+
super(Object.assign(Object.assign({}, rest), { environment: (0, environment_js_1.getEnvironment)(environment), token: (_a = options.token) !== null && _a !== void 0 ? _a : (() => "") }));
|
|
70
|
+
this._options.authProvider = new core.NoOpAuthProvider();
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Exchange credentials for a short-lived access token using the tenant token endpoint (client_credentials).
|
|
74
|
+
* Resolves tenant from client options. Supports optional scopes (openid is always included).
|
|
75
|
+
*
|
|
76
|
+
* @param request - Client credentials and optional scopes
|
|
77
|
+
* @param requestOptions - Request-specific configuration
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link Corti.BadRequestError}
|
|
80
|
+
* @throws {@link Corti.UnauthorizedError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* const response = await auth.getToken({
|
|
84
|
+
* clientId: "client_id",
|
|
85
|
+
* clientSecret: "client_secret",
|
|
86
|
+
* scopes: ["profile"]
|
|
87
|
+
* });
|
|
88
|
+
*/
|
|
89
|
+
getToken(request, requestOptions) {
|
|
90
|
+
return core.HttpResponsePromise.fromPromise(this._getTokenWithTenant(request, requestOptions !== null && requestOptions !== void 0 ? requestOptions : {}));
|
|
91
|
+
}
|
|
92
|
+
_getTokenWithTenant(request, requestOptions) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
const authRequest = (0, buildTokenRequestBody_js_1.buildTokenRequestBody)(request);
|
|
95
|
+
const tenantName = yield core.Supplier.get(this._options.tenantName);
|
|
96
|
+
return this.token(tenantName, authRequest, requestOptions).withRawResponse();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/** Exchange username/password for access token via ROPC (resource owner password credentials). */
|
|
100
|
+
getRopcFlowToken(request, requestOptions) {
|
|
101
|
+
return core.HttpResponsePromise.fromPromise(this._getTokenWithTenant(request, requestOptions !== null && requestOptions !== void 0 ? requestOptions : {}));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Exchange a refresh token for a new access token (refresh_token grant).
|
|
105
|
+
* Resolves tenant from client options.
|
|
106
|
+
*
|
|
107
|
+
* @param request - Client ID, refresh token, and optional scopes
|
|
108
|
+
* @param requestOptions - Request-specific configuration
|
|
109
|
+
*
|
|
110
|
+
* @throws {@link Corti.BadRequestError}
|
|
111
|
+
* @throws {@link Corti.UnauthorizedError}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* const response = await auth.refreshToken({
|
|
115
|
+
* clientId: "client_id",
|
|
116
|
+
* refreshToken: "refresh_token",
|
|
117
|
+
* });
|
|
118
|
+
*/
|
|
119
|
+
refreshToken(request, requestOptions) {
|
|
120
|
+
return core.HttpResponsePromise.fromPromise(this._getTokenWithTenant(request, requestOptions !== null && requestOptions !== void 0 ? requestOptions : {}));
|
|
121
|
+
}
|
|
122
|
+
/** Exchange an authorization code for an access token (authorization_code grant). */
|
|
123
|
+
getCodeFlowToken(request, requestOptions) {
|
|
124
|
+
return core.HttpResponsePromise.fromPromise(this._getTokenWithTenant(request, requestOptions !== null && requestOptions !== void 0 ? requestOptions : {}));
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Exchange a PKCE authorization code for an access token (authorization_code grant with code_verifier).
|
|
128
|
+
* If codeVerifier is omitted, it is read from localStorage (set by authorizePkceUrl).
|
|
129
|
+
*/
|
|
130
|
+
getPkceFlowToken(request, requestOptions) {
|
|
131
|
+
var _a;
|
|
132
|
+
const codeVerifier = (_a = request.codeVerifier) !== null && _a !== void 0 ? _a : (0, localStorageHelpers_js_1.getLocalStorageItem)(localStorageHelpers_js_1.CODE_VERIFIER_KEY);
|
|
133
|
+
if (!codeVerifier) {
|
|
134
|
+
throw new index_js_1.ParseError([
|
|
135
|
+
{
|
|
136
|
+
path: ["codeVerifier"],
|
|
137
|
+
message: "Code verifier was not provided and not found in localStorage.",
|
|
138
|
+
},
|
|
139
|
+
]);
|
|
140
|
+
}
|
|
141
|
+
return core.HttpResponsePromise.fromPromise(this._getTokenWithTenant(Object.assign(Object.assign({}, request), { codeVerifier }), requestOptions !== null && requestOptions !== void 0 ? requestOptions : {}));
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Build the Keycloak authorization endpoint URL for the PKCE flow.
|
|
145
|
+
* Generates a code verifier if not provided, stores it in localStorage, and computes the challenge.
|
|
146
|
+
* In a browser environment, redirects to the URL unless skipRedirect is true.
|
|
147
|
+
*/
|
|
148
|
+
authorizePkceUrl(_a, options_1) {
|
|
149
|
+
return __awaiter(this, arguments, void 0, function* ({ clientId, redirectUri, scopes, codeVerifier }, options) {
|
|
150
|
+
const verifier = codeVerifier !== null && codeVerifier !== void 0 ? codeVerifier : (0, pkceHelpers_js_1.generateCodeVerifier)();
|
|
151
|
+
(0, localStorageHelpers_js_1.setLocalStorageItem)(localStorageHelpers_js_1.CODE_VERIFIER_KEY, verifier);
|
|
152
|
+
const codeChallenge = yield (0, pkceHelpers_js_1.generateCodeChallenge)(verifier);
|
|
153
|
+
return this.authorizeURL({ clientId, redirectUri, codeChallenge, scopes }, options);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/** Read the PKCE code verifier stored in localStorage by authorizePkceUrl. Returns null if not found. */
|
|
157
|
+
static getCodeVerifier() {
|
|
158
|
+
return (0, localStorageHelpers_js_1.getLocalStorageItem)(localStorageHelpers_js_1.CODE_VERIFIER_KEY);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Build the Keycloak authorization endpoint URL for the authorization code flow.
|
|
162
|
+
* In a browser environment, redirects to the URL unless skipRedirect is true.
|
|
163
|
+
* In a server environment (no window), always returns the URL string.
|
|
164
|
+
*
|
|
165
|
+
* @param client - clientId, redirectUri, and optional codeChallenge/scopes
|
|
166
|
+
* @param options - { skipRedirect?: boolean }
|
|
167
|
+
*/
|
|
168
|
+
authorizeURL(_a, options_1) {
|
|
169
|
+
return __awaiter(this, arguments, void 0, function* ({ clientId, redirectUri, codeChallenge, scopes }, options) {
|
|
170
|
+
const envUrls = yield core.Supplier.get(this._options.environment);
|
|
171
|
+
const tenantName = yield core.Supplier.get(this._options.tenantName);
|
|
172
|
+
const authUrl = new URL(core.url.join(envUrls.login, tenantName, "protocol/openid-connect/auth"));
|
|
173
|
+
authUrl.searchParams.set("response_type", "code");
|
|
174
|
+
const allScopes = ["openid", "profile", ...(scopes !== null && scopes !== void 0 ? scopes : [])];
|
|
175
|
+
authUrl.searchParams.set("scope", [...new Set(allScopes)].join(" "));
|
|
176
|
+
if (clientId !== undefined) {
|
|
177
|
+
authUrl.searchParams.set("client_id", clientId);
|
|
178
|
+
}
|
|
179
|
+
if (redirectUri !== undefined) {
|
|
180
|
+
authUrl.searchParams.set("redirect_uri", redirectUri);
|
|
181
|
+
}
|
|
182
|
+
if (codeChallenge !== undefined) {
|
|
183
|
+
authUrl.searchParams.set("code_challenge", codeChallenge);
|
|
184
|
+
authUrl.searchParams.set("code_challenge_method", "S256");
|
|
185
|
+
}
|
|
186
|
+
const authUrlString = authUrl.toString();
|
|
187
|
+
if (typeof window !== "undefined" && !(options === null || options === void 0 ? void 0 : options.skipRedirect)) {
|
|
188
|
+
window.location.href = authUrlString;
|
|
189
|
+
return authUrlString;
|
|
190
|
+
}
|
|
191
|
+
return authUrlString;
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
exports.CortiAuth = CortiAuth;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { OAuthAuthProvider } from "../../auth/OAuthAuthProvider.js";
|
|
2
|
+
import type { BaseClientOptions } from "../../BaseClient.js";
|
|
3
|
+
import * as core from "../../core/index.js";
|
|
4
|
+
export declare class OAuthAuthCodeAuthProvider implements core.AuthProvider {
|
|
5
|
+
private readonly options;
|
|
6
|
+
private readonly authClient;
|
|
7
|
+
private accessToken;
|
|
8
|
+
private expiresAt;
|
|
9
|
+
private refreshPromise;
|
|
10
|
+
private storedRefreshToken;
|
|
11
|
+
private refreshExpiresAt;
|
|
12
|
+
constructor(options: BaseClientOptions & OAuthAuthProvider.AuthCodeCredentials);
|
|
13
|
+
static canCreate(options?: Partial<OAuthAuthProvider.AuthCodeCredentials & BaseClientOptions>): options is BaseClientOptions & OAuthAuthProvider.AuthCodeCredentials;
|
|
14
|
+
private clientIdSupplier;
|
|
15
|
+
private clientSecretSupplier;
|
|
16
|
+
private codeSupplier;
|
|
17
|
+
private redirectUriSupplier;
|
|
18
|
+
getAuthRequest({ endpointMetadata, }?: {
|
|
19
|
+
endpointMetadata?: core.EndpointMetadata;
|
|
20
|
+
}): Promise<core.AuthRequest>;
|
|
21
|
+
private getToken;
|
|
22
|
+
private refresh;
|
|
23
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.OAuthAuthCodeAuthProvider = void 0;
|
|
46
|
+
const core = __importStar(require("../../core/index.js"));
|
|
47
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
48
|
+
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
49
|
+
const oauthAuthHelpers_js_1 = require("../utils/oauthAuthHelpers.js");
|
|
50
|
+
class OAuthAuthCodeAuthProvider {
|
|
51
|
+
constructor(options) {
|
|
52
|
+
this.options = options;
|
|
53
|
+
this.authClient = new CortiAuth_js_1.CortiAuth(options);
|
|
54
|
+
this.expiresAt = new Date();
|
|
55
|
+
}
|
|
56
|
+
static canCreate(options) {
|
|
57
|
+
return ((options === null || options === void 0 ? void 0 : options[oauthAuthHelpers_js_1.CLIENT_ID_PARAM]) != null &&
|
|
58
|
+
(options === null || options === void 0 ? void 0 : options[oauthAuthHelpers_js_1.CLIENT_SECRET_PARAM]) != null &&
|
|
59
|
+
(options === null || options === void 0 ? void 0 : options[oauthAuthHelpers_js_1.CODE_PARAM]) != null &&
|
|
60
|
+
(options === null || options === void 0 ? void 0 : options[oauthAuthHelpers_js_1.REDIRECT_URI_PARAM]) != null);
|
|
61
|
+
}
|
|
62
|
+
clientIdSupplier() {
|
|
63
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
64
|
+
const supplier = this.options[oauthAuthHelpers_js_1.CLIENT_ID_PARAM];
|
|
65
|
+
if (supplier == null) {
|
|
66
|
+
throw new errors.CortiError({ message: oauthAuthHelpers_js_1.CLIENT_ID_REQUIRED_ERROR_MESSAGE });
|
|
67
|
+
}
|
|
68
|
+
return core.EndpointSupplier.get(supplier, { endpointMetadata });
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
clientSecretSupplier() {
|
|
72
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
73
|
+
const supplier = this.options[oauthAuthHelpers_js_1.CLIENT_SECRET_PARAM];
|
|
74
|
+
if (supplier == null) {
|
|
75
|
+
throw new errors.CortiError({ message: oauthAuthHelpers_js_1.CLIENT_SECRET_REQUIRED_ERROR_MESSAGE });
|
|
76
|
+
}
|
|
77
|
+
return core.EndpointSupplier.get(supplier, { endpointMetadata });
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
codeSupplier() {
|
|
81
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
82
|
+
const supplier = this.options[oauthAuthHelpers_js_1.CODE_PARAM];
|
|
83
|
+
if (supplier == null) {
|
|
84
|
+
throw new errors.CortiError({ message: oauthAuthHelpers_js_1.CODE_REQUIRED_ERROR_MESSAGE });
|
|
85
|
+
}
|
|
86
|
+
return core.EndpointSupplier.get(supplier, { endpointMetadata });
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
redirectUriSupplier() {
|
|
90
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
91
|
+
const supplier = this.options[oauthAuthHelpers_js_1.REDIRECT_URI_PARAM];
|
|
92
|
+
if (supplier == null) {
|
|
93
|
+
throw new errors.CortiError({ message: oauthAuthHelpers_js_1.REDIRECT_URI_REQUIRED_ERROR_MESSAGE });
|
|
94
|
+
}
|
|
95
|
+
return core.EndpointSupplier.get(supplier, { endpointMetadata });
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
getAuthRequest() {
|
|
99
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
100
|
+
const token = yield this.getToken({ endpointMetadata });
|
|
101
|
+
return {
|
|
102
|
+
headers: {
|
|
103
|
+
Authorization: `Bearer ${token}`,
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
getToken() {
|
|
109
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata } = {}) {
|
|
110
|
+
if (this.accessToken && this.expiresAt > new Date()) {
|
|
111
|
+
return this.accessToken;
|
|
112
|
+
}
|
|
113
|
+
if (this.refreshPromise != null) {
|
|
114
|
+
return this.refreshPromise;
|
|
115
|
+
}
|
|
116
|
+
return this.refresh({ endpointMetadata });
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
refresh() {
|
|
120
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata } = {}) {
|
|
121
|
+
this.refreshPromise = (() => __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
try {
|
|
123
|
+
const clientId = yield this.clientIdSupplier({ endpointMetadata });
|
|
124
|
+
const clientSecret = yield this.clientSecretSupplier({ endpointMetadata });
|
|
125
|
+
let tokenResponse;
|
|
126
|
+
if (clientId &&
|
|
127
|
+
this.storedRefreshToken &&
|
|
128
|
+
this.refreshExpiresAt &&
|
|
129
|
+
this.refreshExpiresAt > new Date()) {
|
|
130
|
+
tokenResponse = yield this.authClient.refreshToken({
|
|
131
|
+
clientId,
|
|
132
|
+
refreshToken: this.storedRefreshToken,
|
|
133
|
+
clientSecret,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
const code = yield this.codeSupplier({ endpointMetadata });
|
|
138
|
+
const redirectUri = yield this.redirectUriSupplier({ endpointMetadata });
|
|
139
|
+
tokenResponse = yield this.authClient.getCodeFlowToken({
|
|
140
|
+
clientId,
|
|
141
|
+
clientSecret,
|
|
142
|
+
code,
|
|
143
|
+
redirectUri,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
this.accessToken = tokenResponse.accessToken;
|
|
147
|
+
this.expiresAt = (0, oauthAuthHelpers_js_1.getExpiresAt)(tokenResponse.expiresIn, oauthAuthHelpers_js_1.BUFFER_IN_MINUTES);
|
|
148
|
+
if (tokenResponse.refreshToken) {
|
|
149
|
+
this.storedRefreshToken = tokenResponse.refreshToken;
|
|
150
|
+
this.refreshExpiresAt = tokenResponse.refreshExpiresIn
|
|
151
|
+
? (0, oauthAuthHelpers_js_1.getExpiresAt)(tokenResponse.refreshExpiresIn, oauthAuthHelpers_js_1.BUFFER_IN_MINUTES)
|
|
152
|
+
: undefined;
|
|
153
|
+
}
|
|
154
|
+
return this.accessToken;
|
|
155
|
+
}
|
|
156
|
+
finally {
|
|
157
|
+
this.refreshPromise = undefined;
|
|
158
|
+
}
|
|
159
|
+
}))();
|
|
160
|
+
return this.refreshPromise;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.OAuthAuthCodeAuthProvider = OAuthAuthCodeAuthProvider;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { OAuthAuthProvider } from "../../auth/OAuthAuthProvider.js";
|
|
2
|
+
import type { BaseClientOptions } from "../../BaseClient.js";
|
|
3
|
+
import * as core from "../../core/index.js";
|
|
4
|
+
export declare class OAuthPkceAuthProvider implements core.AuthProvider {
|
|
5
|
+
private readonly options;
|
|
6
|
+
private readonly authClient;
|
|
7
|
+
private accessToken;
|
|
8
|
+
private expiresAt;
|
|
9
|
+
private refreshPromise;
|
|
10
|
+
private storedRefreshToken;
|
|
11
|
+
private refreshExpiresAt;
|
|
12
|
+
constructor(options: BaseClientOptions & OAuthAuthProvider.PkceCredentials);
|
|
13
|
+
static canCreate(options?: Partial<OAuthAuthProvider.PkceCredentials & BaseClientOptions>): options is BaseClientOptions & OAuthAuthProvider.PkceCredentials;
|
|
14
|
+
private clientIdSupplier;
|
|
15
|
+
private codeSupplier;
|
|
16
|
+
private redirectUriSupplier;
|
|
17
|
+
private codeVerifierSupplier;
|
|
18
|
+
getAuthRequest({ endpointMetadata, }?: {
|
|
19
|
+
endpointMetadata?: core.EndpointMetadata;
|
|
20
|
+
}): Promise<core.AuthRequest>;
|
|
21
|
+
private getToken;
|
|
22
|
+
private refresh;
|
|
23
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.OAuthPkceAuthProvider = void 0;
|
|
46
|
+
const core = __importStar(require("../../core/index.js"));
|
|
47
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
48
|
+
const CortiAuth_js_1 = require("./CortiAuth.js");
|
|
49
|
+
const oauthAuthHelpers_js_1 = require("../utils/oauthAuthHelpers.js");
|
|
50
|
+
class OAuthPkceAuthProvider {
|
|
51
|
+
constructor(options) {
|
|
52
|
+
this.options = options;
|
|
53
|
+
this.authClient = new CortiAuth_js_1.CortiAuth(options);
|
|
54
|
+
this.expiresAt = new Date();
|
|
55
|
+
}
|
|
56
|
+
static canCreate(options) {
|
|
57
|
+
const opts = options;
|
|
58
|
+
return ((opts === null || opts === void 0 ? void 0 : opts[oauthAuthHelpers_js_1.CLIENT_ID_PARAM]) != null &&
|
|
59
|
+
(opts === null || opts === void 0 ? void 0 : opts[oauthAuthHelpers_js_1.CLIENT_SECRET_PARAM]) == null &&
|
|
60
|
+
(opts === null || opts === void 0 ? void 0 : opts[oauthAuthHelpers_js_1.CODE_PARAM]) != null &&
|
|
61
|
+
(opts === null || opts === void 0 ? void 0 : opts[oauthAuthHelpers_js_1.REDIRECT_URI_PARAM]) != null);
|
|
62
|
+
}
|
|
63
|
+
clientIdSupplier() {
|
|
64
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
65
|
+
const supplier = this.options[oauthAuthHelpers_js_1.CLIENT_ID_PARAM];
|
|
66
|
+
if (supplier == null) {
|
|
67
|
+
throw new errors.CortiError({ message: oauthAuthHelpers_js_1.CLIENT_ID_REQUIRED_ERROR_MESSAGE });
|
|
68
|
+
}
|
|
69
|
+
return core.EndpointSupplier.get(supplier, { endpointMetadata });
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
codeSupplier() {
|
|
73
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
74
|
+
const supplier = this.options[oauthAuthHelpers_js_1.CODE_PARAM];
|
|
75
|
+
if (supplier == null) {
|
|
76
|
+
throw new errors.CortiError({ message: oauthAuthHelpers_js_1.CODE_REQUIRED_ERROR_MESSAGE });
|
|
77
|
+
}
|
|
78
|
+
return core.EndpointSupplier.get(supplier, { endpointMetadata });
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
redirectUriSupplier() {
|
|
82
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
83
|
+
const supplier = this.options[oauthAuthHelpers_js_1.REDIRECT_URI_PARAM];
|
|
84
|
+
if (supplier == null) {
|
|
85
|
+
throw new errors.CortiError({ message: oauthAuthHelpers_js_1.REDIRECT_URI_REQUIRED_ERROR_MESSAGE });
|
|
86
|
+
}
|
|
87
|
+
return core.EndpointSupplier.get(supplier, { endpointMetadata });
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
codeVerifierSupplier() {
|
|
91
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
92
|
+
const supplier = this.options[oauthAuthHelpers_js_1.CODE_VERIFIER_PARAM];
|
|
93
|
+
if (supplier == null) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
return core.EndpointSupplier.get(supplier, { endpointMetadata });
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
getAuthRequest() {
|
|
100
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
101
|
+
const token = yield this.getToken({ endpointMetadata });
|
|
102
|
+
return {
|
|
103
|
+
headers: {
|
|
104
|
+
Authorization: `Bearer ${token}`,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
getToken() {
|
|
110
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata } = {}) {
|
|
111
|
+
if (this.accessToken && this.expiresAt > new Date()) {
|
|
112
|
+
return this.accessToken;
|
|
113
|
+
}
|
|
114
|
+
if (this.refreshPromise != null) {
|
|
115
|
+
return this.refreshPromise;
|
|
116
|
+
}
|
|
117
|
+
return this.refresh({ endpointMetadata });
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
refresh() {
|
|
121
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata } = {}) {
|
|
122
|
+
this.refreshPromise = (() => __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
try {
|
|
124
|
+
const clientId = yield this.clientIdSupplier({ endpointMetadata });
|
|
125
|
+
let tokenResponse;
|
|
126
|
+
if (clientId &&
|
|
127
|
+
this.storedRefreshToken &&
|
|
128
|
+
this.refreshExpiresAt &&
|
|
129
|
+
this.refreshExpiresAt > new Date()) {
|
|
130
|
+
tokenResponse = yield this.authClient.refreshToken({
|
|
131
|
+
clientId,
|
|
132
|
+
refreshToken: this.storedRefreshToken,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
const code = yield this.codeSupplier({ endpointMetadata });
|
|
137
|
+
const redirectUri = yield this.redirectUriSupplier({ endpointMetadata });
|
|
138
|
+
const codeVerifier = yield this.codeVerifierSupplier({ endpointMetadata });
|
|
139
|
+
tokenResponse = yield this.authClient.getPkceFlowToken({
|
|
140
|
+
clientId,
|
|
141
|
+
code,
|
|
142
|
+
redirectUri,
|
|
143
|
+
codeVerifier,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
this.accessToken = tokenResponse.accessToken;
|
|
147
|
+
this.expiresAt = (0, oauthAuthHelpers_js_1.getExpiresAt)(tokenResponse.expiresIn, oauthAuthHelpers_js_1.BUFFER_IN_MINUTES);
|
|
148
|
+
if (tokenResponse.refreshToken) {
|
|
149
|
+
this.storedRefreshToken = tokenResponse.refreshToken;
|
|
150
|
+
this.refreshExpiresAt = tokenResponse.refreshExpiresIn
|
|
151
|
+
? (0, oauthAuthHelpers_js_1.getExpiresAt)(tokenResponse.refreshExpiresIn, oauthAuthHelpers_js_1.BUFFER_IN_MINUTES)
|
|
152
|
+
: undefined;
|
|
153
|
+
}
|
|
154
|
+
return this.accessToken;
|
|
155
|
+
}
|
|
156
|
+
finally {
|
|
157
|
+
this.refreshPromise = undefined;
|
|
158
|
+
}
|
|
159
|
+
}))();
|
|
160
|
+
return this.refreshPromise;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.OAuthPkceAuthProvider = OAuthPkceAuthProvider;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { OAuthAuthProvider } from "../../auth/OAuthAuthProvider.js";
|
|
2
|
+
import type { BaseClientOptions } from "../../BaseClient.js";
|
|
3
|
+
import * as core from "../../core/index.js";
|
|
4
|
+
export declare class OAuthRopcAuthProvider implements core.AuthProvider {
|
|
5
|
+
private readonly options;
|
|
6
|
+
private readonly authClient;
|
|
7
|
+
private accessToken;
|
|
8
|
+
private expiresAt;
|
|
9
|
+
private refreshPromise;
|
|
10
|
+
private storedRefreshToken;
|
|
11
|
+
private refreshExpiresAt;
|
|
12
|
+
constructor(options: BaseClientOptions & OAuthAuthProvider.RopcCredentials);
|
|
13
|
+
static canCreate(options?: Partial<OAuthAuthProvider.RopcCredentials & BaseClientOptions>): options is BaseClientOptions & OAuthAuthProvider.RopcCredentials;
|
|
14
|
+
private clientIdSupplier;
|
|
15
|
+
private usernameSupplier;
|
|
16
|
+
private passwordSupplier;
|
|
17
|
+
getAuthRequest({ endpointMetadata, }?: {
|
|
18
|
+
endpointMetadata?: core.EndpointMetadata;
|
|
19
|
+
}): Promise<core.AuthRequest>;
|
|
20
|
+
private getToken;
|
|
21
|
+
private refresh;
|
|
22
|
+
}
|