Skip to content

Commit 7a95c30

Browse files
authored
fix: update readme (#277)
1 parent e57db15 commit 7a95c30

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,13 +2037,17 @@ Tells the native app to start the push notification subscription flow. The app
20372037
first verifies that notifications permission is granted; if so, it starts the
20382038
corresponding SDK and executes the push subscription through it.
20392039
2040+
Only available in Mein O2 and Mein Blau.
2041+
20402042
```ts
20412043
subscribeToPushNotifications: () => Promise<void>;
20422044
```
20432045
20442046
#### Error cases
20452047
20462048
- `401`: Push notifications permission is not granted
2049+
- `405`: Feature not supported in current brand (only available in Mein Blau
2050+
and Mein O2)
20472051
- `500`: Any other error that prevented the operation from completing
20482052
20492053
### unsubscribeFromPushNotifications
@@ -2053,12 +2057,16 @@ subscribeToPushNotifications: () => Promise<void>;
20532057
Tells the native app to unsubscribe from pushes through the corresponding SDK.
20542058
No permission is required.
20552059
2060+
Only available in Mein O2 and Mein Blau.
2061+
20562062
```ts
20572063
unsubscribeFromPushNotifications: () => Promise<void>;
20582064
```
20592065
20602066
#### Error cases
20612067
2068+
- `405`: Feature not supported in current brand (only available in Mein Blau
2069+
and Mein O2)
20622070
- `500`: Any other error that prevented the operation from completing
20632071
20642072
## Error handling

src/push-notifications.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ import {postMessageToNativeApp} from './post-message';
55
* The native app verifies the notifications permission first; if granted, it
66
* starts the corresponding SDK and executes the push subscription.
77
*
8+
* Only available in Mein O2 and Mein Blau.
9+
*
810
* Error cases:
911
* - 401: Push notifications permission is not granted
12+
* - 405: Feature not supported in current brand (only available in Mein Blau and Mein O2)
1013
* - 500: Any other error that prevented the operation from completing
1114
*/
1215
export const subscribeToPushNotifications = (): Promise<void> =>
@@ -16,7 +19,10 @@ export const subscribeToPushNotifications = (): Promise<void> =>
1619
* Tells the native app to unsubscribe from pushes through the corresponding SDK.
1720
* No permission is required.
1821
*
22+
* Only available in Mein O2 and Mein Blau.
23+
*
1924
* Error cases:
25+
* - 405: Feature not supported in current brand (only available in Mein Blau and Mein O2)
2026
* - 500: Any other error that prevented the operation from completing
2127
*/
2228
export const unsubscribeFromPushNotifications = (): Promise<void> =>

0 commit comments

Comments
 (0)