cyberdesk 1.8.0 → 1.9.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/README.md CHANGED
@@ -10,28 +10,48 @@ npm install cyberdesk
10
10
 
11
11
  ## Quick Start
12
12
 
13
+ The most common use case is to execute workflows that you've created in the [Cyberdesk Dashboard](https://cyberdesk.io/dashboard).
14
+
13
15
  ```typescript
14
16
  import { createCyberdeskClient } from 'cyberdesk';
15
17
 
16
18
  // Initialize client with your API key
17
19
  const client = createCyberdeskClient('your-api-key');
18
20
 
19
- // List machines with full type safety
20
- const { data } = await client.machines.list({
21
- status: 'connected', // ✅ Typed enum
22
- limit: 10
23
- });
24
-
25
- // Create a workflow
26
- const workflow = await client.workflows.create({
27
- main_prompt: "Automate my tasks",
28
- cleanup_prompt: "Clean up afterwards"
21
+ // Create a run for your workflow
22
+ const { data: run } = await client.runs.create({
23
+ workflow_id: 'your-workflow-id',
24
+ machine_id: 'your-machine-id',
25
+ input_values: {
26
+ // Your workflow-specific input data
27
+ patient_id: '12345',
28
+ patient_first_name: 'John',
29
+ patient_last_name: 'Doe'
30
+ }
29
31
  });
30
32
 
31
- // All responses are fully typed!
32
- console.log(data?.items); // MachineResponse[]
33
+ // Wait for the run to complete
34
+ let status = run.status;
35
+ while (status === 'scheduling' || status === 'running') {
36
+ await new Promise(resolve => setTimeout(resolve, 5000)); // Wait 5 seconds
37
+ const { data: updatedRun } = await client.runs.get(run.id);
38
+ status = updatedRun.status;
39
+ }
40
+
41
+ // Get the output data
42
+ if (status === 'success') {
43
+ console.log('Result:', updatedRun.output_data);
44
+ } else {
45
+ console.error('Run failed:', updatedRun.error?.join(', '));
46
+ }
33
47
  ```
34
48
 
