UNPKG

magicbell

Version:
46 lines 1.41 kB
// This file is generated. Do not update manually! import { Resource } from '../client/resource.js'; export class PushSubscriptions extends Resource { path = 'push_subscriptions'; entity = 'push_subscription'; /** * Register a device token for push notifications. * * Please keep in mind that mobile push notifications will be delivered to this * device only if the channel is configured and enabled. * * @param data * @param options - override client request options. * @returns **/ create(data, options) { return this.request({ method: 'POST', }, data, options); } /** * Returns the list of device tokens registered for push notifications. * * @param options - override client request options. * @returns **/ list(options) { return this.request({ method: 'GET', paged: true, }, options); } /** * Deletes the registered device token to remove the mobile push subscription. * * @param deviceToken - Token of the device you want to remove * @param options - override client request options. **/ delete(deviceToken, options) { return this.request({ method: 'DELETE', path: '{device_token}', }, deviceToken, options); } } //# sourceMappingURL=push-subscriptions.js.map