@vicinae/api 0.20.9 → 0.20.10

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 (76) hide show
  1. package/dist/api/alert.d.ts +1 -1
  2. package/dist/api/alert.js +9 -14
  3. package/dist/api/client.d.ts +7 -0
  4. package/dist/api/client.js +11 -0
  5. package/dist/api/clipboard.d.ts +4 -8
  6. package/dist/api/clipboard.js +13 -18
  7. package/dist/api/color.d.ts +4 -10
  8. package/dist/api/color.js +8 -47
  9. package/dist/api/command.js +4 -6
  10. package/dist/api/controls.js +9 -56
  11. package/dist/api/environment.d.ts +0 -11
  12. package/dist/api/environment.js +2 -1
  13. package/dist/api/file-search.d.ts +3 -4
  14. package/dist/api/file-search.js +6 -4
  15. package/dist/api/globals.d.ts +9 -0
  16. package/dist/api/globals.js +5 -0
  17. package/dist/api/hooks/use-imperative-form-handle.d.ts +1 -1
  18. package/dist/api/hooks/use-imperative-form-handle.js +6 -3
  19. package/dist/api/hooks/use-navigation.d.ts +2 -2
  20. package/dist/api/hooks/use-navigation.js +2 -5
  21. package/dist/api/image.d.ts +4 -4
  22. package/dist/api/image.js +12 -51
  23. package/dist/api/index.d.ts +0 -2
  24. package/dist/api/index.js +0 -2
  25. package/dist/api/local-storage.js +7 -14
  26. package/dist/api/oauth.d.ts +1 -1
  27. package/dist/api/oauth.js +7 -15
  28. package/dist/api/preference.d.ts +2 -4
  29. package/dist/api/preference.js +10 -6
  30. package/dist/api/proto/api.d.ts +240 -0
  31. package/dist/api/proto/api.js +271 -0
  32. package/dist/api/toast.js +7 -77
  33. package/dist/api/utils.d.ts +6 -2
  34. package/dist/api/utils.js +9 -26
  35. package/dist/api/window-management.d.ts +3 -5
  36. package/dist/api/window-management.js +14 -27
  37. package/dist/schemas/manifest.d.ts +3 -3
  38. package/package.json +1 -4
  39. package/dist/api/bus.d.ts +0 -125
  40. package/dist/api/bus.js +0 -201
  41. package/dist/api/context/index.d.ts +0 -1
  42. package/dist/api/context/index.js +0 -17
  43. package/dist/api/context/navigation-context.d.ts +0 -7
  44. package/dist/api/context/navigation-context.js +0 -12
  45. package/dist/api/context/navigation-provider.d.ts +0 -7
  46. package/dist/api/context/navigation-provider.js +0 -58
  47. package/dist/api/hooks.d.ts +0 -1
  48. package/dist/api/hooks.js +0 -30
  49. package/dist/api/proto/application.d.ts +0 -79
  50. package/dist/api/proto/application.js +0 -826
  51. package/dist/api/proto/clipboard.d.ts +0 -88
  52. package/dist/api/proto/clipboard.js +0 -929
  53. package/dist/api/proto/command.d.ts +0 -35
  54. package/dist/api/proto/command.js +0 -182
  55. package/dist/api/proto/common.d.ts +0 -28
  56. package/dist/api/proto/common.js +0 -102
  57. package/dist/api/proto/extension.d.ts +0 -106
  58. package/dist/api/proto/extension.js +0 -1122
  59. package/dist/api/proto/file-search.d.ts +0 -42
  60. package/dist/api/proto/file-search.js +0 -290
  61. package/dist/api/proto/google/protobuf/struct.d.ts +0 -107
  62. package/dist/api/proto/google/protobuf/struct.js +0 -456
  63. package/dist/api/proto/ipc.d.ts +0 -64
  64. package/dist/api/proto/ipc.js +0 -604
  65. package/dist/api/proto/manager.d.ts +0 -87
  66. package/dist/api/proto/manager.js +0 -776
  67. package/dist/api/proto/oauth.d.ts +0 -97
  68. package/dist/api/proto/oauth.js +0 -994
  69. package/dist/api/proto/storage.d.ts +0 -80
  70. package/dist/api/proto/storage.js +0 -804
  71. package/dist/api/proto/ui.d.ts +0 -208
  72. package/dist/api/proto/ui.js +0 -2316
  73. package/dist/api/proto/wlr-clipboard.d.ts +0 -30
  74. package/dist/api/proto/wlr-clipboard.js +0 -158
  75. package/dist/api/proto/wm.d.ts +0 -142
  76. package/dist/api/proto/wm.js +0 -1714