49
+ ## Full Documentation
50
+
51
+ For complete documentation including advanced usage, error handling, and all available methods, visit:
52
+
53
+ **[https://docs.cyberdesk.io/sdk-guides/typescript](https://docs.cyberdesk.io/sdk-guides/typescript)**
54
+
35
55
  ## Custom Base URL
36
56
 
37
57
  ```typescript
@@ -3,4 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.client = void 0;
5
5
  const client_fetch_1 = require("@hey-api/client-fetch");
6
- exports.client = (0, client_fetch_1.createClient)((0, client_fetch_1.createConfig)());
6
+ exports.client = (0, client_fetch_1.createClient)((0, client_fetch_1.createConfig)({
7
+ baseUrl: 'https://api.cyberdesk.io'
8
+ }));
@@ -1,5 +1,5 @@
1
1
  import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
2
- import type { HealthCheckV1HealthGetData, DatabaseHealthCheckV1HealthDbGetData, ListMachinesV1MachinesGetData, CreateMachineV1MachinesPostData, DeleteMachineV1MachinesMachineIdDeleteData, GetMachineV1MachinesMachineIdGetData, UpdateMachineV1MachinesMachineIdPatchData, ListWorkflowsV1WorkflowsGetData, CreateWorkflowV1WorkflowsPostData, DeleteWorkflowV1WorkflowsWorkflowIdDeleteData, GetWorkflowV1WorkflowsWorkflowIdGetData, UpdateWorkflowV1WorkflowsWorkflowIdPatchData, GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetData, ListRunsV1RunsGetData, CreateRunV1RunsPostData, DeleteRunV1RunsRunIdDeleteData, GetRunV1RunsRunIdGetData, UpdateRunV1RunsRunIdPatchData, ListConnectionsV1ConnectionsGetData, CreateConnectionV1ConnectionsPostData, DeleteConnectionV1ConnectionsConnectionIdDeleteData, GetConnectionV1ConnectionsConnectionIdGetData, UpdateConnectionV1ConnectionsConnectionIdPatchData, ListRequestLogsV1RequestLogsGetData, CreateRequestLogV1RequestLogsPostData, DeleteRequestLogV1RequestLogsLogIdDeleteData, GetRequestLogV1RequestLogsLogIdGetData, UpdateRequestLogV1RequestLogsLogIdPatchData, ListTrajectoriesV1TrajectoriesGetData, CreateTrajectoryV1TrajectoriesPostData, DeleteTrajectoryV1TrajectoriesTrajectoryIdDeleteData, GetTrajectoryV1TrajectoriesTrajectoryIdGetData, UpdateTrajectoryV1TrajectoriesTrajectoryIdPatchData, GetLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGetData, GetScreenshotV1ComputerMachineIdDisplayScreenshotGetData, GetDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGetData, KeyboardTypeV1ComputerMachineIdInputKeyboardTypePostData, KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostData, GetMousePositionV1ComputerMachineIdInputMousePositionGetData, MouseMoveV1ComputerMachineIdInputMouseMovePostData, MouseClickV1ComputerMachineIdInputMouseClickPostData, DummyTestEndpointV1TestPostData, RootGetData } from './types.gen';
2
+ import type { HealthCheckV1HealthGetData, DatabaseHealthCheckV1HealthDbGetData, ListMachinesV1MachinesGetData, CreateMachineV1MachinesPostData, DeleteMachineV1MachinesMachineIdDeleteData, GetMachineV1MachinesMachineIdGetData, UpdateMachineV1MachinesMachineIdPatchData, ListWorkflowsV1WorkflowsGetData, CreateWorkflowV1WorkflowsPostData, DeleteWorkflowV1WorkflowsWorkflowIdDeleteData, GetWorkflowV1WorkflowsWorkflowIdGetData, UpdateWorkflowV1WorkflowsWorkflowIdPatchData, GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetData, ListRunsV1RunsGetData, CreateRunV1RunsPostData, DeleteRunV1RunsRunIdDeleteData, GetRunV1RunsRunIdGetData, UpdateRunV1RunsRunIdPatchData, ListRunAttachmentsV1RunAttachmentsGetData, CreateRunAttachmentV1RunAttachmentsPostData, DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteData, GetRunAttachmentV1RunAttachmentsAttachmentIdGetData, UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutData, DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetData, ListConnectionsV1ConnectionsGetData, CreateConnectionV1ConnectionsPostData, DeleteConnectionV1ConnectionsConnectionIdDeleteData, GetConnectionV1ConnectionsConnectionIdGetData, UpdateConnectionV1ConnectionsConnectionIdPatchData, ListRequestLogsV1RequestLogsGetData, CreateRequestLogV1RequestLogsPostData, DeleteRequestLogV1RequestLogsLogIdDeleteData, GetRequestLogV1RequestLogsLogIdGetData, UpdateRequestLogV1RequestLogsLogIdPatchData, ListTrajectoriesV1TrajectoriesGetData, CreateTrajectoryV1TrajectoriesPostData, DeleteTrajectoryV1TrajectoriesTrajectoryIdDeleteData, GetTrajectoryV1TrajectoriesTrajectoryIdGetData, UpdateTrajectoryV1TrajectoriesTrajectoryIdPatchData, GetLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGetData, GetScreenshotV1ComputerMachineIdDisplayScreenshotGetData, GetDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGetData, KeyboardTypeV1ComputerMachineIdInputKeyboardTypePostData, KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostData, GetMousePositionV1ComputerMachineIdInputMousePositionGetData, MouseMoveV1ComputerMachineIdInputMouseMovePostData, MouseClickV1ComputerMachineIdInputMouseClickPostData, FsListV1ComputerMachineIdFsListGetData, FsReadV1ComputerMachineIdFsReadGetData, FsWriteV1ComputerMachineIdFsWritePostData, PowershellExecV1ComputerMachineIdShellPowershellExecPostData, PowershellSessionV1ComputerMachineIdShellPowershellSessionPostData, DummyTestEndpointV1TestPostData, RootGetData } from './types.gen';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -157,6 +157,49 @@ export declare const getRunV1RunsRunIdGet: <ThrowOnError extends boolean = false
157
157
  * The run must belong to the authenticated user.
158
158
  */
159
159
  export declare const updateRunV1RunsRunIdPatch: <ThrowOnError extends boolean = false>(options: Options<UpdateRunV1RunsRunIdPatchData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RunResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
160
+ /**
161
+ * List Run Attachments
162
+ * List all run attachments for the authenticated user.
163
+ *
164
+ * Supports pagination and filtering by run ID and attachment type.
165
+ */
166
+ export declare const listRunAttachmentsV1RunAttachmentsGet: <ThrowOnError extends boolean = false>(options?: Options<ListRunAttachmentsV1RunAttachmentsGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").PaginatedResponseRunAttachmentResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
167
+ /**
168
+ * Create Run Attachment
169
+ * Create a new run attachment.
170
+ *
171
+ * This endpoint is primarily for internal use. File uploads typically happen
172
+ * through the run creation endpoint.
173
+ */
174
+ export declare const createRunAttachmentV1RunAttachmentsPost: <ThrowOnError extends boolean = false>(options: Options<CreateRunAttachmentV1RunAttachmentsPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RunAttachmentResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
175
+ /**
176
+ * Delete Run Attachment
177
+ * Delete a run attachment.
178
+ *
179
+ * This will remove both the database record and the file from Supabase storage.
180
+ */
181
+ export declare const deleteRunAttachmentV1RunAttachmentsAttachmentIdDelete: <ThrowOnError extends boolean = false>(options: Options<DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, import("./types.gen").HttpValidationError, ThrowOnError>;
182
+ /**
183
+ * Get Run Attachment
184
+ * Get a specific run attachment by ID.
185
+ *
186
+ * Returns attachment metadata only. Use the download endpoint to get file content.
187
+ */
188
+ export declare const getRunAttachmentV1RunAttachmentsAttachmentIdGet: <ThrowOnError extends boolean = false>(options: Options<GetRunAttachmentV1RunAttachmentsAttachmentIdGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RunAttachmentResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
189
+ /**
190
+ * Update Run Attachment
191
+ * Update a run attachment.
192
+ *
193
+ * Currently only supports updating the expiration date.
194
+ */
195
+ export declare const updateRunAttachmentV1RunAttachmentsAttachmentIdPut: <ThrowOnError extends boolean = false>(options: Options<UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RunAttachmentResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
196
+ /**
197
+ * Download Run Attachment
198
+ * Download a run attachment file.
199
+ *
200
+ * Returns the file content as a streaming response.
201
+ */
202
+ export declare const downloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGet: <ThrowOnError extends boolean = false>(options: Options<DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, import("./types.gen").HttpValidationError, ThrowOnError>;
160
203
  /**
161
204
  * List Connections
162
205
  * List all connections for the authenticated user's machines.
@@ -315,6 +358,41 @@ export declare const mouseMoveV1ComputerMachineIdInputMouseMovePost: <ThrowOnErr
315
358
  * If coordinates are not provided, clicks at current position.
316
359
  */
317
360
  export declare const mouseClickV1ComputerMachineIdInputMouseClickPost: <ThrowOnError extends boolean = false>(options: Options<MouseClickV1ComputerMachineIdInputMouseClickPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, import("./types.gen").HttpValidationError, ThrowOnError>;
361
+ /**
362
+ * List directory contents
363
+ * List directory contents on the machine.
364
+ */
365
+ export declare const fsListV1ComputerMachineIdFsListGet: <ThrowOnError extends boolean = false>(options: Options<FsListV1ComputerMachineIdFsListGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
366
+ [key: string]: unknown;
367
+ }, import("./types.gen").HttpValidationError, ThrowOnError>;
368
+ /**
369
+ * Read file contents
370
+ * Read file contents from the machine (base64 encoded).
371
+ */
372
+ export declare const fsReadV1ComputerMachineIdFsReadGet: <ThrowOnError extends boolean = false>(options: Options<FsReadV1ComputerMachineIdFsReadGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
373
+ [key: string]: unknown;
374
+ }, import("./types.gen").HttpValidationError, ThrowOnError>;
375
+ /**
376
+ * Write file contents
377
+ * Write file contents to the machine.
378
+ */
379
+ export declare const fsWriteV1ComputerMachineIdFsWritePost: <ThrowOnError extends boolean = false>(options: Options<FsWriteV1ComputerMachineIdFsWritePostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
380
+ [key: string]: unknown;
381
+ }, import("./types.gen").HttpValidationError, ThrowOnError>;
382
+ /**
383
+ * Execute PowerShell command
384
+ * Execute PowerShell command on the machine.
385
+ */
386
+ export declare const powershellExecV1ComputerMachineIdShellPowershellExecPost: <ThrowOnError extends boolean = false>(options: Options<PowershellExecV1ComputerMachineIdShellPowershellExecPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
387
+ [key: string]: unknown;
388
+ }, import("./types.gen").HttpValidationError, ThrowOnError>;
389
+ /**
390
+ * Manage PowerShell session
391
+ * Create or destroy PowerShell sessions on the machine.
392
+ */
393
+ export declare const powershellSessionV1ComputerMachineIdShellPowershellSessionPost: <ThrowOnError extends boolean = false>(options: Options<PowershellSessionV1ComputerMachineIdShellPowershellSessionPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
394
+ [key: string]: unknown;
395
+ }, import("./types.gen").HttpValidationError, ThrowOnError>;
318
396
  /**
319
397
  * Dummy Test Endpoint
320
398
  * Test endpoint that performs a sequence of actions:
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  // This file is auto-generated by @hey-api/openapi-ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.rootGet = exports.dummyTestEndpointV1TestPost = exports.mouseClickV1ComputerMachineIdInputMouseClickPost = exports.mouseMoveV1ComputerMachineIdInputMouseMovePost = exports.getMousePositionV1ComputerMachineIdInputMousePositionGet = exports.keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = exports.keyboardTypeV1ComputerMachineIdInputKeyboardTypePost = exports.getDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGet = exports.getScreenshotV1ComputerMachineIdDisplayScreenshotGet = exports.getLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGet = exports.updateTrajectoryV1TrajectoriesTrajectoryIdPatch = exports.getTrajectoryV1TrajectoriesTrajectoryIdGet = exports.deleteTrajectoryV1TrajectoriesTrajectoryIdDelete = exports.createTrajectoryV1TrajectoriesPost = exports.listTrajectoriesV1TrajectoriesGet = exports.updateRequestLogV1RequestLogsLogIdPatch = exports.getRequestLogV1RequestLogsLogIdGet = exports.deleteRequestLogV1RequestLogsLogIdDelete = exports.createRequestLogV1RequestLogsPost = exports.listRequestLogsV1RequestLogsGet = exports.updateConnectionV1ConnectionsConnectionIdPatch = exports.getConnectionV1ConnectionsConnectionIdGet = exports.deleteConnectionV1ConnectionsConnectionIdDelete = exports.createConnectionV1ConnectionsPost = exports.listConnectionsV1ConnectionsGet = exports.updateRunV1RunsRunIdPatch = exports.getRunV1RunsRunIdGet = exports.deleteRunV1RunsRunIdDelete = exports.createRunV1RunsPost = exports.listRunsV1RunsGet = exports.getWorkflowVersionsV1WorkflowsWorkflowIdVersionsGet = exports.updateWorkflowV1WorkflowsWorkflowIdPatch = exports.getWorkflowV1WorkflowsWorkflowIdGet = exports.deleteWorkflowV1WorkflowsWorkflowIdDelete = exports.createWorkflowV1WorkflowsPost = exports.listWorkflowsV1WorkflowsGet = exports.updateMachineV1MachinesMachineIdPatch = exports.getMachineV1MachinesMachineIdGet = exports.deleteMachineV1MachinesMachineIdDelete = exports.createMachineV1MachinesPost = exports.listMachinesV1MachinesGet = exports.databaseHealthCheckV1HealthDbGet = exports.healthCheckV1HealthGet = void 0;
4
+ exports.fsWriteV1ComputerMachineIdFsWritePost = exports.fsReadV1ComputerMachineIdFsReadGet = exports.fsListV1ComputerMachineIdFsListGet = exports.mouseClickV1ComputerMachineIdInputMouseClickPost = exports.mouseMoveV1ComputerMachineIdInputMouseMovePost = exports.getMousePositionV1ComputerMachineIdInputMousePositionGet = exports.keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = exports.keyboardTypeV1ComputerMachineIdInputKeyboardTypePost = exports.getDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGet = exports.getScreenshotV1ComputerMachineIdDisplayScreenshotGet = exports.getLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGet = exports.updateTrajectoryV1TrajectoriesTrajectoryIdPatch = exports.getTrajectoryV1TrajectoriesTrajectoryIdGet = exports.deleteTrajectoryV1TrajectoriesTrajectoryIdDelete = exports.createTrajectoryV1TrajectoriesPost = exports.listTrajectoriesV1TrajectoriesGet = exports.updateRequestLogV1RequestLogsLogIdPatch = exports.getRequestLogV1RequestLogsLogIdGet = exports.deleteRequestLogV1RequestLogsLogIdDelete = exports.createRequestLogV1RequestLogsPost = exports.listRequestLogsV1RequestLogsGet = exports.updateConnectionV1ConnectionsConnectionIdPatch = exports.getConnectionV1ConnectionsConnectionIdGet = exports.deleteConnectionV1ConnectionsConnectionIdDelete = exports.createConnectionV1ConnectionsPost = exports.listConnectionsV1ConnectionsGet = exports.downloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGet = exports.updateRunAttachmentV1RunAttachmentsAttachmentIdPut = exports.getRunAttachmentV1RunAttachmentsAttachmentIdGet = exports.deleteRunAttachmentV1RunAttachmentsAttachmentIdDelete = exports.createRunAttachmentV1RunAttachmentsPost = exports.listRunAttachmentsV1RunAttachmentsGet = exports.updateRunV1RunsRunIdPatch = exports.getRunV1RunsRunIdGet = exports.deleteRunV1RunsRunIdDelete = exports.createRunV1RunsPost = exports.listRunsV1RunsGet = exports.getWorkflowVersionsV1WorkflowsWorkflowIdVersionsGet = exports.updateWorkflowV1WorkflowsWorkflowIdPatch = exports.getWorkflowV1WorkflowsWorkflowIdGet = exports.deleteWorkflowV1WorkflowsWorkflowIdDelete = exports.createWorkflowV1WorkflowsPost = exports.listWorkflowsV1WorkflowsGet = exports.updateMachineV1MachinesMachineIdPatch = exports.getMachineV1MachinesMachineIdGet = exports.deleteMachineV1MachinesMachineIdDelete = exports.createMachineV1MachinesPost = exports.listMachinesV1MachinesGet = exports.databaseHealthCheckV1HealthDbGet = exports.healthCheckV1HealthGet = void 0;
5
+ exports.rootGet = exports.dummyTestEndpointV1TestPost = exports.powershellSessionV1ComputerMachineIdShellPowershellSessionPost = exports.powershellExecV1ComputerMachineIdShellPowershellExecPost = void 0;
5
6
  const client_gen_1 = require("./client.gen");
6
7
  /**
7
8
  * Health Check
@@ -293,6 +294,103 @@ const updateRunV1RunsRunIdPatch = (options) => {
293
294
  ], url: '/v1/runs/{run_id}' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
294
295
  };
295
296
  exports.updateRunV1RunsRunIdPatch = updateRunV1RunsRunIdPatch;
297
+ /**
298
+ * List Run Attachments
299
+ * List all run attachments for the authenticated user.
300
+ *
301
+ * Supports pagination and filtering by run ID and attachment type.
302
+ */
303
+ const listRunAttachmentsV1RunAttachmentsGet = (options) => {
304
+ var _a;
305
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ security: [
306
+ {
307
+ scheme: 'bearer',
308
+ type: 'http'
309
+ }
310
+ ], url: '/v1/run-attachments' }, options));
311
+ };
312
+ exports.listRunAttachmentsV1RunAttachmentsGet = listRunAttachmentsV1RunAttachmentsGet;
313
+ /**
314
+ * Create Run Attachment
315
+ * Create a new run attachment.
316
+ *
317
+ * This endpoint is primarily for internal use. File uploads typically happen
318
+ * through the run creation endpoint.
319
+ */
320
+ const createRunAttachmentV1RunAttachmentsPost = (options) => {
321
+ var _a;
322
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ security: [
323
+ {
324
+ scheme: 'bearer',
325
+ type: 'http'
326
+ }
327
+ ], url: '/v1/run-attachments' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
328
+ };
329
+ exports.createRunAttachmentV1RunAttachmentsPost = createRunAttachmentV1RunAttachmentsPost;
330
+ /**
331
+ * Delete Run Attachment
332
+ * Delete a run attachment.
333
+ *
334
+ * This will remove both the database record and the file from Supabase storage.
335
+ */
336
+ const deleteRunAttachmentV1RunAttachmentsAttachmentIdDelete = (options) => {
337
+ var _a;
338
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).delete(Object.assign({ security: [
339
+ {
340
+ scheme: 'bearer',
341
+ type: 'http'
342
+ }
343
+ ], url: '/v1/run-attachments/{attachment_id}' }, options));
344
+ };
345
+ exports.deleteRunAttachmentV1RunAttachmentsAttachmentIdDelete = deleteRunAttachmentV1RunAttachmentsAttachmentIdDelete;
346
+ /**
347
+ * Get Run Attachment
348
+ * Get a specific run attachment by ID.
349
+ *
350
+ * Returns attachment metadata only. Use the download endpoint to get file content.
351
+ */
352
+ const getRunAttachmentV1RunAttachmentsAttachmentIdGet = (options) => {
353
+ var _a;
354
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ security: [
355
+ {
356
+ scheme: 'bearer',
357
+ type: 'http'
358
+ }
359
+ ], url: '/v1/run-attachments/{attachment_id}' }, options));
360
+ };
361
+ exports.getRunAttachmentV1RunAttachmentsAttachmentIdGet = getRunAttachmentV1RunAttachmentsAttachmentIdGet;
362
+ /**
363
+ * Update Run Attachment
364
+ * Update a run attachment.
365
+ *
366
+ * Currently only supports updating the expiration date.
367
+ */
368
+ const updateRunAttachmentV1RunAttachmentsAttachmentIdPut = (options) => {
369
+ var _a;
370
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).put(Object.assign(Object.assign({ security: [
371
+ {
372
+ scheme: 'bearer',
373
+ type: 'http'
374
+ }
375
+ ], url: '/v1/run-attachments/{attachment_id}' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
376
+ };
377
+ exports.updateRunAttachmentV1RunAttachmentsAttachmentIdPut = updateRunAttachmentV1RunAttachmentsAttachmentIdPut;
378
+ /**
379
+ * Download Run Attachment
380
+ * Download a run attachment file.
381
+ *
382
+ * Returns the file content as a streaming response.
383
+ */
384
+ const downloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGet = (options) => {
385
+ var _a;
386
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ security: [
387
+ {
388
+ scheme: 'bearer',
389
+ type: 'http'
390
+ }
391
+ ], url: '/v1/run-attachments/{attachment_id}/download' }, options));
392
+ };
393
+ exports.downloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGet = downloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGet;
296
394
  /**
297
395
  * List Connections
298
396
  * List all connections for the authenticated user's machines.
@@ -658,6 +756,76 @@ const mouseClickV1ComputerMachineIdInputMouseClickPost = (options) => {
658
756
  ], url: '/v1/computer/{machine_id}/input/mouse/click' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
659
757
  };
660
758
  exports.mouseClickV1ComputerMachineIdInputMouseClickPost = mouseClickV1ComputerMachineIdInputMouseClickPost;
759
+ /**
760
+ * List directory contents
761
+ * List directory contents on the machine.
762
+ */
763
+ const fsListV1ComputerMachineIdFsListGet = (options) => {
764
+ var _a;
765
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ security: [
766
+ {
767
+ scheme: 'bearer',
768
+ type: 'http'
769
+ }
770
+ ], url: '/v1/computer/{machine_id}/fs/list' }, options));
771
+ };
772
+ exports.fsListV1ComputerMachineIdFsListGet = fsListV1ComputerMachineIdFsListGet;
773
+ /**
774
+ * Read file contents
775
+ * Read file contents from the machine (base64 encoded).
776
+ */
777
+ const fsReadV1ComputerMachineIdFsReadGet = (options) => {
778
+ var _a;
779
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ security: [
780
+ {
781
+ scheme: 'bearer',
782
+ type: 'http'
783
+ }
784
+ ], url: '/v1/computer/{machine_id}/fs/read' }, options));
785
+ };
786
+ exports.fsReadV1ComputerMachineIdFsReadGet = fsReadV1ComputerMachineIdFsReadGet;
787
+ /**
788
+ * Write file contents
789
+ * Write file contents to the machine.
790
+ */
791
+ const fsWriteV1ComputerMachineIdFsWritePost = (options) => {
792
+ var _a;
793
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ security: [
794
+ {
795
+ scheme: 'bearer',
796
+ type: 'http'
797
+ }
798
+ ], url: '/v1/computer/{machine_id}/fs/write' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
799
+ };
800
+ exports.fsWriteV1ComputerMachineIdFsWritePost = fsWriteV1ComputerMachineIdFsWritePost;
801
+ /**
802
+ * Execute PowerShell command
803
+ * Execute PowerShell command on the machine.
804
+ */
805
+ const powershellExecV1ComputerMachineIdShellPowershellExecPost = (options) => {
806
+ var _a;
807
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ security: [
808
+ {
809
+ scheme: 'bearer',
810
+ type: 'http'
811
+ }
812
+ ], url: '/v1/computer/{machine_id}/shell/powershell/exec' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
813
+ };
814
+ exports.powershellExecV1ComputerMachineIdShellPowershellExecPost = powershellExecV1ComputerMachineIdShellPowershellExecPost;
815
+ /**
816
+ * Manage PowerShell session
817
+ * Create or destroy PowerShell sessions on the machine.
818
+ */
819
+ const powershellSessionV1ComputerMachineIdShellPowershellSessionPost = (options) => {
820
+ var _a;
821
+ return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ security: [
822
+ {
823
+ scheme: 'bearer',
824
+ type: 'http'
825
+ }
826
+ ], url: '/v1/computer/{machine_id}/shell/powershell/session' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
827
+ };
828
+ exports.powershellSessionV1ComputerMachineIdShellPowershellSessionPost = powershellSessionV1ComputerMachineIdShellPowershellSessionPost;
661
829
  /**
662
830
  * Dummy Test Endpoint
663
831
  * Test endpoint that performs a sequence of actions:
@@ -1,3 +1,4 @@
1
+ export type AttachmentType = 'input' | 'output';
1
2
  /**
2
3
  * Schema for creating a connection
3
4
  */
@@ -26,6 +27,38 @@ export type DisplayDimensions = {
26
27
  width: number;
27
28
  height: number;
28
29
  };
30
+ /**
31
+ * File input for run creation
32
+ */
33
+ export type FileInput = {
34
+ filename: string;
35
+ /**
36
+ * Base64 encoded file content
37
+ */
38
+ content: string;
39
+ /**
40
+ * Optional path on machine, defaults to ~/CyberdeskTransfers/
41
+ */
42
+ target_path?: string | null;
43
+ /**
44
+ * Delete from machine after run completes
45
+ */
46
+ cleanup_imports_after_run?: boolean;
47
+ };
48
+ export type FileWriteRequest = {
49
+ /**
50
+ * Target file path
51
+ */
52
+ path: string;
53
+ /**
54
+ * Base64 encoded file content
55
+ */
56
+ content: string;
57
+ /**
58
+ * Write mode - 'write' or 'append'
59
+ */
60
+ mode?: string;
61
+ };
29
62
  export type HttpValidationError = {
30
63
  detail?: Array<ValidationError>;
31
64
  };
@@ -114,6 +147,12 @@ export type PaginatedResponseMachineResponse = {
114
147
  skip: number;
115
148
  limit: number;
116
149
  };
150
+ export type PaginatedResponseRunAttachmentResponse = {
151
+ items: Array<RunAttachmentResponse>;
152
+ total: number;
153
+ skip: number;
154
+ limit: number;
155
+ };
117
156
  export type PaginatedResponseRunResponse = {
118
157
  items: Array<RunResponse>;
119
158
  total: number;
@@ -132,6 +171,34 @@ export type PaginatedResponseWorkflowResponse = {
132
171
  skip: number;
133
172
  limit: number;
134
173
  };
174
+ export type PowerShellExecRequest = {
175
+ /**
176
+ * PowerShell command to execute
177
+ */
178
+ command: string;
179
+ /**
180
+ * Use persistent session
181
+ */
182
+ same_session?: boolean;
183
+ /**
184
+ * Working directory for new session
185
+ */
186
+ working_directory?: string | null;
187
+ /**
188
+ * Session ID to use
189
+ */
190
+ session_id?: string | null;
191
+ };
192
+ export type PowerShellSessionRequest = {
193
+ /**
194
+ * Action to perform - 'create' or 'destroy'
195
+ */
196
+ action: string;
197
+ /**
198
+ * Session ID for destroy action
199
+ */
200
+ session_id?: string | null;
201
+ };
135
202
  /**
136
203
  * Schema for creating a request log
137
204
  */
@@ -173,6 +240,45 @@ export type RequestLogUpdate = {
173
240
  duration_ms?: number | null;
174
241
  error_message?: string | null;
175
242
  };
243
+ /**
244
+ * Schema for creating a run attachment
245
+ */
246
+ export type RunAttachmentCreate = {
247
+ run_id: string;
248
+ filename: string;
249
+ /**
250
+ * Base64 encoded file content
251
+ */
252
+ content: string;
253
+ content_type: string;
254
+ attachment_type: AttachmentType;
255
+ target_path?: string | null;
256
+ cleanup_imports_after_run?: boolean;
257
+ expires_at?: string | null;
258
+ };
259
+ /**
260
+ * Run attachment response schema
261
+ */
262
+ export type RunAttachmentResponse = {
263
+ filename: string;
264
+ content_type: string;
265
+ attachment_type: AttachmentType;
266
+ target_path?: string | null;
267
+ cleanup_imports_after_run?: boolean;
268
+ id: string;
269
+ user_id: string;
270
+ run_id: string;
271
+ size_bytes: number;
272
+ storage_path: string;
273
+ expires_at?: string | null;
274
+ created_at: string;
275
+ };
276
+ /**
277
+ * Schema for updating a run attachment
278
+ */
279
+ export type RunAttachmentUpdate = {
280
+ expires_at?: string | null;
281
+ };
176
282
  /**
177
283
  * Schema for creating a run
178
284
  */
@@ -188,6 +294,10 @@ export type RunCreate = {
188
294
  input_values?: {
189
295
  [key: string]: unknown;
190
296
  } | null;
297
+ /**
298
+ * Files to upload to the machine
299
+ */
300
+ file_inputs?: Array<FileInput> | null;
191
301
  };
192
302
  /**
193
303
  * Run response schema
@@ -202,6 +312,7 @@ export type RunResponse = {
202
312
  output_data: {
203
313
  [key: string]: unknown;
204
314
  } | null;
315
+ input_attachment_ids: Array<string> | null;
205
316
  output_attachment_ids: Array<string> | null;
206
317
  run_message_history: Array<{
207
318
  [key: string]: unknown;
@@ -298,6 +409,10 @@ export type WorkflowCreate = {
298
409
  * JSON schema for output data transformation
299
410
  */
300
411
  output_schema?: string | null;
412
+ /**
413
+ * Enable AI-based file export detection
414
+ */
415
+ includes_file_exports?: boolean;
301
416
  };
302
417
  /**
303
418
  * Workflow response schema
@@ -309,6 +424,10 @@ export type WorkflowResponse = {
309
424
  * JSON schema for output data transformation
310
425
  */
311
426
  output_schema?: string | null;
427
+ /**
428
+ * Enable AI-based file export detection
429
+ */
430
+ includes_file_exports?: boolean;
312
431
  id: string;
313
432
  user_id: string;
314
433
  includes_input_variables?: boolean;
@@ -328,6 +447,10 @@ export type WorkflowUpdate = {
328
447
  * JSON schema for output data transformation
329
448
  */
330
449
  output_schema?: string | null;
450
+ /**
451
+ * Enable AI-based file export detection
452
+ */
453
+ includes_file_exports?: boolean | null;
331
454
  };
332
455
  export type HealthCheckV1HealthGetData = {
333
456
  body?: never;
@@ -726,6 +849,144 @@ export type UpdateRunV1RunsRunIdPatchResponses = {
726
849
  200: RunResponse;
727
850
  };
728
851
  export type UpdateRunV1RunsRunIdPatchResponse = UpdateRunV1RunsRunIdPatchResponses[keyof UpdateRunV1RunsRunIdPatchResponses];
852
+ export type ListRunAttachmentsV1RunAttachmentsGetData = {
853
+ body?: never;
854
+ path?: never;
855
+ query?: {
856
+ /**
857
+ * Filter by run ID
858
+ */
859
+ run_id?: string | null;
860
+ /**
861
+ * Filter by attachment type
862
+ */
863
+ attachment_type?: AttachmentType | null;
864
+ skip?: number;
865
+ limit?: number;
866
+ };
867
+ url: '/v1/run-attachments';
868
+ };
869
+ export type ListRunAttachmentsV1RunAttachmentsGetErrors = {
870
+ /**
871
+ * Validation Error
872
+ */
873
+ 422: HttpValidationError;
874
+ };
875
+ export type ListRunAttachmentsV1RunAttachmentsGetError = ListRunAttachmentsV1RunAttachmentsGetErrors[keyof ListRunAttachmentsV1RunAttachmentsGetErrors];
876
+ export type ListRunAttachmentsV1RunAttachmentsGetResponses = {
877
+ /**
878
+ * Successful Response
879
+ */
880
+ 200: PaginatedResponseRunAttachmentResponse;
881
+ };
882
+ export type ListRunAttachmentsV1RunAttachmentsGetResponse = ListRunAttachmentsV1RunAttachmentsGetResponses[keyof ListRunAttachmentsV1RunAttachmentsGetResponses];
883
+ export type CreateRunAttachmentV1RunAttachmentsPostData = {
884
+ body: RunAttachmentCreate;
885
+ path?: never;
886
+ query?: never;
887
+ url: '/v1/run-attachments';
888
+ };
889
+ export type CreateRunAttachmentV1RunAttachmentsPostErrors = {
890
+ /**
891
+ * Validation Error
892
+ */
893
+ 422: HttpValidationError;
894
+ };
895
+ export type CreateRunAttachmentV1RunAttachmentsPostError = CreateRunAttachmentV1RunAttachmentsPostErrors[keyof CreateRunAttachmentV1RunAttachmentsPostErrors];
896
+ export type CreateRunAttachmentV1RunAttachmentsPostResponses = {
897
+ /**
898
+ * Successful Response
899
+ */
900
+ 201: RunAttachmentResponse;
901
+ };
902
+ export type CreateRunAttachmentV1RunAttachmentsPostResponse = CreateRunAttachmentV1RunAttachmentsPostResponses[keyof CreateRunAttachmentV1RunAttachmentsPostResponses];
903
+ export type DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteData = {
904
+ body?: never;
905
+ path: {
906
+ attachment_id: string;
907
+ };
908
+ query?: never;
909
+ url: '/v1/run-attachments/{attachment_id}';
910
+ };
911
+ export type DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteErrors = {
912
+ /**
913
+ * Validation Error
914
+ */
915
+ 422: HttpValidationError;
916
+ };
917
+ export type DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteError = DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteErrors[keyof DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteErrors];
918
+ export type DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteResponses = {
919
+ /**
920
+ * Successful Response
921
+ */
922
+ 204: void;
923
+ };
924
+ export type DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteResponse = DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteResponses[keyof DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteResponses];
925
+ export type GetRunAttachmentV1RunAttachmentsAttachmentIdGetData = {
926
+ body?: never;
927
+ path: {
928
+ attachment_id: string;
929
+ };
930
+ query?: never;
931
+ url: '/v1/run-attachments/{attachment_id}';
932
+ };
933
+ export type GetRunAttachmentV1RunAttachmentsAttachmentIdGetErrors = {
934
+ /**
935
+ * Validation Error
936
+ */
937
+ 422: HttpValidationError;
938
+ };
939
+ export type GetRunAttachmentV1RunAttachmentsAttachmentIdGetError = GetRunAttachmentV1RunAttachmentsAttachmentIdGetErrors[keyof GetRunAttachmentV1RunAttachmentsAttachmentIdGetErrors];
940
+ export type GetRunAttachmentV1RunAttachmentsAttachmentIdGetResponses = {
941
+ /**
942
+ * Successful Response
943
+ */
944
+ 200: RunAttachmentResponse;
945
+ };
946
+ export type GetRunAttachmentV1RunAttachmentsAttachmentIdGetResponse = GetRunAttachmentV1RunAttachmentsAttachmentIdGetResponses[keyof GetRunAttachmentV1RunAttachmentsAttachmentIdGetResponses];
947
+ export type UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutData = {
948
+ body: RunAttachmentUpdate;
949
+ path: {
950
+ attachment_id: string;
951
+ };
952
+ query?: never;
953
+ url: '/v1/run-attachments/{attachment_id}';
954
+ };
955
+ export type UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutErrors = {
956
+ /**
957
+ * Validation Error
958
+ */
959
+ 422: HttpValidationError;
960
+ };
961
+ export type UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutError = UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutErrors[keyof UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutErrors];
962
+ export type UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutResponses = {
963
+ /**
964
+ * Successful Response
965
+ */
966
+ 200: RunAttachmentResponse;
967
+ };
968
+ export type UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutResponse = UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutResponses[keyof UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutResponses];
969
+ export type DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetData = {
970
+ body?: never;
971
+ path: {
972
+ attachment_id: string;
973
+ };
974
+ query?: never;
975
+ url: '/v1/run-attachments/{attachment_id}/download';
976
+ };
977
+ export type DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetErrors = {
978
+ /**
979
+ * Validation Error
980
+ */
981
+ 422: HttpValidationError;
982
+ };
983
+ export type DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetError = DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetErrors[keyof DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetErrors];
984
+ export type DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetResponses = {
985
+ /**
986
+ * Successful Response
987
+ */
988
+ 200: unknown;
989
+ };
729
990
  export type ListConnectionsV1ConnectionsGetData = {
730
991
  body?: never;
731
992
  path?: never;
@@ -1252,6 +1513,130 @@ export type MouseClickV1ComputerMachineIdInputMouseClickPostResponses = {
1252
1513
  204: void;
1253
1514
  };
1254
1515
  export type MouseClickV1ComputerMachineIdInputMouseClickPostResponse = MouseClickV1ComputerMachineIdInputMouseClickPostResponses[keyof MouseClickV1ComputerMachineIdInputMouseClickPostResponses];
1516
+ export type FsListV1ComputerMachineIdFsListGetData = {
1517
+ body?: never;
1518
+ path: {
1519
+ machine_id: string;
1520
+ };
1521
+ query?: {
1522
+ path?: string;
1523
+ };
1524
+ url: '/v1/computer/{machine_id}/fs/list';
1525
+ };
1526
+ export type FsListV1ComputerMachineIdFsListGetErrors = {
1527
+ /**
1528
+ * Validation Error
1529
+ */
1530
+ 422: HttpValidationError;
1531
+ };
1532
+ export type FsListV1ComputerMachineIdFsListGetError = FsListV1ComputerMachineIdFsListGetErrors[keyof FsListV1ComputerMachineIdFsListGetErrors];
1533
+ export type FsListV1ComputerMachineIdFsListGetResponses = {
1534
+ /**
1535
+ * Successful Response
1536
+ */
1537
+ 200: {
1538
+ [key: string]: unknown;
1539
+ };
1540
+ };
1541
+ export type FsListV1ComputerMachineIdFsListGetResponse = FsListV1ComputerMachineIdFsListGetResponses[keyof FsListV1ComputerMachineIdFsListGetResponses];
1542
+ export type FsReadV1ComputerMachineIdFsReadGetData = {
1543
+ body?: never;
1544
+ path: {
1545
+ machine_id: string;
1546
+ };
1547
+ query: {
1548
+ path: string;
1549
+ };
1550
+ url: '/v1/computer/{machine_id}/fs/read';
1551
+ };
1552
+ export type FsReadV1ComputerMachineIdFsReadGetErrors = {
1553
+ /**
1554
+ * Validation Error
1555
+ */
1556
+ 422: HttpValidationError;
1557
+ };
1558
+ export type FsReadV1ComputerMachineIdFsReadGetError = FsReadV1ComputerMachineIdFsReadGetErrors[keyof FsReadV1ComputerMachineIdFsReadGetErrors];
1559
+ export type FsReadV1ComputerMachineIdFsReadGetResponses = {
1560
+ /**
1561
+ * Successful Response
1562
+ */
1563
+ 200: {
1564
+ [key: string]: unknown;
1565
+ };
1566
+ };
1567
+ export type FsReadV1ComputerMachineIdFsReadGetResponse = FsReadV1ComputerMachineIdFsReadGetResponses[keyof FsReadV1ComputerMachineIdFsReadGetResponses];
1568
+ export type FsWriteV1ComputerMachineIdFsWritePostData = {
1569
+ body: FileWriteRequest;
1570
+ path: {
1571
+ machine_id: string;
1572
+ };
1573
+ query?: never;
1574
+ url: '/v1/computer/{machine_id}/fs/write';
1575
+ };
1576
+ export type FsWriteV1ComputerMachineIdFsWritePostErrors = {
1577
+ /**
1578
+ * Validation Error
1579
+ */
1580
+ 422: HttpValidationError;
1581
+ };
1582
+ export type FsWriteV1ComputerMachineIdFsWritePostError = FsWriteV1ComputerMachineIdFsWritePostErrors[keyof FsWriteV1ComputerMachineIdFsWritePostErrors];
1583
+ export type FsWriteV1ComputerMachineIdFsWritePostResponses = {
1584
+ /**
1585
+ * Successful Response
1586
+ */
1587
+ 200: {
1588
+ [key: string]: unknown;
1589
+ };
1590
+ };
1591
+ export type FsWriteV1ComputerMachineIdFsWritePostResponse = FsWriteV1ComputerMachineIdFsWritePostResponses[keyof FsWriteV1ComputerMachineIdFsWritePostResponses];
1592
+ export type PowershellExecV1ComputerMachineIdShellPowershellExecPostData = {
1593
+ body: PowerShellExecRequest;
1594
+ path: {
1595
+ machine_id: string;
1596
+ };
1597
+ query?: never;
1598
+ url: '/v1/computer/{machine_id}/shell/powershell/exec';
1599
+ };
1600
+ export type PowershellExecV1ComputerMachineIdShellPowershellExecPostErrors = {
1601
+ /**
1602
+ * Validation Error
1603
+ */
1604
+ 422: HttpValidationError;
1605
+ };
1606
+ export type PowershellExecV1ComputerMachineIdShellPowershellExecPostError = PowershellExecV1ComputerMachineIdShellPowershellExecPostErrors[keyof PowershellExecV1ComputerMachineIdShellPowershellExecPostErrors];
1607
+ export type PowershellExecV1ComputerMachineIdShellPowershellExecPostResponses = {
1608
+ /**
1609
+ * Successful Response
1610
+ */
1611
+ 200: {
1612
+ [key: string]: unknown;
1613
+ };
1614
+ };
1615
+ export type PowershellExecV1ComputerMachineIdShellPowershellExecPostResponse = PowershellExecV1ComputerMachineIdShellPowershellExecPostResponses[keyof PowershellExecV1ComputerMachineIdShellPowershellExecPostResponses];
1616
+ export type PowershellSessionV1ComputerMachineIdShellPowershellSessionPostData = {
1617
+ body: PowerShellSessionRequest;
1618
+ path: {
1619
+ machine_id: string;
1620
+ };
1621
+ query?: never;
1622
+ url: '/v1/computer/{machine_id}/shell/powershell/session';
1623
+ };
1624
+ export type PowershellSessionV1ComputerMachineIdShellPowershellSessionPostErrors = {
1625
+ /**
1626
+ * Validation Error
1627
+ */
1628
+ 422: HttpValidationError;
1629
+ };
1630
+ export type PowershellSessionV1ComputerMachineIdShellPowershellSessionPostError = PowershellSessionV1ComputerMachineIdShellPowershellSessionPostErrors[keyof PowershellSessionV1ComputerMachineIdShellPowershellSessionPostErrors];
1631
+ export type PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponses = {
1632
+ /**
1633
+ * Successful Response
1634
+ */
1635
+ 200: {
1636
+ [key: string]: unknown;
1637
+ };
1638
+ };
1639
+ export type PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponse = PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponses[keyof PowershellSessionV1ComputerMachineIdShellPowershellSessionPostResponses];
1255
1640
  export type DummyTestEndpointV1TestPostData = {
1256
1641
  body?: never;
1257
1642
  path?: never;
@@ -1280,5 +1665,5 @@ export type RootGetResponses = {
1280
1665
  200: unknown;
1281
1666
  };
1282
1667
  export type ClientOptions = {
1283
- baseUrl: `${string}://${string}` | (string & {});
1668
+ baseUrl: 'https://api.cyberdesk.io' | (string & {});
1284
1669
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type MachineResponse, type WorkflowResponse, type RunResponse, type ConnectionResponse, type TrajectoryResponse, type PaginatedResponseMachineResponse, type PaginatedResponseWorkflowResponse, type PaginatedResponseRunResponse, type PaginatedResponseConnectionResponse, type PaginatedResponseTrajectoryResponse, type MachineStatus, type RunStatus, type ConnectionStatus, type MachineCreate, type WorkflowCreate, type RunCreate, type ConnectionCreate, type TrajectoryCreate, type MachineUpdate, type WorkflowUpdate, type RunUpdate, type TrajectoryUpdate } from './client/types.gen';
1
+ import { type MachineResponse, type WorkflowResponse, type RunResponse, type ConnectionResponse, type TrajectoryResponse, type PaginatedResponseMachineResponse, type PaginatedResponseWorkflowResponse, type PaginatedResponseRunResponse, type PaginatedResponseConnectionResponse, type PaginatedResponseTrajectoryResponse, type MachineStatus, type RunStatus, type ConnectionStatus, type MachineCreate, type WorkflowCreate, type RunCreate, type FileInput, type ConnectionCreate, type TrajectoryCreate, type MachineUpdate, type WorkflowUpdate, type RunUpdate, type TrajectoryUpdate, type RunAttachmentCreate, type RunAttachmentUpdate, type RunAttachmentResponse, type AttachmentType, type PaginatedResponseRunAttachmentResponse } from './client/types.gen';
2
2
  export * from './client/types.gen';
