@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
32 lines • 1.06 kB
TypeScript
interface Params {
userId: string;
token: {
issuedAt: string;
expiresAt: string;
accessToken: string;
};
}
/**
* ```js
* import { resumeSession } from '@amityco/ts-sdk/client/api'
* const success = await resumeSession({
* userId: 'XYZ123456789',
* token: { accessToken: 'abc123', issuedAt: '2023-01-01T00:00:00Z', expiresAt: '2023-01-02T00:00:00Z' }
* })
* ```
*
* Connects an {@link Amity.Client} instance to ASC servers using an existing access token
*
* @param params the connect parameters
* @param params.userId the user ID for the current session
* @param params.token the existing access token with its metadata
* @param sessionHandler the session handler for token renewal
* @param config optional configuration
* @returns a success boolean if connected
*
* @category Client API
* @async
*/
export declare const resumeSession: (params: Params, sessionHandler: Amity.SessionHandler, config?: Amity.ConnectClientConfig) => Promise<boolean>;
export {};
//# sourceMappingURL=resumeSession.d.ts.map