UNPKG

magicbell

Version:
50 lines 1.58 kB
"use strict"; // This file is generated. Do not update manually! Object.defineProperty(exports, "__esModule", { value: true }); exports.PushSubscriptions = void 0; const resource_js_1 = require("../client/resource.js"); class PushSubscriptions extends resource_js_1.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); } } exports.PushSubscriptions = PushSubscriptions; //# sourceMappingURL=push-subscriptions.js.map