Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Action Buttons on IOs with categories #273

Merged
merged 1 commit into from
Jul 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/plugins/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,29 @@ export interface IOSPushOptions {
* **Note**: only usable in conjunction with `senderID`.
*/
topics?: string[];

/**
* The data required in order to enable Action Buttons for iOS.
* Action Buttons on iOS - https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#action-buttons-1
*/
categories?: CategoryArray
}

export interface CategoryArray {
[name: string]: CategoryAction
}

export interface CategoryAction {
yes?: CategoryActionData
no?: CategoryActionData
maybe?: CategoryActionData
}

export interface CategoryActionData {
callback: string
title: string
foreground: boolean
destructive: boolean
}

export interface AndroidPushOptions {
Expand Down