UNPKG

@trycourier/courier-react-native

Version:

Inbox, Push Notifications, and Preferences for React Native

32 lines (31 loc) 1.05 kB
import { BrandClient } from ".."; import { ClientModule } from "./ClientModule"; import { InboxClient } from "./InboxClient"; import { PreferenceClient } from "./PreferenceClient"; import { TokenClient } from "./TokenClient"; import { TrackingClient } from "./TrackingClient"; export class CourierClient extends ClientModule { options; tokens; brands; inbox; preferences; tracking; constructor(props) { const options = { userId: props.userId, showLogs: props.showLogs ?? __DEV__, jwt: props.jwt, clientKey: props.clientKey, connectionId: props.clientKey, tenantId: props.tenantId, }; super(options); this.options = options; this.tokens = new TokenClient(this.clientId); this.brands = new BrandClient(this.clientId); this.inbox = new InboxClient(this.clientId); this.preferences = new PreferenceClient(this.clientId); this.tracking = new TrackingClient(this.clientId); } }