Skip to content

Commit 3eff280

Browse files
bartwesselinkdanielsogl
authored andcommitted
feat(siri-shortcuts): Add clear option for the activated shortcut (#2734)
* feat(siri-shortcuts): Add clear option for the getActivatedShortcutOperation * Update index.ts
1 parent 8116ddd commit 3eff280

File tree

1 file changed

+9
-2
lines changed
  • src/@ionic-native/plugins/siri-shortcuts

1 file changed

+9
-2
lines changed

src/@ionic-native/plugins/siri-shortcuts/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ export interface SiriShortcutOptions extends SiriShortcut {
1313
isEligibleForPrediction?: boolean;
1414
}
1515

16+
export interface ActivatedShortcutOptions {
17+
clear?: boolean;
18+
}
19+
1620
/**
1721
* @beta
1822
* @name Siri Shortcuts
1923
* @description
20-
* This plugin only works when your app is built with XCode 10 Beta. Shortcuts will only appear on iOS-versions >= 12.0
24+
* This plugin only works when your app is built with XCode 10. Shortcuts will only appear on iOS-versions >= 12.0
2125
*
2226
* This plugin enables the use of Siri shortcuts in Cordova. Siri Shortcuts enable the user to perform certain actions by adding them to Siri.
2327
* 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
@@ -71,6 +75,7 @@ export interface SiriShortcutOptions extends SiriShortcut {
7175
* @interfaces
7276
* SiriShortcut
7377
* SiriShortcutOptions
78+
* ActivatedShortcutOptions
7479
*/
7580
@Plugin({
7681
pluginName: 'SiriShortcuts',
@@ -134,10 +139,12 @@ export class SiriShortcuts extends IonicNativePlugin {
134139

135140
/**
136141
* Get the current clicked user activity, and return `null` if none
142+
* @param {ActivatedShortcutOptions|null} options Options to specify for getting the shortcut
143+
* @param {boolean} options.clear Clear the currently activated shortcut, defaults to true
137144
* @return Promise<SiriShortcut|null>
138145
*/
139146
@Cordova()
140-
getActivatedShortcut(): Promise<SiriShortcut | null> {
147+
getActivatedShortcut(options?: ActivatedShortcutOptions): Promise<SiriShortcut | null> {
141148
return;
142149
}
143150
}

0 commit comments

Comments
 (0)