@@ -135,6 +135,9 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) {
135135 didReceiveNotificationRequest:withContentHandler: method fires. */
136136+ (instancetype )parseWithApns : (nonnull NSDictionary *)message ;
137137
138+ /* Convert object into a custom Dictionary / JSON Object */
139+ - (NSDictionary * _Nonnull)jsonRepresentation ;
140+
138141/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */
139142- (NSString * _Nonnull)stringify ;
140143
@@ -207,7 +210,7 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) {
207210// Pass in nil means a notification will not display
208211typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification);
209212/* OneSignal Influence Types */
210- typedef NS_ENUM (NSUInteger , Session ) {
213+ typedef NS_ENUM (NSUInteger , OSSession ) {
211214 DIRECT,
212215 INDIRECT,
213216 UNATTRIBUTED,
@@ -222,7 +225,7 @@ typedef NS_ENUM(NSUInteger, OSInfluenceChannel) {
222225@interface OSOutcomeEvent : NSObject
223226
224227// Session enum (DIRECT, INDIRECT, UNATTRIBUTED, or DISABLED) to determine code route and request params
225- @property (nonatomic ) Session session;
228+ @property (nonatomic ) OSSession session;
226229
227230// Notification ids for the current session
228231@property (strong , nonatomic , nullable ) NSArray *notificationIds;
@@ -252,7 +255,10 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
252255 OSNotificationPermissionAuthorized,
253256
254257 // the application is only authorized to post Provisional notifications (direct to history)
255- OSNotificationPermissionProvisional
258+ OSNotificationPermissionProvisional,
259+
260+ // the application is authorized to send notifications for 8 hours. Only used by App Clips.
261+ OSNotificationPermissionEphemeral
256262};
257263
258264// Permission Classes
@@ -281,8 +287,8 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
281287// Subscription Classes
282288@interface OSSubscriptionState : NSObject
283289
284- @property (readonly , nonatomic ) BOOL subscribed ; // (yes only if userId, pushToken, and setSubscription exists / are true)
285- @property (readonly , nonatomic ) BOOL userSubscriptionSetting ; // returns setSubscription state .
290+ @property (readonly , nonatomic ) BOOL isSubscribed ; // (yes only if userId, pushToken, and setSubscription exists / are true)
291+ @property (readonly , nonatomic ) BOOL isPushDisabled ; // returns value of disablePush .
286292@property (readonly , nonatomic , nullable ) NSString * userId; // AKA OneSignal PlayerId
287293@property (readonly , nonatomic , nullable ) NSString * pushToken; // AKA Apple Device Token
288294- (NSDictionary * _Nonnull)toDictionary ;
@@ -292,7 +298,7 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
292298@interface OSEmailSubscriptionState : NSObject
293299@property (readonly , nonatomic , nullable ) NSString * emailUserId; // The new Email user ID
294300@property (readonly , nonatomic , nullable ) NSString *emailAddress;
295- @property (readonly , nonatomic ) BOOL subscribed ;
301+ @property (readonly , nonatomic ) BOOL isSubscribed ;
296302- (NSDictionary * _Nonnull)toDictionary ;
297303@end
298304
@@ -368,6 +374,8 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
368374 */
369375@property (readonly , nullable ) NSString * emailAddress;
370376
377+ @property (readonly ) BOOL isEmailSubscribed;
378+
371379- (instancetype )initWithSubscriptionState : (OSPermissionSubscriptionState *)state ;
372380
373381// Convert the class into a NSDictionary
@@ -492,7 +500,6 @@ typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action)
492500
493501#pragma mark Permission, Subscription, and Email Observers
494502NS_ASSUME_NONNULL_BEGIN
495- + (OSPermissionSubscriptionState*)getPermissionSubscriptionState ;
496503
497504+ (void )addPermissionObserver : (NSObject <OSPermissionObserver>*)observer ;
498505+ (void )removePermissionObserver : (NSObject <OSPermissionObserver>*)observer ;
0 commit comments