UNPKG

@trycourier/courier-react-native

Version:

Inbox, Push Notifications, and Preferences for React Native

18 lines (17 loc) 638 B
import { Modules } from "../Modules"; export class TrackingClient { clientId; constructor(clientId) { this.clientId = clientId; } /** * Posts a tracking URL with associated event data. * @param props - The properties for posting the tracking URL. * @param props.url - The tracking URL to be posted. * @param props.event - The CourierTrackingEvent associated with the URL. * @returns A promise that resolves when the tracking URL is successfully posted. */ async postTrackingUrl(props) { await Modules.Client.postTrackingUrl(this.clientId, props.url, props.event); } }