@signalwire/js
Advanced tools
Comparing version 3.23.0-dev.202307071726.37bfb58.0 to 3.23.0-dev.202307181739.0f77e80.0
@@ -41,4 +41,4 @@ import { SessionOptions } from './utils/interfaces'; | ||
*/ | ||
protected _checkTokenExpiration(): void; | ||
protected _checkTokenExpiration(): Promise<void>; | ||
} | ||
//# sourceMappingURL=BaseJWTSession.d.ts.map |
@@ -44,2 +44,4 @@ /// <reference types="node" /> | ||
logLevel?: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent'; | ||
/** To refresh the auth token */ | ||
onRefreshToken?(): Promise<void>; | ||
/** | ||
@@ -51,3 +53,3 @@ * The SDK invokes this method and uses the new token to re-auth. | ||
* */ | ||
_onRefreshToken?(): void; | ||
_onRefreshToken?(): Promise<void>; | ||
sessionChannel?: SessionChannel; | ||
@@ -54,0 +56,0 @@ } |
@@ -16,2 +16,3 @@ import { type UserOptions } from '@signalwire/core'; | ||
handlePushNotification: WSClient['handlePushNotification']; | ||
updateToken: WSClient['updateToken']; | ||
} | ||
@@ -18,0 +19,0 @@ export declare const SignalWire: (options: SignalWireOptions) => Promise<SignalWireContract>; |
@@ -32,4 +32,5 @@ import { type UserOptions } from '@signalwire/core'; | ||
private executeVertoSubscribe; | ||
updateToken(token: string): Promise<void>; | ||
} | ||
export {}; | ||
//# sourceMappingURL=WSClient.d.ts.map |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "3.23.0-dev.202307071726.37bfb58.0", | ||
"version": "3.23.0-dev.202307181739.0f77e80.0", | ||
"main": "dist/index.js", | ||
@@ -43,4 +43,4 @@ "module": "dist/index.esm.js", | ||
"dependencies": { | ||
"@signalwire/core": "3.18.0-dev.202307071726.37bfb58.0", | ||
"@signalwire/webrtc": "3.9.0-dev.202307071726.37bfb58.0", | ||
"@signalwire/core": "3.18.0-dev.202307181739.0f77e80.0", | ||
"@signalwire/webrtc": "3.9.0-dev.202307181739.0f77e80.0", | ||
"jwt-decode": "^3.1.2" | ||
@@ -47,0 +47,0 @@ }, |
@@ -18,2 +18,3 @@ import { type UserOptions } from '@signalwire/core' | ||
handlePushNotification: WSClient['handlePushNotification'] | ||
updateToken: WSClient['updateToken'] | ||
} | ||
@@ -38,2 +39,3 @@ | ||
handlePushNotification: wsClient.handlePushNotification.bind(wsClient), | ||
updateToken: wsClient.updateToken.bind(wsClient), | ||
// @ts-expect-error | ||
@@ -40,0 +42,0 @@ __httpClient: httpClient, |
@@ -247,2 +247,17 @@ import { type UserOptions, getLogger, VertoSubscribe } from '@signalwire/core' | ||
} | ||
updateToken(token: string): Promise<void> { | ||
return new Promise((resolve, reject) => { | ||
// @ts-expect-error | ||
this.wsClient.once('session.auth_error', (error) => { | ||
reject(error) | ||
}) | ||
this.wsClient.once('session.connected', () => { | ||
resolve() | ||
}) | ||
// @ts-expect-error | ||
this.wsClient.reauthenticate(token) | ||
}) | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2603579
24367
+ Added@signalwire/core@3.18.0-dev.202307181739.0f77e80.0(transitive)
+ Added@signalwire/webrtc@3.9.0-dev.202307181739.0f77e80.0(transitive)
- Removed@signalwire/core@3.18.0-dev.202307071726.37bfb58.0(transitive)
- Removed@signalwire/webrtc@3.9.0-dev.202307071726.37bfb58.0(transitive)