@wox-launcher/wox-plugin 0.0.37 → 0.0.39

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +17 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -3,6 +3,10 @@ export interface Plugin {
3
3
  query: (query: Query) => Promise<Result[]>;
4
4
  }
5
5
  export interface Query {
6
+ /**
7
+ * Type of a query.
8
+ */
9
+ Type: "text" | "file";
6
10
  /**
7
11
  * Raw query, this includes trigger keyword if it has
8
12
  * We didn't recommend use this property directly. You should always use Search property.
@@ -28,6 +32,19 @@ export interface Result {
28
32
  Icon: WoxImage;
29
33
  Preview?: WoxPreview;
30
34
  Score?: number;
35
+ Action: () => Promise<void>;
36
+ }
37
+ export interface ResultAction {
38
+ /**
39
+ * Result id, should be unique. It's optional, if you don't set it, Wox will assign a random id for you
40
+ */
41
+ Id?: string;
42
+ Name: string;
43
+ /**
44
+ * If true, Wox will use this action as default action. There can be only one default action in results
45
+ * This can be omitted, if you don't set it, Wox will use the first action as default action
46
+ */
47
+ IsDefault?: boolean;
31
48
  /**
32
49
  * If true, Wox will not hide after user select this result
33
50
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wox-launcher/wox-plugin",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "All nodejs plugin for Wox should use types in this package",
5
5
  "repository": {
6
6
  "type": "git",