package/dist/api/image.js CHANGED
@@ -1,41 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.serializeProtoImage = exports.Image = void 0;
37
4
  const color_1 = require("./color");
38
- const ui = __importStar(require("./proto/ui"));
5
+ const icon_1 = require("./icon");
39
6
  /**
40
7
  * @category Image
41
8
  */
@@ -48,15 +15,15 @@ var Image;
48
15
  })(Mask = Image.Mask || (Image.Mask = {}));
49
16
  })(Image || (exports.Image = Image = {}));
50
17
  const maskMap = {
51
- [Image.Mask.Circle]: ui.ImageMask.Circle,
52
- [Image.Mask.RoundedRectangle]: ui.ImageMask.RoundedRectangle,
18
+ [Image.Mask.Circle]: "Circle",
19
+ [Image.Mask.RoundedRectangle]: "RoundedRectangle",
53
20
  };
54
21
  const serializeProtoImage = (image) => {
55
22
  const serializeSource = (payload) => {
56
23
  if (typeof payload === "object") {
57
24
  const tmp = payload;
58
25
  return {
59
- themed: { light: tmp.light.toString(), dark: tmp.dark.toString() },
26
+ themed: { light: tmp.light?.toString(), dark: tmp.dark?.toString() },
60
27
  };
61
28
  }
62
29
  return { raw: payload.toString() };
@@ -64,22 +31,16 @@ const serializeProtoImage = (image) => {
64
31
  if (image instanceof URL || typeof image === "string") {
65
32
  return { source: { raw: image.toString() } };
66
33
  }
67
- const proto = ui.Image.create();
68
34
  const img = image;
69
35
  // img.source should technically not be null, but it somehow still happens at times with some
70
36
  // raycast extensions
71
- if (img.source) {
72
- proto.source = serializeSource(img.source);
73
- }
74
- if (img.fallback) {
75
- proto.fallback = serializeSource(img.fallback);
76
- }
77
- if (img.mask) {
78
- proto.mask = maskMap[img.mask];
79
- }
80
- if (img.tintColor) {
81
- proto.tintColor = (0, color_1.serializeColorLike)(img.tintColor);
82
- }
83
- return proto;
37
+ if (!img.source)
38
+ return (0, exports.serializeProtoImage)(icon_1.Icon.QuestionMarkCircle);
39
+ return {
40
+ source: serializeSource(img.source),
41
+ fallback: img.fallback ? serializeSource(img.fallback) : undefined,
42
+ mask: img.mask ? maskMap[img.mask] : undefined,
43
+ tintColor: img.tintColor ? (0, color_1.serializeColorLike)(img.tintColor) : undefined,
44
+ };
84
45
  };
85
46
  exports.serializeProtoImage = serializeProtoImage;
@@ -1,8 +1,6 @@
1
1
  export * from "./ai.js";
2
2
  export * from "./components/index.js";
3
3
  export * from "./hooks/index.js";
4
- export * from "./context/index.js";
5
- export * from "./bus.js";
6
4
  export { Color, ColorLike } from "./color.js";
7
5
  export * from "./keyboard.js";
8
6
  export { ImageLike, Image } from "./image.js";
package/dist/api/index.js CHANGED
@@ -18,8 +18,6 @@ exports.Image = exports.Color = void 0;
18
18
  __exportStar(require("./ai.js"), exports);
19
19
  __exportStar(require("./components/index.js"), exports);
20
20
  __exportStar(require("./hooks/index.js"), exports);
21
- __exportStar(require("./context/index.js"), exports);
22
- __exportStar(require("./bus.js"), exports);
23
21
  var color_js_1 = require("./color.js");
24
22
  Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return color_js_1.Color; } });
