@magicbell/react-headless
Version:
Hooks to build a notification inbox
34 lines (33 loc) • 854 B
TypeScript
import { UserClient } from 'magicbell/user-client';
export type ClientSettings = {
apiKey: string;
userEmail?: string;
userExternalId?: string;
userKey?: string;
token?: string;
clientId: string;
serverURL: string;
socketURL: string;
getClient(): InstanceType<typeof UserClient>;
appInfo?: {
name: string;
version: string;
};
network?: {
maxRetries?: number;
cacheTTL?: number;
};
} & ({
userEmail: string;
} | {
userExternalId: string;
});
/**
* Store for the configuration of this MagicBell client. It contains all
* settings required to make a request to the MagicBell server.
*
* @example
* const { apiKey } = clientSettings.getState()
*/
declare const clientSettings: import("zustand/vanilla").StoreApi<ClientSettings>;
export default clientSettings;