@wox-launcher/wox-plugin 0.0.88 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/index.d.ts +13 -9
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export interface ResultTail {
|
|
|
135
135
|
* })
|
|
136
136
|
* ```
|
|
137
137
|
*/
|
|
138
|
-
export interface
|
|
138
|
+
export interface UpdatableResult {
|
|
139
139
|
/** Required - identifies which result to update */
|
|
140
140
|
Id: string
|
|
141
141
|
/** Optional - update the title */
|
|
@@ -177,7 +177,7 @@ export interface UpdateableResult {
|
|
|
177
177
|
* })
|
|
178
178
|
* ```
|
|
179
179
|
*/
|
|
180
|
-
export interface
|
|
180
|
+
export interface UpdatableResultAction {
|
|
181
181
|
/** Required - identifies which result contains the action */
|
|
182
182
|
ResultId: string
|
|
183
183
|
/** Required - identifies which action to update */
|
|
@@ -214,6 +214,10 @@ export interface ResultAction {
|
|
|
214
214
|
* If IsDefault is true, Hotkey will be set to enter key by default
|
|
215
215
|
*/
|
|
216
216
|
Hotkey?: string
|
|
217
|
+
/**
|
|
218
|
+
* Additional data associate with this action, can be retrieved later
|
|
219
|
+
*/
|
|
220
|
+
ContextData?: string
|
|
217
221
|
}
|
|
218
222
|
|
|
219
223
|
export interface ActionContext {
|
|
@@ -345,7 +349,7 @@ export interface PublicAPI {
|
|
|
345
349
|
/**
|
|
346
350
|
* Get the current state of a result that is displayed in the UI.
|
|
347
351
|
*
|
|
348
|
-
* Returns
|
|
352
|
+
* Returns UpdatableResult with current values if the result is still visible.
|
|
349
353
|
* Returns null if the result is no longer visible.
|
|
350
354
|
*
|
|
351
355
|
* Note: System actions and tails (like favorite icon) are automatically filtered out.
|
|
@@ -372,9 +376,9 @@ export interface PublicAPI {
|
|
|
372
376
|
*
|
|
373
377
|
* @param ctx Context
|
|
374
378
|
* @param resultId ID of the result to get
|
|
375
|
-
* @returns Promise<
|
|
379
|
+
* @returns Promise<UpdatableResult | null> Current result state, or null if not visible
|
|
376
380
|
*/
|
|
377
|
-
GetUpdatableResult: (ctx: Context, resultId: string) => Promise<
|
|
381
|
+
GetUpdatableResult: (ctx: Context, resultId: string) => Promise<UpdatableResult | null>
|
|
378
382
|
|
|
379
383
|
/**
|
|
380
384
|
* Update a query result that is currently displayed in the UI.
|
|
@@ -408,10 +412,10 @@ export interface PublicAPI {
|
|
|
408
412
|
* ```
|
|
409
413
|
*
|
|
410
414
|
* @param ctx Context
|
|
411
|
-
* @param result
|
|
415
|
+
* @param result UpdatableResult with Id (required) and optional fields to update
|
|
412
416
|
* @returns Promise<boolean> True if updated successfully, false if result no longer visible
|
|
413
417
|
*/
|
|
414
|
-
UpdateResult: (ctx: Context, result:
|
|
418
|
+
UpdateResult: (ctx: Context, result: UpdatableResult) => Promise<boolean>
|
|
415
419
|
|
|
416
420
|
/**
|
|
417
421
|
* Update a single action within a query result that is currently displayed in the UI.
|
|
@@ -452,10 +456,10 @@ export interface PublicAPI {
|
|
|
452
456
|
* ```
|
|
453
457
|
*
|
|
454
458
|
* @param ctx Context
|
|
455
|
-
* @param action
|
|
459
|
+
* @param action UpdatableResultAction with ResultId, ActionId (required) and optional fields to update
|
|
456
460
|
* @returns Promise<boolean> True if updated successfully, false if result no longer visible
|
|
457
461
|
*/
|
|
458
|
-
UpdateResultAction: (ctx: Context, action:
|
|
462
|
+
UpdateResultAction: (ctx: Context, action: UpdatableResultAction) => Promise<boolean>
|
|
459
463
|
}
|
|
460
464
|
|
|
461
465
|
export type WoxImageType = "absolute" | "relative" | "base64" | "svg" | "url" | "emoji" | "lottie"
|