capacitor-firebase-push
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -0,4 +1,11 @@ | ||
# 1.2.0 | ||
- `getBadgeValue()` added | ||
- `setBadgeValue()` added | ||
- `getDeliveredNotifications()` added | ||
- `removeDeliveredNotifications()` added | ||
- `removeAllDeliveredNotifications()` added | ||
# 1.1.1 | ||
- fix messageType for tapped notification pushs | ||
- fix messageType for tapped notification push's | ||
@@ -5,0 +12,0 @@ # 1.1.0 |
@@ -13,3 +13,8 @@ { | ||
"returns": "Promise<PermissionStatus>", | ||
"tags": [], | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.0.0" | ||
} | ||
], | ||
"docs": "Check permission to receive push notifications.\n\nWill always return \"granted\" on Android", | ||
@@ -26,3 +31,8 @@ "complexTypes": [ | ||
"returns": "Promise<PermissionStatus>", | ||
"tags": [], | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.0.0" | ||
} | ||
], | ||
"docs": "Request permission to receive push notifications.\n\nWill always return \"granted\" on Android", | ||
@@ -39,3 +49,8 @@ "complexTypes": [ | ||
"returns": "Promise<void>", | ||
"tags": [], | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.0.0" | ||
} | ||
], | ||
"docs": "Register the app to receive push notifications.", | ||
@@ -50,3 +65,8 @@ "complexTypes": [], | ||
"returns": "Promise<void>", | ||
"tags": [], | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.1.0" | ||
} | ||
], | ||
"docs": "Should be called to unregister the Firebase Instance. For example if a User logs out.", | ||
@@ -57,2 +77,97 @@ "complexTypes": [], | ||
{ | ||
"name": "getBadgeNumber", | ||
"signature": "() => Promise<BadgeCount>", | ||
"parameters": [], | ||
"returns": "Promise<BadgeCount>", | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.2.0" | ||
} | ||
], | ||
"docs": "Get icon badge Value\n\nOnly available on iOS", | ||
"complexTypes": [ | ||
"BadgeCount" | ||
], | ||
"slug": "getbadgenumber" | ||
}, | ||
{ | ||
"name": "setBadgeNumber", | ||
"signature": "(options: BadgeCount) => Promise<void>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "BadgeCount" | ||
} | ||
], | ||
"returns": "Promise<void>", | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.2.0" | ||
} | ||
], | ||
"docs": "Set icon badge Value\n\nOnly available on iOS", | ||
"complexTypes": [ | ||
"BadgeCount" | ||
], | ||
"slug": "setbadgenumber" | ||
}, | ||
{ | ||
"name": "getDeliveredNotifications", | ||
"signature": "() => Promise<NotificationsResult>", | ||
"parameters": [], | ||
"returns": "Promise<NotificationsResult>", | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.2.0" | ||
} | ||
], | ||
"docs": "Get notifications in Notification Center", | ||
"complexTypes": [ | ||
"NotificationsResult" | ||
], | ||
"slug": "getdeliverednotifications" | ||
}, | ||
{ | ||
"name": "removeDeliveredNotifications", | ||
"signature": "(options: NotificationsIds) => Promise<void>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "NotificationsIds" | ||
} | ||
], | ||
"returns": "Promise<void>", | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.2.0" | ||
} | ||
], | ||
"docs": "Remove notifications from the notifications screen based on the id", | ||
"complexTypes": [ | ||
"NotificationsIds" | ||
], | ||
"slug": "removedeliverednotifications" | ||
}, | ||
{ | ||
"name": "removeAllDeliveredNotifications", | ||
"signature": "() => Promise<void>", | ||
"parameters": [], | ||
"returns": "Promise<void>", | ||
"tags": [ | ||
{ | ||
"name": "since", | ||
"text": "1.2.0" | ||
} | ||
], | ||
"docs": "Remove all notifications from the notifications screen", | ||
"complexTypes": [], | ||
"slug": "removealldeliverednotifications" | ||
}, | ||
{ | ||
"name": "addListener", | ||
@@ -162,2 +277,80 @@ "signature": "(eventName: 'token', listenerFunc: (result: TokenResult) => void) => Promise<PluginListenerHandle> & PluginListenerHandle", | ||
{ | ||
"name": "BadgeCount", | ||
"slug": "badgecount", | ||
"docs": "", | ||
"tags": [ | ||
{ | ||
"text": "1.2.0", | ||
"name": "since" | ||
} | ||
], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "count", | ||
"tags": [ | ||
{ | ||
"text": "1.2.0", | ||
"name": "since" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "number" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "NotificationsResult", | ||
"slug": "notificationsresult", | ||
"docs": "", | ||
"tags": [ | ||
{ | ||
"text": "1.2.0", | ||
"name": "since" | ||
} | ||
], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "notifications", | ||
"tags": [ | ||
{ | ||
"text": "1.2.0", | ||
"name": "since" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "any[]" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "NotificationsIds", | ||
"slug": "notificationsids", | ||
"docs": "", | ||
"tags": [ | ||
{ | ||
"text": "1.2.0", | ||
"name": "since" | ||
} | ||
], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "ids", | ||
"tags": [ | ||
{ | ||
"text": "1.2.0", | ||
"name": "since" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string[]" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "PluginListenerHandle", | ||
@@ -164,0 +357,0 @@ "slug": "pluginlistenerhandle", |
@@ -28,2 +28,4 @@ import type { PermissionState, PluginListenerHandle } from '@capacitor/core'; | ||
* Will always return "granted" on Android | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
@@ -35,2 +37,4 @@ checkPermissions(): Promise<PermissionStatus>; | ||
* Will always return "granted" on Android | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
@@ -40,2 +44,4 @@ requestPermissions(): Promise<PermissionStatus>; | ||
* Register the app to receive push notifications. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
@@ -45,5 +51,41 @@ register(): Promise<void>; | ||
* Should be called to unregister the Firebase Instance. For example if a User logs out. | ||
* | ||
* @since 1.1.0 | ||
*/ | ||
unregister(): Promise<void>; | ||
/** | ||
* Get icon badge Value | ||
* | ||
* Only available on iOS | ||
* | ||
* @since 1.2.0 | ||
*/ | ||
getBadgeNumber(): Promise<BadgeCount>; | ||
/** | ||
* Set icon badge Value | ||
* | ||
* Only available on iOS | ||
* | ||
* @since 1.2.0 | ||
*/ | ||
setBadgeNumber(options: BadgeCount): Promise<void>; | ||
/** | ||
* Get notifications in Notification Center | ||
* | ||
* @since 1.2.0 | ||
*/ | ||
getDeliveredNotifications(): Promise<NotificationsResult>; | ||
/** | ||
* Remove notifications from the notifications screen based on the id | ||
* | ||
* @since 1.2.0 | ||
*/ | ||
removeDeliveredNotifications(options: NotificationsIds): Promise<void>; | ||
/** | ||
* Remove all notifications from the notifications screen | ||
* | ||
* @since 1.2.0 | ||
*/ | ||
removeAllDeliveredNotifications(): Promise<void>; | ||
/** | ||
* Called when a new fcm token is created | ||
@@ -74,2 +116,29 @@ * | ||
/** | ||
* @since 1.2.0 | ||
*/ | ||
export interface BadgeCount { | ||
/** | ||
* @since 1.2.0 | ||
*/ | ||
count: number; | ||
} | ||
/** | ||
* @since 1.2.0 | ||
*/ | ||
export interface NotificationsResult { | ||
/** | ||
* @since 1.2.0 | ||
*/ | ||
notifications: any[]; | ||
} | ||
/** | ||
* @since 1.2.0 | ||
*/ | ||
export interface NotificationsIds { | ||
/** | ||
* @since 1.2.0 | ||
*/ | ||
ids: string[]; | ||
} | ||
/** | ||
* @since 1.0.0 | ||
@@ -76,0 +145,0 @@ */ |
{ | ||
"name": "capacitor-firebase-push", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Capacitor Plugin for Firebase Push", | ||
@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js", |
126
README.md
@@ -23,3 +23,3 @@ # Capacitor Firebase Push | ||
- [Install](#install) | ||
- [Shutout ❤️](#shutout-) | ||
- [Shutout](#shutout) | ||
- [Setup](#setup) | ||
@@ -35,2 +35,7 @@ - [Android](#android) | ||
- [unregister()](#unregister) | ||
- [getBadgeNumber()](#getbadgenumber) | ||
- [setBadgeNumber(...)](#setbadgenumber) | ||
- [getDeliveredNotifications()](#getdeliverednotifications) | ||
- [removeDeliveredNotifications(...)](#removedeliverednotifications) | ||
- [removeAllDeliveredNotifications()](#removealldeliverednotifications) | ||
- [addListener('token', ...)](#addlistenertoken-) | ||
@@ -52,4 +57,6 @@ - [addListener('message', ...)](#addlistenermessage-) | ||
## Shutout ❤️ | ||
## Shutout | ||
❤️ | ||
This Plugin was created to match every requirement I had for my app. These Plugins helped my a lot to create this one: | ||
@@ -148,2 +155,7 @@ - [cordova-plugin-firebase-x](https://github.com/dpa99c/cordova-plugin-firebasex) | ||
* [`unregister()`](#unregister) | ||
* [`getBadgeNumber()`](#getbadgenumber) | ||
* [`setBadgeNumber(...)`](#setbadgenumber) | ||
* [`getDeliveredNotifications()`](#getdeliverednotifications) | ||
* [`removeDeliveredNotifications(...)`](#removedeliverednotifications) | ||
* [`removeAllDeliveredNotifications()`](#removealldeliverednotifications) | ||
* [`addListener('token', ...)`](#addlistenertoken-) | ||
@@ -172,2 +184,4 @@ * [`addListener('message', ...)`](#addlistenermessage-) | ||
**Since:** 1.0.0 | ||
-------------------- | ||
@@ -188,2 +202,4 @@ | ||
**Since:** 1.0.0 | ||
-------------------- | ||
@@ -200,2 +216,4 @@ | ||
**Since:** 1.0.0 | ||
-------------------- | ||
@@ -212,5 +230,88 @@ | ||
**Since:** 1.1.0 | ||
-------------------- | ||
### getBadgeNumber() | ||
```typescript | ||
getBadgeNumber() => Promise<BadgeCount> | ||
``` | ||
Get icon badge Value | ||
Only available on iOS | ||
**Returns:** <code>Promise<<a href="#badgecount">BadgeCount</a>></code> | ||
**Since:** 1.2.0 | ||
-------------------- | ||
### setBadgeNumber(...) | ||
```typescript | ||
setBadgeNumber(options: BadgeCount) => Promise<void> | ||
``` | ||
Set icon badge Value | ||
Only available on iOS | ||
| Param | Type | | ||
| ------------- | ------------------------------------------------- | | ||
| **`options`** | <code><a href="#badgecount">BadgeCount</a></code> | | ||
**Since:** 1.2.0 | ||
-------------------- | ||
### getDeliveredNotifications() | ||
```typescript | ||
getDeliveredNotifications() => Promise<NotificationsResult> | ||
``` | ||
Get notifications in Notification Center | ||
**Returns:** <code>Promise<<a href="#notificationsresult">NotificationsResult</a>></code> | ||
**Since:** 1.2.0 | ||
-------------------- | ||
### removeDeliveredNotifications(...) | ||
```typescript | ||
removeDeliveredNotifications(options: NotificationsIds) => Promise<void> | ||
``` | ||
Remove notifications from the notifications screen based on the id | ||
| Param | Type | | ||
| ------------- | ------------------------------------------------------------- | | ||
| **`options`** | <code><a href="#notificationsids">NotificationsIds</a></code> | | ||
**Since:** 1.2.0 | ||
-------------------- | ||
### removeAllDeliveredNotifications() | ||
```typescript | ||
removeAllDeliveredNotifications() => Promise<void> | ||
``` | ||
Remove all notifications from the notifications screen | ||
**Since:** 1.2.0 | ||
-------------------- | ||
### addListener('token', ...) | ||
@@ -279,2 +380,23 @@ | ||
#### BadgeCount | ||
| Prop | Type | Since | | ||
| ----------- | ------------------- | ----- | | ||
| **`count`** | <code>number</code> | 1.2.0 | | ||
#### NotificationsResult | ||
| Prop | Type | Since | | ||
| ------------------- | ------------------ | ----- | | ||
| **`notifications`** | <code>any[]</code> | 1.2.0 | | ||
#### NotificationsIds | ||
| Prop | Type | Since | | ||
| --------- | --------------------- | ----- | | ||
| **`ids`** | <code>string[]</code> | 1.2.0 | | ||
#### PluginListenerHandle | ||
@@ -281,0 +403,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
61050
892
419