cyberdesk 2.1.5 → 2.1.7
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/dist/client/sdk.gen.d.ts +10 -1
- package/dist/client/sdk.gen.js +20 -2
- package/dist/client/types.gen.d.ts +97 -0
- package/dist/index.d.ts +41 -1
- package/dist/index.js +34 -0
- package/package.json +1 -1
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -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, GetMachinePoolsV1MachinesMachineIdPoolsGetData, UpdateMachinePoolsV1MachinesMachineIdPoolsPutData, ListPoolsV1PoolsGetData, CreatePoolV1PoolsPostData, DeletePoolV1PoolsPoolIdDeleteData, GetPoolV1PoolsPoolIdGetData, UpdatePoolV1PoolsPoolIdPatchData, RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteData, AddMachinesToPoolV1PoolsPoolIdMachinesPostData, ListWorkflowsV1WorkflowsGetData, CreateWorkflowV1WorkflowsPostData, DeleteWorkflowV1WorkflowsWorkflowIdDeleteData, GetWorkflowV1WorkflowsWorkflowIdGetData, UpdateWorkflowV1WorkflowsWorkflowIdPatchData, GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetData, ListRunsV1RunsGetData, CreateRunV1RunsPostData, DeleteRunV1RunsRunIdDeleteData, GetRunV1RunsRunIdGetData, UpdateRunV1RunsRunIdPatchData, BulkCreateRunsV1RunsBulkPostData, ListRunAttachmentsV1RunAttachmentsGetData, CreateRunAttachmentV1RunAttachmentsPostData, DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteData, GetRunAttachmentV1RunAttachmentsAttachmentIdGetData, UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutData, GetRunAttachmentDownloadUrlV1RunAttachmentsAttachmentIdDownloadUrlGetData, DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetData, ListConnectionsV1ConnectionsGetData, CreateConnectionV1ConnectionsPostData, DeleteConnectionV1ConnectionsConnectionIdDeleteData, GetConnectionV1ConnectionsConnectionIdGetData, UpdateConnectionV1ConnectionsConnectionIdPatchData, ListRequestLogsV1RequestLogsGetData, CreateRequestLogV1RequestLogsPostData, DeleteRequestLogV1RequestLogsLogIdDeleteData, GetRequestLogV1RequestLogsLogIdGetData, UpdateRequestLogV1RequestLogsLogIdPatchData, ListTrajectoriesV1TrajectoriesGetData, CreateTrajectoryV1TrajectoriesPostData, DeleteTrajectoryV1TrajectoriesTrajectoryIdDeleteData, GetTrajectoryV1TrajectoriesTrajectoryIdGetData, UpdateTrajectoryV1TrajectoriesTrajectoryIdPatchData, GetLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGetData, GetScreenshotV1ComputerMachineIdDisplayScreenshotGetData, GetDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGetData, KeyboardTypeV1ComputerMachineIdInputKeyboardTypePostData, KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostData, GetMousePositionV1ComputerMachineIdInputMousePositionGetData, MouseMoveV1ComputerMachineIdInputMouseMovePostData, MouseClickV1ComputerMachineIdInputMouseClickPostData, MouseScrollV1ComputerMachineIdInputMouseScrollPostData, FsListV1ComputerMachineIdFsListGetData, FsReadV1ComputerMachineIdFsReadGetData, FsWriteV1ComputerMachineIdFsWritePostData, PowershellExecV1ComputerMachineIdShellPowershellExecPostData, PowershellSessionV1ComputerMachineIdShellPowershellSessionPostData, DummyTestEndpointV1TestPostData, RootGetData, HealthHealthGetData, HealthDbHealthDbGetData } from './types.gen';
|
|
2
|
+
import type { HealthCheckV1HealthGetData, DatabaseHealthCheckV1HealthDbGetData, ListMachinesV1MachinesGetData, CreateMachineV1MachinesPostData, DeleteMachineV1MachinesMachineIdDeleteData, GetMachineV1MachinesMachineIdGetData, UpdateMachineV1MachinesMachineIdPatchData, GetMachinePoolsV1MachinesMachineIdPoolsGetData, UpdateMachinePoolsV1MachinesMachineIdPoolsPutData, ListPoolsV1PoolsGetData, CreatePoolV1PoolsPostData, DeletePoolV1PoolsPoolIdDeleteData, GetPoolV1PoolsPoolIdGetData, UpdatePoolV1PoolsPoolIdPatchData, RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteData, AddMachinesToPoolV1PoolsPoolIdMachinesPostData, ListWorkflowsV1WorkflowsGetData, CreateWorkflowV1WorkflowsPostData, DeleteWorkflowV1WorkflowsWorkflowIdDeleteData, GetWorkflowV1WorkflowsWorkflowIdGetData, UpdateWorkflowV1WorkflowsWorkflowIdPatchData, GetWorkflowVersionsV1WorkflowsWorkflowIdVersionsGetData, ListRunsV1RunsGetData, CreateRunV1RunsPostData, DeleteRunV1RunsRunIdDeleteData, GetRunV1RunsRunIdGetData, UpdateRunV1RunsRunIdPatchData, CreateRunChainV1RunsChainPostData, BulkCreateRunsV1RunsBulkPostData, ListRunAttachmentsV1RunAttachmentsGetData, CreateRunAttachmentV1RunAttachmentsPostData, DeleteRunAttachmentV1RunAttachmentsAttachmentIdDeleteData, GetRunAttachmentV1RunAttachmentsAttachmentIdGetData, UpdateRunAttachmentV1RunAttachmentsAttachmentIdPutData, GetRunAttachmentDownloadUrlV1RunAttachmentsAttachmentIdDownloadUrlGetData, DownloadRunAttachmentV1RunAttachmentsAttachmentIdDownloadGetData, ListConnectionsV1ConnectionsGetData, CreateConnectionV1ConnectionsPostData, DeleteConnectionV1ConnectionsConnectionIdDeleteData, GetConnectionV1ConnectionsConnectionIdGetData, UpdateConnectionV1ConnectionsConnectionIdPatchData, ListRequestLogsV1RequestLogsGetData, CreateRequestLogV1RequestLogsPostData, DeleteRequestLogV1RequestLogsLogIdDeleteData, GetRequestLogV1RequestLogsLogIdGetData, UpdateRequestLogV1RequestLogsLogIdPatchData, ListTrajectoriesV1TrajectoriesGetData, CreateTrajectoryV1TrajectoriesPostData, DeleteTrajectoryV1TrajectoriesTrajectoryIdDeleteData, GetTrajectoryV1TrajectoriesTrajectoryIdGetData, UpdateTrajectoryV1TrajectoriesTrajectoryIdPatchData, GetLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGetData, GetScreenshotV1ComputerMachineIdDisplayScreenshotGetData, GetDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGetData, KeyboardTypeV1ComputerMachineIdInputKeyboardTypePostData, KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostData, GetMousePositionV1ComputerMachineIdInputMousePositionGetData, MouseMoveV1ComputerMachineIdInputMouseMovePostData, MouseClickV1ComputerMachineIdInputMouseClickPostData, MouseScrollV1ComputerMachineIdInputMouseScrollPostData, FsListV1ComputerMachineIdFsListGetData, FsReadV1ComputerMachineIdFsReadGetData, FsWriteV1ComputerMachineIdFsWritePostData, PowershellExecV1ComputerMachineIdShellPowershellExecPostData, PowershellSessionV1ComputerMachineIdShellPowershellSessionPostData, DummyTestEndpointV1TestPostData, RootGetData, HealthHealthGetData, HealthDbHealthDbGetData } 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
|
|
@@ -203,6 +203,15 @@ export declare const getRunV1RunsRunIdGet: <ThrowOnError extends boolean = false
|
|
|
203
203
|
* The run must belong to the authenticated organization.
|
|
204
204
|
*/
|
|
205
205
|
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>;
|
|
206
|
+
/**
|
|
207
|
+
* Create Run Chain
|
|
208
|
+
* Create a multi-step chain that runs on a single reserved session/machine.
|
|
209
|
+
*
|
|
210
|
+
* - Starts a new session unless session_id is provided (then runs on existing session).
|
|
211
|
+
* - Accepts shared_inputs/sensitive/file_inputs and per-step file_inputs.
|
|
212
|
+
* - machine_id > pool_id when starting a new session; both ignored if session_id provided.
|
|
213
|
+
*/
|
|
214
|
+
export declare const createRunChainV1RunsChainPost: <ThrowOnError extends boolean = false>(options: Options<CreateRunChainV1RunsChainPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").WorkflowChainResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
206
215
|
/**
|
|
207
216
|
* Bulk Create Runs
|
|
208
217
|
* Create multiple runs with the same configuration.
|
package/dist/client/sdk.gen.js
CHANGED
|
@@ -1,8 +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.
|
|
5
|
-
exports.healthDbHealthDbGet = exports.healthHealthGet = exports.rootGet = exports.dummyTestEndpointV1TestPost = exports.powershellSessionV1ComputerMachineIdShellPowershellSessionPost = exports.powershellExecV1ComputerMachineIdShellPowershellExecPost = exports.fsWriteV1ComputerMachineIdFsWritePost = exports.fsReadV1ComputerMachineIdFsReadGet = exports.fsListV1ComputerMachineIdFsListGet = exports.mouseScrollV1ComputerMachineIdInputMouseScrollPost = exports.mouseClickV1ComputerMachineIdInputMouseClickPost = exports.mouseMoveV1ComputerMachineIdInputMouseMovePost = exports.getMousePositionV1ComputerMachineIdInputMousePositionGet = exports.keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = exports.keyboardTypeV1ComputerMachineIdInputKeyboardTypePost = exports.getDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGet = exports.getScreenshotV1ComputerMachineIdDisplayScreenshotGet = exports.getLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGet = void 0;
|
|
4
|
+
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.getRunAttachmentDownloadUrlV1RunAttachmentsAttachmentIdDownloadUrlGet = exports.updateRunAttachmentV1RunAttachmentsAttachmentIdPut = exports.getRunAttachmentV1RunAttachmentsAttachmentIdGet = exports.deleteRunAttachmentV1RunAttachmentsAttachmentIdDelete = exports.createRunAttachmentV1RunAttachmentsPost = exports.listRunAttachmentsV1RunAttachmentsGet = exports.bulkCreateRunsV1RunsBulkPost = exports.createRunChainV1RunsChainPost = exports.updateRunV1RunsRunIdPatch = exports.getRunV1RunsRunIdGet = exports.deleteRunV1RunsRunIdDelete = exports.createRunV1RunsPost = exports.listRunsV1RunsGet = exports.getWorkflowVersionsV1WorkflowsWorkflowIdVersionsGet = exports.updateWorkflowV1WorkflowsWorkflowIdPatch = exports.getWorkflowV1WorkflowsWorkflowIdGet = exports.deleteWorkflowV1WorkflowsWorkflowIdDelete = exports.createWorkflowV1WorkflowsPost = exports.listWorkflowsV1WorkflowsGet = exports.addMachinesToPoolV1PoolsPoolIdMachinesPost = exports.removeMachinesFromPoolV1PoolsPoolIdMachinesDelete = exports.updatePoolV1PoolsPoolIdPatch = exports.getPoolV1PoolsPoolIdGet = exports.deletePoolV1PoolsPoolIdDelete = exports.createPoolV1PoolsPost = exports.listPoolsV1PoolsGet = exports.updateMachinePoolsV1MachinesMachineIdPoolsPut = exports.getMachinePoolsV1MachinesMachineIdPoolsGet = exports.updateMachineV1MachinesMachineIdPatch = exports.getMachineV1MachinesMachineIdGet = exports.deleteMachineV1MachinesMachineIdDelete = exports.createMachineV1MachinesPost = exports.listMachinesV1MachinesGet = exports.databaseHealthCheckV1HealthDbGet = exports.healthCheckV1HealthGet = void 0;
|
|
5
|
+
exports.healthDbHealthDbGet = exports.healthHealthGet = exports.rootGet = exports.dummyTestEndpointV1TestPost = exports.powershellSessionV1ComputerMachineIdShellPowershellSessionPost = exports.powershellExecV1ComputerMachineIdShellPowershellExecPost = exports.fsWriteV1ComputerMachineIdFsWritePost = exports.fsReadV1ComputerMachineIdFsReadGet = exports.fsListV1ComputerMachineIdFsListGet = exports.mouseScrollV1ComputerMachineIdInputMouseScrollPost = exports.mouseClickV1ComputerMachineIdInputMouseClickPost = exports.mouseMoveV1ComputerMachineIdInputMouseMovePost = exports.getMousePositionV1ComputerMachineIdInputMousePositionGet = exports.keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = exports.keyboardTypeV1ComputerMachineIdInputKeyboardTypePost = exports.getDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGet = exports.getScreenshotV1ComputerMachineIdDisplayScreenshotGet = exports.getLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGet = exports.updateTrajectoryV1TrajectoriesTrajectoryIdPatch = void 0;
|
|
6
6
|
const client_gen_1 = require("./client.gen");
|
|
7
7
|
/**
|
|
8
8
|
* Health Check
|
|
@@ -421,6 +421,24 @@ const updateRunV1RunsRunIdPatch = (options) => {
|
|
|
421
421
|
], url: '/v1/runs/{run_id}' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
422
422
|
};
|
|
423
423
|
exports.updateRunV1RunsRunIdPatch = updateRunV1RunsRunIdPatch;
|
|
424
|
+
/**
|
|
425
|
+
* Create Run Chain
|
|
426
|
+
* Create a multi-step chain that runs on a single reserved session/machine.
|
|
427
|
+
*
|
|
428
|
+
* - Starts a new session unless session_id is provided (then runs on existing session).
|
|
429
|
+
* - Accepts shared_inputs/sensitive/file_inputs and per-step file_inputs.
|
|
430
|
+
* - machine_id > pool_id when starting a new session; both ignored if session_id provided.
|
|
431
|
+
*/
|
|
432
|
+
const createRunChainV1RunsChainPost = (options) => {
|
|
433
|
+
var _a;
|
|
434
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ security: [
|
|
435
|
+
{
|
|
436
|
+
scheme: 'bearer',
|
|
437
|
+
type: 'http'
|
|
438
|
+
}
|
|
439
|
+
], url: '/v1/runs/chain' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
440
|
+
};
|
|
441
|
+
exports.createRunChainV1RunsChainPost = createRunChainV1RunsChainPost;
|
|
424
442
|
/**
|
|
425
443
|
* Bulk Create Runs
|
|
426
444
|
* Create multiple runs with the same configuration.
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
export type AttachmentType = 'input' | 'output';
|
|
2
|
+
/**
|
|
3
|
+
* One step within a chain
|
|
4
|
+
*/
|
|
5
|
+
export type ChainStep = {
|
|
6
|
+
workflow_id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Alias to persist this step's outputs within the session
|
|
9
|
+
*/
|
|
10
|
+
session_alias?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Step-specific inputs; values must be string or {$ref: 'alias.outputs.path'}
|
|
13
|
+
*/
|
|
14
|
+
inputs?: {
|
|
15
|
+
[key: string]: string | RefValue;
|
|
16
|
+
} | null;
|
|
17
|
+
};
|
|
2
18
|
/**
|
|
3
19
|
* Schema for creating a connection
|
|
4
20
|
*/
|
|
@@ -112,6 +128,7 @@ export type MachineResponse = {
|
|
|
112
128
|
unkey_key_id: string;
|
|
113
129
|
status: MachineStatus;
|
|
114
130
|
is_available: boolean;
|
|
131
|
+
reserved_session_id?: string | null;
|
|
115
132
|
created_at: string;
|
|
116
133
|
last_seen: string;
|
|
117
134
|
pools?: Array<PoolResponse> | null;
|
|
@@ -128,6 +145,10 @@ export type MachineUpdate = {
|
|
|
128
145
|
status?: MachineStatus | null;
|
|
129
146
|
is_available?: boolean | null;
|
|
130
147
|
last_seen?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* Set to null to clear reservation; server will cancel queued/running session runs and clear
|
|
150
|
+
*/
|
|
151
|
+
reserved_session_id?: string | null;
|
|
131
152
|
};
|
|
132
153
|
export type MouseClickRequest = {
|
|
133
154
|
x?: number | null;
|
|
@@ -282,6 +303,13 @@ export type PowerShellSessionRequest = {
|
|
|
282
303
|
*/
|
|
283
304
|
session_id?: string | null;
|
|
284
305
|
};
|
|
306
|
+
/**
|
|
307
|
+
* Reference to a prior step's output within the same session.
|
|
308
|
+
* The wire shape is {"$ref": "alias.outputs.path"}.
|
|
309
|
+
*/
|
|
310
|
+
export type RefValue = {
|
|
311
|
+
$ref: string;
|
|
312
|
+
};
|
|
285
313
|
/**
|
|
286
314
|
* Schema for creating a request log
|
|
287
315
|
*/
|
|
@@ -410,6 +438,14 @@ export type RunBulkCreate = {
|
|
|
410
438
|
sensitive_input_values?: {
|
|
411
439
|
[key: string]: string;
|
|
412
440
|
} | null;
|
|
441
|
+
/**
|
|
442
|
+
* Join an existing session; overrides machine_id/pool_ids for all runs
|
|
443
|
+
*/
|
|
444
|
+
session_id?: string | null;
|
|
445
|
+
/**
|
|
446
|
+
* Start a new session for these runs; a new UUID will be generated and set on all runs. The first run will attempt to reserve a machine.
|
|
447
|
+
*/
|
|
448
|
+
start_session?: boolean | null;
|
|
413
449
|
};
|
|
414
450
|
/**
|
|
415
451
|
* Response for bulk run creation
|
|
@@ -469,6 +505,18 @@ export type RunCreate = {
|
|
|
469
505
|
sensitive_input_values?: {
|
|
470
506
|
[key: string]: string;
|
|
471
507
|
} | null;
|
|
508
|
+
/**
|
|
509
|
+
* Join an existing session; overrides machine_id/pool_ids
|
|
510
|
+
*/
|
|
511
|
+
session_id?: string | null;
|
|
512
|
+
/**
|
|
513
|
+
* Start a new session on the machine used by this run. Session ID will be this run's ID.
|
|
514
|
+
*/
|
|
515
|
+
start_session?: boolean | null;
|
|
516
|
+
/**
|
|
517
|
+
* Persist outputs under this alias for $ref in this session
|
|
518
|
+
*/
|
|
519
|
+
session_alias?: string | null;
|
|
472
520
|
};
|
|
473
521
|
/**
|
|
474
522
|
* Run response schema
|
|
@@ -496,6 +544,8 @@ export type RunResponse = {
|
|
|
496
544
|
sensitive_input_aliases?: {
|
|
497
545
|
[key: string]: string;
|
|
498
546
|
} | null;
|
|
547
|
+
session_id?: string | null;
|
|
548
|
+
session_alias?: string | null;
|
|
499
549
|
created_at: string;
|
|
500
550
|
};
|
|
501
551
|
export type RunStatus = 'scheduling' | 'running' | 'success' | 'cancelled' | 'error';
|
|
@@ -582,6 +632,33 @@ export type ValidationError = {
|
|
|
582
632
|
msg: string;
|
|
583
633
|
type: string;
|
|
584
634
|
};
|
|
635
|
+
/**
|
|
636
|
+
* Request to create and run a multi-step chain on a single reserved session/machine
|
|
637
|
+
*/
|
|
638
|
+
export type WorkflowChainCreate = {
|
|
639
|
+
steps: Array<ChainStep>;
|
|
640
|
+
shared_inputs?: {
|
|
641
|
+
[key: string]: unknown;
|
|
642
|
+
} | null;
|
|
643
|
+
shared_sensitive_inputs?: {
|
|
644
|
+
[key: string]: string;
|
|
645
|
+
} | null;
|
|
646
|
+
shared_file_inputs?: Array<FileInput> | null;
|
|
647
|
+
keep_session_after_completion?: boolean | null;
|
|
648
|
+
machine_id?: string | null;
|
|
649
|
+
/**
|
|
650
|
+
* Pool IDs to filter available machines when starting a new session. Machine must belong to ALL of these pools (intersection). Ignored when machine_id is provided.
|
|
651
|
+
*/
|
|
652
|
+
pool_ids?: Array<string> | null;
|
|
653
|
+
session_id?: string | null;
|
|
654
|
+
};
|
|
655
|
+
/**
|
|
656
|
+
* Response for chain creation
|
|
657
|
+
*/
|
|
658
|
+
export type WorkflowChainResponse = {
|
|
659
|
+
session_id: string;
|
|
660
|
+
run_ids: Array<string>;
|
|
661
|
+
};
|
|
585
662
|
/**
|
|
586
663
|
* Schema for creating a workflow
|
|
587
664
|
*/
|
|
@@ -1279,6 +1356,26 @@ export type UpdateRunV1RunsRunIdPatchResponses = {
|
|
|
1279
1356
|
200: RunResponse;
|
|
1280
1357
|
};
|
|
1281
1358
|
export type UpdateRunV1RunsRunIdPatchResponse = UpdateRunV1RunsRunIdPatchResponses[keyof UpdateRunV1RunsRunIdPatchResponses];
|
|
1359
|
+
export type CreateRunChainV1RunsChainPostData = {
|
|
1360
|
+
body: WorkflowChainCreate;
|
|
1361
|
+
path?: never;
|
|
1362
|
+
query?: never;
|
|
1363
|
+
url: '/v1/runs/chain';
|
|
1364
|
+
};
|
|
1365
|
+
export type CreateRunChainV1RunsChainPostErrors = {
|
|
1366
|
+
/**
|
|
1367
|
+
* Validation Error
|
|
1368
|
+
*/
|
|
1369
|
+
422: HttpValidationError;
|
|
1370
|
+
};
|
|
1371
|
+
export type CreateRunChainV1RunsChainPostError = CreateRunChainV1RunsChainPostErrors[keyof CreateRunChainV1RunsChainPostErrors];
|
|
1372
|
+
export type CreateRunChainV1RunsChainPostResponses = {
|
|
1373
|
+
/**
|
|
1374
|
+
* Successful Response
|
|
1375
|
+
*/
|
|
1376
|
+
201: WorkflowChainResponse;
|
|
1377
|
+
};
|
|
1378
|
+
export type CreateRunChainV1RunsChainPostResponse = CreateRunChainV1RunsChainPostResponses[keyof CreateRunChainV1RunsChainPostResponses];
|
|
1282
1379
|
export type BulkCreateRunsV1RunsBulkPostData = {
|
|
1283
1380
|
body: RunBulkCreate;
|
|
1284
1381
|
path?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* });
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
import { type MachineResponse, type MachinePoolUpdate, type PoolResponse, type PoolCreate, type PoolUpdate, type PoolWithMachines, type MachinePoolAssignment, type WorkflowResponse, type RunResponse, type ConnectionResponse, type TrajectoryResponse, type PaginatedResponseMachineResponse, type PaginatedResponsePoolResponse, type PaginatedResponseWorkflowResponse, type PaginatedResponseRunResponse, type PaginatedResponseConnectionResponse, type PaginatedResponseTrajectoryResponse, type MachineStatus, type RunStatus, type ConnectionStatus, type MachineCreate, type WorkflowCreate, type RunCreate, type RunBulkCreate, type RunBulkCreateResponse, type FileInput, type ConnectionCreate, type TrajectoryCreate, type MachineUpdate, type WorkflowUpdate, type RunUpdate, type TrajectoryUpdate, type RunAttachmentCreate, type RunAttachmentUpdate, type RunAttachmentResponse, type RunAttachmentDownloadUrlResponse, type AttachmentType, type PaginatedResponseRunAttachmentResponse } from './client/types.gen';
|
|
28
|
+
import { type MachineResponse, type MachinePoolUpdate, type PoolResponse, type PoolCreate, type PoolUpdate, type PoolWithMachines, type MachinePoolAssignment, type WorkflowResponse, type RunResponse, type ConnectionResponse, type TrajectoryResponse, type PaginatedResponseMachineResponse, type PaginatedResponsePoolResponse, type PaginatedResponseWorkflowResponse, type PaginatedResponseRunResponse, type PaginatedResponseConnectionResponse, type PaginatedResponseTrajectoryResponse, type MachineStatus, type RunStatus, type ConnectionStatus, type MachineCreate, type WorkflowCreate, type RunCreate, type RunBulkCreate, type RunBulkCreateResponse, type WorkflowChainCreate, type WorkflowChainResponse, type FileInput, type ConnectionCreate, type TrajectoryCreate, type MachineUpdate, type WorkflowUpdate, type RunUpdate, type TrajectoryUpdate, type RunAttachmentCreate, type RunAttachmentUpdate, type RunAttachmentResponse, type RunAttachmentDownloadUrlResponse, type AttachmentType, type PaginatedResponseRunAttachmentResponse } from './client/types.gen';
|
|
29
29
|
export * from './client/types.gen';
|
|
30
30
|
export * from './client/sdk.gen';
|
|
31
31
|
export * from './client/client.gen';
|
|
@@ -112,6 +112,24 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
112
112
|
data?: MachineResponse;
|
|
113
113
|
error?: any;
|
|
114
114
|
}>;
|
|
115
|
+
/**
|
|
116
|
+
* Clear any reserved session on the machine.
|
|
117
|
+
*
|
|
118
|
+
* Sends reserved_session_id=null; backend will cancel queued/running session runs
|
|
119
|
+
* and then clear the reservation per API contract.
|
|
120
|
+
*
|
|
121
|
+
* @param machineId - The ID of the machine
|
|
122
|
+
*/
|
|
123
|
+
clearSession: (machineId: string) => Promise<({
|
|
124
|
+
data: undefined;
|
|
125
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
126
|
+
} | {
|
|
127
|
+
data: MachineResponse;
|
|
128
|
+
error: undefined;
|
|
129
|
+
}) & {
|
|
130
|
+
request: Request;
|
|
131
|
+
response: Response;
|
|
132
|
+
}>;
|
|
115
133
|
/**
|
|
116
134
|
* Delete a machine
|
|
117
135
|
*
|
|
@@ -447,6 +465,8 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
447
465
|
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
448
466
|
* @param data.input_values - Optional input values for workflow variables
|
|
449
467
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
468
|
+
* @param data.start_session - Optional: start a new machine session for this run
|
|
469
|
+
* @param data.session_id - Optional: join an existing session; ignores machine_id/pool_ids
|
|
450
470
|
* @returns Created run details
|
|
451
471
|
*
|
|
452
472
|
* @example
|
|
@@ -489,6 +509,8 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
489
509
|
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
490
510
|
* @param data.input_values - Optional input values for workflow variables
|
|
491
511
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
512
|
+
* @param data.start_session - Optional: start a new session for all created runs
|
|
513
|
+
* @param data.session_id - Optional: join an existing session for all runs
|
|
492
514
|
* @returns Details about created runs and any failures
|
|
493
515
|
*
|
|
494
516
|
* @example
|
|
@@ -522,6 +544,24 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
522
544
|
request: Request;
|
|
523
545
|
response: Response;
|
|
524
546
|
}>;
|
|
547
|
+
/**
|
|
548
|
+
* Create a chained run sequence on a single reserved machine session.
|
|
549
|
+
*
|
|
550
|
+
* @param data - WorkflowChainCreate with steps (session_alias, inputs),
|
|
551
|
+
* optional shared inputs/sensitive/file inputs, and either
|
|
552
|
+
* session_id to join or machine_id/pool_id to start a session.
|
|
553
|
+
* @returns WorkflowChainResponse containing session_id and run_ids
|
|
554
|
+
*/
|
|
555
|
+
chain: (data: WorkflowChainCreate) => Promise<({
|
|
556
|
+
data: undefined;
|
|
557
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
558
|
+
} | {
|
|
559
|
+
data: WorkflowChainResponse;
|
|
560
|
+
error: undefined;
|
|
561
|
+
}) & {
|
|
562
|
+
request: Request;
|
|
563
|
+
response: Response;
|
|
564
|
+
}>;
|
|
525
565
|
/**
|
|
526
566
|
* Get a specific run by ID
|
|
527
567
|
*
|
package/dist/index.js
CHANGED
|
@@ -160,6 +160,22 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
160
160
|
body: data,
|
|
161
161
|
});
|
|
162
162
|
}),
|
|
163
|
+
/**
|
|
164
|
+
* Clear any reserved session on the machine.
|
|
165
|
+
*
|
|
166
|
+
* Sends reserved_session_id=null; backend will cancel queued/running session runs
|
|
167
|
+
* and then clear the reservation per API contract.
|
|
168
|
+
*
|
|
169
|
+
* @param machineId - The ID of the machine
|
|
170
|
+
*/
|
|
171
|
+
clearSession: (machineId) => __awaiter(this, void 0, void 0, function* () {
|
|
172
|
+
const update = { reserved_session_id: null };
|
|
173
|
+
return (0, sdk_gen_1.updateMachineV1MachinesMachineIdPatch)({
|
|
174
|
+
client,
|
|
175
|
+
path: { machine_id: machineId },
|
|
176
|
+
body: update,
|
|
177
|
+
});
|
|
178
|
+
}),
|
|
163
179
|
/**
|
|
164
180
|
* Delete a machine
|
|
165
181
|
*
|
|
@@ -434,6 +450,8 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
434
450
|
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
435
451
|
* @param data.input_values - Optional input values for workflow variables
|
|
436
452
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
453
|
+
* @param data.start_session - Optional: start a new machine session for this run
|
|
454
|
+
* @param data.session_id - Optional: join an existing session; ignores machine_id/pool_ids
|
|
437
455
|
* @returns Created run details
|
|
438
456
|
*
|
|
439
457
|
* @example
|
|
@@ -472,6 +490,8 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
472
490
|
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
473
491
|
* @param data.input_values - Optional input values for workflow variables
|
|
474
492
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
493
|
+
* @param data.start_session - Optional: start a new session for all created runs
|
|
494
|
+
* @param data.session_id - Optional: join an existing session for all runs
|
|
475
495
|
* @returns Details about created runs and any failures
|
|
476
496
|
*
|
|
477
497
|
* @example
|
|
@@ -501,6 +521,20 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
501
521
|
body: data,
|
|
502
522
|
});
|
|
503
523
|
}),
|
|
524
|
+
/**
|
|
525
|
+
* Create a chained run sequence on a single reserved machine session.
|
|
526
|
+
*
|
|
527
|
+
* @param data - WorkflowChainCreate with steps (session_alias, inputs),
|
|
528
|
+
* optional shared inputs/sensitive/file inputs, and either
|
|
529
|
+
* session_id to join or machine_id/pool_id to start a session.
|
|
530
|
+
* @returns WorkflowChainResponse containing session_id and run_ids
|
|
531
|
+
*/
|
|
532
|
+
chain: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
533
|
+
return (0, sdk_gen_1.createRunChainV1RunsChainPost)({
|
|
534
|
+
client,
|
|
535
|
+
body: data,
|
|
536
|
+
});
|
|
537
|
+
}),
|
|
504
538
|
/**
|
|
505
539
|
* Get a specific run by ID
|
|
506
540
|
*
|