25
23
  __exportStar(require("./keyboard.js"), exports);
@@ -1,38 +1,31 @@
1
1
  "use strict";
2
+ // Implementation of Raycast's storage API: https://developers.raycast.com/api-reference/storage
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.LocalStorage = void 0;
4
- const bus_1 = require("./bus");
5
- // Implementation of Raycast's storage API: https://developers.raycast.com/api-reference/storage
5
+ const client_1 = require("./client");
6
6
  /**
7
7
  * @category Local Storage
8
8
  */
9
9
  var LocalStorage;
10
10
  (function (LocalStorage) {
11
11
  async function getItem(key) {
12
- const res = await bus_1.bus.request("storage.get", { key });
13
- if (!res.ok || res.value.value === null) {
14
- return undefined;
15
- }
16
- return res.value.value;
12
+ return (0, client_1.getClient)().Storage.get(key);
17
13
  }
18
14
  LocalStorage.getItem = getItem;
19
15
  async function setItem(key, value) {
20
- await bus_1.bus.request("storage.set", { key, value });
16
+ await (0, client_1.getClient)().Storage.set(key, value);
21
17
  }
22
18
  LocalStorage.setItem = setItem;
23
19
  async function removeItem(key) {
24
- await bus_1.bus.request("storage.remove", { key });
20
+ await (0, client_1.getClient)().Storage.remove(key);
25
21
  }
26
22
  LocalStorage.removeItem = removeItem;
27
23
  async function allItems() {
28
- const res = await bus_1.bus.request("storage.list", {});
29
- if (!res.ok)
30
- return {};
31
- return res.value.values;
24
+ return (0, client_1.getClient)().Storage.list();
32
25
  }
33
26
  LocalStorage.allItems = allItems;
34
27
  async function clear() {
35
- await bus_1.bus.request("storage.clear", {});
28
+ await (0, client_1.getClient)().Storage.clear();
36
29
  }
37
30
  LocalStorage.clear = clear;
38
31
  })(LocalStorage || (exports.LocalStorage = LocalStorage = {}));
