UNPKG

@shopgate/engage

Version:
19 lines 1.94 kB
import{main$}from'@shopgate/pwa-common/streams/main';import{PERMISSION_ID_PUSH,PERMISSION_ID_CAMERA,PERMISSION_ID_LOCATION,PERMISSION_ID_PHONE,PERMISSION_ID_BACKGROUND_APP_REFRESH,APP_PERMISSION_STATUS_RECEIVED}from'@shopgate/engage/core/constants';/** * Gets triggered when a permission status was received from the app. * @type {Observable} */export var appPermissionStatusReceived$=main$.filter(function(_ref){var action=_ref.action;return action.type===APP_PERMISSION_STATUS_RECEIVED;});/** * Gets triggered when a push permission status was received from the app. * @type {Observable} */export var appPermissionStatusPushReceived$=appPermissionStatusReceived$.filter(function(_ref2){var action=_ref2.action;return action.permissionId===PERMISSION_ID_PUSH;});/** * Gets triggered when a camera permission status was received from the app. * @type {Observable} */export var appPermissionStatusCameraReceived$=appPermissionStatusReceived$.filter(function(_ref3){var action=_ref3.action;return action.permissionId===PERMISSION_ID_CAMERA;});/** * Gets triggered when a location permission status was received from the app. * @type {Observable} */export var appPermissionStatusLocationReceived$=appPermissionStatusReceived$.filter(function(_ref4){var action=_ref4.action;return action.permissionId===PERMISSION_ID_LOCATION;});/** * Gets triggered when a phone permission status was received from the app. * @type {Observable} */export var appPermissionStatusPhoneReceived$=appPermissionStatusReceived$.filter(function(_ref5){var action=_ref5.action;return action.permissionId===PERMISSION_ID_PHONE;});/** * Gets triggered when a backgroundAppRefresh permission status was received from the app. * @type {Observable} */export var appPermissionStatusBackgroundAppRefreshReceived$=appPermissionStatusReceived$.filter(function(_ref6){var action=_ref6.action;return action.permissionId===PERMISSION_ID_BACKGROUND_APP_REFRESH;});