3
3
  export * from './client/sdk.gen';
4
4
  export * from './client/client.gen';
@@ -151,5 +151,42 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
151
151
  error?: any;
152
152
  }>;
153
153
  };
154
+ run_attachments: {
155
+ list: (params?: {
156
+ skip?: number;
157
+ limit?: number;
158
+ run_id?: string;
159
+ attachment_type?: AttachmentType;
160
+ }) => Promise<{
161
+ data?: PaginatedResponseRunAttachmentResponse;
162
+ error?: any;
163
+ }>;
164
+ create: (data: RunAttachmentCreate) => Promise<{
165
+ data?: RunAttachmentResponse;
166
+ error?: any;
167
+ }>;
168
+ get: (attachmentId: string) => Promise<{
169
+ data?: RunAttachmentResponse;
170
+ error?: any;
171
+ }>;
172
+ download: (attachmentId: string) => Promise<{
173
+ data?: any;
174
+ error?: any;
175
+ }>;
176
+ update: (attachmentId: string, data: RunAttachmentUpdate) => Promise<{
177
+ data?: RunAttachmentResponse;
178
+ error?: any;
179
+ }>;
180
+ delete: (attachmentId: string) => Promise<({
181
+ data: undefined;
182
+ error: import("./client/types.gen").HttpValidationError;
183
+ } | {
184
+ data: void;
185
+ error: undefined;
186
+ }) & {
187
+ request: Request;
188
+ response: Response;
189
+ }>;
190
+ };
154
191
  };
