Skip to content

Commit

Permalink
feat(siri-shortcuts): Add clear option for the activated shortcut (#2734
Browse files Browse the repository at this point in the history
)

* feat(siri-shortcuts): Add clear option for the getActivatedShortcutOperation

* Update index.ts
  • Loading branch information
bartwesselink authored and danielsogl committed Sep 25, 2018
1 parent 8116ddd commit 3eff280
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/@ionic-native/plugins/siri-shortcuts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ export interface SiriShortcutOptions extends SiriShortcut {
isEligibleForPrediction?: boolean;
}

export interface ActivatedShortcutOptions {
clear?: boolean;
}

/**
* @beta
* @name Siri Shortcuts
* @description
* This plugin only works when your app is built with XCode 10 Beta. Shortcuts will only appear on iOS-versions >= 12.0
* This plugin only works when your app is built with XCode 10. Shortcuts will only appear on iOS-versions >= 12.0
*
* This plugin enables the use of Siri shortcuts in Cordova. Siri Shortcuts enable the user to perform certain actions by adding them to Siri.
* After you have donated a shortcut to Siri, it will appear in the settings menu, after which the user is able to add the action. You can check
Expand Down Expand Up @@ -71,6 +75,7 @@ export interface SiriShortcutOptions extends SiriShortcut {
* @interfaces
* SiriShortcut
* SiriShortcutOptions
* ActivatedShortcutOptions
*/
@Plugin({
pluginName: 'SiriShortcuts',
Expand Down Expand Up @@ -134,10 +139,12 @@ export class SiriShortcuts extends IonicNativePlugin {

/**
* Get the current clicked user activity, and return `null` if none
* @param {ActivatedShortcutOptions|null} options Options to specify for getting the shortcut
* @param {boolean} options.clear Clear the currently activated shortcut, defaults to true
* @return Promise<SiriShortcut|null>
*/
@Cordova()
getActivatedShortcut(): Promise<SiriShortcut | null> {
getActivatedShortcut(options?: ActivatedShortcutOptions): Promise<SiriShortcut | null> {
return;
}
}

0 comments on commit 3eff280

Please sign in to comment.