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
6fc34ed3
Commit
6fc34ed3
authored
Apr 11, 2017
by
William Candillon
Committed by
Libin Lu
Apr 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add typescript definition file (#376)
* Add typescript definition file * Update index.d.ts
parent
7c7fa790
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
index.d.ts
index.d.ts
+56
-0
No files found.
index.d.ts
0 → 100644
View file @
6fc34ed3
declare
module
"
react-native-fcm
"
{
type
FCMEventType
=
"
FCMTokenRefreshed
"
|
"
FCMNotificationReceived
"
;
export
module
FCMEvent
{
const
RefreshToken
=
"
FCMTokenRefreshed
"
;
const
Notification
=
"
FCMNotificationReceived
"
;
}
export
module
RemoteNotificationResult
{
const
NewData
=
"
UIBackgroundFetchResultNewData
"
;
const
NoData
=
"
UIBackgroundFetchResultNoData
"
;
const
ResultFailed
=
"
UIBackgroundFetchResultFailed
"
;
}
export
module
WillPresentNotificationResult
{
const
All
=
"
UNNotificationPresentationOptionAll
"
;
const
None
=
"
UNNotificationPresentationOptionNone
"
;
}
export
module
NotificationType
{
const
Remote
=
"
remote_notification
"
;
const
NotificationResponse
=
"
notification_response
"
;
const
WillPresent
=
"
will_present_notification
"
;
const
Local
=
"
local_notification
"
;
}
export
interface
Subscription
{
remove
():
void
;
}
export
class
FCM
{
static
requestPermissions
():
void
;
static
getFCMToken
():
Promise
<
string
>
;
static
on
(
event
:
"
FCMTokenRefreshed
"
,
handler
:
(
token
:
string
)
=>
void
):
Subscription
;
static
on
(
event
:
"
FCMNotificationReceived
"
,
handler
:
(
notification
:
any
)
=>
void
):
Subscription
;
static
subscribeToTopic
(
topic
:
string
):
void
;
static
unsubscribeFromTopic
(
topic
:
string
):
void
;
static
getInitialNotification
():
Promise
<
any
>
;
static
presentLocalNotification
(
notification
:
any
):
void
;
static
scheduleLocalNotification
(
schedule
:
any
):
void
;
static
getScheduledLocalNotifications
():
Promise
<
any
>
;
static
removeAllDeliveredNotifications
():
void
;
static
removeDeliveredNotification
(
id
:
string
):
void
;
static
cancelAllLocalNotifications
():
void
;
static
cancelLocalNotification
(
id
:
string
):
string
;
static
setBadgeNumber
(
badge
:
number
):
void
;
static
getBadgeNumber
():
Promise
<
number
>
;
static
send
(
id
:
string
,
data
:
any
):
void
;
}
export
default
FCM
;
}
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