cyberdesk 0.1.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.
@@ -0,0 +1,12 @@
1
+ import type { ClientOptions } from './types.gen';
2
+ import { type Config, type ClientOptions as DefaultClientOptions } from '@hey-api/client-fetch';
3
+ /**
4
+ * The `createClientConfig()` function will be called on client initialization
5
+ * and the returned object will become the client's initial configuration.
6
+ *
7
+ * You may want to initialize your client this way instead of calling
8
+ * `setConfig()`. This is useful for example if you're using Next.js
9
+ * to ensure your client always has the correct values.
10
+ */
11
+ export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;
12
+ export declare const client: import("@hey-api/client-fetch").Client;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.client = void 0;
5
+ const client_fetch_1 = require("@hey-api/client-fetch");
6
+ exports.client = (0, client_fetch_1.createClient)((0, client_fetch_1.createConfig)({
7
+ baseUrl: 'https://api.cyberdesk.io'
8
+ }));
@@ -0,0 +1,2 @@
1
+ export * from './types.gen';
2
+ export * from './sdk.gen';
@@ -0,0 +1,19 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // This file is auto-generated by @hey-api/openapi-ts
18
+ __exportStar(require("./types.gen"), exports);
19
+ __exportStar(require("./sdk.gen"), exports);
@@ -0,0 +1,65 @@
1
+ import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
2
+ import type { GetV1DesktopIdData, GetV1DesktopIdError, PostV1DesktopData, PostV1DesktopError, PostV1DesktopIdStopData, PostV1DesktopIdStopError, PostV1DesktopIdComputerActionData, PostV1DesktopIdComputerActionError, PostV1DesktopIdBashActionData, PostV1DesktopIdBashActionError } from './types.gen';
3
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
4
+ /**
5
+ * You can provide a client instance returned by `createClient()` instead of
6
+ * individual options. This might be also useful if you want to implement a
7
+ * custom client.
8
+ */
9
+ client?: Client;
10
+ /**
11
+ * You can pass arbitrary values through the `meta` object. This can be
12
+ * used to access values that aren't defined as part of the SDK function.
13
+ */
14
+ meta?: Record<string, unknown>;
15
+ };
16
+ /**
17
+ * Get details of a specific desktop instance
18
+ * Returns the ID, status, creation timestamp, and timeout timestamp for a given desktop instance.
19
+ */
20
+ export declare const getV1DesktopId: <ThrowOnError extends boolean = false>(options: Options<GetV1DesktopIdData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
21
+ id: string;
22
+ status: "pending" | "running" | "terminated" | "error";
23
+ createdAt: string;
24
+ timeoutAt: string;
25
+ }, GetV1DesktopIdError, ThrowOnError>;
26
+ /**
27
+ * Create a new virtual desktop instance
28
+ * Creates a new virtual desktop instance and returns its ID and stream URL
29
+ */
30
+ export declare const postV1Desktop: <ThrowOnError extends boolean = false>(options: Options<PostV1DesktopData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
31
+ id: string;
32
+ streamUrl: string;
33
+ }, PostV1DesktopError, ThrowOnError>;
34
+ /**
35
+ * Stop a running desktop instance
36
+ * Stops a running desktop instance and cleans up resources
37
+ */
38
+ export declare const postV1DesktopIdStop: <ThrowOnError extends boolean = false>(options: Options<PostV1DesktopIdStopData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
39
+ status: string;
40
+ image?: string;
41
+ cursorPosition?: {
42
+ x?: number;
43
+ y?: number;
44
+ };
45
+ }, PostV1DesktopIdStopError, ThrowOnError>;
46
+ /**
47
+ * Perform an action on the desktop
48
+ * Executes a computer action such as mouse clicks, keyboard input, or screenshots on the desktop
49
+ */
50
+ export declare const postV1DesktopIdComputerAction: <ThrowOnError extends boolean = false>(options: Options<PostV1DesktopIdComputerActionData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
51
+ status: string;
52
+ image?: string;
53
+ cursorPosition?: {
54
+ x?: number;
55
+ y?: number;
56
+ };
57
+ }, PostV1DesktopIdComputerActionError, ThrowOnError>;
58
+ /**
59
+ * Execute a bash command on the desktop
60
+ * Runs a bash command on the desktop and returns the command output
61
+ */
62
+ export declare const postV1DesktopIdBashAction: <ThrowOnError extends boolean = false>(options: Options<PostV1DesktopIdBashActionData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
63
+ status: string;
64
+ output: string;
65
+ }, PostV1DesktopIdBashActionError, ThrowOnError>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.postV1DesktopIdBashAction = exports.postV1DesktopIdComputerAction = exports.postV1DesktopIdStop = exports.postV1Desktop = exports.getV1DesktopId = void 0;
5
+ const client_gen_1 = require("./client.gen");
6
+ /**
7
+ * Get details of a specific desktop instance
8
+ * Returns the ID, status, creation timestamp, and timeout timestamp for a given desktop instance.
9
+ */
10
+ const getV1DesktopId = (options) => {
11
+ var _a;
12
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ url: '/v1/desktop/:id' }, options));
13
+ };
14
+ exports.getV1DesktopId = getV1DesktopId;
15
+ /**
16
+ * Create a new virtual desktop instance
17
+ * Creates a new virtual desktop instance and returns its ID and stream URL
18
+ */
19
+ const postV1Desktop = (options) => {
20
+ var _a;
21
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ url: '/v1/desktop' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
22
+ };
23
+ exports.postV1Desktop = postV1Desktop;
24
+ /**
25
+ * Stop a running desktop instance
26
+ * Stops a running desktop instance and cleans up resources
27
+ */
28
+ const postV1DesktopIdStop = (options) => {
29
+ var _a;
30
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign({ url: '/v1/desktop/:id/stop' }, options));
31
+ };
32
+ exports.postV1DesktopIdStop = postV1DesktopIdStop;
33
+ /**
34
+ * Perform an action on the desktop
35
+ * Executes a computer action such as mouse clicks, keyboard input, or screenshots on the desktop
36
+ */
37
+ const postV1DesktopIdComputerAction = (options) => {
38
+ var _a;
39
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ url: '/v1/desktop/:id/computer-action' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
40
+ };
41
+ exports.postV1DesktopIdComputerAction = postV1DesktopIdComputerAction;
42
+ /**
43
+ * Execute a bash command on the desktop
44
+ * Runs a bash command on the desktop and returns the command output
45
+ */
46
+ const postV1DesktopIdBashAction = (options) => {
47
+ var _a;
48
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ url: '/v1/desktop/:id/bash-action' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
49
+ };
50
+ exports.postV1DesktopIdBashAction = postV1DesktopIdBashAction;
@@ -0,0 +1,587 @@
1
+ export type GetV1DesktopIdData = {
2
+ body?: never;
3
+ headers: {
4
+ /**
5
+ * API key for authentication
6
+ */
7
+ 'x-api-key': string;
8
+ };
9
+ path: {
10
+ /**
11
+ * The UUID of the desktop instance to retrieve
12
+ */
13
+ id: string;
14
+ };
15
+ query?: never;
16
+ url: '/v1/desktop/:id';
17
+ };
18
+ export type GetV1DesktopIdErrors = {
19
+ /**
20
+ * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
21
+ */
22
+ 400: {
23
+ message: string;
24
+ docs: string;
25
+ };
26
+ /**
27
+ * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
28
+ */
29
+ 401: {
30
+ message: string;
31
+ docs: string;
32
+ };
33
+ /**
34
+ * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
35
+ */
36
+ 403: {
37
+ message: string;
38
+ docs: string;
39
+ };
40
+ /**
41
+ * The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.
42
+ */
43
+ 404: {
44
+ message: string;
45
+ docs: string;
46
+ };
47
+ /**
48
+ * This response is sent when a request conflicts with the current state of the server.
49
+ */
50
+ 409: {
51
+ message: string;
52
+ docs: string;
53
+ };
54
+ /**
55
+ * The user has sent too many requests in a given amount of time ("rate limiting")
56
+ */
57
+ 429: {
58
+ message: string;
59
+ docs: string;
60
+ };
61
+ /**
62
+ * The server has encountered a situation it does not know how to handle.
63
+ */
64
+ 500: {
65
+ message: string;
66
+ docs: string;
67
+ };
68
+ };
69
+ export type GetV1DesktopIdError = GetV1DesktopIdErrors[keyof GetV1DesktopIdErrors];
70
+ export type GetV1DesktopIdResponses = {
71
+ /**
72
+ * Desktop instance details retrieved successfully
73
+ */
74
+ 200: {
75
+ /**
76
+ * Unique identifier for the desktop instance
77
+ */
78
+ id: string;
79
+ /**
80
+ * Current status of the desktop instance
81
+ */
82
+ status: 'pending' | 'running' | 'terminated' | 'error';
83
+ /**
84
+ * Timestamp when the instance was created
85
+ */
86
+ createdAt: string;
87
+ /**
88
+ * Timestamp when the instance will automatically time out
89
+ */
90
+ timeoutAt: string;
91
+ };
92
+ };
93
+ export type GetV1DesktopIdResponse = GetV1DesktopIdResponses[keyof GetV1DesktopIdResponses];
94
+ export type PostV1DesktopData = {
95
+ body?: {
96
+ /**
97
+ * Timeout in milliseconds for the desktop session
98
+ */
99
+ timeoutMs?: number;
100
+ };
101
+ headers: {
102
+ /**
103
+ * API key for authentication
104
+ */
105
+ 'x-api-key': string;
106
+ };
107
+ path?: never;
108
+ query?: never;
109
+ url: '/v1/desktop';
110
+ };
111
+ export type PostV1DesktopErrors = {
112
+ /**
113
+ * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
114
+ */
115
+ 400: {
116
+ message: string;
117
+ docs: string;
118
+ };
119
+ /**
120
+ * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
121
+ */
122
+ 401: {
123
+ message: string;
124
+ docs: string;
125
+ };
126
+ /**
127
+ * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
128
+ */
129
+ 403: {
130
+ message: string;
131
+ docs: string;
132
+ };
133
+ /**
134
+ * The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.
135
+ */
136
+ 404: {
137
+ message: string;
138
+ docs: string;
139
+ };
140
+ /**
141
+ * This response is sent when a request conflicts with the current state of the server.
142
+ */
143
+ 409: {
144
+ message: string;
145
+ docs: string;
146
+ };
147
+ /**
148
+ * The user has sent too many requests in a given amount of time ("rate limiting")
149
+ */
150
+ 429: {
151
+ message: string;
152
+ docs: string;
153
+ };
154
+ /**
155
+ * The server has encountered a situation it does not know how to handle.
156
+ */
157
+ 500: {
158
+ message: string;
159
+ docs: string;
160
+ };
161
+ };
162
+ export type PostV1DesktopError = PostV1DesktopErrors[keyof PostV1DesktopErrors];
163
+ export type PostV1DesktopResponses = {
164
+ /**
165
+ * Desktop created successfully
166
+ */
167
+ 200: {
168
+ /**
169
+ * Unique identifier for the desktop instance
170
+ */
171
+ id: string;
172
+ /**
173
+ * URL to stream the desktop via VNC
174
+ */
175
+ streamUrl: string;
176
+ };
177
+ };
178
+ export type PostV1DesktopResponse = PostV1DesktopResponses[keyof PostV1DesktopResponses];
179
+ export type PostV1DesktopIdStopData = {
180
+ body?: never;
181
+ headers: {
182
+ /**
183
+ * API key for authentication
184
+ */
185
+ 'x-api-key': string;
186
+ };
187
+ path: {
188
+ /**
189
+ * Desktop instance ID to stop
190
+ */
191
+ id: string;
192
+ };
193
+ query?: never;
194
+ url: '/v1/desktop/:id/stop';
195
+ };
196
+ export type PostV1DesktopIdStopErrors = {
197
+ /**
198
+ * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
199
+ */
200
+ 400: {
201
+ message: string;
202
+ docs: string;
203
+ };
204
+ /**
205
+ * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
206
+ */
207
+ 401: {
208
+ message: string;
209
+ docs: string;
210
+ };
211
+ /**
212
+ * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
213
+ */
214
+ 403: {
215
+ message: string;
216
+ docs: string;
217
+ };
218
+ /**
219
+ * The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.
220
+ */
221
+ 404: {
222
+ message: string;
223
+ docs: string;
224
+ };
225
+ /**
226
+ * This response is sent when a request conflicts with the current state of the server.
227
+ */
228
+ 409: {
229
+ message: string;
230
+ docs: string;
231
+ };
232
+ /**
233
+ * The user has sent too many requests in a given amount of time ("rate limiting")
234
+ */
235
+ 429: {
236
+ message: string;
237
+ docs: string;
238
+ };
239
+ /**
240
+ * The server has encountered a situation it does not know how to handle.
241
+ */
242
+ 500: {
243
+ message: string;
244
+ docs: string;
245
+ };
246
+ };
247
+ export type PostV1DesktopIdStopError = PostV1DesktopIdStopErrors[keyof PostV1DesktopIdStopErrors];
248
+ export type PostV1DesktopIdStopResponses = {
249
+ /**
250
+ * Desktop stopped successfully
251
+ */
252
+ 200: {
253
+ /**
254
+ * Status of the operation
255
+ */
256
+ status: string;
257
+ /**
258
+ * Base64 encoded image data (only returned for screenshot actions)
259
+ */
260
+ image?: string;
261
+ /**
262
+ * Current cursor coordinates (only returned for get_cursor_position action)
263
+ */
264
+ cursorPosition?: {
265
+ /**
266
+ * X coordinate on the screen
267
+ */
268
+ x?: number;
269
+ /**
270
+ * Y coordinate on the screen
271
+ */
272
+ y?: number;
273
+ };
274
+ };
275
+ };
276
+ export type PostV1DesktopIdStopResponse = PostV1DesktopIdStopResponses[keyof PostV1DesktopIdStopResponses];
277
+ export type PostV1DesktopIdComputerActionData = {
278
+ body?: {
279
+ /**
280
+ * Perform a mouse action: click, press (down), or release (up). Defaults to a single left click at the current position.
281
+ */
282
+ type: 'click_mouse';
283
+ /**
284
+ * X coordinate for the action (optional, uses current position if omitted)
285
+ */
286
+ x?: number;
287
+ /**
288
+ * Y coordinate for the action (optional, uses current position if omitted)
289
+ */
290
+ y?: number;
291
+ /**
292
+ * Mouse button to use (optional, defaults to 'left')
293
+ */
294
+ button?: 'left' | 'right' | 'middle';
295
+ /**
296
+ * Number of clicks to perform (optional, defaults to 1, only applicable for 'click' type)
297
+ */
298
+ num_of_clicks?: number;
299
+ /**
300
+ * Type of mouse action (optional, defaults to 'click')
301
+ */
302
+ click_type?: 'click' | 'down' | 'up';
303
+ } | {
304
+ /**
305
+ * Scroll the mouse wheel in the specified direction
306
+ */
307
+ type: 'scroll';
308
+ /**
309
+ * Direction to scroll
310
+ */
311
+ direction: 'up' | 'down' | 'left' | 'right';
312
+ /**
313
+ * Amount to scroll in pixels
314
+ */
315
+ amount: number;
316
+ } | {
317
+ /**
318
+ * Move the mouse cursor to the specified coordinates
319
+ */
320
+ type: 'move_mouse';
321
+ /**
322
+ * X coordinate to move to
323
+ */
324
+ x: number;
325
+ /**
326
+ * Y coordinate to move to
327
+ */
328
+ y: number;
329
+ } | {
330
+ /**
331
+ * Drag the mouse from start to end coordinates
332
+ */
333
+ type: 'drag_mouse';
334
+ /**
335
+ * Starting coordinates for the drag operation
336
+ */
337
+ start: {
338
+ /**
339
+ * X coordinate on the screen
340
+ */
341
+ x: number;
342
+ /**
343
+ * Y coordinate on the screen
344
+ */
345
+ y: number;
346
+ };
347
+ /**
348
+ * Ending coordinates for the drag operation
349
+ */
350
+ end: {
351
+ /**
352
+ * X coordinate on the screen
353
+ */
354
+ x: number;
355
+ /**
356
+ * Y coordinate on the screen
357
+ */
358
+ y: number;
359
+ };
360
+ } | {
361
+ /**
362
+ * Type text at the current cursor position
363
+ */
364
+ type: 'type';
365
+ /**
366
+ * Text to type
367
+ */
368
+ text: string;
369
+ } | {
370
+ /**
371
+ * Press, hold down, or release one or more keyboard keys. Defaults to a single press and release.
372
+ */
373
+ type: 'press_keys';
374
+ keys: string | Array<string>;
375
+ /**
376
+ * Type of key action (optional, defaults to 'press' which is a down and up action)
377
+ */
378
+ key_action_type?: 'press' | 'down' | 'up';
379
+ } | {
380
+ /**
381
+ * Wait for the specified number of milliseconds
382
+ */
383
+ type: 'wait';
384
+ /**
385
+ * Time to wait in milliseconds
386
+ */
387
+ ms: number;
388
+ } | {
389
+ /**
390
+ * Take a screenshot of the desktop
391
+ */
392
+ type: 'screenshot';
393
+ } | {
394
+ /**
395
+ * Get the current mouse cursor position
396
+ */
397
+ type: 'get_cursor_position';
398
+ };
399
+ headers: {
400
+ /**
401
+ * API key for authentication
402
+ */
403
+ 'x-api-key': string;
404
+ };
405
+ path: {
406
+ /**
407
+ * Desktop instance ID to perform the action on
408
+ */
409
+ id: string;
410
+ };
411
+ query?: never;
412
+ url: '/v1/desktop/:id/computer-action';
413
+ };
414
+ export type PostV1DesktopIdComputerActionErrors = {
415
+ /**
416
+ * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
417
+ */
418
+ 400: {
419
+ message: string;
420
+ docs: string;
421
+ };
422
+ /**
423
+ * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
424
+ */
425
+ 401: {
426
+ message: string;
427
+ docs: string;
428
+ };
429
+ /**
430
+ * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
431
+ */
432
+ 403: {
433
+ message: string;
434
+ docs: string;
435
+ };
436
+ /**
437
+ * The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.
438
+ */
439
+ 404: {
440
+ message: string;
441
+ docs: string;
442
+ };
443
+ /**
444
+ * This response is sent when a request conflicts with the current state of the server.
445
+ */
446
+ 409: {
447
+ message: string;
448
+ docs: string;
449
+ };
450
+ /**
451
+ * The user has sent too many requests in a given amount of time ("rate limiting")
452
+ */
453
+ 429: {
454
+ message: string;
455
+ docs: string;
456
+ };
457
+ /**
458
+ * The server has encountered a situation it does not know how to handle.
459
+ */
460
+ 500: {
461
+ message: string;
462
+ docs: string;
463
+ };
464
+ };
465
+ export type PostV1DesktopIdComputerActionError = PostV1DesktopIdComputerActionErrors[keyof PostV1DesktopIdComputerActionErrors];
466
+ export type PostV1DesktopIdComputerActionResponses = {
467
+ /**
468
+ * Action executed successfully
469
+ */
470
+ 200: {
471
+ /**
472
+ * Status of the operation
473
+ */
474
+ status: string;
475
+ /**
476
+ * Base64 encoded image data (only returned for screenshot actions)
477
+ */
478
+ image?: string;
479
+ /**
480
+ * Current cursor coordinates (only returned for get_cursor_position action)
481
+ */
482
+ cursorPosition?: {
483
+ /**
484
+ * X coordinate on the screen
485
+ */
486
+ x?: number;
487
+ /**
488
+ * Y coordinate on the screen
489
+ */
490
+ y?: number;
491
+ };
492
+ };
493
+ };
494
+ export type PostV1DesktopIdComputerActionResponse = PostV1DesktopIdComputerActionResponses[keyof PostV1DesktopIdComputerActionResponses];
495
+ export type PostV1DesktopIdBashActionData = {
496
+ body?: {
497
+ /**
498
+ * Bash command to execute
499
+ */
500
+ command: string;
501
+ };
502
+ headers: {
503
+ /**
504
+ * API key for authentication
505
+ */
506
+ 'x-api-key': string;
507
+ };
508
+ path: {
509
+ /**
510
+ * Desktop instance ID to run the command on
511
+ */
512
+ id: string;
513
+ };
514
+ query?: never;
515
+ url: '/v1/desktop/:id/bash-action';
516
+ };
517
+ export type PostV1DesktopIdBashActionErrors = {
518
+ /**
519
+ * The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
520
+ */
521
+ 400: {
522
+ message: string;
523
+ docs: string;
524
+ };
525
+ /**
526
+ * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
527
+ */
528
+ 401: {
529
+ message: string;
530
+ docs: string;
531
+ };
532
+ /**
533
+ * The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
534
+ */
535
+ 403: {
536
+ message: string;
537
+ docs: string;
538
+ };
539
+ /**
540
+ * The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.
541
+ */
542
+ 404: {
543
+ message: string;
544
+ docs: string;
545
+ };
546
+ /**
547
+ * This response is sent when a request conflicts with the current state of the server.
548
+ */
549
+ 409: {
550
+ message: string;
551
+ docs: string;
552
+ };
553
+ /**
554
+ * The user has sent too many requests in a given amount of time ("rate limiting")
555
+ */
556
+ 429: {
557
+ message: string;
558
+ docs: string;
559
+ };
560
+ /**
561
+ * The server has encountered a situation it does not know how to handle.
562
+ */
563
+ 500: {
564
+ message: string;
565
+ docs: string;
566
+ };
567
+ };
568
+ export type PostV1DesktopIdBashActionError = PostV1DesktopIdBashActionErrors[keyof PostV1DesktopIdBashActionErrors];
569
+ export type PostV1DesktopIdBashActionResponses = {
570
+ /**
571
+ * Command executed successfully
572
+ */
573
+ 200: {
574
+ /**
575
+ * Status of the bash command execution
576
+ */
577
+ status: string;
578
+ /**
579
+ * Output from the bash command execution
580
+ */
581
+ output: string;
582
+ };
583
+ };
584
+ export type PostV1DesktopIdBashActionResponse = PostV1DesktopIdBashActionResponses[keyof PostV1DesktopIdBashActionResponses];
585
+ export type ClientOptions = {
586
+ baseUrl: 'https://api.cyberdesk.io' | (string & {});
587
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "cyberdesk",
3
+ "version": "0.1.0",
4
+ "description": "The official TypeScript SDK for Cyberdesk",
5
+ "main": "dist/client/index.js",
6
+ "types": "dist/client/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "LICENSE",
10
+ "README.md"
11
+ ],
12
+ "scripts": {
13
+ "generate": "openapi-ts",
14
+ "build": "npm run generate && tsc",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/cyberdesk-hq/cyberdesk.git"
20
+ },
21
+ "license": "MIT",
22
+ "author": "Cyberdesk Team <dev@cyberdesk.io>",
23
+ "bugs": {
24
+ "url": "https://github.com/cyberdesk-hq/cyberdesk/issues"
25
+ },
26
+ "homepage": "https://github.com/cyberdesk-hq/cyberdesk#readme",
27
+ "dependencies": {
28
+ "@hey-api/client-fetch": "^0.10.0"
29
+ },
30
+ "devDependencies": {
31
+ "@hey-api/openapi-ts": "^0.66.6",
32
+ "typescript": "^5.0.0"
33
+ }
34
+ }