From 592feb409e453887f841e981a2dc18493da7f84f Mon Sep 17 00:00:00 2001 From: Bailhache Pierre Date: Thu, 7 Jul 2016 19:16:38 +0200 Subject: [PATCH] feat(push): added support for Action Buttons on iOS with categories (#273) --- src/plugins/push.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/plugins/push.ts b/src/plugins/push.ts index 702e220ca..eec40e24f 100644 --- a/src/plugins/push.ts +++ b/src/plugins/push.ts @@ -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 {