apns-types
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

apns-types

Type definitions for APNS (Apple Push Notification Service)

Description

This is a zero dependency module with only type definitions for APNS dictionaries.

If you only need the types for your APIs or similar and don't want to add a dependency to the APNS client implementation found in node-apn, this module is for you!

References:

Installation

npm install apns-types

or

yarn add apns-types

Example usage

import {Aps} from 'apns-types';

interface MyAppPushNotification {
  myCustomField: string;
  someOtherField?: string;
  aps: Aps;
}

const n: MyAppPushNotification = {
  myCustomField: 'Hello, world!',
  aps: {
    alert: {
      title: 'Title',
      body: 'Body'
    },
    'thread-id': '42',
    sound: 'default'
  }
};

Package Sidebar

Install

npm i apns-types

Weekly Downloads

12

Version

1.0.0

License

Apache-2.0

Unpacked Size

28.5 kB

Total Files

8

Last publish

Collaborators

  • henhal