Skip to content

Commit

Permalink
Add correct typescript definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBarba committed Feb 4, 2020
1 parent 693d9fa commit 6fe62a8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Change Log

---

## [8.2.0](https://github.com/AndrewBarba/apns2/releases/tag/8.2.0)

1. Add correct TypeScript definitions for `NotificationOptions`

## [8.1.0](https://github.com/AndrewBarba/apns2/releases/tag/8.1.0)

1. Add missing TypeScript interface for `NotificationOptions`
Expand Down
24 changes: 11 additions & 13 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,19 @@ declare interface APNSOptions {
}

declare interface NotificationOptions {
alert?: string | any;
aps?: any;
actions?: NotificationAction[];
badge?: string;
body?: string;
badge?: number;
category?: string;
collapseId?: string;
contentAvailable?: boolean;
data?: any;
dir?: NotificationDirection;
icon?: string;
image?: string;
lang?: string;
renotify?: boolean;
requireInteraction?: boolean;
silent?: boolean;
tag?: string;
timestamp?: number;
vibrate?: VibratePattern;
expiration?: number;
priority?: string;
pushType?: string;
sound?: string;
threadId?: string;
topic?: string;
}

declare interface NotificationPriority {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apns2",
"version": "8.1.0",
"version": "8.2.0",
"description": "Node client for connecting to Apple's Push Notification Service using the new HTTP/2 protocol with JSON web tokens.",
"author": "Andrew Barba <[email protected]>",
"main": "lib/apns.js",
Expand Down

0 comments on commit 6fe62a8

Please sign in to comment.