import { expectType } from 'tsd'; import * as PusherPushNotifications from '.'; // Create a client const beamsClient = new PusherPushNotifications.Client({ instanceId: 'YOUR_INSTANCE_ID', }); // Lifecycle management expectType>(beamsClient.start()); expectType>(beamsClient.stop()); expectType>(beamsClient.clearAllState()); expectType>(beamsClient.getDeviceId()); // Interest management expectType>(beamsClient.addDeviceInterest('hello')); expectType>(beamsClient.removeDeviceInterest('hello')); expectType>>(beamsClient.getDeviceInterests()); expectType>(beamsClient.setDeviceInterests(['a', 'b', 'c'])); expectType>(beamsClient.clearDeviceInterests()); // Authenticated Users const tokenProvider = new PusherPushNotifications.TokenProvider({ url: 'YOUR_BEAMS_AUTH_URL_HERE', queryParams: { someQueryParam: 'parameter-content' }, headers: { someHeader: 'header-content' }, }); expectType>(beamsClient.getUserId()); expectType>(beamsClient.setUserId('alice', tokenProvider)); // Registration state expectType>( beamsClient.getRegistrationState() );