UNPKG

@trycourier/courier-react-native

Version:

Inbox, Push Notifications, and Preferences for React Native

36 lines (33 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TokenClient = void 0; var _Modules = require("../Modules"); class TokenClient { constructor(clientId) { this.clientId = clientId; } /** * Stores a user token for a specific provider. * @param props - The properties for storing the user token. * @param props.token - The token to be stored. * @param props.provider - The provider associated with the token. * @param props.device - Optional device information. * @returns A promise that resolves when the token is successfully stored. */ async putUserToken(props) { await _Modules.Modules.Client.putUserToken(this.clientId, props.token, props.provider, props.device); } /** * Deletes a user token. * @param props - The properties for deleting the user token. * @param props.token - The token to be deleted. * @returns A promise that resolves when the token is successfully deleted. */ async deleteUserToken(props) { await _Modules.Modules.Client.deleteUserToken(this.clientId, props.token); } } exports.TokenClient = TokenClient; //# sourceMappingURL=TokenClient.js.map