Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-fcm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-fcm
Commits
164d055d
Commit
164d055d
authored
Apr 14, 2017
by
William Candillon
Committed by
Libin Lu
Apr 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Notification type (#382)
* More typings * Update index.d.ts * Update index.d.ts * Update index.d.ts
parent
de0849e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
5 deletions
+34
-5
index.d.ts
index.d.ts
+34
-5
No files found.
index.d.ts
View file @
164d055d
...
@@ -24,6 +24,35 @@ declare module "react-native-fcm" {
...
@@ -24,6 +24,35 @@ declare module "react-native-fcm" {
const
Local
=
"
local_notification
"
;
const
Local
=
"
local_notification
"
;
}
}
export
interface
Notification
{
collapse_key
:
string
;
opened_from_tray
:
boolean
;
from
:
string
;
notification
:
{
title
?:
string
body
:
string
;
icon
:
string
;
};
_notificationType
:
string
;
finish
(
type
?:
string
):
void
;
}
export
interface
LocalNotification
{
title
?:
string
;
body
:
string
;
icon
?:
string
;
vibrate
?:
number
;
sound
?:
boolean
;
big_text
?:
string
;
large_icon
?:
string
;
priority
?:
string
}
export
interface
ScheduleLocalNotification
extends
LocalNotification
{
id
:
string
;
fire_date
:
number
}
export
interface
Subscription
{
export
interface
Subscription
{
remove
():
void
;
remove
():
void
;
}
}
...
@@ -32,14 +61,14 @@ declare module "react-native-fcm" {
...
@@ -32,14 +61,14 @@ declare module "react-native-fcm" {
static
requestPermissions
():
void
;
static
requestPermissions
():
void
;
static
getFCMToken
():
Promise
<
string
>
;
static
getFCMToken
():
Promise
<
string
>
;
static
on
(
event
:
"
FCMTokenRefreshed
"
,
handler
:
(
token
:
string
)
=>
void
):
Subscription
;
static
on
(
event
:
"
FCMTokenRefreshed
"
,
handler
:
(
token
:
string
)
=>
void
):
Subscription
;
static
on
(
event
:
"
FCMNotificationReceived
"
,
handler
:
(
notification
:
any
)
=>
void
):
Subscription
;
static
on
(
event
:
"
FCMNotificationReceived
"
,
handler
:
(
notification
:
Notification
)
=>
void
):
Subscription
;
static
subscribeToTopic
(
topic
:
string
):
void
;
static
subscribeToTopic
(
topic
:
string
):
void
;
static
unsubscribeFromTopic
(
topic
:
string
):
void
;
static
unsubscribeFromTopic
(
topic
:
string
):
void
;
static
getInitialNotification
():
Promise
<
any
>
;
static
getInitialNotification
():
Promise
<
Notification
>
;
static
presentLocalNotification
(
notification
:
any
):
void
;
static
presentLocalNotification
(
notification
:
LocalNotification
):
void
;
static
scheduleLocalNotification
(
schedule
:
any
):
void
;
static
scheduleLocalNotification
(
schedule
:
LocalNotification
):
void
;
static
getScheduledLocalNotifications
():
Promise
<
any
>
;
static
getScheduledLocalNotifications
():
Promise
<
LocalNotification
>
;
static
removeAllDeliveredNotifications
():
void
;
static
removeAllDeliveredNotifications
():
void
;
static
removeDeliveredNotification
(
id
:
string
):
void
;
static
removeDeliveredNotification
(
id
:
string
):
void
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment