cyberdesk 2.1.16 → 2.1.18
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 +53 -0
- package/dist/client/sdk.gen.d.ts +17 -6
- package/dist/client/sdk.gen.js +23 -3
- package/dist/client/types.gen.d.ts +71 -4
- package/dist/index.d.ts +51 -6
- package/dist/index.js +51 -6
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -46,6 +46,37 @@ if (status === 'success') {
|
|
|
46
46
|
}
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
## Desktop Parameters
|
|
50
|
+
|
|
51
|
+
Configure machine-specific values that automatically populate workflows running on specific desktops:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { createCyberdeskClient } from 'cyberdesk';
|
|
55
|
+
|
|
56
|
+
const client = createCyberdeskClient('your-api-key');
|
|
57
|
+
|
|
58
|
+
// Set desktop parameters for a machine
|
|
59
|
+
await client.machines.update('machine-id', {
|
|
60
|
+
machine_parameters: {
|
|
61
|
+
username: 'machine_specific_user',
|
|
62
|
+
api_url: 'https://api-region-east.example.com',
|
|
63
|
+
config_path: 'C:\\MachineA\\config.json'
|
|
64
|
+
},
|
|
65
|
+
machine_sensitive_parameters: {
|
|
66
|
+
password: 'actual_secret_value', // Stored securely in Basis Theory
|
|
67
|
+
api_key: 'actual_api_key_123'
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Use in workflows with standard syntax:
|
|
73
|
+
```
|
|
74
|
+
Log in to {api_url} using {username} and password {$password}.
|
|
75
|
+
Then open the config at {config_path}.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Desktop parameters automatically override run-level inputs and persist across runs. See the [Desktop Parameters docs](https://docs.cyberdesk.io/concepts/desktop-parameters) for more details.
|
|
79
|
+
|
|
49
80
|
## Full Documentation
|
|
50
81
|
|
|
51
82
|
For complete documentation including advanced usage, error handling, and all available methods, visit:
|
|
@@ -111,6 +142,28 @@ const machines: { data?: PaginatedResponseMachineResponse } =
|
|
|
111
142
|
await client.machines.list();
|
|
112
143
|
```
|
|
113
144
|
|
|
145
|
+
## Testing
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Install dependencies
|
|
149
|
+
npm install
|
|
150
|
+
|
|
151
|
+
# Set up environment
|
|
152
|
+
cp .env.example .env
|
|
153
|
+
# Edit with your credentials
|
|
154
|
+
|
|
155
|
+
# Run all tests
|
|
156
|
+
npm test
|
|
157
|
+
|
|
158
|
+
# Run only webhook tests
|
|
159
|
+
npm run test:webhooks
|
|
160
|
+
|
|
161
|
+
# Run only integration tests (real API calls)
|
|
162
|
+
npm run test:integration
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
See [tests/README.md](./tests/README.md) for details.
|
|
166
|
+
|
|
114
167
|
## License
|
|
115
168
|
|
|
116
169
|
MIT
|
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, CreateRunChainV1RunsChainPostData, BulkCreateRunsV1RunsBulkPostData, RetryRunV1RunsRunIdRetryPostData, 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, MouseDragV1ComputerMachineIdInputMouseDragPostData, 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, RetryRunV1RunsRunIdRetryPostData, 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, CopyToClipboardV1ComputerMachineIdCopyToClipboardPostData, GetMousePositionV1ComputerMachineIdInputMousePositionGetData, MouseMoveV1ComputerMachineIdInputMouseMovePostData, MouseClickV1ComputerMachineIdInputMouseClickPostData, MouseScrollV1ComputerMachineIdInputMouseScrollPostData, MouseDragV1ComputerMachineIdInputMouseDragPostData, 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
|
|
@@ -26,11 +26,9 @@ export declare const healthCheckV1HealthGet: <ThrowOnError extends boolean = fal
|
|
|
26
26
|
* Database Health Check
|
|
27
27
|
* Database health check endpoint.
|
|
28
28
|
*
|
|
29
|
-
* Verifies database connectivity without authentication.
|
|
29
|
+
* Verifies database connectivity and pool status without authentication.
|
|
30
30
|
*/
|
|
31
|
-
export declare const databaseHealthCheckV1HealthDbGet: <ThrowOnError extends boolean = false>(options?: Options<DatabaseHealthCheckV1HealthDbGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<
|
|
32
|
-
[key: string]: string;
|
|
33
|
-
}, unknown, ThrowOnError>;
|
|
31
|
+
export declare const databaseHealthCheckV1HealthDbGet: <ThrowOnError extends boolean = false>(options?: Options<DatabaseHealthCheckV1HealthDbGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, unknown, ThrowOnError>;
|
|
34
32
|
/**
|
|
35
33
|
* List Machines
|
|
36
34
|
* List all machines for the authenticated organization.
|
|
@@ -49,7 +47,10 @@ export declare const createMachineV1MachinesPost: <ThrowOnError extends boolean
|
|
|
49
47
|
* Delete Machine
|
|
50
48
|
* Delete a machine.
|
|
51
49
|
*
|
|
52
|
-
*
|
|
50
|
+
* Associated runs are PRESERVED with machine_id set to NULL.
|
|
51
|
+
* This ensures run history is never lost when a machine is deleted.
|
|
52
|
+
* Connections and request logs are cascade deleted.
|
|
53
|
+
*
|
|
53
54
|
* The machine must belong to the authenticated organization.
|
|
54
55
|
*/
|
|
55
56
|
export declare const deleteMachineV1MachinesMachineIdDelete: <ThrowOnError extends boolean = false>(options: Options<DeleteMachineV1MachinesMachineIdDeleteData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
@@ -66,6 +67,9 @@ export declare const getMachineV1MachinesMachineIdGet: <ThrowOnError extends boo
|
|
|
66
67
|
*
|
|
67
68
|
* Only the fields provided in the request body will be updated.
|
|
68
69
|
* The machine must belong to the authenticated organization.
|
|
70
|
+
*
|
|
71
|
+
* For machine_sensitive_parameters: provide actual secret values and they will be
|
|
72
|
+
* stored in Basis Theory. Only aliases will be stored in the database.
|
|
69
73
|
*/
|
|
70
74
|
export declare const updateMachineV1MachinesMachineIdPatch: <ThrowOnError extends boolean = false>(options: Options<UpdateMachineV1MachinesMachineIdPatchData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").MachineResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
71
75
|
/**
|
|
@@ -432,6 +436,13 @@ export declare const keyboardTypeV1ComputerMachineIdInputKeyboardTypePost: <Thro
|
|
|
432
436
|
* Send a key combination (e.g., 'ctrl+a', 'alt+tab'). Uses 'keys' field to match Piglet expectations.
|
|
433
437
|
*/
|
|
434
438
|
export declare const keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost: <ThrowOnError extends boolean = false>(options: Options<KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
439
|
+
/**
|
|
440
|
+
* Copy to clipboard via Ctrl+C
|
|
441
|
+
* Execute Ctrl+C and return clipboard contents with the specified key name.
|
|
442
|
+
*/
|
|
443
|
+
export declare const copyToClipboardV1ComputerMachineIdCopyToClipboardPost: <ThrowOnError extends boolean = false>(options: Options<CopyToClipboardV1ComputerMachineIdCopyToClipboardPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
444
|
+
[key: string]: unknown;
|
|
445
|
+
}, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
435
446
|
/**
|
|
436
447
|
* Get mouse position
|
|
437
448
|
* Get the current mouse cursor position.
|
package/dist/client/sdk.gen.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
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.retryRunV1RunsRunIdRetryPost = 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.mouseDragV1ComputerMachineIdInputMouseDragPost = exports.mouseScrollV1ComputerMachineIdInputMouseScrollPost = exports.mouseClickV1ComputerMachineIdInputMouseClickPost = exports.mouseMoveV1ComputerMachineIdInputMouseMovePost = exports.getMousePositionV1ComputerMachineIdInputMousePositionGet = exports.keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = exports.keyboardTypeV1ComputerMachineIdInputKeyboardTypePost = exports.getDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGet = exports.getScreenshotV1ComputerMachineIdDisplayScreenshotGet = exports.getLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGet = exports.updateTrajectoryV1TrajectoriesTrajectoryIdPatch = exports.getTrajectoryV1TrajectoriesTrajectoryIdGet = void 0;
|
|
5
|
+
exports.healthDbHealthDbGet = exports.healthHealthGet = exports.rootGet = exports.dummyTestEndpointV1TestPost = exports.powershellSessionV1ComputerMachineIdShellPowershellSessionPost = exports.powershellExecV1ComputerMachineIdShellPowershellExecPost = exports.fsWriteV1ComputerMachineIdFsWritePost = exports.fsReadV1ComputerMachineIdFsReadGet = exports.fsListV1ComputerMachineIdFsListGet = exports.mouseDragV1ComputerMachineIdInputMouseDragPost = exports.mouseScrollV1ComputerMachineIdInputMouseScrollPost = exports.mouseClickV1ComputerMachineIdInputMouseClickPost = exports.mouseMoveV1ComputerMachineIdInputMouseMovePost = exports.getMousePositionV1ComputerMachineIdInputMousePositionGet = exports.copyToClipboardV1ComputerMachineIdCopyToClipboardPost = exports.keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = exports.keyboardTypeV1ComputerMachineIdInputKeyboardTypePost = exports.getDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGet = exports.getScreenshotV1ComputerMachineIdDisplayScreenshotGet = exports.getLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGet = exports.updateTrajectoryV1TrajectoriesTrajectoryIdPatch = exports.getTrajectoryV1TrajectoriesTrajectoryIdGet = void 0;
|
|
6
6
|
const client_gen_1 = require("./client.gen");
|
|
7
7
|
/**
|
|
8
8
|
* Health Check
|
|
@@ -19,7 +19,7 @@ exports.healthCheckV1HealthGet = healthCheckV1HealthGet;
|
|
|
19
19
|
* Database Health Check
|
|
20
20
|
* Database health check endpoint.
|
|
21
21
|
*
|
|
22
|
-
* Verifies database connectivity without authentication.
|
|
22
|
+
* Verifies database connectivity and pool status without authentication.
|
|
23
23
|
*/
|
|
24
24
|
const databaseHealthCheckV1HealthDbGet = (options) => {
|
|
25
25
|
var _a;
|
|
@@ -62,7 +62,10 @@ exports.createMachineV1MachinesPost = createMachineV1MachinesPost;
|
|
|
62
62
|
* Delete Machine
|
|
63
63
|
* Delete a machine.
|
|
64
64
|
*
|
|
65
|
-
*
|
|
65
|
+
* Associated runs are PRESERVED with machine_id set to NULL.
|
|
66
|
+
* This ensures run history is never lost when a machine is deleted.
|
|
67
|
+
* Connections and request logs are cascade deleted.
|
|
68
|
+
*
|
|
66
69
|
* The machine must belong to the authenticated organization.
|
|
67
70
|
*/
|
|
68
71
|
const deleteMachineV1MachinesMachineIdDelete = (options) => {
|
|
@@ -97,6 +100,9 @@ exports.getMachineV1MachinesMachineIdGet = getMachineV1MachinesMachineIdGet;
|
|
|
97
100
|
*
|
|
98
101
|
* Only the fields provided in the request body will be updated.
|
|
99
102
|
* The machine must belong to the authenticated organization.
|
|
103
|
+
*
|
|
104
|
+
* For machine_sensitive_parameters: provide actual secret values and they will be
|
|
105
|
+
* stored in Basis Theory. Only aliases will be stored in the database.
|
|
100
106
|
*/
|
|
101
107
|
const updateMachineV1MachinesMachineIdPatch = (options) => {
|
|
102
108
|
var _a;
|
|
@@ -920,6 +926,20 @@ const keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = (options) => {
|
|
|
920
926
|
], url: '/v1/computer/{machine_id}/input/keyboard/key' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
921
927
|
};
|
|
922
928
|
exports.keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost;
|
|
929
|
+
/**
|
|
930
|
+
* Copy to clipboard via Ctrl+C
|
|
931
|
+
* Execute Ctrl+C and return clipboard contents with the specified key name.
|
|
932
|
+
*/
|
|
933
|
+
const copyToClipboardV1ComputerMachineIdCopyToClipboardPost = (options) => {
|
|
934
|
+
var _a;
|
|
935
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ security: [
|
|
936
|
+
{
|
|
937
|
+
scheme: 'bearer',
|
|
938
|
+
type: 'http'
|
|
939
|
+
}
|
|
940
|
+
], url: '/v1/computer/{machine_id}/copy_to_clipboard' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
941
|
+
};
|
|
942
|
+
exports.copyToClipboardV1ComputerMachineIdCopyToClipboardPost = copyToClipboardV1ComputerMachineIdCopyToClipboardPost;
|
|
923
943
|
/**
|
|
924
944
|
* Get mouse position
|
|
925
945
|
* Get the current mouse cursor position.
|
|
@@ -45,6 +45,12 @@ export type ConnectionResponse = {
|
|
|
45
45
|
status: ConnectionStatus;
|
|
46
46
|
};
|
|
47
47
|
export type ConnectionStatus = 'connected' | 'disconnected' | 'error';
|
|
48
|
+
export type CopyToClipboardRequest = {
|
|
49
|
+
/**
|
|
50
|
+
* Key name for the copied data
|
|
51
|
+
*/
|
|
52
|
+
text: string;
|
|
53
|
+
};
|
|
48
54
|
export type DisplayDimensions = {
|
|
49
55
|
width: number;
|
|
50
56
|
height: number;
|
|
@@ -99,6 +105,18 @@ export type MachineCreate = {
|
|
|
99
105
|
version?: string | null;
|
|
100
106
|
hostname?: string | null;
|
|
101
107
|
os_info?: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Machine-specific input values that auto-populate runs
|
|
110
|
+
*/
|
|
111
|
+
machine_parameters?: {
|
|
112
|
+
[key: string]: unknown;
|
|
113
|
+
} | null;
|
|
114
|
+
/**
|
|
115
|
+
* Machine-specific sensitive input aliases (stored in Basis Theory)
|
|
116
|
+
*/
|
|
117
|
+
machine_sensitive_parameters?: {
|
|
118
|
+
[key: string]: string;
|
|
119
|
+
} | null;
|
|
102
120
|
unkey_key_id: string;
|
|
103
121
|
};
|
|
104
122
|
/**
|
|
@@ -128,6 +146,18 @@ export type MachineResponse = {
|
|
|
128
146
|
version?: string | null;
|
|
129
147
|
hostname?: string | null;
|
|
130
148
|
os_info?: string | null;
|
|
149
|
+
/**
|
|
150
|
+
* Machine-specific input values that auto-populate runs
|
|
151
|
+
*/
|
|
152
|
+
machine_parameters?: {
|
|
153
|
+
[key: string]: unknown;
|
|
154
|
+
} | null;
|
|
155
|
+
/**
|
|
156
|
+
* Machine-specific sensitive input aliases (stored in Basis Theory)
|
|
157
|
+
*/
|
|
158
|
+
machine_sensitive_parameters?: {
|
|
159
|
+
[key: string]: string;
|
|
160
|
+
} | null;
|
|
131
161
|
id: string;
|
|
132
162
|
user_id?: string | null;
|
|
133
163
|
organization_id?: string | null;
|
|
@@ -156,6 +186,18 @@ export type MachineUpdate = {
|
|
|
156
186
|
* Set to null to clear reservation; server will cancel queued/running session runs and clear
|
|
157
187
|
*/
|
|
158
188
|
reserved_session_id?: string | null;
|
|
189
|
+
/**
|
|
190
|
+
* Machine-specific input values. Provide empty dict {} to clear all.
|
|
191
|
+
*/
|
|
192
|
+
machine_parameters?: {
|
|
193
|
+
[key: string]: unknown;
|
|
194
|
+
} | null;
|
|
195
|
+
/**
|
|
196
|
+
* Machine-specific sensitive input values (will be stored in Basis Theory). Provide empty dict {} to clear all.
|
|
197
|
+
*/
|
|
198
|
+
machine_sensitive_parameters?: {
|
|
199
|
+
[key: string]: string;
|
|
200
|
+
} | null;
|
|
159
201
|
};
|
|
160
202
|
export type MouseClickRequest = {
|
|
161
203
|
x?: number | null;
|
|
@@ -310,6 +352,10 @@ export type PowerShellExecRequest = {
|
|
|
310
352
|
* Session ID to use
|
|
311
353
|
*/
|
|
312
354
|
session_id?: string | null;
|
|
355
|
+
/**
|
|
356
|
+
* Maximum time in seconds to wait for command completion before continuing. The command will continue running in the background after timeout (default: 30.0)
|
|
357
|
+
*/
|
|
358
|
+
timeout?: number | null;
|
|
313
359
|
};
|
|
314
360
|
export type PowerShellSessionRequest = {
|
|
315
361
|
/**
|
|
@@ -835,11 +881,8 @@ export type DatabaseHealthCheckV1HealthDbGetResponses = {
|
|
|
835
881
|
/**
|
|
836
882
|
* Successful Response
|
|
837
883
|
*/
|
|
838
|
-
200:
|
|
839
|
-
[key: string]: string;
|
|
840
|
-
};
|
|
884
|
+
200: unknown;
|
|
841
885
|
};
|
|
842
|
-
export type DatabaseHealthCheckV1HealthDbGetResponse = DatabaseHealthCheckV1HealthDbGetResponses[keyof DatabaseHealthCheckV1HealthDbGetResponses];
|
|
843
886
|
export type ListMachinesV1MachinesGetData = {
|
|
844
887
|
body?: never;
|
|
845
888
|
path?: never;
|
|
@@ -2156,6 +2199,30 @@ export type KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostResponses = {
|
|
|
2156
2199
|
204: void;
|
|
2157
2200
|
};
|
|
2158
2201
|
export type KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostResponse = KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostResponses[keyof KeyboardKeyV1ComputerMachineIdInputKeyboardKeyPostResponses];
|
|
2202
|
+
export type CopyToClipboardV1ComputerMachineIdCopyToClipboardPostData = {
|
|
2203
|
+
body: CopyToClipboardRequest;
|
|
2204
|
+
path: {
|
|
2205
|
+
machine_id: string;
|
|
2206
|
+
};
|
|
2207
|
+
query?: never;
|
|
2208
|
+
url: '/v1/computer/{machine_id}/copy_to_clipboard';
|
|
2209
|
+
};
|
|
2210
|
+
export type CopyToClipboardV1ComputerMachineIdCopyToClipboardPostErrors = {
|
|
2211
|
+
/**
|
|
2212
|
+
* Validation Error
|
|
2213
|
+
*/
|
|
2214
|
+
422: HttpValidationError;
|
|
2215
|
+
};
|
|
2216
|
+
export type CopyToClipboardV1ComputerMachineIdCopyToClipboardPostError = CopyToClipboardV1ComputerMachineIdCopyToClipboardPostErrors[keyof CopyToClipboardV1ComputerMachineIdCopyToClipboardPostErrors];
|
|
2217
|
+
export type CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponses = {
|
|
2218
|
+
/**
|
|
2219
|
+
* Successful Response
|
|
2220
|
+
*/
|
|
2221
|
+
200: {
|
|
2222
|
+
[key: string]: unknown;
|
|
2223
|
+
};
|
|
2224
|
+
};
|
|
2225
|
+
export type CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponse = CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponses[keyof CopyToClipboardV1ComputerMachineIdCopyToClipboardPostResponses];
|
|
2159
2226
|
export type GetMousePositionV1ComputerMachineIdInputMousePositionGetData = {
|
|
2160
2227
|
body?: never;
|
|
2161
2228
|
path: {
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,8 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
51
51
|
* @param params.skip - Number of items to skip (for pagination)
|
|
52
52
|
* @param params.limit - Maximum number of items to return
|
|
53
53
|
* @param params.status - Filter by machine status
|
|
54
|
-
* @returns Paginated list of machines
|
|
54
|
+
* @returns Paginated list of machines. Each machine includes desktop parameters
|
|
55
|
+
* (machine_parameters, machine_sensitive_parameters) if configured.
|
|
55
56
|
*/
|
|
56
57
|
list: (params?: {
|
|
57
58
|
skip?: number;
|
|
@@ -73,6 +74,12 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
73
74
|
* Create a new machine
|
|
74
75
|
*
|
|
75
76
|
* @param data - Machine configuration
|
|
77
|
+
* @param data.fingerprint - Unique machine fingerprint
|
|
78
|
+
* @param data.unkey_key_id - API key ID for authentication
|
|
79
|
+
* @param data.name - Optional machine name
|
|
80
|
+
* @param data.machine_parameters - Optional dict of desktop parameters
|
|
81
|
+
* @param data.machine_sensitive_parameters - Optional dict of sensitive desktop parameters
|
|
82
|
+
* (provide actual values, they'll be stored in Basis Theory)
|
|
76
83
|
* @returns Created machine details
|
|
77
84
|
*/
|
|
78
85
|
create: (data: MachineCreate) => Promise<({
|
|
@@ -89,7 +96,11 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
89
96
|
* Get a specific machine by ID
|
|
90
97
|
*
|
|
91
98
|
* @param machineId - The ID of the machine
|
|
92
|
-
* @returns Machine details
|
|
99
|
+
* @returns Machine details including:
|
|
100
|
+
* - Basic info: id, name, status, fingerprint, etc.
|
|
101
|
+
* - machine_parameters: Dict of desktop parameters (if configured)
|
|
102
|
+
* - machine_sensitive_parameters: Dict of sensitive parameter aliases (if configured)
|
|
103
|
+
* - pools: List of pools this machine belongs to
|
|
93
104
|
*/
|
|
94
105
|
get: (machineId: string) => Promise<({
|
|
95
106
|
data: undefined;
|
|
@@ -105,12 +116,40 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
105
116
|
* Update a machine
|
|
106
117
|
*
|
|
107
118
|
* @param machineId - The ID of the machine to update
|
|
108
|
-
* @param data - Update data
|
|
119
|
+
* @param data - Update data with fields:
|
|
120
|
+
* - name: Optional machine name
|
|
121
|
+
* - machine_parameters: Optional dict of machine-specific input values that
|
|
122
|
+
* automatically populate runs on this desktop. Use {} to clear all.
|
|
123
|
+
* - machine_sensitive_parameters: Optional dict of sensitive parameters
|
|
124
|
+
* (provide actual values, they'll be stored in Basis Theory). Use {} to clear all.
|
|
125
|
+
* - status, is_available, hostname, os_info, version: Other machine fields
|
|
126
|
+
* - reserved_session_id: Set to null to clear reservation
|
|
127
|
+
*
|
|
128
|
+
* Desktop Parameters:
|
|
129
|
+
* Machine parameters automatically merge into runs assigned to this machine,
|
|
130
|
+
* overriding run-level input values. Use {param_name} or {$sensitive_param}
|
|
131
|
+
* syntax in workflow prompts.
|
|
109
132
|
*
|
|
110
|
-
* Note: linked_keepalive_machine_id is not writable; it is managed by
|
|
111
|
-
* Cyberdriver link events and will be set/cleared automatically by the
|
|
112
|
-
* platform.
|
|
113
133
|
* @returns Updated machine details
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* await client.machines.update('machine-id', {
|
|
138
|
+
* machine_parameters: {
|
|
139
|
+
* username: 'machine_specific_user',
|
|
140
|
+
* api_url: 'https://api.example.com'
|
|
141
|
+
* },
|
|
142
|
+
* machine_sensitive_parameters: {
|
|
143
|
+
* password: 'actual_secret_value' // Stored securely in Basis Theory
|
|
144
|
+
* }
|
|
145
|
+
* });
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @remarks
|
|
149
|
+
* - linked_keepalive_machine_id is not writable; it is managed by
|
|
150
|
+
* Cyberdriver link events and will be set/cleared automatically.
|
|
151
|
+
* - For machine_sensitive_parameters, provide actual secret values.
|
|
152
|
+
* They will be stored securely in Basis Theory and only aliases stored in DB.
|
|
114
153
|
*/
|
|
115
154
|
update: (machineId: string, data: MachineUpdate) => Promise<{
|
|
116
155
|
data?: MachineResponse;
|
|
@@ -137,6 +176,12 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
137
176
|
/**
|
|
138
177
|
* Delete a machine
|
|
139
178
|
*
|
|
179
|
+
* Associated runs are preserved with machine_id set to NULL to maintain run history.
|
|
180
|
+
* Connections and request logs are cascade deleted.
|
|
181
|
+
*
|
|
182
|
+
* If the machine has desktop sensitive parameters, they will be automatically
|
|
183
|
+
* cleaned up from Basis Theory before deletion.
|
|
184
|
+
*
|
|
140
185
|
* @param machineId - The ID of the machine to delete
|
|
141
186
|
*/
|
|
142
187
|
delete: (machineId: string) => Promise<({
|
package/dist/index.js
CHANGED
|
@@ -110,7 +110,8 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
110
110
|
* @param params.skip - Number of items to skip (for pagination)
|
|
111
111
|
* @param params.limit - Maximum number of items to return
|
|
112
112
|
* @param params.status - Filter by machine status
|
|
113
|
-
* @returns Paginated list of machines
|
|
113
|
+
* @returns Paginated list of machines. Each machine includes desktop parameters
|
|
114
|
+
* (machine_parameters, machine_sensitive_parameters) if configured.
|
|
114
115
|
*/
|
|
115
116
|
list: (params) => __awaiter(this, void 0, void 0, function* () {
|
|
116
117
|
const query = {
|
|
@@ -126,6 +127,12 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
126
127
|
* Create a new machine
|
|
127
128
|
*
|
|
128
129
|
* @param data - Machine configuration
|
|
130
|
+
* @param data.fingerprint - Unique machine fingerprint
|
|
131
|
+
* @param data.unkey_key_id - API key ID for authentication
|
|
132
|
+
* @param data.name - Optional machine name
|
|
133
|
+
* @param data.machine_parameters - Optional dict of desktop parameters
|
|
134
|
+
* @param data.machine_sensitive_parameters - Optional dict of sensitive desktop parameters
|
|
135
|
+
* (provide actual values, they'll be stored in Basis Theory)
|
|
129
136
|
* @returns Created machine details
|
|
130
137
|
*/
|
|
131
138
|
create: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -138,7 +145,11 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
138
145
|
* Get a specific machine by ID
|
|
139
146
|
*
|
|
140
147
|
* @param machineId - The ID of the machine
|
|
141
|
-
* @returns Machine details
|
|
148
|
+
* @returns Machine details including:
|
|
149
|
+
* - Basic info: id, name, status, fingerprint, etc.
|
|
150
|
+
* - machine_parameters: Dict of desktop parameters (if configured)
|
|
151
|
+
* - machine_sensitive_parameters: Dict of sensitive parameter aliases (if configured)
|
|
152
|
+
* - pools: List of pools this machine belongs to
|
|
142
153
|
*/
|
|
143
154
|
get: (machineId) => __awaiter(this, void 0, void 0, function* () {
|
|
144
155
|
return (0, sdk_gen_1.getMachineV1MachinesMachineIdGet)({
|
|
@@ -150,12 +161,40 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
150
161
|
* Update a machine
|
|
151
162
|
*
|
|
152
163
|
* @param machineId - The ID of the machine to update
|
|
153
|
-
* @param data - Update data
|
|
164
|
+
* @param data - Update data with fields:
|
|
165
|
+
* - name: Optional machine name
|
|
166
|
+
* - machine_parameters: Optional dict of machine-specific input values that
|
|
167
|
+
* automatically populate runs on this desktop. Use {} to clear all.
|
|
168
|
+
* - machine_sensitive_parameters: Optional dict of sensitive parameters
|
|
169
|
+
* (provide actual values, they'll be stored in Basis Theory). Use {} to clear all.
|
|
170
|
+
* - status, is_available, hostname, os_info, version: Other machine fields
|
|
171
|
+
* - reserved_session_id: Set to null to clear reservation
|
|
172
|
+
*
|
|
173
|
+
* Desktop Parameters:
|
|
174
|
+
* Machine parameters automatically merge into runs assigned to this machine,
|
|
175
|
+
* overriding run-level input values. Use {param_name} or {$sensitive_param}
|
|
176
|
+
* syntax in workflow prompts.
|
|
154
177
|
*
|
|
155
|
-
* Note: linked_keepalive_machine_id is not writable; it is managed by
|
|
156
|
-
* Cyberdriver link events and will be set/cleared automatically by the
|
|
157
|
-
* platform.
|
|
158
178
|
* @returns Updated machine details
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```typescript
|
|
182
|
+
* await client.machines.update('machine-id', {
|
|
183
|
+
* machine_parameters: {
|
|
184
|
+
* username: 'machine_specific_user',
|
|
185
|
+
* api_url: 'https://api.example.com'
|
|
186
|
+
* },
|
|
187
|
+
* machine_sensitive_parameters: {
|
|
188
|
+
* password: 'actual_secret_value' // Stored securely in Basis Theory
|
|
189
|
+
* }
|
|
190
|
+
* });
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* @remarks
|
|
194
|
+
* - linked_keepalive_machine_id is not writable; it is managed by
|
|
195
|
+
* Cyberdriver link events and will be set/cleared automatically.
|
|
196
|
+
* - For machine_sensitive_parameters, provide actual secret values.
|
|
197
|
+
* They will be stored securely in Basis Theory and only aliases stored in DB.
|
|
159
198
|
*/
|
|
160
199
|
update: (machineId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
161
200
|
return (0, sdk_gen_1.updateMachineV1MachinesMachineIdPatch)({
|
|
@@ -183,6 +222,12 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
183
222
|
/**
|
|
184
223
|
* Delete a machine
|
|
185
224
|
*
|
|
225
|
+
* Associated runs are preserved with machine_id set to NULL to maintain run history.
|
|
226
|
+
* Connections and request logs are cascade deleted.
|
|
227
|
+
*
|
|
228
|
+
* If the machine has desktop sensitive parameters, they will be automatically
|
|
229
|
+
* cleaned up from Basis Theory before deletion.
|
|
230
|
+
*
|
|
186
231
|
* @param machineId - The ID of the machine to delete
|
|
187
232
|
*/
|
|
188
233
|
delete: (machineId) => __awaiter(this, void 0, void 0, function* () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyberdesk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.18",
|
|
4
4
|
"description": "The official TypeScript SDK for Cyberdesk",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"generate": "openapi-ts",
|
|
14
14
|
"build": "npm run generate && tsc",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:watch": "vitest",
|
|
17
|
+
"test:webhooks": "vitest run tests/webhooks",
|
|
18
|
+
"test:integration": "vitest run tests/integration",
|
|
15
19
|
"prepublishOnly": "npm run build"
|
|
16
20
|
},
|
|
17
21
|
"repository": {
|
|
@@ -29,6 +33,10 @@
|
|
|
29
33
|
},
|
|
30
34
|
"devDependencies": {
|
|
31
35
|
"@hey-api/openapi-ts": "^0.66.6",
|
|
32
|
-
"
|
|
36
|
+
"@types/node": "^20.0.0",
|
|
37
|
+
"dotenv": "^16.0.0",
|
|
38
|
+
"svix": "^1.0.0",
|
|
39
|
+
"typescript": "^5.0.0",
|
|
40
|
+
"vitest": "^1.0.0"
|
|
33
41
|
}
|
|
34
42
|
}
|