155
- export type { MachineResponse, WorkflowResponse, RunResponse, ConnectionResponse, TrajectoryResponse, PaginatedResponseMachineResponse, PaginatedResponseWorkflowResponse, PaginatedResponseRunResponse, PaginatedResponseConnectionResponse, PaginatedResponseTrajectoryResponse, };
192
+ export type { MachineResponse, WorkflowResponse, RunResponse, ConnectionResponse, TrajectoryResponse, RunAttachmentResponse, FileInput, AttachmentType, PaginatedResponseMachineResponse, PaginatedResponseWorkflowResponse, PaginatedResponseRunResponse, PaginatedResponseConnectionResponse, PaginatedResponseTrajectoryResponse, PaginatedResponseRunAttachmentResponse, };
package/dist/index.js CHANGED
@@ -205,5 +205,46 @@ function createCyberdeskClient(apiKey, baseUrl) {
205
205
  });
206
206
  }),
207
207
  },
208
+ // Run Attachment endpoints
209
+ run_attachments: {
210
+ list: (params) => __awaiter(this, void 0, void 0, function* () {
211
+ return (0, sdk_gen_1.listRunAttachmentsV1RunAttachmentsGet)({
212
+ client,
213
+ query: params,
214
+ });
215
+ }),
216
+ create: (data) => __awaiter(this, void 0, void 0, function* () {
217
+ return (0, sdk_gen_1.createRunAttachmentV1RunAttachmentsPost)({
218
+ client,
219
+ body: data,
220
+ });
221
+ }),
222
+ get: (attachmentId) => __awaiter(this, void 0, void 0, function* () {
223
+ return (0, sdk_gen_1.getRunAttachmentV1RunAttachmentsAttachmentIdGet)({
224
+ client,
225
+ path: { attachment_id: attachmentId },
226
+ });
227
+ }),
228
+ download: (attachmentId) => __awaiter(this, void 0, void 0, function* () {
229
+ // Note: This endpoint returns a download URL redirect or file data
230
+ return (0, sdk_gen_1.downloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGet)({
231
+ client,
232
+ path: { attachment_id: attachmentId },
233
+ });
234
+ }),
235
+ update: (attachmentId, data) => __awaiter(this, void 0, void 0, function* () {
236
+ return (0, sdk_gen_1.updateRunAttachmentV1RunAttachmentsAttachmentIdPut)({
237
+ client,
238
+ path: { attachment_id: attachmentId },
239
+ body: data,
240
+ });
241
+ }),
242
+ delete: (attachmentId) => __awaiter(this, void 0, void 0, function* () {
243
+ return (0, sdk_gen_1.deleteRunAttachmentV1RunAttachmentsAttachmentIdDelete)({
244
+ client,
245
+ path: { attachment_id: attachmentId },
246
+ });
247
+ }),
248
+ },
208
249
  };
209
250
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberdesk",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "The official TypeScript SDK for Cyberdesk",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",