rcs-js 2.0.21 → 2.0.23-rc.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/dist/cjs/Client.d.ts +6 -0
- package/dist/cjs/Client.js +32 -22
- package/dist/cjs/api/errors/BadGatewayError.d.ts +6 -0
- package/dist/cjs/api/errors/BadGatewayError.js +50 -0
- package/dist/cjs/api/errors/ConflictError.d.ts +6 -0
- package/dist/cjs/api/errors/ConflictError.js +50 -0
- package/dist/cjs/api/errors/GoneError.d.ts +6 -0
- package/dist/cjs/api/errors/GoneError.js +50 -0
- package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +6 -0
- package/dist/cjs/api/errors/ServiceUnavailableError.js +50 -0
- package/dist/cjs/api/errors/TooEarlyError.d.ts +6 -0
- package/dist/cjs/api/errors/TooEarlyError.js +50 -0
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +6 -0
- package/dist/cjs/api/errors/UnprocessableEntityError.js +50 -0
- package/dist/cjs/api/errors/index.d.ts +6 -0
- package/dist/cjs/api/errors/index.js +6 -0
- package/dist/cjs/api/resources/calls/client/Client.d.ts +181 -0
- package/dist/cjs/api/resources/calls/client/Client.js +788 -0
- package/dist/cjs/api/resources/calls/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/calls/client/index.js +17 -0
- package/dist/cjs/api/resources/calls/client/requests/CallsDownloadRecordingRequest.d.ts +8 -0
- package/dist/cjs/api/resources/calls/client/requests/CallsDownloadRecordingRequest.js +3 -0
- package/dist/cjs/api/resources/calls/client/requests/CallsListEventsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/calls/client/requests/CallsListEventsRequest.js +3 -0
- package/dist/cjs/api/resources/calls/client/requests/CallsListRequest.d.ts +17 -0
- package/dist/cjs/api/resources/calls/client/requests/CallsListRequest.js +3 -0
- package/dist/cjs/api/resources/calls/client/requests/CreateCallParams.d.ts +17 -0
- package/dist/cjs/api/resources/calls/client/requests/CreateCallParams.js +3 -0
- package/dist/cjs/api/resources/calls/client/requests/CreateStreamTokenParams.d.ts +12 -0
- package/dist/cjs/api/resources/calls/client/requests/CreateStreamTokenParams.js +3 -0
- package/dist/cjs/api/resources/calls/client/requests/UpdateCallParams.d.ts +12 -0
- package/dist/cjs/api/resources/calls/client/requests/UpdateCallParams.js +3 -0
- package/dist/cjs/api/resources/calls/client/requests/index.d.ts +6 -0
- package/dist/cjs/api/resources/calls/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/calls/index.d.ts +1 -0
- package/dist/cjs/api/resources/calls/index.js +17 -0
- package/dist/cjs/api/resources/forms/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/forms/client/Client.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/network/client/Client.d.ts +21 -0
- package/dist/cjs/api/resources/network/client/Client.js +30 -0
- package/dist/cjs/api/resources/network/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/client/index.js +2 -0
- package/dist/cjs/api/resources/network/index.d.ts +2 -0
- package/dist/cjs/api/resources/network/index.js +18 -0
- package/dist/cjs/api/resources/network/resources/index.d.ts +8 -0
- package/dist/cjs/api/resources/network/resources/index.js +47 -0
- package/dist/cjs/api/resources/network/resources/requests/client/Client.d.ts +61 -0
- package/dist/cjs/api/resources/network/resources/requests/client/Client.js +223 -0
- package/dist/cjs/api/resources/network/resources/requests/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/requests/client/index.js +17 -0
- package/dist/cjs/api/resources/network/resources/requests/client/requests/ListNetworkRequestsParams.d.ts +21 -0
- package/dist/cjs/api/resources/network/resources/requests/client/requests/ListNetworkRequestsParams.js +3 -0
- package/dist/cjs/api/resources/network/resources/requests/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/requests/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/network/resources/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/requests/index.js +17 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/Client.d.ts +71 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/Client.js +234 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/index.js +17 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/requests/SilentAuthCheckRequest.d.ts +10 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/requests/SilentAuthCheckRequest.js +3 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/requests/SilentAuthRequest.d.ts +34 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/requests/SilentAuthRequest.js +3 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/silentAuth/index.js +17 -0
- package/dist/cjs/api/resources/network/resources/simSwap/client/Client.d.ts +37 -0
- package/dist/cjs/api/resources/network/resources/simSwap/client/Client.js +143 -0
- package/dist/cjs/api/resources/network/resources/simSwap/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/simSwap/client/index.js +17 -0
- package/dist/cjs/api/resources/network/resources/simSwap/client/requests/SimSwapRequest.d.ts +13 -0
- package/dist/cjs/api/resources/network/resources/simSwap/client/requests/SimSwapRequest.js +3 -0
- package/dist/cjs/api/resources/network/resources/simSwap/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/simSwap/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/network/resources/simSwap/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/simSwap/index.js +17 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/client/Client.d.ts +47 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/client/Client.js +153 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/client/index.js +17 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/client/requests/SubscriberMatchRequest.d.ts +22 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/client/requests/SubscriberMatchRequest.js +3 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/index.d.ts +1 -0
- package/dist/cjs/api/resources/network/resources/subscriberMatch/index.js +17 -0
- package/dist/cjs/api/resources/voiceStreams/index.d.ts +1 -0
- package/dist/cjs/api/resources/voiceStreams/index.js +17 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceClientFrame.d.ts +10 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceClientFrame.js +3 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceClientMedia.d.ts +10 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceClientMedia.js +3 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceClientMediaFrame.d.ts +11 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceClientMediaFrame.js +10 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceCommandAckFrame.d.ts +22 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceCommandAckFrame.js +14 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceCommandAction.d.ts +15 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceCommandAction.js +18 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceCommandFrame.d.ts +15 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceCommandFrame.js +10 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceConnectedFrame.d.ts +11 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceConnectedFrame.js +10 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceEventFrame.d.ts +15 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceEventFrame.js +10 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceMediaTrack.d.ts +5 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceMediaTrack.js +8 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceServerFrame.d.ts +16 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceServerFrame.js +3 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceServerMedia.d.ts +10 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceServerMedia.js +3 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceServerMediaFrame.d.ts +13 -0
- package/dist/cjs/api/resources/voiceStreams/types/VoiceServerMediaFrame.js +10 -0
- package/dist/cjs/api/resources/voiceStreams/types/index.d.ts +12 -0
- package/dist/cjs/api/resources/voiceStreams/types/index.js +28 -0
- package/dist/cjs/api/types/AgentSummary.d.ts +2 -2
- package/dist/cjs/api/types/Call.d.ts +16 -0
- package/dist/cjs/api/types/Call.js +3 -0
- package/dist/cjs/api/types/CallDirection.d.ts +11 -0
- package/dist/cjs/api/types/CallDirection.js +14 -0
- package/dist/cjs/api/types/CallEvent.d.ts +15 -0
- package/dist/cjs/api/types/CallEvent.js +3 -0
- package/dist/cjs/api/types/CallEventSource.d.ts +8 -0
- package/dist/cjs/api/types/CallEventSource.js +11 -0
- package/dist/cjs/api/types/CallMetadata.d.ts +4 -0
- package/dist/cjs/api/types/CallMetadata.js +3 -0
- package/dist/cjs/api/types/CallState.d.ts +25 -0
- package/dist/cjs/api/types/CallState.js +28 -0
- package/dist/cjs/api/types/CallStatusEvent.d.ts +41 -0
- package/dist/cjs/api/types/CallStatusEvent.js +3 -0
- package/dist/cjs/api/types/CallStreamToken.d.ts +7 -0
- package/dist/cjs/api/types/CallStreamToken.js +3 -0
- package/dist/cjs/api/types/CreatedCall.d.ts +18 -0
- package/dist/cjs/api/types/CreatedCall.js +3 -0
- package/dist/cjs/api/types/E164PhoneNumber.d.ts +4 -0
- package/dist/cjs/api/types/E164PhoneNumber.js +3 -0
- package/dist/cjs/api/types/HostedSilentAuthResponse.d.ts +8 -0
- package/dist/cjs/api/types/HostedSilentAuthResponse.js +3 -0
- package/dist/cjs/api/types/JsonSilentAuthResponse.d.ts +8 -0
- package/dist/cjs/api/types/JsonSilentAuthResponse.js +3 -0
- package/dist/cjs/api/types/ListCallEventsResponse.d.ts +5 -0
- package/dist/cjs/api/types/ListCallEventsResponse.js +3 -0
- package/dist/cjs/api/types/ListCallsResponse.d.ts +5 -0
- package/dist/cjs/api/types/ListCallsResponse.js +3 -0
- package/dist/cjs/api/types/ListNetworkRequestsResponse.d.ts +8 -0
- package/dist/cjs/api/types/ListNetworkRequestsResponse.js +3 -0
- package/dist/cjs/api/types/NetworkInsightStatus.d.ts +8 -0
- package/dist/cjs/api/types/NetworkInsightStatus.js +11 -0
- package/dist/cjs/api/types/NetworkRequestId.d.ts +4 -0
- package/dist/cjs/api/types/NetworkRequestId.js +3 -0
- package/dist/cjs/api/types/NetworkRequestResult.d.ts +5 -0
- package/dist/cjs/api/types/NetworkRequestResult.js +3 -0
- package/dist/cjs/api/types/NetworkRequestStatus.d.ts +9 -0
- package/dist/cjs/api/types/NetworkRequestStatus.js +12 -0
- package/dist/cjs/api/types/NetworkRequestSummary.d.ts +19 -0
- package/dist/cjs/api/types/NetworkRequestSummary.js +3 -0
- package/dist/cjs/api/types/NetworkRequestType.d.ts +7 -0
- package/dist/cjs/api/types/NetworkRequestType.js +10 -0
- package/dist/cjs/api/types/RecordingDownload.d.ts +5 -0
- package/dist/cjs/api/types/RecordingDownload.js +3 -0
- package/dist/cjs/api/types/RecordingState.d.ts +15 -0
- package/dist/cjs/api/types/RecordingState.js +18 -0
- package/dist/cjs/api/types/SilentAuthCheckResponse.d.ts +14 -0
- package/dist/cjs/api/types/SilentAuthCheckResponse.js +12 -0
- package/dist/cjs/api/types/SilentAuthResponse.d.ts +10 -0
- package/dist/cjs/api/types/SilentAuthResponse.js +3 -0
- package/dist/cjs/api/types/SimSwapResponse.d.ts +9 -0
- package/dist/cjs/api/types/SimSwapResponse.js +3 -0
- package/dist/cjs/api/types/SubscriberMatchAttributes.d.ts +27 -0
- package/dist/cjs/api/types/SubscriberMatchAttributes.js +3 -0
- package/dist/cjs/api/types/SubscriberMatchResponse.d.ts +46 -0
- package/dist/cjs/api/types/SubscriberMatchResponse.js +3 -0
- package/dist/cjs/api/types/SubscriberMatchResult.d.ts +12 -0
- package/dist/cjs/api/types/SubscriberMatchResult.js +15 -0
- package/dist/cjs/api/types/WebhookEventEnum.d.ts +1 -0
- package/dist/cjs/api/types/WebhookEventEnum.js +1 -0
- package/dist/cjs/api/types/index.d.ts +29 -0
- package/dist/cjs/api/types/index.js +29 -0
- package/dist/cjs/index.d.ts +6 -1
- package/dist/cjs/index.js +12 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/PinnacleClient.d.ts +4 -1
- package/dist/cjs/wrapper/PinnacleClient.js +17 -6
- package/dist/cjs/wrapper/messages/Client.d.ts +1 -1
- package/dist/cjs/wrapper/voice/Client.d.ts +34 -0
- package/dist/cjs/wrapper/voice/Client.js +147 -0
- package/dist/cjs/wrapper/voice/VoiceSocket.d.ts +98 -0
- package/dist/cjs/wrapper/voice/VoiceSocket.js +371 -0
- package/dist/cjs/wrapper/voice/types.d.ts +199 -0
- package/dist/cjs/wrapper/voice/types.js +35 -0
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +12 -2
- package/dist/esm/api/errors/BadGatewayError.d.mts +6 -0
- package/dist/esm/api/errors/BadGatewayError.mjs +13 -0
- package/dist/esm/api/errors/ConflictError.d.mts +6 -0
- package/dist/esm/api/errors/ConflictError.mjs +13 -0
- package/dist/esm/api/errors/GoneError.d.mts +6 -0
- package/dist/esm/api/errors/GoneError.mjs +13 -0
- package/dist/esm/api/errors/ServiceUnavailableError.d.mts +6 -0
- package/dist/esm/api/errors/ServiceUnavailableError.mjs +13 -0
- package/dist/esm/api/errors/TooEarlyError.d.mts +6 -0
- package/dist/esm/api/errors/TooEarlyError.mjs +13 -0
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +6 -0
- package/dist/esm/api/errors/UnprocessableEntityError.mjs +13 -0
- package/dist/esm/api/errors/index.d.mts +6 -0
- package/dist/esm/api/errors/index.mjs +6 -0
- package/dist/esm/api/resources/calls/client/Client.d.mts +181 -0
- package/dist/esm/api/resources/calls/client/Client.mjs +751 -0
- package/dist/esm/api/resources/calls/client/index.d.mts +1 -0
- package/dist/esm/api/resources/calls/client/index.mjs +1 -0
- package/dist/esm/api/resources/calls/client/requests/CallsDownloadRecordingRequest.d.mts +8 -0
- package/dist/esm/api/resources/calls/client/requests/CallsDownloadRecordingRequest.mjs +2 -0
- package/dist/esm/api/resources/calls/client/requests/CallsListEventsRequest.d.mts +10 -0
- package/dist/esm/api/resources/calls/client/requests/CallsListEventsRequest.mjs +2 -0
- package/dist/esm/api/resources/calls/client/requests/CallsListRequest.d.mts +17 -0
- package/dist/esm/api/resources/calls/client/requests/CallsListRequest.mjs +2 -0
- package/dist/esm/api/resources/calls/client/requests/CreateCallParams.d.mts +17 -0
- package/dist/esm/api/resources/calls/client/requests/CreateCallParams.mjs +2 -0
- package/dist/esm/api/resources/calls/client/requests/CreateStreamTokenParams.d.mts +12 -0
- package/dist/esm/api/resources/calls/client/requests/CreateStreamTokenParams.mjs +2 -0
- package/dist/esm/api/resources/calls/client/requests/UpdateCallParams.d.mts +12 -0
- package/dist/esm/api/resources/calls/client/requests/UpdateCallParams.mjs +2 -0
- package/dist/esm/api/resources/calls/client/requests/index.d.mts +6 -0
- package/dist/esm/api/resources/calls/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/calls/index.d.mts +1 -0
- package/dist/esm/api/resources/calls/index.mjs +1 -0
- package/dist/esm/api/resources/forms/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/forms/client/Client.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/network/client/Client.d.mts +21 -0
- package/dist/esm/api/resources/network/client/Client.mjs +26 -0
- package/dist/esm/api/resources/network/client/index.d.mts +1 -0
- package/dist/esm/api/resources/network/client/index.mjs +1 -0
- package/dist/esm/api/resources/network/index.d.mts +2 -0
- package/dist/esm/api/resources/network/index.mjs +2 -0
- package/dist/esm/api/resources/network/resources/index.d.mts +8 -0
- package/dist/esm/api/resources/network/resources/index.mjs +8 -0
- package/dist/esm/api/resources/network/resources/requests/client/Client.d.mts +61 -0
- package/dist/esm/api/resources/network/resources/requests/client/Client.mjs +186 -0
- package/dist/esm/api/resources/network/resources/requests/client/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/requests/client/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/requests/client/requests/ListNetworkRequestsParams.d.mts +21 -0
- package/dist/esm/api/resources/network/resources/requests/client/requests/ListNetworkRequestsParams.mjs +2 -0
- package/dist/esm/api/resources/network/resources/requests/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/requests/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/requests/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/Client.d.mts +71 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/Client.mjs +197 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/requests/SilentAuthCheckRequest.d.mts +10 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/requests/SilentAuthCheckRequest.mjs +2 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/requests/SilentAuthRequest.d.mts +34 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/requests/SilentAuthRequest.mjs +2 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/network/resources/silentAuth/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/silentAuth/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/silentAuth/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/simSwap/client/Client.d.mts +37 -0
- package/dist/esm/api/resources/network/resources/simSwap/client/Client.mjs +106 -0
- package/dist/esm/api/resources/network/resources/simSwap/client/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/simSwap/client/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/simSwap/client/requests/SimSwapRequest.d.mts +13 -0
- package/dist/esm/api/resources/network/resources/simSwap/client/requests/SimSwapRequest.mjs +2 -0
- package/dist/esm/api/resources/network/resources/simSwap/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/simSwap/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/simSwap/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/simSwap/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/client/Client.d.mts +47 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/client/Client.mjs +116 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/client/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/client/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/client/requests/SubscriberMatchRequest.d.mts +22 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/client/requests/SubscriberMatchRequest.mjs +2 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/index.d.mts +1 -0
- package/dist/esm/api/resources/network/resources/subscriberMatch/index.mjs +1 -0
- package/dist/esm/api/resources/voiceStreams/index.d.mts +1 -0
- package/dist/esm/api/resources/voiceStreams/index.mjs +1 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceClientFrame.d.mts +10 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceClientFrame.mjs +2 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceClientMedia.d.mts +10 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceClientMedia.mjs +2 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceClientMediaFrame.d.mts +11 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceClientMediaFrame.mjs +7 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceCommandAckFrame.d.mts +22 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceCommandAckFrame.mjs +11 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceCommandAction.d.mts +15 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceCommandAction.mjs +15 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceCommandFrame.d.mts +15 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceCommandFrame.mjs +7 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceConnectedFrame.d.mts +11 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceConnectedFrame.mjs +7 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceEventFrame.d.mts +15 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceEventFrame.mjs +7 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceMediaTrack.d.mts +5 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceMediaTrack.mjs +5 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceServerFrame.d.mts +16 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceServerFrame.mjs +2 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceServerMedia.d.mts +10 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceServerMedia.mjs +2 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceServerMediaFrame.d.mts +13 -0
- package/dist/esm/api/resources/voiceStreams/types/VoiceServerMediaFrame.mjs +7 -0
- package/dist/esm/api/resources/voiceStreams/types/index.d.mts +12 -0
- package/dist/esm/api/resources/voiceStreams/types/index.mjs +12 -0
- package/dist/esm/api/types/AgentSummary.d.mts +2 -2
- package/dist/esm/api/types/Call.d.mts +16 -0
- package/dist/esm/api/types/Call.mjs +2 -0
- package/dist/esm/api/types/CallDirection.d.mts +11 -0
- package/dist/esm/api/types/CallDirection.mjs +11 -0
- package/dist/esm/api/types/CallEvent.d.mts +15 -0
- package/dist/esm/api/types/CallEvent.mjs +2 -0
- package/dist/esm/api/types/CallEventSource.d.mts +8 -0
- package/dist/esm/api/types/CallEventSource.mjs +8 -0
- package/dist/esm/api/types/CallMetadata.d.mts +4 -0
- package/dist/esm/api/types/CallMetadata.mjs +2 -0
- package/dist/esm/api/types/CallState.d.mts +25 -0
- package/dist/esm/api/types/CallState.mjs +25 -0
- package/dist/esm/api/types/CallStatusEvent.d.mts +41 -0
- package/dist/esm/api/types/CallStatusEvent.mjs +2 -0
- package/dist/esm/api/types/CallStreamToken.d.mts +7 -0
- package/dist/esm/api/types/CallStreamToken.mjs +2 -0
- package/dist/esm/api/types/CreatedCall.d.mts +18 -0
- package/dist/esm/api/types/CreatedCall.mjs +2 -0
- package/dist/esm/api/types/E164PhoneNumber.d.mts +4 -0
- package/dist/esm/api/types/E164PhoneNumber.mjs +2 -0
- package/dist/esm/api/types/HostedSilentAuthResponse.d.mts +8 -0
- package/dist/esm/api/types/HostedSilentAuthResponse.mjs +2 -0
- package/dist/esm/api/types/JsonSilentAuthResponse.d.mts +8 -0
- package/dist/esm/api/types/JsonSilentAuthResponse.mjs +2 -0
- package/dist/esm/api/types/ListCallEventsResponse.d.mts +5 -0
- package/dist/esm/api/types/ListCallEventsResponse.mjs +2 -0
- package/dist/esm/api/types/ListCallsResponse.d.mts +5 -0
- package/dist/esm/api/types/ListCallsResponse.mjs +2 -0
- package/dist/esm/api/types/ListNetworkRequestsResponse.d.mts +8 -0
- package/dist/esm/api/types/ListNetworkRequestsResponse.mjs +2 -0
- package/dist/esm/api/types/NetworkInsightStatus.d.mts +8 -0
- package/dist/esm/api/types/NetworkInsightStatus.mjs +8 -0
- package/dist/esm/api/types/NetworkRequestId.d.mts +4 -0
- package/dist/esm/api/types/NetworkRequestId.mjs +2 -0
- package/dist/esm/api/types/NetworkRequestResult.d.mts +5 -0
- package/dist/esm/api/types/NetworkRequestResult.mjs +2 -0
- package/dist/esm/api/types/NetworkRequestStatus.d.mts +9 -0
- package/dist/esm/api/types/NetworkRequestStatus.mjs +9 -0
- package/dist/esm/api/types/NetworkRequestSummary.d.mts +19 -0
- package/dist/esm/api/types/NetworkRequestSummary.mjs +2 -0
- package/dist/esm/api/types/NetworkRequestType.d.mts +7 -0
- package/dist/esm/api/types/NetworkRequestType.mjs +7 -0
- package/dist/esm/api/types/RecordingDownload.d.mts +5 -0
- package/dist/esm/api/types/RecordingDownload.mjs +2 -0
- package/dist/esm/api/types/RecordingState.d.mts +15 -0
- package/dist/esm/api/types/RecordingState.mjs +15 -0
- package/dist/esm/api/types/SilentAuthCheckResponse.d.mts +14 -0
- package/dist/esm/api/types/SilentAuthCheckResponse.mjs +9 -0
- package/dist/esm/api/types/SilentAuthResponse.d.mts +10 -0
- package/dist/esm/api/types/SilentAuthResponse.mjs +2 -0
- package/dist/esm/api/types/SimSwapResponse.d.mts +9 -0
- package/dist/esm/api/types/SimSwapResponse.mjs +2 -0
- package/dist/esm/api/types/SubscriberMatchAttributes.d.mts +27 -0
- package/dist/esm/api/types/SubscriberMatchAttributes.mjs +2 -0
- package/dist/esm/api/types/SubscriberMatchResponse.d.mts +46 -0
- package/dist/esm/api/types/SubscriberMatchResponse.mjs +2 -0
- package/dist/esm/api/types/SubscriberMatchResult.d.mts +12 -0
- package/dist/esm/api/types/SubscriberMatchResult.mjs +12 -0
- package/dist/esm/api/types/WebhookEventEnum.d.mts +1 -0
- package/dist/esm/api/types/WebhookEventEnum.mjs +1 -0
- package/dist/esm/api/types/index.d.mts +29 -0
- package/dist/esm/api/types/index.mjs +29 -0
- package/dist/esm/index.d.mts +6 -1
- package/dist/esm/index.mjs +4 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/PinnacleClient.d.mts +4 -1
- package/dist/esm/wrapper/PinnacleClient.mjs +16 -5
- package/dist/esm/wrapper/messages/Client.d.mts +1 -1
- package/dist/esm/wrapper/voice/Client.d.mts +34 -0
- package/dist/esm/wrapper/voice/Client.mjs +143 -0
- package/dist/esm/wrapper/voice/VoiceSocket.d.mts +98 -0
- package/dist/esm/wrapper/voice/VoiceSocket.mjs +366 -0
- package/dist/esm/wrapper/voice/types.d.mts +199 -0
- package/dist/esm/wrapper/voice/types.mjs +32 -0
- package/package.json +9 -8
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
3
|
+
import * as Pinnacle from "../../../../../index.mjs";
|
|
4
|
+
export declare namespace SilentAuth {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class SilentAuth {
|
|
11
|
+
protected readonly _options: SilentAuth.Options;
|
|
12
|
+
constructor(_options: SilentAuth.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Start a Silent Authentication session to verify that the user controls the device attached to a phone number. Omit `format` to receive a `browserUrl` for the hosted browser/WebView flow, or set `format: "json"` to receive a `jsonUrl` for a native mobile app or custom client-side flow. The device check must run from the user's cellular device, not your server.
|
|
15
|
+
*
|
|
16
|
+
* The returned URL expires 60 seconds after creation. Open or fetch it immediately and use `expiresAt` to detect when a new Silent Auth session is required.
|
|
17
|
+
*
|
|
18
|
+
* <Note>
|
|
19
|
+
* Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
|
|
20
|
+
* </Note>
|
|
21
|
+
*
|
|
22
|
+
* @param {Pinnacle.network.SilentAuthRequest} request
|
|
23
|
+
* @param {SilentAuth.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
|
+
*
|
|
25
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
26
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
27
|
+
* @throws {@link Pinnacle.ForbiddenError}
|
|
28
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.network.silentAuth.start({
|
|
32
|
+
* phoneNumber: "+14155550123",
|
|
33
|
+
* clientRef: "user_123"
|
|
34
|
+
* })
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* await client.network.silentAuth.start({
|
|
38
|
+
* phoneNumber: "+14155550123",
|
|
39
|
+
* clientRef: "user_123",
|
|
40
|
+
* format: "json"
|
|
41
|
+
* })
|
|
42
|
+
*/
|
|
43
|
+
start(request: Pinnacle.network.SilentAuthRequest, requestOptions?: SilentAuth.RequestOptions): core.HttpResponsePromise<Pinnacle.SilentAuthResponse>;
|
|
44
|
+
private __start;
|
|
45
|
+
/**
|
|
46
|
+
* Complete a Silent Authentication request by exchanging the code returned from the JSON flow. Call this from your server after the user's mobile app fetches `jsonUrl`.
|
|
47
|
+
*
|
|
48
|
+
* This endpoint returns a terminal verification result. To inspect pending lifecycle states such as `started` or `challenge-issued`, use [Get Network Request](/api-reference/network/get-network-request).
|
|
49
|
+
*
|
|
50
|
+
* <Note>
|
|
51
|
+
* Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
|
|
52
|
+
* </Note>
|
|
53
|
+
*
|
|
54
|
+
* @param {Pinnacle.NetworkRequestId} requestId - Silent Authentication request ID returned by `POST /network/silent-auth`.
|
|
55
|
+
* @param {Pinnacle.network.SilentAuthCheckRequest} request
|
|
56
|
+
* @param {SilentAuth.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
59
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
60
|
+
* @throws {@link Pinnacle.ForbiddenError}
|
|
61
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* await client.network.silentAuth.check("nar_1234567890ABCDEF", {
|
|
65
|
+
* code: "abc123"
|
|
66
|
+
* })
|
|
67
|
+
*/
|
|
68
|
+
check(requestId: Pinnacle.NetworkRequestId, request: Pinnacle.network.SilentAuthCheckRequest, requestOptions?: SilentAuth.RequestOptions): core.HttpResponsePromise<Pinnacle.SilentAuthCheckResponse>;
|
|
69
|
+
private __check;
|
|
70
|
+
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
12
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
13
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
14
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
15
|
+
import * as Pinnacle from "../../../../../index.mjs";
|
|
16
|
+
export class SilentAuth {
|
|
17
|
+
constructor(_options) {
|
|
18
|
+
this._options = _options;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Start a Silent Authentication session to verify that the user controls the device attached to a phone number. Omit `format` to receive a `browserUrl` for the hosted browser/WebView flow, or set `format: "json"` to receive a `jsonUrl` for a native mobile app or custom client-side flow. The device check must run from the user's cellular device, not your server.
|
|
22
|
+
*
|
|
23
|
+
* The returned URL expires 60 seconds after creation. Open or fetch it immediately and use `expiresAt` to detect when a new Silent Auth session is required.
|
|
24
|
+
*
|
|
25
|
+
* <Note>
|
|
26
|
+
* Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
|
|
27
|
+
* </Note>
|
|
28
|
+
*
|
|
29
|
+
* @param {Pinnacle.network.SilentAuthRequest} request
|
|
30
|
+
* @param {SilentAuth.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
33
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
34
|
+
* @throws {@link Pinnacle.ForbiddenError}
|
|
35
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.network.silentAuth.start({
|
|
39
|
+
* phoneNumber: "+14155550123",
|
|
40
|
+
* clientRef: "user_123"
|
|
41
|
+
* })
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.network.silentAuth.start({
|
|
45
|
+
* phoneNumber: "+14155550123",
|
|
46
|
+
* clientRef: "user_123",
|
|
47
|
+
* format: "json"
|
|
48
|
+
* })
|
|
49
|
+
*/
|
|
50
|
+
start(request, requestOptions) {
|
|
51
|
+
return core.HttpResponsePromise.fromPromise(this.__start(request, requestOptions));
|
|
52
|
+
}
|
|
53
|
+
__start(request, requestOptions) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
56
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
57
|
+
const _response = yield core.fetcher({
|
|
58
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "network/silent-auth"),
|
|
59
|
+
method: "POST",
|
|
60
|
+
headers: _headers,
|
|
61
|
+
contentType: "application/json",
|
|
62
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
63
|
+
requestType: "json",
|
|
64
|
+
body: request,
|
|
65
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
66
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
67
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
68
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
69
|
+
logging: this._options.logging,
|
|
70
|
+
});
|
|
71
|
+
if (_response.ok) {
|
|
72
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
73
|
+
}
|
|
74
|
+
if (_response.error.reason === "status-code") {
|
|
75
|
+
switch (_response.error.statusCode) {
|
|
76
|
+
case 400:
|
|
77
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 401:
|
|
79
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
80
|
+
case 403:
|
|
81
|
+
throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
82
|
+
case 500:
|
|
83
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
84
|
+
default:
|
|
85
|
+
throw new errors.PinnacleError({
|
|
86
|
+
statusCode: _response.error.statusCode,
|
|
87
|
+
body: _response.error.body,
|
|
88
|
+
rawResponse: _response.rawResponse,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
switch (_response.error.reason) {
|
|
93
|
+
case "non-json":
|
|
94
|
+
throw new errors.PinnacleError({
|
|
95
|
+
statusCode: _response.error.statusCode,
|
|
96
|
+
body: _response.error.rawBody,
|
|
97
|
+
rawResponse: _response.rawResponse,
|
|
98
|
+
});
|
|
99
|
+
case "timeout":
|
|
100
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /network/silent-auth.");
|
|
101
|
+
case "unknown":
|
|
102
|
+
throw new errors.PinnacleError({
|
|
103
|
+
message: _response.error.errorMessage,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Complete a Silent Authentication request by exchanging the code returned from the JSON flow. Call this from your server after the user's mobile app fetches `jsonUrl`.
|
|
111
|
+
*
|
|
112
|
+
* This endpoint returns a terminal verification result. To inspect pending lifecycle states such as `started` or `challenge-issued`, use [Get Network Request](/api-reference/network/get-network-request).
|
|
113
|
+
*
|
|
114
|
+
* <Note>
|
|
115
|
+
* Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
|
|
116
|
+
* </Note>
|
|
117
|
+
*
|
|
118
|
+
* @param {Pinnacle.NetworkRequestId} requestId - Silent Authentication request ID returned by `POST /network/silent-auth`.
|
|
119
|
+
* @param {Pinnacle.network.SilentAuthCheckRequest} request
|
|
120
|
+
* @param {SilentAuth.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
|
+
*
|
|
122
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
123
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
124
|
+
* @throws {@link Pinnacle.ForbiddenError}
|
|
125
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* await client.network.silentAuth.check("nar_1234567890ABCDEF", {
|
|
129
|
+
* code: "abc123"
|
|
130
|
+
* })
|
|
131
|
+
*/
|
|
132
|
+
check(requestId, request, requestOptions) {
|
|
133
|
+
return core.HttpResponsePromise.fromPromise(this.__check(requestId, request, requestOptions));
|
|
134
|
+
}
|
|
135
|
+
__check(requestId, request, requestOptions) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
138
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
139
|
+
const _response = yield core.fetcher({
|
|
140
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, `network/silent-auth/${core.url.encodePathParam(requestId)}/check`),
|
|
141
|
+
method: "POST",
|
|
142
|
+
headers: _headers,
|
|
143
|
+
contentType: "application/json",
|
|
144
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
145
|
+
requestType: "json",
|
|
146
|
+
body: request,
|
|
147
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
148
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
149
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
150
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
151
|
+
logging: this._options.logging,
|
|
152
|
+
});
|
|
153
|
+
if (_response.ok) {
|
|
154
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
155
|
+
}
|
|
156
|
+
if (_response.error.reason === "status-code") {
|
|
157
|
+
switch (_response.error.statusCode) {
|
|
158
|
+
case 400:
|
|
159
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
160
|
+
case 401:
|
|
161
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
162
|
+
case 403:
|
|
163
|
+
throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
164
|
+
case 500:
|
|
165
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
166
|
+
default:
|
|
167
|
+
throw new errors.PinnacleError({
|
|
168
|
+
statusCode: _response.error.statusCode,
|
|
169
|
+
body: _response.error.body,
|
|
170
|
+
rawResponse: _response.rawResponse,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
switch (_response.error.reason) {
|
|
175
|
+
case "non-json":
|
|
176
|
+
throw new errors.PinnacleError({
|
|
177
|
+
statusCode: _response.error.statusCode,
|
|
178
|
+
body: _response.error.rawBody,
|
|
179
|
+
rawResponse: _response.rawResponse,
|
|
180
|
+
});
|
|
181
|
+
case "timeout":
|
|
182
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /network/silent-auth/{requestId}/check.");
|
|
183
|
+
case "unknown":
|
|
184
|
+
throw new errors.PinnacleError({
|
|
185
|
+
message: _response.error.errorMessage,
|
|
186
|
+
rawResponse: _response.rawResponse,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
_getCustomAuthorizationHeaders() {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
194
|
+
return { "PINNACLE-API-KEY": apiKeyValue };
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
package/dist/esm/api/resources/network/resources/silentAuth/client/requests/SilentAuthRequest.d.mts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type * as Pinnacle from "../../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* phoneNumber: "+14155550123",
|
|
6
|
+
* clientRef: "user_123"
|
|
7
|
+
* }
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* {
|
|
11
|
+
* phoneNumber: "+14155550123",
|
|
12
|
+
* clientRef: "user_123",
|
|
13
|
+
* format: "json"
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* {
|
|
18
|
+
* phoneNumber: "+14155550123",
|
|
19
|
+
* clientRef: "user_123"
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* {
|
|
24
|
+
* phoneNumber: "+14155550123",
|
|
25
|
+
* clientRef: "user_123"
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
export interface SilentAuthRequest {
|
|
29
|
+
phoneNumber: Pinnacle.E164PhoneNumber;
|
|
30
|
+
/** Your correlation ID, such as a user ID, session ID, or case ID. */
|
|
31
|
+
clientRef?: string;
|
|
32
|
+
/** Set to `json` when you want to fetch `jsonUrl` directly from your app and receive a JSON response. Omit this field for the hosted browser/WebView flow. */
|
|
33
|
+
format?: "json";
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
3
|
+
import * as Pinnacle from "../../../../../index.mjs";
|
|
4
|
+
export declare namespace SimSwap {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class SimSwap {
|
|
11
|
+
protected readonly _options: SimSwap.Options;
|
|
12
|
+
constructor(_options: SimSwap.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Check whether a phone number's SIM was changed during a recent lookback window. Use this to flag account takeover risk before sign-in, password reset, payment, or other sensitive actions.
|
|
15
|
+
*
|
|
16
|
+
* <Note>
|
|
17
|
+
* Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
|
|
18
|
+
* </Note>
|
|
19
|
+
*
|
|
20
|
+
* @param {Pinnacle.network.SimSwapRequest} request
|
|
21
|
+
* @param {SimSwap.RequestOptions} requestOptions - Request-specific configuration.
|
|
22
|
+
*
|
|
23
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
24
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
25
|
+
* @throws {@link Pinnacle.ForbiddenError}
|
|
26
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* await client.network.simSwap.check({
|
|
30
|
+
* phoneNumber: "+14155550123",
|
|
31
|
+
* periodHours: 240
|
|
32
|
+
* })
|
|
33
|
+
*/
|
|
34
|
+
check(request: Pinnacle.network.SimSwapRequest, requestOptions?: SimSwap.RequestOptions): core.HttpResponsePromise<Pinnacle.SimSwapResponse>;
|
|
35
|
+
private __check;
|
|
36
|
+
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
12
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
13
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
14
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
15
|
+
import * as Pinnacle from "../../../../../index.mjs";
|
|
16
|
+
export class SimSwap {
|
|
17
|
+
constructor(_options) {
|
|
18
|
+
this._options = _options;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Check whether a phone number's SIM was changed during a recent lookback window. Use this to flag account takeover risk before sign-in, password reset, payment, or other sensitive actions.
|
|
22
|
+
*
|
|
23
|
+
* <Note>
|
|
24
|
+
* Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
|
|
25
|
+
* </Note>
|
|
26
|
+
*
|
|
27
|
+
* @param {Pinnacle.network.SimSwapRequest} request
|
|
28
|
+
* @param {SimSwap.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
30
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
31
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
32
|
+
* @throws {@link Pinnacle.ForbiddenError}
|
|
33
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.network.simSwap.check({
|
|
37
|
+
* phoneNumber: "+14155550123",
|
|
38
|
+
* periodHours: 240
|
|
39
|
+
* })
|
|
40
|
+
*/
|
|
41
|
+
check(request, requestOptions) {
|
|
42
|
+
return core.HttpResponsePromise.fromPromise(this.__check(request, requestOptions));
|
|
43
|
+
}
|
|
44
|
+
__check(request, requestOptions) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
47
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
|
+
const _response = yield core.fetcher({
|
|
49
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "network/sim-swap"),
|
|
50
|
+
method: "POST",
|
|
51
|
+
headers: _headers,
|
|
52
|
+
contentType: "application/json",
|
|
53
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
54
|
+
requestType: "json",
|
|
55
|
+
body: request,
|
|
56
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
57
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
58
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
59
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
60
|
+
logging: this._options.logging,
|
|
61
|
+
});
|
|
62
|
+
if (_response.ok) {
|
|
63
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
64
|
+
}
|
|
65
|
+
if (_response.error.reason === "status-code") {
|
|
66
|
+
switch (_response.error.statusCode) {
|
|
67
|
+
case 400:
|
|
68
|
+
throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
|
|
69
|
+
case 401:
|
|
70
|
+
throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
71
|
+
case 403:
|
|
72
|
+
throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
73
|
+
case 500:
|
|
74
|
+
throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
|
|
75
|
+
default:
|
|
76
|
+
throw new errors.PinnacleError({
|
|
77
|
+
statusCode: _response.error.statusCode,
|
|
78
|
+
body: _response.error.body,
|
|
79
|
+
rawResponse: _response.rawResponse,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
switch (_response.error.reason) {
|
|
84
|
+
case "non-json":
|
|
85
|
+
throw new errors.PinnacleError({
|
|
86
|
+
statusCode: _response.error.statusCode,
|
|
87
|
+
body: _response.error.rawBody,
|
|
88
|
+
rawResponse: _response.rawResponse,
|
|
89
|
+
});
|
|
90
|
+
case "timeout":
|
|
91
|
+
throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /network/sim-swap.");
|
|
92
|
+
case "unknown":
|
|
93
|
+
throw new errors.PinnacleError({
|
|
94
|
+
message: _response.error.errorMessage,
|
|
95
|
+
rawResponse: _response.rawResponse,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
_getCustomAuthorizationHeaders() {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
103
|
+
return { "PINNACLE-API-KEY": apiKeyValue };
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as Pinnacle from "../../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* phoneNumber: "+14155550123",
|
|
6
|
+
* periodHours: 240
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface SimSwapRequest {
|
|
10
|
+
phoneNumber: Pinnacle.E164PhoneNumber;
|
|
11
|
+
/** Lookback window, in hours, for detecting a recent SIM change. Must be from 1 to 2400. Defaults to 240. */
|
|
12
|
+
periodHours?: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { SimSwapRequest } from "./SimSwapRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
3
|
+
import * as Pinnacle from "../../../../../index.mjs";
|
|
4
|
+
export declare namespace SubscriberMatch {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class SubscriberMatch {
|
|
11
|
+
protected readonly _options: SubscriberMatch.Options;
|
|
12
|
+
constructor(_options: SubscriberMatch.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Compare user-provided identity details against the carrier's subscriber record. Results return match strength per attribute, so you can use partial signals without receiving carrier PII.
|
|
15
|
+
*
|
|
16
|
+
* <Note>
|
|
17
|
+
* Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
|
|
18
|
+
* </Note>
|
|
19
|
+
*
|
|
20
|
+
* @param {Pinnacle.network.SubscriberMatchRequest} request
|
|
21
|
+
* @param {SubscriberMatch.RequestOptions} requestOptions - Request-specific configuration.
|
|
22
|
+
*
|
|
23
|
+
* @throws {@link Pinnacle.BadRequestError}
|
|
24
|
+
* @throws {@link Pinnacle.UnauthorizedError}
|
|
25
|
+
* @throws {@link Pinnacle.ForbiddenError}
|
|
26
|
+
* @throws {@link Pinnacle.InternalServerError}
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* await client.network.subscriberMatch.check({
|
|
30
|
+
* phoneNumber: "+14155550123",
|
|
31
|
+
* attributes: {
|
|
32
|
+
* givenName: "Jane",
|
|
33
|
+
* familyName: "Doe",
|
|
34
|
+
* streetName: "Market Street",
|
|
35
|
+
* streetNumber: "123",
|
|
36
|
+
* postalCode: "94105",
|
|
37
|
+
* locality: "San Francisco",
|
|
38
|
+
* region: "CA",
|
|
39
|
+
* country: "US",
|
|
40
|
+
* birthdate: "1990-01-31"
|
|
41
|
+
* }
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
check(request: Pinnacle.network.SubscriberMatchRequest, requestOptions?: SubscriberMatch.RequestOptions): core.HttpResponsePromise<Pinnacle.SubscriberMatchResponse>;
|
|
45
|
+
private __check;
|
|
46
|
+
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
47
|
+
}
|