@bigbinary/neeto-commons-rn 1.4.12 → 1.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/notifications.js +1 -1
- package/package.json +1 -1
package/api/notifications.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.registerDeviceTokenAPI=exports.markReadUnReadNotificationAPI=exports.markAllNotificationsReadAPI=exports.fetchNotificationsAPI=exports.deleteDeviceTokenAPI=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _axios=_interopRequireDefault(require("axios"));var registerDeviceTokenAPI=exports.registerDeviceTokenAPI=function(){var _ref=(0,_asyncToGenerator2.default)(function*(payload){return yield _axios.default.post("/neeto_notifications/api/v1/devices",payload);});return function registerDeviceTokenAPI(_x){return _ref.apply(this,arguments);};}();var deleteDeviceTokenAPI=exports.deleteDeviceTokenAPI=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(_ref2){var notificationDeviceId=_ref2.notificationDeviceId;var url="/neeto_notifications/api/v1/devices/"+notificationDeviceId;return yield _axios.default.delete(url);});return function deleteDeviceTokenAPI(_x2){return _ref3.apply(this,arguments);};}();var fetchNotificationsAPI=exports.fetchNotificationsAPI=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(_ref4){var page=_ref4.page;return yield _axios.default.get("/neeto_notifications/api/v1/notifications",{params:{page:page}});});return function fetchNotificationsAPI(_x3){return _ref5.apply(this,arguments);};}();var markReadUnReadNotificationAPI=exports.markReadUnReadNotificationAPI=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(_ref6){var notificationId=_ref6.notificationId,readAt=_ref6.readAt;return yield _axios.default.put("/neeto_notifications/api/v1/notifications/"+notificationId,{notification:{read_at:readAt}});});return function markReadUnReadNotificationAPI(_x4){return _ref7.apply(this,arguments);};}();var markAllNotificationsReadAPI=exports.markAllNotificationsReadAPI=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(){return yield _axios.default.
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.registerDeviceTokenAPI=exports.markReadUnReadNotificationAPI=exports.markAllNotificationsReadAPI=exports.fetchNotificationsAPI=exports.deleteDeviceTokenAPI=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _axios=_interopRequireDefault(require("axios"));var registerDeviceTokenAPI=exports.registerDeviceTokenAPI=function(){var _ref=(0,_asyncToGenerator2.default)(function*(payload){return yield _axios.default.post("/neeto_notifications/api/v1/devices",payload);});return function registerDeviceTokenAPI(_x){return _ref.apply(this,arguments);};}();var deleteDeviceTokenAPI=exports.deleteDeviceTokenAPI=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(_ref2){var notificationDeviceId=_ref2.notificationDeviceId;var url="/neeto_notifications/api/v1/devices/"+notificationDeviceId;return yield _axios.default.delete(url);});return function deleteDeviceTokenAPI(_x2){return _ref3.apply(this,arguments);};}();var fetchNotificationsAPI=exports.fetchNotificationsAPI=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(_ref4){var page=_ref4.page;return yield _axios.default.get("/neeto_notifications/api/v1/notifications",{params:{page:page}});});return function fetchNotificationsAPI(_x3){return _ref5.apply(this,arguments);};}();var markReadUnReadNotificationAPI=exports.markReadUnReadNotificationAPI=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(_ref6){var notificationId=_ref6.notificationId,readAt=_ref6.readAt;return yield _axios.default.put("/neeto_notifications/api/v1/notifications/"+notificationId,{notification:{read_at:readAt}});});return function markReadUnReadNotificationAPI(_x4){return _ref7.apply(this,arguments);};}();var markAllNotificationsReadAPI=exports.markAllNotificationsReadAPI=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(){return yield _axios.default.post("/neeto_notifications/api/v1/notifications/mark_all_read");});return function markAllNotificationsReadAPI(){return _ref8.apply(this,arguments);};}();
|