@@ -1,4 +1,4 @@
1
- import { Image } from "./image";
1
+ import { type Image } from "./image";
2
2
  declare enum OauthRedirectMethod {
3
3
  /**
4
4
  * Use this type for a redirect back to the Raycast website, which will then open the extension.
package/dist/api/oauth.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OAuth = exports.PKCEClient = void 0;
4
4
  const node_crypto_1 = require("node:crypto");
5
5
  const image_1 = require("./image");
6
- const bus_1 = require("./bus");
6
+ const client_1 = require("./client");
7
7
  var OauthRedirectMethod;
8
8
  (function (OauthRedirectMethod) {
9
9
  /**
@@ -110,7 +110,7 @@ class PKCEClient {
110
110
  const isAuthorizationOptions = (s) => {
111
111
  return typeof s.url === "string";
112
112
  };
113
- const res = await bus_1.bus.request("oauth.authorize", {
113
+ const { code } = await (0, client_1.getClient)().OAuth.authorize({
114
114
  client: {
115
115
  id: this.providerId,
116
116
  description: this.description ?? "Connect to your account",
@@ -121,10 +121,7 @@ class PKCEClient {
121
121
  },
122
122
  url: isAuthorizationOptions(options) ? options.url : options.toURL(),
123
123
  });
124
- if (!res.ok) {
125
- throw res.error;
126
- }
127
- return { authorizationCode: res.value.code };
124
+ return { authorizationCode: code };
128
125
  }
129
126
  authorizationURL;
130
127
  /**
@@ -142,7 +139,7 @@ class PKCEClient {
142
139
  return Object.hasOwn(options, "access_token");
143
140
  };
144
141
  if (isTokenResponse(options)) {
145
- await bus_1.bus.request("oauth.setTokens", {
142
+ await (0, client_1.getClient)().OAuth.setTokens({
146
143
  accessToken: options.access_token,
147
144
  refreshToken: options.refresh_token,
148
145
  idToken: options.id_token,
@@ -152,7 +149,7 @@ class PKCEClient {
152
149
  });
153
150
  }
154
151
  else {
155
- await bus_1.bus.request("oauth.setTokens", {
152
+ await (0, client_1.getClient)().OAuth.setTokens({
156
153
  ...options,
157
154
  providerId: this.providerId,
158
155
  });
@@ -166,10 +163,7 @@ class PKCEClient {
166
163
  * @returns A promise that resolves when the token set has been retrieved.
167
164
  */
168
165
  async getTokens() {
169
- const res = await bus_1.bus.request("oauth.getTokens", {
170
- providerId: this.providerId,
171
- });
172
- const set = res.unwrap().tokenSet;
166
+ const { set } = await (0, client_1.getClient)().OAuth.getTokens(this.providerId);
173
167
  if (!set)
174
168
  return undefined;
175
169
  const tokenSet = {
@@ -190,9 +184,7 @@ class PKCEClient {
190
184
  * Removes the stored {@link OAuth.TokenSet} for the client.
191
185
  */
192
186
  async removeTokens() {
193
- await bus_1.bus.request("oauth.removeTokens", {
194
- providerId: this.providerId,
195
- });
187
+ (0, client_1.getClient)().OAuth.removeTokens(this.providerId);
196
188
  }
197
189
  }
198
190
  exports.PKCEClient = PKCEClient;
@@ -2,12 +2,10 @@ export declare const getPreferenceValues: <T = {
2
2
  [preferenceName: string]: any;
3
3
  }>() => T;
4
4
  /**
5
- * TODO: implement
6
- * @ignore
5
+ * Opens the extension preferences in the vicinae settings window.
7
6
  */
8
7
  export declare const openExtensionPreferences: () => Promise<void>;
9
8
  /**
10
- * TODO: implement
11
- * @ignore
9
+ * Open the command preferences in the vicinae settings window.
12
10
  */
13
11
  export declare const openCommandPreferences: () => Promise<void>;
@@ -1,23 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.openCommandPreferences = exports.openExtensionPreferences = exports.getPreferenceValues = void 0;
4
+ const client_1 = require("./client");
5
+ const controls_1 = require("./controls");
6
+ const globals_1 = require("./globals");
4
7
  const getPreferenceValues = () => {
5
- return globalThis.vicinae.preferences;
8
+ return (0, globals_1.getGlobal)().preferences;
6
9
  };
7
10
  exports.getPreferenceValues = getPreferenceValues;
8
11
  /**
9
- * TODO: implement
10
- * @ignore
12
+ * Opens the extension preferences in the vicinae settings window.
11
13
  */
12
14
  const openExtensionPreferences = async () => {
13
15
  console.error("openExtensionPreferences is not implemented");
16
+ await (0, client_1.getClient)().Command.openExtensionPreferences();
17
+ await (0, controls_1.closeMainWindow)();
14
18
  };
15
19
  exports.openExtensionPreferences = openExtensionPreferences;
16
20
  /**
17
- * TODO: implement
18
- * @ignore
21
+ * Open the command preferences in the vicinae settings window.
19
22
  */
20
23
  const openCommandPreferences = async () => {
21
- console.error("openCommandPreferences is not implemented");
24
+ await (0, client_1.getClient)().Command.openCommandPreferences();
25
+ await (0, controls_1.closeMainWindow)();
22
26
  };
23
27
  exports.openCommandPreferences = openCommandPreferences;
@@ -0,0 +1,240 @@
1
+ interface ITransport {
2
+ send(data: string): void;
3
+ }
4
+ type EventSubscription = {
5
+ unsubscribe: () => void;
6
+ };
7
+ export declare class RpcTransport {
8
+ private readonly transport;
9
+ constructor(transport: ITransport);
10
+ dispatchMessage(data: string): void;
11
+ request<T>(method: string, params: Record<string, any>): Promise<T>;
12
+ subscribe(method: string, cb: (result: any) => void): EventSubscription;
13
+ private sendMessage;
14
+ private id;
15
+ private requestMap;
16
+ private handlers;
17
+ }
18
+ export type ImageMask = 'None' | 'Circle' | 'RoundedRectangle';
19
+ export type ToastStyle = 'Success' | 'Info' | 'Warning' | 'Error' | 'Dynamic';
20
+ export type PopToRootType = 'Default' | 'Immediate' | 'Suspended';
21
+ export type ConfirmAlertActionStyle = 'Default' | 'Destructive' | 'Cancel';
22
+ export type Application = {
23
+ id: string;
24
+ name: string;
25
+ icon?: string;
26
+ path: string;
27
+ };
28
+ export type RunInTerminalPayload = {
29
+ cmdline: string[];
30
+ hold: boolean;
31
+ appId?: string;
32
+ workingDirectory?: string;
33
+ title?: string;
34
+ };
35
+ export type ThemedImageSource = {
36
+ light?: string;
37
+ dark?: string;
38
+ };
39
+ export type ImageSource = {
40
+ raw?: string;
41
+ themed?: ThemedImageSource;
42
+ };
43
+ export type DynamicColor = {
44
+ light: string;
45
+ dark: string;
46
+ adjustContrast?: boolean;
47
+ };
48
+ export type ColorLike = {
49
+ raw?: string;
50
+ dynamic?: DynamicColor;
51
+ };
52
+ export type Image = {
53
+ source: ImageSource;
54
+ fallback?: ImageSource;
55
+ mask?: ImageMask;
56
+ tintColor?: ColorLike;
57
+ };
58
+ export type ConfirmAlertAction = {
59
+ title: string;
60
+ style: ConfirmAlertActionStyle;
61
+ };
62
+ export type ConfirmAlertPayload = {
63
+ title: string;
64
+ description: string;
65
+ primaryAction: ConfirmAlertAction;
66
+ dismissAction: ConfirmAlertAction;
67
+ rememberUserChoice: boolean;
68
+ icon?: Image;
69
+ };
70
+ export type Rect = {
71
+ x: number;
72
+ y: number;
73
+ width: number;
74
+ height: number;
75
+ };
76
+ export type Window = {
77
+ id: string;
78
+ title: string;
79
+ workspaceId: string;
80
+ active: boolean;
81
+ fullscreen: boolean;
82
+ bounds: Rect;
83
+ app?: Application;
84
+ };
85
+ export type Screen = {
86
+ name: string;
87
+ model: string;
88
+ make: string;
89
+ serial?: string;
90
+ bounds: Rect;
91
+ };
92
+ export type Workspace = {
93
+ id: string;
94
+ name: string;
95
+ active: boolean;
96
+ fullscreen: boolean;
97
+ monitor: string;
98
+ };
99
+ export type ClipboardContent = {
100
+ text?: string;
101
+ html?: string;
102
+ path?: string;
103
+ };
104
+ export type ClipboardOptions = {
105
+ concealed: boolean;
106
+ };
107
+ export type FileInfo = {
108
+ path: string;
109
+ mimeType: string;
110
+ };
111
+ export type UpdateCommandMetadataPayload = {
112
+ subtitle?: string;
113
+ };
114
+ export type PKCEClientOptions = {
115
+ name: string;
116
+ id?: string;
117
+ description: string;
118
+ icon?: Image;
119
+ };
120
+ export type AuthorizeRequest = {
121
+ client: PKCEClientOptions;
122
+ url: string;
123
+ };
124
+ export type AuthorizeResponse = {
125
+ code: string;
126
+ };
127
+ export type TokenSet = {
128
+ accessToken: string;
129
+ refreshToken?: string;
130
+ idToken?: string;
131
+ expiresIn?: number;
132
+ scope?: string;
133
+ updatedAt: number;
134
+ };
135
+ export type SetTokensRequest = {
136
+ providerId?: string;
137
+ accessToken: string;
138
+ refreshToken?: string;
139
+ idToken?: string;
140
+ expiresIn?: number;
141
+ scope?: string;
142
+ };
143
+ export type TokenSetResponse = {
144
+ set?: TokenSet;
145
+ };
146
+ declare class ApplicationService {
147
+ private readonly transport;
148
+ constructor(transport: RpcTransport);
149
+ list(target?: string): Promise<Application[]>;
150
+ open(target: string, appId?: string): Promise<void>;
151
+ getDefault(target: string): Promise<Application>;
152
+ showInFileBrowser(target: string, select: boolean): Promise<void>;
153
+ runInTerminal(opts: RunInTerminalPayload): Promise<boolean>;
154
+ }
155
+ declare class UIService {
156
+ private readonly transport;
157
+ constructor(transport: RpcTransport);
158
+ render(json: string): Promise<void>;
159
+ showToast(id: string, title: string, message: string, style: ToastStyle): Promise<void>;
160
+ updateToast(id: string, title: string): Promise<void>;
161
+ hideToast(id: string): Promise<void>;
162
+ showHud(text: string, clear_root: boolean, popToRoot: PopToRootType): Promise<void>;
163
+ closeMainWindow(clearRoot: boolean, popToRoot: PopToRootType): Promise<void>;
164
+ popToRoot(clearSearchBar: boolean): Promise<void>;
165
+ confirmAlert(payload: ConfirmAlertPayload): Promise<boolean>;
166
+ pushView(): Promise<void>;
167
+ popView(): Promise<void>;
168
+ setSearchText(text: string): Promise<void>;
169
+ getSelectedText(): Promise<string>;
170
+ viewPoped(handler: () => void): EventSubscription;
171
+ viewPushed(handler: () => void): EventSubscription;
172
+ }
173
+ declare class WindowManagementService {
174
+ private readonly transport;
175
+ constructor(transport: RpcTransport);
176
+ focusWindow(winId: string): Promise<boolean>;
177
+ getActiveWindow(): Promise<Window>;
178
+ getActiveWorkspace(): Promise<Workspace>;
179
+ getWindows(workspaceId?: string): Promise<Window[]>;
180
+ getScreens(): Promise<Screen[]>;
181
+ getWorkspaces(): Promise<Workspace[]>;
182
+ setWindowBounds(winId: string, bounds: Rect): Promise<boolean>;
183
+ }
184
+ declare class ClipboardService {
185
+ private readonly transport;
186
+ constructor(transport: RpcTransport);
187
+ copy(content: ClipboardContent, options: ClipboardOptions): Promise<void>;
188
+ paste(content: ClipboardContent): Promise<void>;
189
+ clear(): Promise<void>;
190
+ readContent(): Promise<ClipboardContent>;
191
+ }
192
+ declare class StorageService {
193
+ private readonly transport;
194
+ constructor(transport: RpcTransport);
195
+ get(key: string): Promise<any>;
196
+ set(key: string, value: any): Promise<void>;
197
+ remove(key: string): Promise<void>;
198
+ clear(): Promise<void>;
199
+ list(): Promise<any>;
200
+ }
201
+ declare class FileSearchService {
202
+ private readonly transport;
203
+ constructor(transport: RpcTransport);
204
+ search(q: string): Promise<FileInfo[]>;
205
+ }
206
+ declare class CommandService {
207
+ private readonly transport;
208
+ constructor(transport: RpcTransport);
209
+ updateCommandMetadata(payload: UpdateCommandMetadataPayload): Promise<void>;
210
+ openExtensionPreferences(): Promise<void>;
211
+ openCommandPreferences(): Promise<void>;
212
+ }
213
+ declare class OAuthService {
214
+ private readonly transport;
215
+ constructor(transport: RpcTransport);
216
+ authorize(payload: AuthorizeRequest): Promise<AuthorizeResponse>;
217
+ getTokens(id?: string): Promise<TokenSetResponse>;
218
+ setTokens(payload: SetTokensRequest): Promise<void>;
219
+ removeTokens(id?: string): Promise<void>;
220
+ }
221
+ declare class EventCoreService {
222
+ private readonly transport;
223
+ constructor(transport: RpcTransport);
224
+ handlerActivated(handler: (id: string, args: any[]) => void): EventSubscription;
225
+ }
226
+ export declare class Client {
227
+ private readonly transport;
228
+ constructor(transport: RpcTransport);
229
+ route(msg: string): void;
230
+ Application: ApplicationService;
231
+ UI: UIService;
232
+ WindowManagement: WindowManagementService;
233
+ Clipboard: ClipboardService;
234
+ Storage: StorageService;
235
+ FileSearch: FileSearchService;
236
+ Command: CommandService;
237
+ OAuth: OAuthService;
238
+ EventCore: EventCoreService;
239
+ }
240
+ export {};