@edenapp/client 0.0.0-stage → 0.15.0
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/LICENSE +21 -0
- package/README.md +115 -2
- package/dist/commands.generated.d.ts +447 -0
- package/dist/commands.generated.d.ts.map +1 -0
- package/dist/commands.generated.js +407 -0
- package/dist/commands.generated.js.map +1 -0
- package/dist/index.cjs +470 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.cts +447 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/invoke.d.ts +3 -0
- package/dist/invoke.d.ts.map +1 -0
- package/dist/invoke.js +5 -0
- package/dist/invoke.js.map +1 -0
- package/dist/runtime.d.ts +4 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +10 -0
- package/dist/runtime.js.map +1 -0
- package/dist/streams.d.ts +5 -0
- package/dist/streams.d.ts.map +1 -0
- package/dist/streams.js +22 -0
- package/dist/streams.js.map +1 -0
- package/dist/subscriptions.d.ts +4 -0
- package/dist/subscriptions.d.ts.map +1 -0
- package/dist/subscriptions.js +8 -0
- package/dist/subscriptions.js.map +1 -0
- package/package.json +43 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Dariusz Majnert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,116 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @edenapp/client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Typed system commands and event subscriptions for Eden frontend and backend apps.
|
|
4
|
+
|
|
5
|
+
Start with the [Eden handbook](https://github.com/b0czek/eden/blob/main/docs/README.md)
|
|
6
|
+
for complete app and consumer workflows.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install @edenapp/client
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { db, fs, system } from "@edenapp/client";
|
|
14
|
+
|
|
15
|
+
const location = { volume: "home", path: "/notes.txt" };
|
|
16
|
+
await fs.write(location, "Hello", { encoding: "utf8" });
|
|
17
|
+
const stats = await fs.stat(location);
|
|
18
|
+
await db.set("theme", "dark");
|
|
19
|
+
const { value } = await db.get("theme");
|
|
20
|
+
const info = await system.info();
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use a namespace import when local names overlap:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import * as eden from "@edenapp/client";
|
|
27
|
+
|
|
28
|
+
await eden.db.get("theme");
|
|
29
|
+
await eden.package.list();
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Arguments and results
|
|
33
|
+
|
|
34
|
+
Each command becomes a method on its namespace. Hyphens and slashes become
|
|
35
|
+
camelCase: `fs/read-binary` is `fs.readBinary`, `db/get/su` is `db.getSu`, and
|
|
36
|
+
`file-picker/open` is `filePicker.open`.
|
|
37
|
+
|
|
38
|
+
Required top-level fields become positional arguments in declaration order.
|
|
39
|
+
Optional fields go in a final optional options object. Nested values retain
|
|
40
|
+
their structure. Commands without public arguments take no arguments.
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
await fs.stat(location);
|
|
44
|
+
await fs.write(location, "contents", { encoding: "utf8" });
|
|
45
|
+
await eden.process.list({ showHidden: true });
|
|
46
|
+
await system.info();
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Methods return Promises with typed command results. Responses such
|
|
50
|
+
as `{ value }` keep their structure. Operation commands return controls for
|
|
51
|
+
progress, completion, and cancellation:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
const copy = await fs.cp(
|
|
55
|
+
{ volume: "home", path: "/notes.txt" },
|
|
56
|
+
{ volume: "home", path: "/backup.txt" },
|
|
57
|
+
{ overwrite: true, submission: { requestKey: "backup-notes" } },
|
|
58
|
+
);
|
|
59
|
+
const stop = await copy.watch((snapshot) => console.log(snapshot));
|
|
60
|
+
try {
|
|
61
|
+
await copy.result();
|
|
62
|
+
} finally {
|
|
63
|
+
stop();
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`submission` is available for operation commands. Use its `requestKey` to prevent duplicate submissions.
|
|
68
|
+
See [IPC operations](../../docs/ipc-architecture.md#operations).
|
|
69
|
+
|
|
70
|
+
File reads accept locations for one-shot access or plain handles returned by
|
|
71
|
+
`fs.open`. See [file handles](../../docs/filesystem.md#file-handles)
|
|
72
|
+
for repeated reads, close, and safe-removal lifetimes.
|
|
73
|
+
|
|
74
|
+
## Event subscriptions
|
|
75
|
+
|
|
76
|
+
Domains that declare events expose `subscribe` and `unsubscribe`. Event names
|
|
77
|
+
are local to the domain: `settings/panels-changed` becomes
|
|
78
|
+
`settings.subscribe("panels-changed", callback)`. Callback payloads are inferred
|
|
79
|
+
from the selected event.
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { settings } from "@edenapp/client";
|
|
83
|
+
import type { EventData } from "@edenapp/types";
|
|
84
|
+
|
|
85
|
+
const handleChanged = (event: EventData<"settings/panels-changed">) => {
|
|
86
|
+
console.log(event.reason, event.panelId);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
await settings.subscribe("panels-changed", handleChanged);
|
|
90
|
+
|
|
91
|
+
// When the owner is disposed, remove the same callback reference.
|
|
92
|
+
settings.unsubscribe("panels-changed", handleChanged);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`subscribe` returns `Promise<void>` and rejects if setup fails. `unsubscribe`
|
|
96
|
+
returns immediately and stops local delivery synchronously; remote cleanup
|
|
97
|
+
follows asynchronously. It can be called while setup is still pending. Register
|
|
98
|
+
component cleanup before awaiting setup so disposal always removes the listener.
|
|
99
|
+
Removing one callback leaves other listeners for the event active.
|
|
100
|
+
|
|
101
|
+
## Frontend and backend
|
|
102
|
+
|
|
103
|
+
The same imports work in both runtimes. Methods use the frontend's
|
|
104
|
+
`window.edenAPI` or the backend's `worker.edenAPI`. Include the client in your
|
|
105
|
+
app bundle; for a Node backend, bundle its entry with dependencies:
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
esbuild src/backend.ts --bundle --platform=node --format=esm --outfile=dist/backend.js
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Calling a method requires the host's injected API.
|
|
112
|
+
AppBus, launch helpers, and operation restoration use the injected APIs directly.
|
|
113
|
+
|
|
114
|
+
For development in this repository, regenerate the client with
|
|
115
|
+
`pnpm --filter @edenapp/sdk run codegen`, then build it with
|
|
116
|
+
`pnpm --filter @edenapp/client run build`.
|
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
+
*
|
|
4
|
+
* Typed app client generated from command and event declarations
|
|
5
|
+
* Generated by scripts/codegen
|
|
6
|
+
* Run 'pnpm run codegen' to regenerate.
|
|
7
|
+
*/
|
|
8
|
+
import type { CommandArgs, CommandResult, CommandStream, EventData, OperationSubmission } from "@edenapp/types";
|
|
9
|
+
declare const appbusCommands: {
|
|
10
|
+
/**
|
|
11
|
+
* Connect to another app's service
|
|
12
|
+
* Creates MessageChannel and transfers ports directly to both apps
|
|
13
|
+
* Requires "appbus/connect" permission
|
|
14
|
+
*/
|
|
15
|
+
connect: (targetAppId: CommandArgs<"appbus/connect">["targetAppId"], serviceName: CommandArgs<"appbus/connect">["serviceName"]) => Promise<CommandResult<"appbus/connect">>;
|
|
16
|
+
/**
|
|
17
|
+
* List all available services
|
|
18
|
+
* No permission required
|
|
19
|
+
*/
|
|
20
|
+
list: () => Promise<CommandResult<"appbus/list">>;
|
|
21
|
+
/**
|
|
22
|
+
* List services by app ID
|
|
23
|
+
* No permission required
|
|
24
|
+
*/
|
|
25
|
+
listByApp: (appId: CommandArgs<"appbus/list-by-app">["appId"]) => Promise<CommandResult<"appbus/list-by-app">>;
|
|
26
|
+
/**
|
|
27
|
+
* Register a service that this app exposes
|
|
28
|
+
* Requires "appbus/expose" permission
|
|
29
|
+
*/
|
|
30
|
+
register: (serviceName: CommandArgs<"appbus/register">["serviceName"], options?: Pick<CommandArgs<"appbus/register">, "description" | "allowedClients">) => Promise<CommandResult<"appbus/register">>;
|
|
31
|
+
/**
|
|
32
|
+
* Unregister a service
|
|
33
|
+
* Requires "appbus/expose" permission
|
|
34
|
+
*/
|
|
35
|
+
unregister: (serviceName: CommandArgs<"appbus/unregister">["serviceName"]) => Promise<CommandResult<"appbus/unregister">>;
|
|
36
|
+
};
|
|
37
|
+
export { appbusCommands as appbus };
|
|
38
|
+
declare const appearanceCommands: {
|
|
39
|
+
getPresets: () => Promise<CommandResult<"appearance/get-presets">>;
|
|
40
|
+
getWallpaper: () => Promise<CommandResult<"appearance/get-wallpaper">>;
|
|
41
|
+
setWallpaper: (wallpaper: CommandArgs<"appearance/set-wallpaper">["wallpaper"]) => Promise<CommandResult<"appearance/set-wallpaper">>;
|
|
42
|
+
subscribe: <E extends "wallpaper-changed">(event: E, callback: (data: EventData<`appearance/${E}`>) => void) => Promise<void>;
|
|
43
|
+
unsubscribe: <E extends "wallpaper-changed">(event: E, callback: (data: EventData<`appearance/${E}`>) => void) => void;
|
|
44
|
+
};
|
|
45
|
+
export { appearanceCommands as appearance };
|
|
46
|
+
declare const associationsCommands: {
|
|
47
|
+
get: (key: CommandArgs<"associations/get">["key"]) => Promise<CommandResult<"associations/get">>;
|
|
48
|
+
list: (options?: Pick<CommandArgs<"associations/list">, "kindPrefix">) => Promise<CommandResult<"associations/list">>;
|
|
49
|
+
remove: (key: CommandArgs<"associations/remove">["key"]) => Promise<CommandResult<"associations/remove">>;
|
|
50
|
+
set: (key: CommandArgs<"associations/set">["key"], appId: CommandArgs<"associations/set">["appId"], kind: CommandArgs<"associations/set">["kind"], options?: Pick<CommandArgs<"associations/set">, "label">) => Promise<CommandResult<"associations/set">>;
|
|
51
|
+
};
|
|
52
|
+
export { associationsCommands as associations };
|
|
53
|
+
declare const contextMenuCommands: {
|
|
54
|
+
close: (options?: Pick<CommandArgs<"context-menu/close">, "requestId">) => Promise<CommandResult<"context-menu/close">>;
|
|
55
|
+
open: (position: CommandArgs<"context-menu/open">["position"], items: CommandArgs<"context-menu/open">["items"], options?: Pick<CommandArgs<"context-menu/open">, "title">) => Promise<CommandResult<"context-menu/open">>;
|
|
56
|
+
registerDisplay: () => Promise<CommandResult<"context-menu/register-display">>;
|
|
57
|
+
resolve: (requestId: CommandArgs<"context-menu/resolve">["requestId"], reason: CommandArgs<"context-menu/resolve">["reason"], options?: Pick<CommandArgs<"context-menu/resolve">, "itemId">) => Promise<CommandResult<"context-menu/resolve">>;
|
|
58
|
+
subscribe: <E extends "closed" | "opened">(event: E, callback: (data: EventData<`context-menu/${E}`>) => void) => Promise<void>;
|
|
59
|
+
unsubscribe: <E extends "closed" | "opened">(event: E, callback: (data: EventData<`context-menu/${E}`>) => void) => void;
|
|
60
|
+
};
|
|
61
|
+
export { contextMenuCommands as contextMenu };
|
|
62
|
+
declare const daemonCommands: {
|
|
63
|
+
disable: (appId: CommandArgs<"daemon/disable">["appId"]) => Promise<CommandResult<"daemon/disable">>;
|
|
64
|
+
enable: (appId: CommandArgs<"daemon/enable">["appId"]) => Promise<CommandResult<"daemon/enable">>;
|
|
65
|
+
list: () => Promise<CommandResult<"daemon/list">>;
|
|
66
|
+
restart: (appId: CommandArgs<"daemon/restart">["appId"], options?: {
|
|
67
|
+
submission?: OperationSubmission;
|
|
68
|
+
}) => Promise<CommandResult<"daemon/restart">>;
|
|
69
|
+
start: (appId: CommandArgs<"daemon/start">["appId"], options?: {
|
|
70
|
+
submission?: OperationSubmission;
|
|
71
|
+
}) => Promise<CommandResult<"daemon/start">>;
|
|
72
|
+
stop: (appId: CommandArgs<"daemon/stop">["appId"], options?: {
|
|
73
|
+
submission?: OperationSubmission;
|
|
74
|
+
}) => Promise<CommandResult<"daemon/stop">>;
|
|
75
|
+
updateDefinition: (definition: CommandArgs<"daemon/update-definition">["definition"]) => Promise<CommandResult<"daemon/update-definition">>;
|
|
76
|
+
subscribe: <E extends "changed">(event: E, callback: (data: EventData<`daemon/${E}`>) => void) => Promise<void>;
|
|
77
|
+
unsubscribe: <E extends "changed">(event: E, callback: (data: EventData<`daemon/${E}`>) => void) => void;
|
|
78
|
+
};
|
|
79
|
+
export { daemonCommands as daemon };
|
|
80
|
+
declare const dbCommands: {
|
|
81
|
+
/**
|
|
82
|
+
* Clear all keys (scoped to caller's app)
|
|
83
|
+
*/
|
|
84
|
+
clear: () => Promise<CommandResult<"db/clear">>;
|
|
85
|
+
/**
|
|
86
|
+
* Clear all keys in any app's namespace (superuser only)
|
|
87
|
+
*/
|
|
88
|
+
clearSu: (appId: CommandArgs<"db/clear/su">["appId"]) => Promise<CommandResult<"db/clear/su">>;
|
|
89
|
+
/**
|
|
90
|
+
* Delete a key from database (scoped to caller's app)
|
|
91
|
+
*/
|
|
92
|
+
delete: (key: CommandArgs<"db/delete">["key"]) => Promise<CommandResult<"db/delete">>;
|
|
93
|
+
/**
|
|
94
|
+
* Delete a key from any app's namespace (superuser only)
|
|
95
|
+
*/
|
|
96
|
+
deleteSu: (appId: CommandArgs<"db/delete/su">["appId"], key: CommandArgs<"db/delete/su">["key"]) => Promise<CommandResult<"db/delete/su">>;
|
|
97
|
+
/**
|
|
98
|
+
* Get a value from database (scoped to caller's app)
|
|
99
|
+
*/
|
|
100
|
+
get: (key: CommandArgs<"db/get">["key"]) => Promise<CommandResult<"db/get">>;
|
|
101
|
+
/**
|
|
102
|
+
* Get a value from any app's namespace (superuser only)
|
|
103
|
+
*/
|
|
104
|
+
getSu: (appId: CommandArgs<"db/get/su">["appId"], key: CommandArgs<"db/get/su">["key"]) => Promise<CommandResult<"db/get/su">>;
|
|
105
|
+
/**
|
|
106
|
+
* Check if a key exists (scoped to caller's app)
|
|
107
|
+
*/
|
|
108
|
+
has: (key: CommandArgs<"db/has">["key"]) => Promise<CommandResult<"db/has">>;
|
|
109
|
+
/**
|
|
110
|
+
* Check if a key exists in any app's namespace (superuser only)
|
|
111
|
+
*/
|
|
112
|
+
hasSu: (appId: CommandArgs<"db/has/su">["appId"], key: CommandArgs<"db/has/su">["key"]) => Promise<CommandResult<"db/has/su">>;
|
|
113
|
+
/**
|
|
114
|
+
* List all keys (scoped to caller's app)
|
|
115
|
+
*/
|
|
116
|
+
list: () => Promise<CommandResult<"db/list">>;
|
|
117
|
+
/**
|
|
118
|
+
* List all keys in any app's namespace (superuser only)
|
|
119
|
+
*/
|
|
120
|
+
listSu: (appId: CommandArgs<"db/list/su">["appId"]) => Promise<CommandResult<"db/list/su">>;
|
|
121
|
+
/**
|
|
122
|
+
* Set a value in database (scoped to caller's app)
|
|
123
|
+
*/
|
|
124
|
+
set: (key: CommandArgs<"db/set">["key"], value: CommandArgs<"db/set">["value"]) => Promise<CommandResult<"db/set">>;
|
|
125
|
+
/**
|
|
126
|
+
* Set a value in any app's namespace (superuser only)
|
|
127
|
+
*/
|
|
128
|
+
setSu: (appId: CommandArgs<"db/set/su">["appId"], key: CommandArgs<"db/set/su">["key"], value: CommandArgs<"db/set/su">["value"]) => Promise<CommandResult<"db/set/su">>;
|
|
129
|
+
};
|
|
130
|
+
export { dbCommands as db };
|
|
131
|
+
declare const eventCommands: {
|
|
132
|
+
exists: (eventName: CommandArgs<"event/exists">["eventName"]) => Promise<CommandResult<"event/exists">>;
|
|
133
|
+
subscribe: (eventName: CommandArgs<"event/subscribe">["eventName"], options?: Pick<CommandArgs<"event/subscribe">, "operation">) => Promise<CommandResult<"event/subscribe">>;
|
|
134
|
+
unsubscribe: (eventName: CommandArgs<"event/unsubscribe">["eventName"], options?: Pick<CommandArgs<"event/unsubscribe">, "operation">) => Promise<CommandResult<"event/unsubscribe">>;
|
|
135
|
+
};
|
|
136
|
+
export { eventCommands as event };
|
|
137
|
+
declare const fileCommands: {
|
|
138
|
+
/**
|
|
139
|
+
* Get all file type associations
|
|
140
|
+
*/
|
|
141
|
+
getAssociations: () => Promise<CommandResult<"file/get-associations">>;
|
|
142
|
+
/**
|
|
143
|
+
* Get the default handler app for a file path
|
|
144
|
+
*/
|
|
145
|
+
getHandler: (location: CommandArgs<"file/get-handler">["location"]) => Promise<CommandResult<"file/get-handler">>;
|
|
146
|
+
/**
|
|
147
|
+
* Get all apps that can handle a specific file path
|
|
148
|
+
*/
|
|
149
|
+
getSupportedHandlers: (location: CommandArgs<"file/get-supported-handlers">["location"]) => Promise<CommandResult<"file/get-supported-handlers">>;
|
|
150
|
+
/**
|
|
151
|
+
* Open a file with its default handler
|
|
152
|
+
*/
|
|
153
|
+
open: (location: CommandArgs<"file/open">["location"], options?: {
|
|
154
|
+
submission?: OperationSubmission;
|
|
155
|
+
}) => Promise<CommandResult<"file/open">>;
|
|
156
|
+
/**
|
|
157
|
+
* Open a file with a specific app
|
|
158
|
+
*/
|
|
159
|
+
openWith: (location: CommandArgs<"file/open-with">["location"], appId: CommandArgs<"file/open-with">["appId"], options?: {
|
|
160
|
+
submission?: OperationSubmission;
|
|
161
|
+
}) => Promise<CommandResult<"file/open-with">>;
|
|
162
|
+
/**
|
|
163
|
+
* Remove user preference for a file path (revert to default)
|
|
164
|
+
*/
|
|
165
|
+
removeDefaultHandler: (location: CommandArgs<"file/remove-default-handler">["location"]) => Promise<CommandResult<"file/remove-default-handler">>;
|
|
166
|
+
/**
|
|
167
|
+
* Set user preference for a file path's default handler
|
|
168
|
+
*/
|
|
169
|
+
setDefaultHandler: (location: CommandArgs<"file/set-default-handler">["location"], appId: CommandArgs<"file/set-default-handler">["appId"]) => Promise<CommandResult<"file/set-default-handler">>;
|
|
170
|
+
subscribe: <E extends "opened">(event: E, callback: (data: EventData<`file/${E}`>) => void) => Promise<void>;
|
|
171
|
+
unsubscribe: <E extends "opened">(event: E, callback: (data: EventData<`file/${E}`>) => void) => void;
|
|
172
|
+
};
|
|
173
|
+
export { fileCommands as file };
|
|
174
|
+
declare const filePickerCommands: {
|
|
175
|
+
close: (options?: Pick<CommandArgs<"file-picker/close">, "requestId">) => Promise<CommandResult<"file-picker/close">>;
|
|
176
|
+
open: (mode: CommandArgs<"file-picker/open">["mode"], options?: Pick<CommandArgs<"file-picker/open">, "selection" | "multiple" | "title" | "initialLocation" | "allowedVolumes" | "suggestedName" | "filters" | "confirmLabel" | "canCreateDirectories" | "overwritePrompt">) => Promise<CommandResult<"file-picker/open">>;
|
|
177
|
+
registerDisplay: () => Promise<CommandResult<"file-picker/register-display">>;
|
|
178
|
+
resolve: (requestId: CommandArgs<"file-picker/resolve">["requestId"], reason: CommandArgs<"file-picker/resolve">["reason"], options?: Pick<CommandArgs<"file-picker/resolve">, "locations">) => Promise<CommandResult<"file-picker/resolve">>;
|
|
179
|
+
subscribe: <E extends "closed" | "opened">(event: E, callback: (data: EventData<`file-picker/${E}`>) => void) => Promise<void>;
|
|
180
|
+
unsubscribe: <E extends "closed" | "opened">(event: E, callback: (data: EventData<`file-picker/${E}`>) => void) => void;
|
|
181
|
+
};
|
|
182
|
+
export { filePickerCommands as filePicker };
|
|
183
|
+
declare const fsCommands: {
|
|
184
|
+
accessScope: (volume: CommandArgs<"fs/access-scope">["volume"]) => Promise<CommandResult<"fs/access-scope">>;
|
|
185
|
+
close: (handle: CommandArgs<"fs/close">["handle"]) => Promise<CommandResult<"fs/close">>;
|
|
186
|
+
cp: (from: CommandArgs<"fs/cp">["from"], to: CommandArgs<"fs/cp">["to"], options?: Pick<CommandArgs<"fs/cp">, "overwrite"> & {
|
|
187
|
+
submission?: OperationSubmission;
|
|
188
|
+
}) => Promise<CommandResult<"fs/cp">>;
|
|
189
|
+
delete: (location: CommandArgs<"fs/delete">["location"], options?: {
|
|
190
|
+
submission?: OperationSubmission;
|
|
191
|
+
}) => Promise<CommandResult<"fs/delete">>;
|
|
192
|
+
exists: (location: CommandArgs<"fs/exists">["location"]) => Promise<CommandResult<"fs/exists">>;
|
|
193
|
+
lstat: (location: CommandArgs<"fs/lstat">["location"]) => Promise<CommandResult<"fs/lstat">>;
|
|
194
|
+
mkdir: (location: CommandArgs<"fs/mkdir">["location"]) => Promise<CommandResult<"fs/mkdir">>;
|
|
195
|
+
mv: (from: CommandArgs<"fs/mv">["from"], to: CommandArgs<"fs/mv">["to"], options?: Pick<CommandArgs<"fs/mv">, "overwrite"> & {
|
|
196
|
+
submission?: OperationSubmission;
|
|
197
|
+
}) => Promise<CommandResult<"fs/mv">>;
|
|
198
|
+
open: (location: CommandArgs<"fs/open">["location"], options?: Pick<CommandArgs<"fs/open">, "mode">) => Promise<CommandResult<"fs/open">>;
|
|
199
|
+
read: (location: CommandArgs<"fs/read">["location"], options?: Pick<CommandArgs<"fs/read">, "encoding">) => Promise<CommandResult<"fs/read">>;
|
|
200
|
+
readBinary: (location: CommandArgs<"fs/read-binary">["location"]) => Promise<CommandResult<"fs/read-binary">>;
|
|
201
|
+
readdir: (location: CommandArgs<"fs/readdir">["location"]) => Promise<CommandResult<"fs/readdir">>;
|
|
202
|
+
resolve: (location: CommandArgs<"fs/resolve">["location"]) => Promise<CommandResult<"fs/resolve">>;
|
|
203
|
+
search: (location: CommandArgs<"fs/search">["location"], pattern: CommandArgs<"fs/search">["pattern"], options?: Pick<CommandArgs<"fs/search">, "limit">) => Promise<CommandStream<"fs/search">>;
|
|
204
|
+
stat: (location: CommandArgs<"fs/stat">["location"]) => Promise<CommandResult<"fs/stat">>;
|
|
205
|
+
/**
|
|
206
|
+
* Move a Home item to Trash.
|
|
207
|
+
*/
|
|
208
|
+
trash: (location: CommandArgs<"fs/trash">["location"], options?: {
|
|
209
|
+
submission?: OperationSubmission;
|
|
210
|
+
}) => Promise<CommandResult<"fs/trash">>;
|
|
211
|
+
/**
|
|
212
|
+
* Permanently delete one Trash item.
|
|
213
|
+
*/
|
|
214
|
+
trashDelete: (id: CommandArgs<"fs/trash-delete">["id"], options?: {
|
|
215
|
+
submission?: OperationSubmission;
|
|
216
|
+
}) => Promise<CommandResult<"fs/trash-delete">>;
|
|
217
|
+
/**
|
|
218
|
+
* Permanently delete every Trash item visible to the caller.
|
|
219
|
+
*/
|
|
220
|
+
trashEmpty: (options?: {
|
|
221
|
+
submission?: OperationSubmission;
|
|
222
|
+
}) => Promise<CommandResult<"fs/trash-empty">>;
|
|
223
|
+
/**
|
|
224
|
+
* List Trash items from folders the caller can access, newest first.
|
|
225
|
+
*/
|
|
226
|
+
trashEntries: () => Promise<CommandResult<"fs/trash-entries">>;
|
|
227
|
+
/**
|
|
228
|
+
* Restore a Trash item to its original location or another destination.
|
|
229
|
+
*/
|
|
230
|
+
trashRestore: (id: CommandArgs<"fs/trash-restore">["id"], options?: Pick<CommandArgs<"fs/trash-restore">, "location"> & {
|
|
231
|
+
submission?: OperationSubmission;
|
|
232
|
+
}) => Promise<CommandResult<"fs/trash-restore">>;
|
|
233
|
+
unwatch: (watchId: CommandArgs<"fs/unwatch">["watchId"]) => Promise<CommandResult<"fs/unwatch">>;
|
|
234
|
+
watch: (location: CommandArgs<"fs/watch">["location"]) => Promise<CommandResult<"fs/watch">>;
|
|
235
|
+
write: (location: CommandArgs<"fs/write">["location"], content: CommandArgs<"fs/write">["content"], options?: Pick<CommandArgs<"fs/write">, "encoding">) => Promise<CommandResult<"fs/write">>;
|
|
236
|
+
writeBinary: (location: CommandArgs<"fs/write-binary">["location"], content: CommandArgs<"fs/write-binary">["content"]) => Promise<CommandResult<"fs/write-binary">>;
|
|
237
|
+
subscribe: <E extends "changed" | "trash-changed">(event: E, callback: (data: EventData<`fs/${E}`>) => void) => Promise<void>;
|
|
238
|
+
unsubscribe: <E extends "changed" | "trash-changed">(event: E, callback: (data: EventData<`fs/${E}`>) => void) => void;
|
|
239
|
+
};
|
|
240
|
+
export { fsCommands as fs };
|
|
241
|
+
declare const i18nCommands: {
|
|
242
|
+
getCommon: (locale: CommandArgs<"i18n/get-common">["locale"]) => Promise<CommandResult<"i18n/get-common">>;
|
|
243
|
+
getLocale: () => Promise<CommandResult<"i18n/get-locale">>;
|
|
244
|
+
subscribe: <E extends "locale-changed">(event: E, callback: (data: EventData<`i18n/${E}`>) => void) => Promise<void>;
|
|
245
|
+
unsubscribe: <E extends "locale-changed">(event: E, callback: (data: EventData<`i18n/${E}`>) => void) => void;
|
|
246
|
+
};
|
|
247
|
+
export { i18nCommands as i18n };
|
|
248
|
+
declare const notificationCommands: {
|
|
249
|
+
/**
|
|
250
|
+
* Report a notification action click from the toaster.
|
|
251
|
+
*/
|
|
252
|
+
actionClicked: (notificationId: CommandArgs<"notification/action-clicked">["notificationId"], actionId: CommandArgs<"notification/action-clicked">["actionId"]) => Promise<CommandResult<"notification/action-clicked">>;
|
|
253
|
+
/**
|
|
254
|
+
* Report a notification dismissal from the toaster.
|
|
255
|
+
*/
|
|
256
|
+
dismissed: (notificationId: CommandArgs<"notification/dismissed">["notificationId"]) => Promise<CommandResult<"notification/dismissed">>;
|
|
257
|
+
/**
|
|
258
|
+
* Push a new notification to subscribers.
|
|
259
|
+
*/
|
|
260
|
+
push: (title: CommandArgs<"notification/push">["title"], message: CommandArgs<"notification/push">["message"], options?: Pick<CommandArgs<"notification/push">, "timeout" | "type" | "actions">) => Promise<CommandResult<"notification/push">>;
|
|
261
|
+
/**
|
|
262
|
+
* Register the notification display provider.
|
|
263
|
+
*/
|
|
264
|
+
registerDisplay: () => Promise<CommandResult<"notification/register-display">>;
|
|
265
|
+
subscribe: <E extends "action-clicked" | "added" | "removed">(event: E, callback: (data: EventData<`notification/${E}`>) => void) => Promise<void>;
|
|
266
|
+
unsubscribe: <E extends "action-clicked" | "added" | "removed">(event: E, callback: (data: EventData<`notification/${E}`>) => void) => void;
|
|
267
|
+
};
|
|
268
|
+
export { notificationCommands as notification };
|
|
269
|
+
declare const operationCommands: {
|
|
270
|
+
cancel: (handle: CommandArgs<"operation/cancel">["handle"]) => Promise<CommandResult<"operation/cancel">>;
|
|
271
|
+
get: (handle: CommandArgs<"operation/get">["handle"]) => Promise<CommandResult<"operation/get">>;
|
|
272
|
+
list: () => Promise<CommandResult<"operation/list">>;
|
|
273
|
+
subscribe: <E extends "changed">(event: E, callback: (data: EventData<`operation/${E}`>) => void) => Promise<void>;
|
|
274
|
+
unsubscribe: <E extends "changed">(event: E, callback: (data: EventData<`operation/${E}`>) => void) => void;
|
|
275
|
+
};
|
|
276
|
+
export { operationCommands as operation };
|
|
277
|
+
declare const packageCommands: {
|
|
278
|
+
get: (packageId: CommandArgs<"package/get">["packageId"]) => Promise<CommandResult<"package/get">>;
|
|
279
|
+
getIcon: (packageId: CommandArgs<"package/get-icon">["packageId"]) => Promise<CommandResult<"package/get-icon">>;
|
|
280
|
+
getInfo: (location: CommandArgs<"package/get-info">["location"]) => Promise<CommandResult<"package/get-info">>;
|
|
281
|
+
getSize: (packageId: CommandArgs<"package/get-size">["packageId"]) => Promise<CommandResult<"package/get-size">>;
|
|
282
|
+
install: (source: CommandArgs<"package/install">["source"], options?: Pick<CommandArgs<"package/install">, "replace"> & {
|
|
283
|
+
submission?: OperationSubmission;
|
|
284
|
+
}) => Promise<CommandResult<"package/install">>;
|
|
285
|
+
isHotReloadEnabled: (packageId: CommandArgs<"package/is-hot-reload-enabled">["packageId"]) => Promise<CommandResult<"package/is-hot-reload-enabled">>;
|
|
286
|
+
list: (options?: Pick<CommandArgs<"package/list">, "showHidden" | "showRestricted">) => Promise<CommandResult<"package/list">>;
|
|
287
|
+
self: () => Promise<CommandResult<"package/self">>;
|
|
288
|
+
toggleHotReload: (packageId: CommandArgs<"package/toggle-hot-reload">["packageId"]) => Promise<CommandResult<"package/toggle-hot-reload">>;
|
|
289
|
+
uninstall: (packageId: CommandArgs<"package/uninstall">["packageId"], options?: {
|
|
290
|
+
submission?: OperationSubmission;
|
|
291
|
+
}) => Promise<CommandResult<"package/uninstall">>;
|
|
292
|
+
subscribe: <E extends "installed" | "uninstalled">(event: E, callback: (data: EventData<`package/${E}`>) => void) => Promise<void>;
|
|
293
|
+
unsubscribe: <E extends "installed" | "uninstalled">(event: E, callback: (data: EventData<`package/${E}`>) => void) => void;
|
|
294
|
+
};
|
|
295
|
+
export { packageCommands as package };
|
|
296
|
+
declare const processCommands: {
|
|
297
|
+
exit: (options?: {
|
|
298
|
+
submission?: OperationSubmission;
|
|
299
|
+
}) => Promise<CommandResult<"process/exit">>;
|
|
300
|
+
launch: (appId: CommandArgs<"process/launch">["appId"], options?: Pick<CommandArgs<"process/launch">, "bounds"> & {
|
|
301
|
+
submission?: OperationSubmission;
|
|
302
|
+
}) => Promise<CommandResult<"process/launch">>;
|
|
303
|
+
list: (options?: Pick<CommandArgs<"process/list">, "showHidden">) => Promise<CommandResult<"process/list">>;
|
|
304
|
+
metrics: (options?: Pick<CommandArgs<"process/metrics">, "showHidden" | "pollingTimeoutMs" | "waitForAccurateCpu">) => Promise<CommandResult<"process/metrics">>;
|
|
305
|
+
stop: (appId: CommandArgs<"process/stop">["appId"], options?: {
|
|
306
|
+
submission?: OperationSubmission;
|
|
307
|
+
}) => Promise<CommandResult<"process/stop">>;
|
|
308
|
+
subscribe: <E extends "error" | "exited" | "launched" | "reloading" | "stopped">(event: E, callback: (data: EventData<`process/${E}`>) => void) => Promise<void>;
|
|
309
|
+
unsubscribe: <E extends "error" | "exited" | "launched" | "reloading" | "stopped">(event: E, callback: (data: EventData<`process/${E}`>) => void) => void;
|
|
310
|
+
};
|
|
311
|
+
export { processCommands as process };
|
|
312
|
+
declare const sessionCommands: {
|
|
313
|
+
getCurrent: () => Promise<CommandResult<"session/get-current">>;
|
|
314
|
+
login: (username: CommandArgs<"session/login">["username"], password: CommandArgs<"session/login">["password"], options?: {
|
|
315
|
+
submission?: OperationSubmission;
|
|
316
|
+
}) => Promise<CommandResult<"session/login">>;
|
|
317
|
+
logout: (options?: {
|
|
318
|
+
submission?: OperationSubmission;
|
|
319
|
+
}) => Promise<CommandResult<"session/logout">>;
|
|
320
|
+
subscribe: <E extends "changed">(event: E, callback: (data: EventData<`session/${E}`>) => void) => Promise<void>;
|
|
321
|
+
unsubscribe: <E extends "changed">(event: E, callback: (data: EventData<`session/${E}`>) => void) => void;
|
|
322
|
+
};
|
|
323
|
+
export { sessionCommands as session };
|
|
324
|
+
declare const settingsCommands: {
|
|
325
|
+
action: (panelId: CommandArgs<"settings/action">["panelId"], actionId: CommandArgs<"settings/action">["actionId"], options?: Pick<CommandArgs<"settings/action">, "invocation">) => Promise<CommandResult<"settings/action">>;
|
|
326
|
+
/**
|
|
327
|
+
* Get a setting value (scoped to caller's app)
|
|
328
|
+
*/
|
|
329
|
+
get: (key: CommandArgs<"settings/get">["key"], options?: Pick<CommandArgs<"settings/get">, "appId">) => Promise<CommandResult<"settings/get">>;
|
|
330
|
+
/**
|
|
331
|
+
* Get all settings with values (scoped to caller's app)
|
|
332
|
+
*/
|
|
333
|
+
getAll: () => Promise<CommandResult<"settings/get-all">>;
|
|
334
|
+
/**
|
|
335
|
+
* Get all settings with values for any app (superuser only)
|
|
336
|
+
* @param showRestricted - If true, includes settings the current user cannot access (hidden by default)
|
|
337
|
+
*/
|
|
338
|
+
getAllSu: (appId: CommandArgs<"settings/get-all/su">["appId"], options?: Pick<CommandArgs<"settings/get-all/su">, "showRestricted">) => Promise<CommandResult<"settings/get-all/su">>;
|
|
339
|
+
/**
|
|
340
|
+
* Get a setting from any app's namespace (superuser only)
|
|
341
|
+
*/
|
|
342
|
+
getSu: (appId: CommandArgs<"settings/get/su">["appId"], key: CommandArgs<"settings/get/su">["key"]) => Promise<CommandResult<"settings/get/su">>;
|
|
343
|
+
/**
|
|
344
|
+
* List all settings keys (scoped to caller's app)
|
|
345
|
+
*/
|
|
346
|
+
list: () => Promise<CommandResult<"settings/list">>;
|
|
347
|
+
/**
|
|
348
|
+
* List all settings in any app's namespace (superuser only)
|
|
349
|
+
* @param showRestricted - If true, includes settings the current user cannot access (hidden by default)
|
|
350
|
+
*/
|
|
351
|
+
listSu: (appId: CommandArgs<"settings/list/su">["appId"], options?: Pick<CommandArgs<"settings/list/su">, "showRestricted">) => Promise<CommandResult<"settings/list/su">>;
|
|
352
|
+
panel: (panelId: CommandArgs<"settings/panel">["panelId"]) => Promise<CommandResult<"settings/panel">>;
|
|
353
|
+
panels: () => Promise<CommandResult<"settings/panels">>;
|
|
354
|
+
/**
|
|
355
|
+
* Reset a setting to default (scoped to caller's app)
|
|
356
|
+
*/
|
|
357
|
+
reset: (key: CommandArgs<"settings/reset">["key"], options?: Pick<CommandArgs<"settings/reset">, "schema">) => Promise<CommandResult<"settings/reset">>;
|
|
358
|
+
/**
|
|
359
|
+
* Reset a setting for any app (superuser only)
|
|
360
|
+
*/
|
|
361
|
+
resetSu: (appId: CommandArgs<"settings/reset/su">["appId"], key: CommandArgs<"settings/reset/su">["key"], options?: Pick<CommandArgs<"settings/reset/su">, "schema">) => Promise<CommandResult<"settings/reset/su">>;
|
|
362
|
+
/**
|
|
363
|
+
* Set a setting value (scoped to caller's app)
|
|
364
|
+
*/
|
|
365
|
+
set: (key: CommandArgs<"settings/set">["key"], value: CommandArgs<"settings/set">["value"]) => Promise<CommandResult<"settings/set">>;
|
|
366
|
+
/**
|
|
367
|
+
* Set a setting in any app's namespace (superuser only)
|
|
368
|
+
*/
|
|
369
|
+
setSu: (appId: CommandArgs<"settings/set/su">["appId"], key: CommandArgs<"settings/set/su">["key"], value: CommandArgs<"settings/set/su">["value"]) => Promise<CommandResult<"settings/set/su">>;
|
|
370
|
+
subscribe: <E extends "changed" | "panels-changed">(event: E, callback: (data: EventData<`settings/${E}`>) => void) => Promise<void>;
|
|
371
|
+
unsubscribe: <E extends "changed" | "panels-changed">(event: E, callback: (data: EventData<`settings/${E}`>) => void) => void;
|
|
372
|
+
};
|
|
373
|
+
export { settingsCommands as settings };
|
|
374
|
+
declare const streamCommands: {
|
|
375
|
+
/**
|
|
376
|
+
* Return credit for chunks that the caller consumed from its stream.
|
|
377
|
+
* Stream readers send this automatically.
|
|
378
|
+
*/
|
|
379
|
+
ack: (handle: CommandArgs<"stream/ack">["handle"], count: CommandArgs<"stream/ack">["count"]) => Promise<CommandResult<"stream/ack">>;
|
|
380
|
+
/**
|
|
381
|
+
* Stop a stream that the caller opened.
|
|
382
|
+
*/
|
|
383
|
+
cancel: (handle: CommandArgs<"stream/cancel">["handle"]) => Promise<CommandResult<"stream/cancel">>;
|
|
384
|
+
};
|
|
385
|
+
export { streamCommands as stream };
|
|
386
|
+
declare const systemCommands: {
|
|
387
|
+
/**
|
|
388
|
+
* Get consumer-controlled product branding for SDK-owned interfaces.
|
|
389
|
+
*/
|
|
390
|
+
branding: () => Promise<CommandResult<"system/branding">>;
|
|
391
|
+
info: () => Promise<CommandResult<"system/info">>;
|
|
392
|
+
power: (action: CommandArgs<"system/power">["action"], options?: {
|
|
393
|
+
submission?: OperationSubmission;
|
|
394
|
+
}) => Promise<CommandResult<"system/power">>;
|
|
395
|
+
powerCapabilities: () => Promise<CommandResult<"system/power-capabilities">>;
|
|
396
|
+
};
|
|
397
|
+
export { systemCommands as system };
|
|
398
|
+
declare const userCommands: {
|
|
399
|
+
changePassword: (currentPassword: CommandArgs<"user/change-password">["currentPassword"], newPassword: CommandArgs<"user/change-password">["newPassword"]) => Promise<CommandResult<"user/change-password">>;
|
|
400
|
+
create: (name: CommandArgs<"user/create">["name"], password: CommandArgs<"user/create">["password"], options?: Pick<CommandArgs<"user/create">, "username" | "role" | "grants" | "directoryRestriction">) => Promise<CommandResult<"user/create">>;
|
|
401
|
+
delete: (username: CommandArgs<"user/delete">["username"]) => Promise<CommandResult<"user/delete">>;
|
|
402
|
+
getDefault: () => Promise<CommandResult<"user/get-default">>;
|
|
403
|
+
grantOptions: () => Promise<CommandResult<"user/grant-options">>;
|
|
404
|
+
hasGrant: (grant: CommandArgs<"user/has-grant">["grant"]) => Promise<CommandResult<"user/has-grant">>;
|
|
405
|
+
list: () => Promise<CommandResult<"user/list">>;
|
|
406
|
+
setDefault: (username: CommandArgs<"user/set-default">["username"]) => Promise<CommandResult<"user/set-default">>;
|
|
407
|
+
setPassword: (username: CommandArgs<"user/set-password">["username"], password: CommandArgs<"user/set-password">["password"]) => Promise<CommandResult<"user/set-password">>;
|
|
408
|
+
update: (username: CommandArgs<"user/update">["username"], options?: Pick<CommandArgs<"user/update">, "name" | "role" | "grants" | "directoryRestriction">) => Promise<CommandResult<"user/update">>;
|
|
409
|
+
subscribe: <E extends "grant-options-changed">(event: E, callback: (data: EventData<`user/${E}`>) => void) => Promise<void>;
|
|
410
|
+
unsubscribe: <E extends "grant-options-changed">(event: E, callback: (data: EventData<`user/${E}`>) => void) => void;
|
|
411
|
+
};
|
|
412
|
+
export { userCommands as user };
|
|
413
|
+
declare const viewCommands: {
|
|
414
|
+
endDrag: () => Promise<CommandResult<"view/end-drag">>;
|
|
415
|
+
endResize: () => Promise<CommandResult<"view/end-resize">>;
|
|
416
|
+
expandTile: (direction: CommandArgs<"view/expand-tile">["direction"]) => Promise<CommandResult<"view/expand-tile">>;
|
|
417
|
+
focus: () => Promise<CommandResult<"view/focus">>;
|
|
418
|
+
focusView: (appId: CommandArgs<"view/focus-view">["appId"]) => Promise<CommandResult<"view/focus-view">>;
|
|
419
|
+
getInterfaceScale: () => Promise<CommandResult<"view/get-interface-scale">>;
|
|
420
|
+
globalMouseup: () => Promise<CommandResult<"view/global-mouseup">>;
|
|
421
|
+
setInterfaceScale: (scale: CommandArgs<"view/set-interface-scale">["scale"]) => Promise<CommandResult<"view/set-interface-scale">>;
|
|
422
|
+
setViewVisibility: (appId: CommandArgs<"view/set-view-visibility">["appId"], visible: CommandArgs<"view/set-view-visibility">["visible"]) => Promise<CommandResult<"view/set-view-visibility">>;
|
|
423
|
+
setVisibility: (visible: CommandArgs<"view/set-visibility">["visible"]) => Promise<CommandResult<"view/set-visibility">>;
|
|
424
|
+
startDrag: (startX: CommandArgs<"view/start-drag">["startX"], startY: CommandArgs<"view/start-drag">["startY"]) => Promise<CommandResult<"view/start-drag">>;
|
|
425
|
+
startResize: (startX: CommandArgs<"view/start-resize">["startX"], startY: CommandArgs<"view/start-resize">["startY"], options?: Pick<CommandArgs<"view/start-resize">, "direction">) => Promise<CommandResult<"view/start-resize">>;
|
|
426
|
+
swapTile: (direction: CommandArgs<"view/swap-tile">["direction"]) => Promise<CommandResult<"view/swap-tile">>;
|
|
427
|
+
tileLayoutState: () => Promise<CommandResult<"view/tile-layout-state">>;
|
|
428
|
+
toggleMode: (options?: Pick<CommandArgs<"view/toggle-mode">, "mode">) => Promise<CommandResult<"view/toggle-mode">>;
|
|
429
|
+
toggleViewMode: (appId: CommandArgs<"view/toggle-view-mode">["appId"], options?: Pick<CommandArgs<"view/toggle-view-mode">, "mode">) => Promise<CommandResult<"view/toggle-view-mode">>;
|
|
430
|
+
updateBounds: (bounds: CommandArgs<"view/update-bounds">["bounds"]) => Promise<CommandResult<"view/update-bounds">>;
|
|
431
|
+
updateGlobalBounds: (bounds: CommandArgs<"view/update-global-bounds">["bounds"], windowSize: CommandArgs<"view/update-global-bounds">["windowSize"]) => Promise<CommandResult<"view/update-global-bounds">>;
|
|
432
|
+
updateViewBounds: (appId: CommandArgs<"view/update-view-bounds">["appId"], bounds: CommandArgs<"view/update-view-bounds">["bounds"]) => Promise<CommandResult<"view/update-view-bounds">>;
|
|
433
|
+
windowSize: () => Promise<CommandResult<"view/window-size">>;
|
|
434
|
+
subscribe: <E extends "bounds-updated" | "global-bounds-changed" | "interface-scale-changed" | "mode-changed" | "view-load-failed" | "view-loaded" | "view-removed">(event: E, callback: (data: EventData<`view/${E}`>) => void) => Promise<void>;
|
|
435
|
+
unsubscribe: <E extends "bounds-updated" | "global-bounds-changed" | "interface-scale-changed" | "mode-changed" | "view-load-failed" | "view-loaded" | "view-removed">(event: E, callback: (data: EventData<`view/${E}`>) => void) => void;
|
|
436
|
+
};
|
|
437
|
+
export { viewCommands as view };
|
|
438
|
+
declare const volumeCommands: {
|
|
439
|
+
eject: (volume: CommandArgs<"volume/eject">["volume"], options?: {
|
|
440
|
+
submission?: OperationSubmission;
|
|
441
|
+
}) => Promise<CommandResult<"volume/eject">>;
|
|
442
|
+
list: () => Promise<CommandResult<"volume/list">>;
|
|
443
|
+
subscribe: <E extends "changed">(event: E, callback: (data: EventData<`volume/${E}`>) => void) => Promise<void>;
|
|
444
|
+
unsubscribe: <E extends "changed">(event: E, callback: (data: EventData<`volume/${E}`>) => void) => void;
|
|
445
|
+
};
|
|
446
|
+
export { volumeCommands as volume };
|
|
447
|
+
//# sourceMappingURL=commands.generated.d.ts.map
|