@@ -3,8 +3,13 @@ import type {
33 SubscriptionTypeValue ,
44} from 'src/core/types/subscription' ;
55import { NotificationType } from 'src/core/types/subscription' ;
6+ import {
7+ getDeviceModel ,
8+ getDeviceOS ,
9+ getSubscriptionType ,
10+ } from 'src/shared/environment' ;
611import { RawPushSubscription } from 'src/shared/models/RawPushSubscription' ;
7- import Environment from '../../ shared/helpers/Environment ' ;
12+ import { VERSION } from 'src/ shared/utils/EnvVariables ' ;
813import type { Serializable } from '../models/Serializable' ;
914
1015export default class FuturePushSubscriptionRecord implements Serializable {
@@ -14,18 +19,18 @@ export default class FuturePushSubscriptionRecord implements Serializable {
1419 readonly notificationTypes ?: NotificationTypeValue ;
1520 readonly sdk : string ;
1621 readonly deviceModel : string ;
17- readonly deviceOs : number ;
22+ readonly deviceOs : string ;
1823 readonly webAuth ?: string ;
1924 readonly webp256 ?: string ;
2025
2126 constructor ( rawPushSubscription : RawPushSubscription ) {
2227 this . token = this . _getToken ( rawPushSubscription ) ;
23- this . type = Environment . getSubscriptionType ( ) ;
28+ this . type = getSubscriptionType ( ) ;
2429 this . enabled = true ;
2530 this . notificationTypes = NotificationType . Subscribed ;
26- this . sdk = Environment . version ( ) ;
27- this . deviceModel = Environment . getDeviceModel ( ) ;
28- this . deviceOs = Environment . getDeviceOS ( ) ;
31+ this . sdk = VERSION ;
32+ this . deviceModel = getDeviceModel ( ) ;
33+ this . deviceOs = getDeviceOS ( ) ;
2934 this . webAuth = rawPushSubscription . w3cAuth ;
3035 this . webp256 = rawPushSubscription . w3cP256dh ;
3136 }
0 commit comments