cyberdesk 2.0.0 → 2.1.1
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 +47 -1
- package/dist/client/sdk.gen.js +129 -2
- package/dist/client/types.gen.d.ts +329 -0
- package/dist/index.d.ts +192 -14
- package/dist/index.js +196 -16
- 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, 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, FsListV1ComputerMachineIdFsListGetData, FsReadV1ComputerMachineIdFsReadGetData, FsWriteV1ComputerMachineIdFsWritePostData, PowershellExecV1ComputerMachineIdShellPowershellExecPostData, PowershellSessionV1ComputerMachineIdShellPowershellSessionPostData, DummyTestEndpointV1TestPostData, RootGetData } 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, 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, 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
|
|
@@ -68,6 +68,52 @@ export declare const getMachineV1MachinesMachineIdGet: <ThrowOnError extends boo
|
|
|
68
68
|
* The machine must belong to the authenticated organization.
|
|
69
69
|
*/
|
|
70
70
|
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
|
+
/**
|
|
72
|
+
* Get Machine Pools
|
|
73
|
+
* Get all pools that a machine belongs to.
|
|
74
|
+
*/
|
|
75
|
+
export declare const getMachinePoolsV1MachinesMachineIdPoolsGet: <ThrowOnError extends boolean = false>(options: Options<GetMachinePoolsV1MachinesMachineIdPoolsGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").PoolResponse[], import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
76
|
+
/**
|
|
77
|
+
* Update Machine Pools
|
|
78
|
+
* Update a machine's pool assignments.
|
|
79
|
+
* This replaces all existing pool assignments with the new ones.
|
|
80
|
+
*/
|
|
81
|
+
export declare const updateMachinePoolsV1MachinesMachineIdPoolsPut: <ThrowOnError extends boolean = false>(options: Options<UpdateMachinePoolsV1MachinesMachineIdPoolsPutData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").MachineResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
82
|
+
/**
|
|
83
|
+
* List Pools
|
|
84
|
+
* List all pools for the organization.
|
|
85
|
+
*/
|
|
86
|
+
export declare const listPoolsV1PoolsGet: <ThrowOnError extends boolean = false>(options?: Options<ListPoolsV1PoolsGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").PaginatedResponsePoolResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
87
|
+
/**
|
|
88
|
+
* Create Pool
|
|
89
|
+
* Create a new pool for organizing machines.
|
|
90
|
+
*/
|
|
91
|
+
export declare const createPoolV1PoolsPost: <ThrowOnError extends boolean = false>(options: Options<CreatePoolV1PoolsPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").PoolResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
92
|
+
/**
|
|
93
|
+
* Delete Pool
|
|
94
|
+
* Delete a pool. This will not delete the machines in the pool.
|
|
95
|
+
*/
|
|
96
|
+
export declare const deletePoolV1PoolsPoolIdDelete: <ThrowOnError extends boolean = false>(options: Options<DeletePoolV1PoolsPoolIdDeleteData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
97
|
+
/**
|
|
98
|
+
* Get Pool
|
|
99
|
+
* Get a specific pool by ID.
|
|
100
|
+
*/
|
|
101
|
+
export declare const getPoolV1PoolsPoolIdGet: <ThrowOnError extends boolean = false>(options: Options<GetPoolV1PoolsPoolIdGetData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").PoolWithMachines, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
102
|
+
/**
|
|
103
|
+
* Update Pool
|
|
104
|
+
* Update a pool's details.
|
|
105
|
+
*/
|
|
106
|
+
export declare const updatePoolV1PoolsPoolIdPatch: <ThrowOnError extends boolean = false>(options: Options<UpdatePoolV1PoolsPoolIdPatchData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").PoolResponse, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
107
|
+
/**
|
|
108
|
+
* Remove Machines From Pool
|
|
109
|
+
* Remove machines from a pool.
|
|
110
|
+
*/
|
|
111
|
+
export declare const removeMachinesFromPoolV1PoolsPoolIdMachinesDelete: <ThrowOnError extends boolean = false>(options: Options<RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
112
|
+
/**
|
|
113
|
+
* Add Machines To Pool
|
|
114
|
+
* Add machines to a pool.
|
|
115
|
+
*/
|
|
116
|
+
export declare const addMachinesToPoolV1PoolsPoolIdMachinesPost: <ThrowOnError extends boolean = false>(options: Options<AddMachinesToPoolV1PoolsPoolIdMachinesPostData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").PoolWithMachines, import("./types.gen").HttpValidationError, ThrowOnError>;
|
|
71
117
|
/**
|
|
72
118
|
* List Workflows
|
|
73
119
|
* List all workflows for the authenticated organization.
|
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.rootGet = exports.dummyTestEndpointV1TestPost = exports.powershellSessionV1ComputerMachineIdShellPowershellSessionPost = exports.powershellExecV1ComputerMachineIdShellPowershellExecPost = exports.fsWriteV1ComputerMachineIdFsWritePost = exports.fsReadV1ComputerMachineIdFsReadGet = void 0;
|
|
4
|
+
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.getRunAttachmentDownloadUrlV1RunAttachmentsAttachmentIdDownloadUrlGet = exports.updateRunAttachmentV1RunAttachmentsAttachmentIdPut = exports.getRunAttachmentV1RunAttachmentsAttachmentIdGet = exports.deleteRunAttachmentV1RunAttachmentsAttachmentIdDelete = exports.createRunAttachmentV1RunAttachmentsPost = exports.listRunAttachmentsV1RunAttachmentsGet = exports.bulkCreateRunsV1RunsBulkPost = 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.rootGet = exports.dummyTestEndpointV1TestPost = exports.powershellSessionV1ComputerMachineIdShellPowershellSessionPost = exports.powershellExecV1ComputerMachineIdShellPowershellExecPost = exports.fsWriteV1ComputerMachineIdFsWritePost = exports.fsReadV1ComputerMachineIdFsReadGet = exports.fsListV1ComputerMachineIdFsListGet = exports.mouseClickV1ComputerMachineIdInputMouseClickPost = exports.mouseMoveV1ComputerMachineIdInputMouseMovePost = exports.getMousePositionV1ComputerMachineIdInputMousePositionGet = exports.keyboardKeyV1ComputerMachineIdInputKeyboardKeyPost = exports.keyboardTypeV1ComputerMachineIdInputKeyboardTypePost = exports.getDisplayDimensionsV1ComputerMachineIdDisplayDimensionsGet = exports.getScreenshotV1ComputerMachineIdDisplayScreenshotGet = exports.getLatestTrajectoryForWorkflowV1WorkflowsWorkflowIdLatestTrajectoryGet = void 0;
|
|
6
6
|
const client_gen_1 = require("./client.gen");
|
|
7
7
|
/**
|
|
8
8
|
* Health Check
|
|
@@ -108,6 +108,133 @@ const updateMachineV1MachinesMachineIdPatch = (options) => {
|
|
|
108
108
|
], url: '/v1/machines/{machine_id}' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
109
109
|
};
|
|
110
110
|
exports.updateMachineV1MachinesMachineIdPatch = updateMachineV1MachinesMachineIdPatch;
|
|
111
|
+
/**
|
|
112
|
+
* Get Machine Pools
|
|
113
|
+
* Get all pools that a machine belongs to.
|
|
114
|
+
*/
|
|
115
|
+
const getMachinePoolsV1MachinesMachineIdPoolsGet = (options) => {
|
|
116
|
+
var _a;
|
|
117
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ security: [
|
|
118
|
+
{
|
|
119
|
+
scheme: 'bearer',
|
|
120
|
+
type: 'http'
|
|
121
|
+
}
|
|
122
|
+
], url: '/v1/machines/{machine_id}/pools' }, options));
|
|
123
|
+
};
|
|
124
|
+
exports.getMachinePoolsV1MachinesMachineIdPoolsGet = getMachinePoolsV1MachinesMachineIdPoolsGet;
|
|
125
|
+
/**
|
|
126
|
+
* Update Machine Pools
|
|
127
|
+
* Update a machine's pool assignments.
|
|
128
|
+
* This replaces all existing pool assignments with the new ones.
|
|
129
|
+
*/
|
|
130
|
+
const updateMachinePoolsV1MachinesMachineIdPoolsPut = (options) => {
|
|
131
|
+
var _a;
|
|
132
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).put(Object.assign(Object.assign({ security: [
|
|
133
|
+
{
|
|
134
|
+
scheme: 'bearer',
|
|
135
|
+
type: 'http'
|
|
136
|
+
}
|
|
137
|
+
], url: '/v1/machines/{machine_id}/pools' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
138
|
+
};
|
|
139
|
+
exports.updateMachinePoolsV1MachinesMachineIdPoolsPut = updateMachinePoolsV1MachinesMachineIdPoolsPut;
|
|
140
|
+
/**
|
|
141
|
+
* List Pools
|
|
142
|
+
* List all pools for the organization.
|
|
143
|
+
*/
|
|
144
|
+
const listPoolsV1PoolsGet = (options) => {
|
|
145
|
+
var _a;
|
|
146
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ security: [
|
|
147
|
+
{
|
|
148
|
+
scheme: 'bearer',
|
|
149
|
+
type: 'http'
|
|
150
|
+
}
|
|
151
|
+
], url: '/v1/pools' }, options));
|
|
152
|
+
};
|
|
153
|
+
exports.listPoolsV1PoolsGet = listPoolsV1PoolsGet;
|
|
154
|
+
/**
|
|
155
|
+
* Create Pool
|
|
156
|
+
* Create a new pool for organizing machines.
|
|
157
|
+
*/
|
|
158
|
+
const createPoolV1PoolsPost = (options) => {
|
|
159
|
+
var _a;
|
|
160
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ security: [
|
|
161
|
+
{
|
|
162
|
+
scheme: 'bearer',
|
|
163
|
+
type: 'http'
|
|
164
|
+
}
|
|
165
|
+
], url: '/v1/pools' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
166
|
+
};
|
|
167
|
+
exports.createPoolV1PoolsPost = createPoolV1PoolsPost;
|
|
168
|
+
/**
|
|
169
|
+
* Delete Pool
|
|
170
|
+
* Delete a pool. This will not delete the machines in the pool.
|
|
171
|
+
*/
|
|
172
|
+
const deletePoolV1PoolsPoolIdDelete = (options) => {
|
|
173
|
+
var _a;
|
|
174
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).delete(Object.assign({ security: [
|
|
175
|
+
{
|
|
176
|
+
scheme: 'bearer',
|
|
177
|
+
type: 'http'
|
|
178
|
+
}
|
|
179
|
+
], url: '/v1/pools/{pool_id}' }, options));
|
|
180
|
+
};
|
|
181
|
+
exports.deletePoolV1PoolsPoolIdDelete = deletePoolV1PoolsPoolIdDelete;
|
|
182
|
+
/**
|
|
183
|
+
* Get Pool
|
|
184
|
+
* Get a specific pool by ID.
|
|
185
|
+
*/
|
|
186
|
+
const getPoolV1PoolsPoolIdGet = (options) => {
|
|
187
|
+
var _a;
|
|
188
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).get(Object.assign({ security: [
|
|
189
|
+
{
|
|
190
|
+
scheme: 'bearer',
|
|
191
|
+
type: 'http'
|
|
192
|
+
}
|
|
193
|
+
], url: '/v1/pools/{pool_id}' }, options));
|
|
194
|
+
};
|
|
195
|
+
exports.getPoolV1PoolsPoolIdGet = getPoolV1PoolsPoolIdGet;
|
|
196
|
+
/**
|
|
197
|
+
* Update Pool
|
|
198
|
+
* Update a pool's details.
|
|
199
|
+
*/
|
|
200
|
+
const updatePoolV1PoolsPoolIdPatch = (options) => {
|
|
201
|
+
var _a;
|
|
202
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).patch(Object.assign(Object.assign({ security: [
|
|
203
|
+
{
|
|
204
|
+
scheme: 'bearer',
|
|
205
|
+
type: 'http'
|
|
206
|
+
}
|
|
207
|
+
], url: '/v1/pools/{pool_id}' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
208
|
+
};
|
|
209
|
+
exports.updatePoolV1PoolsPoolIdPatch = updatePoolV1PoolsPoolIdPatch;
|
|
210
|
+
/**
|
|
211
|
+
* Remove Machines From Pool
|
|
212
|
+
* Remove machines from a pool.
|
|
213
|
+
*/
|
|
214
|
+
const removeMachinesFromPoolV1PoolsPoolIdMachinesDelete = (options) => {
|
|
215
|
+
var _a;
|
|
216
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).delete(Object.assign(Object.assign({ security: [
|
|
217
|
+
{
|
|
218
|
+
scheme: 'bearer',
|
|
219
|
+
type: 'http'
|
|
220
|
+
}
|
|
221
|
+
], url: '/v1/pools/{pool_id}/machines' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
222
|
+
};
|
|
223
|
+
exports.removeMachinesFromPoolV1PoolsPoolIdMachinesDelete = removeMachinesFromPoolV1PoolsPoolIdMachinesDelete;
|
|
224
|
+
/**
|
|
225
|
+
* Add Machines To Pool
|
|
226
|
+
* Add machines to a pool.
|
|
227
|
+
*/
|
|
228
|
+
const addMachinesToPoolV1PoolsPoolIdMachinesPost = (options) => {
|
|
229
|
+
var _a;
|
|
230
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client_gen_1.client).post(Object.assign(Object.assign({ security: [
|
|
231
|
+
{
|
|
232
|
+
scheme: 'bearer',
|
|
233
|
+
type: 'http'
|
|
234
|
+
}
|
|
235
|
+
], url: '/v1/pools/{pool_id}/machines' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
|
|
236
|
+
};
|
|
237
|
+
exports.addMachinesToPoolV1PoolsPoolIdMachinesPost = addMachinesToPoolV1PoolsPoolIdMachinesPost;
|
|
111
238
|
/**
|
|
112
239
|
* List Workflows
|
|
113
240
|
* List all workflows for the authenticated organization.
|
|
@@ -79,6 +79,24 @@ export type MachineCreate = {
|
|
|
79
79
|
os_info?: string | null;
|
|
80
80
|
unkey_key_id: string;
|
|
81
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* Schema for assigning machines to pools
|
|
84
|
+
*/
|
|
85
|
+
export type MachinePoolAssignment = {
|
|
86
|
+
/**
|
|
87
|
+
* List of machine IDs to assign to the pool
|
|
88
|
+
*/
|
|
89
|
+
machine_ids: Array<string>;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Schema for updating a machine's pool assignments
|
|
93
|
+
*/
|
|
94
|
+
export type MachinePoolUpdate = {
|
|
95
|
+
/**
|
|
96
|
+
* List of pool IDs to assign the machine to
|
|
97
|
+
*/
|
|
98
|
+
pool_ids: Array<string>;
|
|
99
|
+
};
|
|
82
100
|
/**
|
|
83
101
|
* Machine response schema
|
|
84
102
|
*/
|
|
@@ -96,6 +114,7 @@ export type MachineResponse = {
|
|
|
96
114
|
is_available: boolean;
|
|
97
115
|
created_at: string;
|
|
98
116
|
last_seen: string;
|
|
117
|
+
pools?: Array<PoolResponse> | null;
|
|
99
118
|
};
|
|
100
119
|
export type MachineStatus = 'connected' | 'disconnected' | 'error';
|
|
101
120
|
/**
|
|
@@ -148,6 +167,12 @@ export type PaginatedResponseMachineResponse = {
|
|
|
148
167
|
skip: number;
|
|
149
168
|
limit: number;
|
|
150
169
|
};
|
|
170
|
+
export type PaginatedResponsePoolResponse = {
|
|
171
|
+
items: Array<PoolResponse>;
|
|
172
|
+
total: number;
|
|
173
|
+
skip: number;
|
|
174
|
+
limit: number;
|
|
175
|
+
};
|
|
151
176
|
export type PaginatedResponseRunAttachmentResponse = {
|
|
152
177
|
items: Array<RunAttachmentResponse>;
|
|
153
178
|
total: number;
|
|
@@ -172,6 +197,51 @@ export type PaginatedResponseWorkflowResponse = {
|
|
|
172
197
|
skip: number;
|
|
173
198
|
limit: number;
|
|
174
199
|
};
|
|
200
|
+
/**
|
|
201
|
+
* Schema for creating a pool
|
|
202
|
+
*/
|
|
203
|
+
export type PoolCreate = {
|
|
204
|
+
name: string;
|
|
205
|
+
description?: string | null;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Pool response schema
|
|
209
|
+
*/
|
|
210
|
+
export type PoolResponse = {
|
|
211
|
+
name: string;
|
|
212
|
+
description?: string | null;
|
|
213
|
+
id: string;
|
|
214
|
+
organization_id: string;
|
|
215
|
+
created_at: string;
|
|
216
|
+
updated_at: string;
|
|
217
|
+
/**
|
|
218
|
+
* Number of machines in this pool
|
|
219
|
+
*/
|
|
220
|
+
machine_count?: number | null;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Schema for updating a pool
|
|
224
|
+
*/
|
|
225
|
+
export type PoolUpdate = {
|
|
226
|
+
name?: string | null;
|
|
227
|
+
description?: string | null;
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Pool response with machines included
|
|
231
|
+
*/
|
|
232
|
+
export type PoolWithMachines = {
|
|
233
|
+
name: string;
|
|
234
|
+
description?: string | null;
|
|
235
|
+
id: string;
|
|
236
|
+
organization_id: string;
|
|
237
|
+
created_at: string;
|
|
238
|
+
updated_at: string;
|
|
239
|
+
/**
|
|
240
|
+
* Number of machines in this pool
|
|
241
|
+
*/
|
|
242
|
+
machine_count?: number | null;
|
|
243
|
+
machines?: Array<MachineResponse>;
|
|
244
|
+
};
|
|
175
245
|
export type PowerShellExecRequest = {
|
|
176
246
|
/**
|
|
177
247
|
* PowerShell command to execute
|
|
@@ -304,6 +374,10 @@ export type RunBulkCreate = {
|
|
|
304
374
|
* Machine ID. If not provided, an available machine will be automatically selected.
|
|
305
375
|
*/
|
|
306
376
|
machine_id?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* Pool IDs to filter available machines. Machine must belong to all of these pools (intersection). Ignored when machine_id is provided.
|
|
379
|
+
*/
|
|
380
|
+
pool_ids?: Array<string> | null;
|
|
307
381
|
/**
|
|
308
382
|
* Input values for workflow variables
|
|
309
383
|
*/
|
|
@@ -336,6 +410,10 @@ export type RunCreate = {
|
|
|
336
410
|
* Machine ID. If not provided, an available machine will be automatically selected.
|
|
337
411
|
*/
|
|
338
412
|
machine_id?: string | null;
|
|
413
|
+
/**
|
|
414
|
+
* Pool IDs to filter available machines. Machine must belong to all of these pools (intersection). Ignored when machine_id is provided.
|
|
415
|
+
*/
|
|
416
|
+
pool_ids?: Array<string> | null;
|
|
339
417
|
/**
|
|
340
418
|
* Input values for workflow variables
|
|
341
419
|
*/
|
|
@@ -369,6 +447,7 @@ export type RunResponse = {
|
|
|
369
447
|
input_values: {
|
|
370
448
|
[key: string]: unknown;
|
|
371
449
|
} | null;
|
|
450
|
+
pool_ids?: Array<string> | null;
|
|
372
451
|
created_at: string;
|
|
373
452
|
};
|
|
374
453
|
export type RunStatus = 'scheduling' | 'running' | 'success' | 'cancelled' | 'error';
|
|
@@ -541,6 +620,14 @@ export type ListMachinesV1MachinesGetData = {
|
|
|
541
620
|
* Filter by machine status
|
|
542
621
|
*/
|
|
543
622
|
status?: MachineStatus | null;
|
|
623
|
+
/**
|
|
624
|
+
* Filter machines created at or after this ISO timestamp (UTC)
|
|
625
|
+
*/
|
|
626
|
+
created_at_from?: string | null;
|
|
627
|
+
/**
|
|
628
|
+
* Filter machines created at or before this ISO timestamp (UTC)
|
|
629
|
+
*/
|
|
630
|
+
created_at_to?: string | null;
|
|
544
631
|
skip?: number;
|
|
545
632
|
limit?: number;
|
|
546
633
|
};
|
|
@@ -646,10 +733,228 @@ export type UpdateMachineV1MachinesMachineIdPatchResponses = {
|
|
|
646
733
|
200: MachineResponse;
|
|
647
734
|
};
|
|
648
735
|
export type UpdateMachineV1MachinesMachineIdPatchResponse = UpdateMachineV1MachinesMachineIdPatchResponses[keyof UpdateMachineV1MachinesMachineIdPatchResponses];
|
|
736
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetData = {
|
|
737
|
+
body?: never;
|
|
738
|
+
path: {
|
|
739
|
+
machine_id: string;
|
|
740
|
+
};
|
|
741
|
+
query?: never;
|
|
742
|
+
url: '/v1/machines/{machine_id}/pools';
|
|
743
|
+
};
|
|
744
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetErrors = {
|
|
745
|
+
/**
|
|
746
|
+
* Validation Error
|
|
747
|
+
*/
|
|
748
|
+
422: HttpValidationError;
|
|
749
|
+
};
|
|
750
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetError = GetMachinePoolsV1MachinesMachineIdPoolsGetErrors[keyof GetMachinePoolsV1MachinesMachineIdPoolsGetErrors];
|
|
751
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetResponses = {
|
|
752
|
+
/**
|
|
753
|
+
* Successful Response
|
|
754
|
+
*/
|
|
755
|
+
200: Array<PoolResponse>;
|
|
756
|
+
};
|
|
757
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetResponse = GetMachinePoolsV1MachinesMachineIdPoolsGetResponses[keyof GetMachinePoolsV1MachinesMachineIdPoolsGetResponses];
|
|
758
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutData = {
|
|
759
|
+
body: MachinePoolUpdate;
|
|
760
|
+
path: {
|
|
761
|
+
machine_id: string;
|
|
762
|
+
};
|
|
763
|
+
query?: never;
|
|
764
|
+
url: '/v1/machines/{machine_id}/pools';
|
|
765
|
+
};
|
|
766
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutErrors = {
|
|
767
|
+
/**
|
|
768
|
+
* Validation Error
|
|
769
|
+
*/
|
|
770
|
+
422: HttpValidationError;
|
|
771
|
+
};
|
|
772
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutError = UpdateMachinePoolsV1MachinesMachineIdPoolsPutErrors[keyof UpdateMachinePoolsV1MachinesMachineIdPoolsPutErrors];
|
|
773
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutResponses = {
|
|
774
|
+
/**
|
|
775
|
+
* Successful Response
|
|
776
|
+
*/
|
|
777
|
+
200: MachineResponse;
|
|
778
|
+
};
|
|
779
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutResponse = UpdateMachinePoolsV1MachinesMachineIdPoolsPutResponses[keyof UpdateMachinePoolsV1MachinesMachineIdPoolsPutResponses];
|
|
780
|
+
export type ListPoolsV1PoolsGetData = {
|
|
781
|
+
body?: never;
|
|
782
|
+
path?: never;
|
|
783
|
+
query?: {
|
|
784
|
+
skip?: number;
|
|
785
|
+
limit?: number;
|
|
786
|
+
};
|
|
787
|
+
url: '/v1/pools';
|
|
788
|
+
};
|
|
789
|
+
export type ListPoolsV1PoolsGetErrors = {
|
|
790
|
+
/**
|
|
791
|
+
* Validation Error
|
|
792
|
+
*/
|
|
793
|
+
422: HttpValidationError;
|
|
794
|
+
};
|
|
795
|
+
export type ListPoolsV1PoolsGetError = ListPoolsV1PoolsGetErrors[keyof ListPoolsV1PoolsGetErrors];
|
|
796
|
+
export type ListPoolsV1PoolsGetResponses = {
|
|
797
|
+
/**
|
|
798
|
+
* Successful Response
|
|
799
|
+
*/
|
|
800
|
+
200: PaginatedResponsePoolResponse;
|
|
801
|
+
};
|
|
802
|
+
export type ListPoolsV1PoolsGetResponse = ListPoolsV1PoolsGetResponses[keyof ListPoolsV1PoolsGetResponses];
|
|
803
|
+
export type CreatePoolV1PoolsPostData = {
|
|
804
|
+
body: PoolCreate;
|
|
805
|
+
path?: never;
|
|
806
|
+
query?: never;
|
|
807
|
+
url: '/v1/pools';
|
|
808
|
+
};
|
|
809
|
+
export type CreatePoolV1PoolsPostErrors = {
|
|
810
|
+
/**
|
|
811
|
+
* Validation Error
|
|
812
|
+
*/
|
|
813
|
+
422: HttpValidationError;
|
|
814
|
+
};
|
|
815
|
+
export type CreatePoolV1PoolsPostError = CreatePoolV1PoolsPostErrors[keyof CreatePoolV1PoolsPostErrors];
|
|
816
|
+
export type CreatePoolV1PoolsPostResponses = {
|
|
817
|
+
/**
|
|
818
|
+
* Successful Response
|
|
819
|
+
*/
|
|
820
|
+
201: PoolResponse;
|
|
821
|
+
};
|
|
822
|
+
export type CreatePoolV1PoolsPostResponse = CreatePoolV1PoolsPostResponses[keyof CreatePoolV1PoolsPostResponses];
|
|
823
|
+
export type DeletePoolV1PoolsPoolIdDeleteData = {
|
|
824
|
+
body?: never;
|
|
825
|
+
path: {
|
|
826
|
+
pool_id: string;
|
|
827
|
+
};
|
|
828
|
+
query?: never;
|
|
829
|
+
url: '/v1/pools/{pool_id}';
|
|
830
|
+
};
|
|
831
|
+
export type DeletePoolV1PoolsPoolIdDeleteErrors = {
|
|
832
|
+
/**
|
|
833
|
+
* Validation Error
|
|
834
|
+
*/
|
|
835
|
+
422: HttpValidationError;
|
|
836
|
+
};
|
|
837
|
+
export type DeletePoolV1PoolsPoolIdDeleteError = DeletePoolV1PoolsPoolIdDeleteErrors[keyof DeletePoolV1PoolsPoolIdDeleteErrors];
|
|
838
|
+
export type DeletePoolV1PoolsPoolIdDeleteResponses = {
|
|
839
|
+
/**
|
|
840
|
+
* Successful Response
|
|
841
|
+
*/
|
|
842
|
+
204: void;
|
|
843
|
+
};
|
|
844
|
+
export type DeletePoolV1PoolsPoolIdDeleteResponse = DeletePoolV1PoolsPoolIdDeleteResponses[keyof DeletePoolV1PoolsPoolIdDeleteResponses];
|
|
845
|
+
export type GetPoolV1PoolsPoolIdGetData = {
|
|
846
|
+
body?: never;
|
|
847
|
+
path: {
|
|
848
|
+
pool_id: string;
|
|
849
|
+
};
|
|
850
|
+
query?: {
|
|
851
|
+
/**
|
|
852
|
+
* Include full machine details
|
|
853
|
+
*/
|
|
854
|
+
include_machines?: boolean;
|
|
855
|
+
};
|
|
856
|
+
url: '/v1/pools/{pool_id}';
|
|
857
|
+
};
|
|
858
|
+
export type GetPoolV1PoolsPoolIdGetErrors = {
|
|
859
|
+
/**
|
|
860
|
+
* Validation Error
|
|
861
|
+
*/
|
|
862
|
+
422: HttpValidationError;
|
|
863
|
+
};
|
|
864
|
+
export type GetPoolV1PoolsPoolIdGetError = GetPoolV1PoolsPoolIdGetErrors[keyof GetPoolV1PoolsPoolIdGetErrors];
|
|
865
|
+
export type GetPoolV1PoolsPoolIdGetResponses = {
|
|
866
|
+
/**
|
|
867
|
+
* Successful Response
|
|
868
|
+
*/
|
|
869
|
+
200: PoolWithMachines;
|
|
870
|
+
};
|
|
871
|
+
export type GetPoolV1PoolsPoolIdGetResponse = GetPoolV1PoolsPoolIdGetResponses[keyof GetPoolV1PoolsPoolIdGetResponses];
|
|
872
|
+
export type UpdatePoolV1PoolsPoolIdPatchData = {
|
|
873
|
+
body: PoolUpdate;
|
|
874
|
+
path: {
|
|
875
|
+
pool_id: string;
|
|
876
|
+
};
|
|
877
|
+
query?: never;
|
|
878
|
+
url: '/v1/pools/{pool_id}';
|
|
879
|
+
};
|
|
880
|
+
export type UpdatePoolV1PoolsPoolIdPatchErrors = {
|
|
881
|
+
/**
|
|
882
|
+
* Validation Error
|
|
883
|
+
*/
|
|
884
|
+
422: HttpValidationError;
|
|
885
|
+
};
|
|
886
|
+
export type UpdatePoolV1PoolsPoolIdPatchError = UpdatePoolV1PoolsPoolIdPatchErrors[keyof UpdatePoolV1PoolsPoolIdPatchErrors];
|
|
887
|
+
export type UpdatePoolV1PoolsPoolIdPatchResponses = {
|
|
888
|
+
/**
|
|
889
|
+
* Successful Response
|
|
890
|
+
*/
|
|
891
|
+
200: PoolResponse;
|
|
892
|
+
};
|
|
893
|
+
export type UpdatePoolV1PoolsPoolIdPatchResponse = UpdatePoolV1PoolsPoolIdPatchResponses[keyof UpdatePoolV1PoolsPoolIdPatchResponses];
|
|
894
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteData = {
|
|
895
|
+
body: MachinePoolAssignment;
|
|
896
|
+
path: {
|
|
897
|
+
pool_id: string;
|
|
898
|
+
};
|
|
899
|
+
query?: never;
|
|
900
|
+
url: '/v1/pools/{pool_id}/machines';
|
|
901
|
+
};
|
|
902
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteErrors = {
|
|
903
|
+
/**
|
|
904
|
+
* Validation Error
|
|
905
|
+
*/
|
|
906
|
+
422: HttpValidationError;
|
|
907
|
+
};
|
|
908
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteError = RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteErrors[keyof RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteErrors];
|
|
909
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteResponses = {
|
|
910
|
+
/**
|
|
911
|
+
* Successful Response
|
|
912
|
+
*/
|
|
913
|
+
204: void;
|
|
914
|
+
};
|
|
915
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteResponse = RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteResponses[keyof RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteResponses];
|
|
916
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostData = {
|
|
917
|
+
body: MachinePoolAssignment;
|
|
918
|
+
path: {
|
|
919
|
+
pool_id: string;
|
|
920
|
+
};
|
|
921
|
+
query?: never;
|
|
922
|
+
url: '/v1/pools/{pool_id}/machines';
|
|
923
|
+
};
|
|
924
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostErrors = {
|
|
925
|
+
/**
|
|
926
|
+
* Validation Error
|
|
927
|
+
*/
|
|
928
|
+
422: HttpValidationError;
|
|
929
|
+
};
|
|
930
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostError = AddMachinesToPoolV1PoolsPoolIdMachinesPostErrors[keyof AddMachinesToPoolV1PoolsPoolIdMachinesPostErrors];
|
|
931
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostResponses = {
|
|
932
|
+
/**
|
|
933
|
+
* Successful Response
|
|
934
|
+
*/
|
|
935
|
+
200: PoolWithMachines;
|
|
936
|
+
};
|
|
937
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostResponse = AddMachinesToPoolV1PoolsPoolIdMachinesPostResponses[keyof AddMachinesToPoolV1PoolsPoolIdMachinesPostResponses];
|
|
649
938
|
export type ListWorkflowsV1WorkflowsGetData = {
|
|
650
939
|
body?: never;
|
|
651
940
|
path?: never;
|
|
652
941
|
query?: {
|
|
942
|
+
/**
|
|
943
|
+
* Filter workflows created at or after this ISO timestamp (UTC)
|
|
944
|
+
*/
|
|
945
|
+
created_at_from?: string | null;
|
|
946
|
+
/**
|
|
947
|
+
* Filter workflows created at or before this ISO timestamp (UTC)
|
|
948
|
+
*/
|
|
949
|
+
created_at_to?: string | null;
|
|
950
|
+
/**
|
|
951
|
+
* Filter workflows updated at or after this ISO timestamp (UTC)
|
|
952
|
+
*/
|
|
953
|
+
updated_at_from?: string | null;
|
|
954
|
+
/**
|
|
955
|
+
* Filter workflows updated at or before this ISO timestamp (UTC)
|
|
956
|
+
*/
|
|
957
|
+
updated_at_to?: string | null;
|
|
653
958
|
skip?: number;
|
|
654
959
|
limit?: number;
|
|
655
960
|
};
|
|
@@ -795,6 +1100,14 @@ export type ListRunsV1RunsGetData = {
|
|
|
795
1100
|
* Filter by run status
|
|
796
1101
|
*/
|
|
797
1102
|
status?: RunStatus | null;
|
|
1103
|
+
/**
|
|
1104
|
+
* Filter runs created at or after this ISO timestamp (UTC)
|
|
1105
|
+
*/
|
|
1106
|
+
created_at_from?: string | null;
|
|
1107
|
+
/**
|
|
1108
|
+
* Filter runs created at or before this ISO timestamp (UTC)
|
|
1109
|
+
*/
|
|
1110
|
+
created_at_to?: string | null;
|
|
798
1111
|
skip?: number;
|
|
799
1112
|
limit?: number;
|
|
800
1113
|
};
|
|
@@ -1331,6 +1644,22 @@ export type ListTrajectoriesV1TrajectoriesGetData = {
|
|
|
1331
1644
|
* Filter by workflow ID
|
|
1332
1645
|
*/
|
|
1333
1646
|
workflow_id?: string | null;
|
|
1647
|
+
/**
|
|
1648
|
+
* Filter trajectories created at or after this ISO timestamp (UTC)
|
|
1649
|
+
*/
|
|
1650
|
+
created_at_from?: string | null;
|
|
1651
|
+
/**
|
|
1652
|
+
* Filter trajectories created at or before this ISO timestamp (UTC)
|
|
1653
|
+
*/
|
|
1654
|
+
created_at_to?: string | null;
|
|
1655
|
+
/**
|
|
1656
|
+
* Filter trajectories updated at or after this ISO timestamp (UTC)
|
|
1657
|
+
*/
|
|
1658
|
+
updated_at_from?: string | null;
|
|
1659
|
+
/**
|
|
1660
|
+
* Filter trajectories updated at or before this ISO timestamp (UTC)
|
|
1661
|
+
*/
|
|
1662
|
+
updated_at_to?: string | null;
|
|
1334
1663
|
skip?: number;
|
|
1335
1664
|
limit?: number;
|
|
1336
1665
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* });
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
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 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 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';
|
|
@@ -57,9 +57,17 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
57
57
|
skip?: number;
|
|
58
58
|
limit?: number;
|
|
59
59
|
status?: MachineStatus;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
created_at_from?: string | Date;
|
|
61
|
+
created_at_to?: string | Date;
|
|
62
|
+
}) => Promise<({
|
|
63
|
+
data: PaginatedResponseMachineResponse;
|
|
64
|
+
error: undefined;
|
|
65
|
+
} | {
|
|
66
|
+
data: undefined;
|
|
67
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
68
|
+
}) & {
|
|
69
|
+
request: Request;
|
|
70
|
+
response: Response;
|
|
63
71
|
}>;
|
|
64
72
|
/**
|
|
65
73
|
* Create a new machine
|
|
@@ -107,6 +115,144 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
107
115
|
request: Request;
|
|
108
116
|
response: Response;
|
|
109
117
|
}>;
|
|
118
|
+
/**
|
|
119
|
+
* Get all pools that a machine belongs to
|
|
120
|
+
*
|
|
121
|
+
* @param machineId - The ID of the machine
|
|
122
|
+
* @returns List of pools the machine belongs to
|
|
123
|
+
*/
|
|
124
|
+
getPools: (machineId: string) => Promise<{
|
|
125
|
+
data?: PoolResponse[];
|
|
126
|
+
error?: any;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Update a machine's pool assignments
|
|
130
|
+
*
|
|
131
|
+
* This replaces all existing pool assignments with the new ones.
|
|
132
|
+
*
|
|
133
|
+
* @param machineId - The ID of the machine
|
|
134
|
+
* @param data - MachinePoolUpdate with pool_ids list
|
|
135
|
+
* @returns Updated machine details
|
|
136
|
+
*/
|
|
137
|
+
updatePools: (machineId: string, data: MachinePoolUpdate) => Promise<{
|
|
138
|
+
data?: MachineResponse;
|
|
139
|
+
error?: any;
|
|
140
|
+
}>;
|
|
141
|
+
};
|
|
142
|
+
pools: {
|
|
143
|
+
/**
|
|
144
|
+
* List pools for the organization
|
|
145
|
+
*
|
|
146
|
+
* @param params - Optional query parameters
|
|
147
|
+
* @param params.skip - Number of items to skip (for pagination)
|
|
148
|
+
* @param params.limit - Maximum number of items to return
|
|
149
|
+
* @returns Paginated list of pools
|
|
150
|
+
*/
|
|
151
|
+
list: (params?: {
|
|
152
|
+
skip?: number;
|
|
153
|
+
limit?: number;
|
|
154
|
+
}) => Promise<{
|
|
155
|
+
data?: PaginatedResponsePoolResponse;
|
|
156
|
+
error?: any;
|
|
157
|
+
}>;
|
|
158
|
+
/**
|
|
159
|
+
* Create a new pool
|
|
160
|
+
*
|
|
161
|
+
* @param data - Pool configuration
|
|
162
|
+
* @returns Created pool details
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```typescript
|
|
166
|
+
* const pool = await client.pools.create({
|
|
167
|
+
* name: 'Customer A',
|
|
168
|
+
* description: 'All Customer A machines'
|
|
169
|
+
* });
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
create: (data: PoolCreate) => Promise<{
|
|
173
|
+
data?: PoolResponse;
|
|
174
|
+
error?: any;
|
|
175
|
+
}>;
|
|
176
|
+
/**
|
|
177
|
+
* Get a specific pool by ID
|
|
178
|
+
*
|
|
179
|
+
* @param poolId - The ID of the pool
|
|
180
|
+
* @param includeMachines - Whether to include full machine details
|
|
181
|
+
* @returns Pool details, optionally with machine list
|
|
182
|
+
*/
|
|
183
|
+
get: (poolId: string, includeMachines?: boolean) => Promise<{
|
|
184
|
+
data?: PoolResponse | PoolWithMachines;
|
|
185
|
+
error?: any;
|
|
186
|
+
}>;
|
|
187
|
+
/**
|
|
188
|
+
* Update a pool's details
|
|
189
|
+
*
|
|
190
|
+
* @param poolId - The ID of the pool to update
|
|
191
|
+
* @param data - Update data (name, description)
|
|
192
|
+
* @returns Updated pool details
|
|
193
|
+
*/
|
|
194
|
+
update: (poolId: string, data: PoolUpdate) => Promise<{
|
|
195
|
+
data?: PoolResponse;
|
|
196
|
+
error?: any;
|
|
197
|
+
}>;
|
|
198
|
+
/**
|
|
199
|
+
* Delete a pool
|
|
200
|
+
*
|
|
201
|
+
* This will not delete the machines in the pool.
|
|
202
|
+
*
|
|
203
|
+
* @param poolId - The ID of the pool to delete
|
|
204
|
+
*/
|
|
205
|
+
delete: (poolId: string) => Promise<({
|
|
206
|
+
data: undefined;
|
|
207
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
208
|
+
} | {
|
|
209
|
+
data: void;
|
|
210
|
+
error: undefined;
|
|
211
|
+
}) & {
|
|
212
|
+
request: Request;
|
|
213
|
+
response: Response;
|
|
214
|
+
}>;
|
|
215
|
+
/**
|
|
216
|
+
* Add machines to a pool
|
|
217
|
+
*
|
|
218
|
+
* @param poolId - The ID of the pool
|
|
219
|
+
* @param data - MachinePoolAssignment with machine_ids list
|
|
220
|
+
* @returns Pool with updated machine list
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```typescript
|
|
224
|
+
* await client.pools.addMachines('pool-id', {
|
|
225
|
+
* machine_ids: ['machine1-id', 'machine2-id']
|
|
226
|
+
* });
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
addMachines: (poolId: string, data: MachinePoolAssignment) => Promise<{
|
|
230
|
+
data?: PoolWithMachines;
|
|
231
|
+
error?: any;
|
|
232
|
+
}>;
|
|
233
|
+
/**
|
|
234
|
+
* Remove machines from a pool
|
|
235
|
+
*
|
|
236
|
+
* @param poolId - The ID of the pool
|
|
237
|
+
* @param data - MachinePoolAssignment with machine_ids list
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```typescript
|
|
241
|
+
* await client.pools.removeMachines('pool-id', {
|
|
242
|
+
* machine_ids: ['machine1-id']
|
|
243
|
+
* });
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
removeMachines: (poolId: string, data: MachinePoolAssignment) => Promise<({
|
|
247
|
+
data: undefined;
|
|
248
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
249
|
+
} | {
|
|
250
|
+
data: void;
|
|
251
|
+
error: undefined;
|
|
252
|
+
}) & {
|
|
253
|
+
request: Request;
|
|
254
|
+
response: Response;
|
|
255
|
+
}>;
|
|
110
256
|
};
|
|
111
257
|
workflows: {
|
|
112
258
|
/**
|
|
@@ -120,9 +266,19 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
120
266
|
list: (params?: {
|
|
121
267
|
skip?: number;
|
|
122
268
|
limit?: number;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
269
|
+
created_at_from?: string | Date;
|
|
270
|
+
created_at_to?: string | Date;
|
|
271
|
+
updated_at_from?: string | Date;
|
|
272
|
+
updated_at_to?: string | Date;
|
|
273
|
+
}) => Promise<({
|
|
274
|
+
data: undefined;
|
|
275
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
276
|
+
} | {
|
|
277
|
+
data: PaginatedResponseWorkflowResponse;
|
|
278
|
+
error: undefined;
|
|
279
|
+
}) & {
|
|
280
|
+
request: Request;
|
|
281
|
+
response: Response;
|
|
126
282
|
}>;
|
|
127
283
|
/**
|
|
128
284
|
* Create a new workflow
|
|
@@ -198,9 +354,17 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
198
354
|
status?: RunStatus;
|
|
199
355
|
workflow_id?: string;
|
|
200
356
|
machine_id?: string;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
357
|
+
created_at_from?: string | Date;
|
|
358
|
+
created_at_to?: string | Date;
|
|
359
|
+
}) => Promise<({
|
|
360
|
+
data: undefined;
|
|
361
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
362
|
+
} | {
|
|
363
|
+
data: PaginatedResponseRunResponse;
|
|
364
|
+
error: undefined;
|
|
365
|
+
}) & {
|
|
366
|
+
request: Request;
|
|
367
|
+
response: Response;
|
|
204
368
|
}>;
|
|
205
369
|
/**
|
|
206
370
|
* Create a new run
|
|
@@ -208,6 +372,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
208
372
|
* @param data - Run configuration
|
|
209
373
|
* @param data.workflow_id - The workflow to run
|
|
210
374
|
* @param data.machine_id - Optional machine ID (auto-selected if not provided)
|
|
375
|
+
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
211
376
|
* @param data.input_values - Optional input values for workflow variables
|
|
212
377
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
213
378
|
* @returns Created run details
|
|
@@ -216,6 +381,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
216
381
|
* ```typescript
|
|
217
382
|
* const run = await client.runs.create({
|
|
218
383
|
* workflow_id: 'workflow-id',
|
|
384
|
+
* pool_ids: ['pool1-id', 'pool2-id'], // Machine must be in both pools
|
|
219
385
|
* input_values: { prompt: 'Hello' },
|
|
220
386
|
* file_inputs: [{
|
|
221
387
|
* filename: 'data.txt',
|
|
@@ -242,6 +408,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
242
408
|
* @param data.count - Number of runs to create (1-1000)
|
|
243
409
|
* @param data.workflow_id - The workflow to run
|
|
244
410
|
* @param data.machine_id - Optional machine ID (auto-selected if not provided)
|
|
411
|
+
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
245
412
|
* @param data.input_values - Optional input values for workflow variables
|
|
246
413
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
247
414
|
* @returns Details about created runs and any failures
|
|
@@ -251,6 +418,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
251
418
|
* const result = await client.runs.bulkCreate({
|
|
252
419
|
* count: 100,
|
|
253
420
|
* workflow_id: 'workflow-id',
|
|
421
|
+
* pool_ids: ['pool1-id'], // All runs require machines in this pool
|
|
254
422
|
* input_values: { prompt: 'Bulk task' },
|
|
255
423
|
* file_inputs: [{
|
|
256
424
|
* filename: 'data.txt',
|
|
@@ -352,9 +520,19 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
352
520
|
skip?: number;
|
|
353
521
|
limit?: number;
|
|
354
522
|
workflow_id?: string;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
523
|
+
created_at_from?: string | Date;
|
|
524
|
+
created_at_to?: string | Date;
|
|
525
|
+
updated_at_from?: string | Date;
|
|
526
|
+
updated_at_to?: string | Date;
|
|
527
|
+
}) => Promise<({
|
|
528
|
+
data: undefined;
|
|
529
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
530
|
+
} | {
|
|
531
|
+
data: PaginatedResponseTrajectoryResponse;
|
|
532
|
+
error: undefined;
|
|
533
|
+
}) & {
|
|
534
|
+
request: Request;
|
|
535
|
+
response: Response;
|
|
358
536
|
}>;
|
|
359
537
|
/**
|
|
360
538
|
* Create a new trajectory
|
|
@@ -534,4 +712,4 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
534
712
|
}>;
|
|
535
713
|
};
|
|
536
714
|
};
|
|
537
|
-
export type { MachineResponse, WorkflowResponse, RunResponse, RunBulkCreate, RunBulkCreateResponse, ConnectionResponse, TrajectoryResponse, RunAttachmentResponse, RunAttachmentDownloadUrlResponse, FileInput, AttachmentType, PaginatedResponseMachineResponse, PaginatedResponseWorkflowResponse, PaginatedResponseRunResponse, PaginatedResponseConnectionResponse, PaginatedResponseTrajectoryResponse, PaginatedResponseRunAttachmentResponse, };
|
|
715
|
+
export type { MachineResponse, MachinePoolUpdate, PoolResponse, PoolCreate, PoolUpdate, PoolWithMachines, MachinePoolAssignment, WorkflowResponse, RunResponse, RunBulkCreate, RunBulkCreateResponse, ConnectionResponse, TrajectoryResponse, RunAttachmentResponse, RunAttachmentDownloadUrlResponse, FileInput, AttachmentType, PaginatedResponseMachineResponse, PaginatedResponsePoolResponse, PaginatedResponseWorkflowResponse, PaginatedResponseRunResponse, PaginatedResponseConnectionResponse, PaginatedResponseTrajectoryResponse, PaginatedResponseRunAttachmentResponse, };
|
package/dist/index.js
CHANGED
|
@@ -79,6 +79,12 @@ function createApiClient(apiKey, baseUrl = DEFAULT_API_BASE_URL) {
|
|
|
79
79
|
},
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
+
// Helpers
|
|
83
|
+
function toIsoUtc(value) {
|
|
84
|
+
if (value == null)
|
|
85
|
+
return undefined;
|
|
86
|
+
return typeof value === 'string' ? value : value.toISOString();
|
|
87
|
+
}
|
|
82
88
|
/**
|
|
83
89
|
* Create a Cyberdesk API client
|
|
84
90
|
*
|
|
@@ -107,10 +113,14 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
107
113
|
* @returns Paginated list of machines
|
|
108
114
|
*/
|
|
109
115
|
list: (params) => __awaiter(this, void 0, void 0, function* () {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
const query = {
|
|
117
|
+
status: params === null || params === void 0 ? void 0 : params.status,
|
|
118
|
+
skip: params === null || params === void 0 ? void 0 : params.skip,
|
|
119
|
+
limit: params === null || params === void 0 ? void 0 : params.limit,
|
|
120
|
+
created_at_from: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_from),
|
|
121
|
+
created_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_to),
|
|
122
|
+
};
|
|
123
|
+
return (0, sdk_gen_1.listMachinesV1MachinesGet)({ client, query });
|
|
114
124
|
}),
|
|
115
125
|
/**
|
|
116
126
|
* Create a new machine
|
|
@@ -161,6 +171,153 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
161
171
|
path: { machine_id: machineId },
|
|
162
172
|
});
|
|
163
173
|
}),
|
|
174
|
+
/**
|
|
175
|
+
* Get all pools that a machine belongs to
|
|
176
|
+
*
|
|
177
|
+
* @param machineId - The ID of the machine
|
|
178
|
+
* @returns List of pools the machine belongs to
|
|
179
|
+
*/
|
|
180
|
+
getPools: (machineId) => __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
return (0, sdk_gen_1.getMachinePoolsV1MachinesMachineIdPoolsGet)({
|
|
182
|
+
client,
|
|
183
|
+
path: { machine_id: machineId },
|
|
184
|
+
});
|
|
185
|
+
}),
|
|
186
|
+
/**
|
|
187
|
+
* Update a machine's pool assignments
|
|
188
|
+
*
|
|
189
|
+
* This replaces all existing pool assignments with the new ones.
|
|
190
|
+
*
|
|
191
|
+
* @param machineId - The ID of the machine
|
|
192
|
+
* @param data - MachinePoolUpdate with pool_ids list
|
|
193
|
+
* @returns Updated machine details
|
|
194
|
+
*/
|
|
195
|
+
updatePools: (machineId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
return (0, sdk_gen_1.updateMachinePoolsV1MachinesMachineIdPoolsPut)({
|
|
197
|
+
client,
|
|
198
|
+
path: { machine_id: machineId },
|
|
199
|
+
body: data,
|
|
200
|
+
});
|
|
201
|
+
}),
|
|
202
|
+
},
|
|
203
|
+
// Pool endpoints
|
|
204
|
+
pools: {
|
|
205
|
+
/**
|
|
206
|
+
* List pools for the organization
|
|
207
|
+
*
|
|
208
|
+
* @param params - Optional query parameters
|
|
209
|
+
* @param params.skip - Number of items to skip (for pagination)
|
|
210
|
+
* @param params.limit - Maximum number of items to return
|
|
211
|
+
* @returns Paginated list of pools
|
|
212
|
+
*/
|
|
213
|
+
list: (params) => __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
return (0, sdk_gen_1.listPoolsV1PoolsGet)({
|
|
215
|
+
client,
|
|
216
|
+
query: params,
|
|
217
|
+
});
|
|
218
|
+
}),
|
|
219
|
+
/**
|
|
220
|
+
* Create a new pool
|
|
221
|
+
*
|
|
222
|
+
* @param data - Pool configuration
|
|
223
|
+
* @returns Created pool details
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```typescript
|
|
227
|
+
* const pool = await client.pools.create({
|
|
228
|
+
* name: 'Customer A',
|
|
229
|
+
* description: 'All Customer A machines'
|
|
230
|
+
* });
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
create: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
return (0, sdk_gen_1.createPoolV1PoolsPost)({
|
|
235
|
+
client,
|
|
236
|
+
body: data,
|
|
237
|
+
});
|
|
238
|
+
}),
|
|
239
|
+
/**
|
|
240
|
+
* Get a specific pool by ID
|
|
241
|
+
*
|
|
242
|
+
* @param poolId - The ID of the pool
|
|
243
|
+
* @param includeMachines - Whether to include full machine details
|
|
244
|
+
* @returns Pool details, optionally with machine list
|
|
245
|
+
*/
|
|
246
|
+
get: (poolId, includeMachines) => __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
return (0, sdk_gen_1.getPoolV1PoolsPoolIdGet)({
|
|
248
|
+
client,
|
|
249
|
+
path: { pool_id: poolId },
|
|
250
|
+
query: includeMachines ? { include_machines: includeMachines } : undefined,
|
|
251
|
+
});
|
|
252
|
+
}),
|
|
253
|
+
/**
|
|
254
|
+
* Update a pool's details
|
|
255
|
+
*
|
|
256
|
+
* @param poolId - The ID of the pool to update
|
|
257
|
+
* @param data - Update data (name, description)
|
|
258
|
+
* @returns Updated pool details
|
|
259
|
+
*/
|
|
260
|
+
update: (poolId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
return (0, sdk_gen_1.updatePoolV1PoolsPoolIdPatch)({
|
|
262
|
+
client,
|
|
263
|
+
path: { pool_id: poolId },
|
|
264
|
+
body: data,
|
|
265
|
+
});
|
|
266
|
+
}),
|
|
267
|
+
/**
|
|
268
|
+
* Delete a pool
|
|
269
|
+
*
|
|
270
|
+
* This will not delete the machines in the pool.
|
|
271
|
+
*
|
|
272
|
+
* @param poolId - The ID of the pool to delete
|
|
273
|
+
*/
|
|
274
|
+
delete: (poolId) => __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
return (0, sdk_gen_1.deletePoolV1PoolsPoolIdDelete)({
|
|
276
|
+
client,
|
|
277
|
+
path: { pool_id: poolId },
|
|
278
|
+
});
|
|
279
|
+
}),
|
|
280
|
+
/**
|
|
281
|
+
* Add machines to a pool
|
|
282
|
+
*
|
|
283
|
+
* @param poolId - The ID of the pool
|
|
284
|
+
* @param data - MachinePoolAssignment with machine_ids list
|
|
285
|
+
* @returns Pool with updated machine list
|
|
286
|
+
*
|
|
287
|
+
* @example
|
|
288
|
+
* ```typescript
|
|
289
|
+
* await client.pools.addMachines('pool-id', {
|
|
290
|
+
* machine_ids: ['machine1-id', 'machine2-id']
|
|
291
|
+
* });
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
294
|
+
addMachines: (poolId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
return (0, sdk_gen_1.addMachinesToPoolV1PoolsPoolIdMachinesPost)({
|
|
296
|
+
client,
|
|
297
|
+
path: { pool_id: poolId },
|
|
298
|
+
body: data,
|
|
299
|
+
});
|
|
300
|
+
}),
|
|
301
|
+
/**
|
|
302
|
+
* Remove machines from a pool
|
|
303
|
+
*
|
|
304
|
+
* @param poolId - The ID of the pool
|
|
305
|
+
* @param data - MachinePoolAssignment with machine_ids list
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* ```typescript
|
|
309
|
+
* await client.pools.removeMachines('pool-id', {
|
|
310
|
+
* machine_ids: ['machine1-id']
|
|
311
|
+
* });
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
removeMachines: (poolId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
315
|
+
return (0, sdk_gen_1.removeMachinesFromPoolV1PoolsPoolIdMachinesDelete)({
|
|
316
|
+
client,
|
|
317
|
+
path: { pool_id: poolId },
|
|
318
|
+
body: data,
|
|
319
|
+
});
|
|
320
|
+
}),
|
|
164
321
|
},
|
|
165
322
|
// Workflow endpoints
|
|
166
323
|
workflows: {
|
|
@@ -173,10 +330,15 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
173
330
|
* @returns Paginated list of workflows
|
|
174
331
|
*/
|
|
175
332
|
list: (params) => __awaiter(this, void 0, void 0, function* () {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
333
|
+
const query = {
|
|
334
|
+
skip: params === null || params === void 0 ? void 0 : params.skip,
|
|
335
|
+
limit: params === null || params === void 0 ? void 0 : params.limit,
|
|
336
|
+
created_at_from: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_from),
|
|
337
|
+
created_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_to),
|
|
338
|
+
updated_at_from: toIsoUtc(params === null || params === void 0 ? void 0 : params.updated_at_from),
|
|
339
|
+
updated_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.updated_at_to),
|
|
340
|
+
};
|
|
341
|
+
return (0, sdk_gen_1.listWorkflowsV1WorkflowsGet)({ client, query });
|
|
180
342
|
}),
|
|
181
343
|
/**
|
|
182
344
|
* Create a new workflow
|
|
@@ -251,10 +413,17 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
251
413
|
* @returns Paginated list of runs
|
|
252
414
|
*/
|
|
253
415
|
list: (params) => __awaiter(this, void 0, void 0, function* () {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
416
|
+
var _a, _b, _c;
|
|
417
|
+
const query = {
|
|
418
|
+
skip: params === null || params === void 0 ? void 0 : params.skip,
|
|
419
|
+
limit: params === null || params === void 0 ? void 0 : params.limit,
|
|
420
|
+
status: (_a = params === null || params === void 0 ? void 0 : params.status) !== null && _a !== void 0 ? _a : undefined,
|
|
421
|
+
workflow_id: (_b = params === null || params === void 0 ? void 0 : params.workflow_id) !== null && _b !== void 0 ? _b : undefined,
|
|
422
|
+
machine_id: (_c = params === null || params === void 0 ? void 0 : params.machine_id) !== null && _c !== void 0 ? _c : undefined,
|
|
423
|
+
created_at_from: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_from),
|
|
424
|
+
created_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_to),
|
|
425
|
+
};
|
|
426
|
+
return (0, sdk_gen_1.listRunsV1RunsGet)({ client, query });
|
|
258
427
|
}),
|
|
259
428
|
/**
|
|
260
429
|
* Create a new run
|
|
@@ -262,6 +431,7 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
262
431
|
* @param data - Run configuration
|
|
263
432
|
* @param data.workflow_id - The workflow to run
|
|
264
433
|
* @param data.machine_id - Optional machine ID (auto-selected if not provided)
|
|
434
|
+
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
265
435
|
* @param data.input_values - Optional input values for workflow variables
|
|
266
436
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
267
437
|
* @returns Created run details
|
|
@@ -270,6 +440,7 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
270
440
|
* ```typescript
|
|
271
441
|
* const run = await client.runs.create({
|
|
272
442
|
* workflow_id: 'workflow-id',
|
|
443
|
+
* pool_ids: ['pool1-id', 'pool2-id'], // Machine must be in both pools
|
|
273
444
|
* input_values: { prompt: 'Hello' },
|
|
274
445
|
* file_inputs: [{
|
|
275
446
|
* filename: 'data.txt',
|
|
@@ -298,6 +469,7 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
298
469
|
* @param data.count - Number of runs to create (1-1000)
|
|
299
470
|
* @param data.workflow_id - The workflow to run
|
|
300
471
|
* @param data.machine_id - Optional machine ID (auto-selected if not provided)
|
|
472
|
+
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
301
473
|
* @param data.input_values - Optional input values for workflow variables
|
|
302
474
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
303
475
|
* @returns Details about created runs and any failures
|
|
@@ -307,6 +479,7 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
307
479
|
* const result = await client.runs.bulkCreate({
|
|
308
480
|
* count: 100,
|
|
309
481
|
* workflow_id: 'workflow-id',
|
|
482
|
+
* pool_ids: ['pool1-id'], // All runs require machines in this pool
|
|
310
483
|
* input_values: { prompt: 'Bulk task' },
|
|
311
484
|
* file_inputs: [{
|
|
312
485
|
* filename: 'data.txt',
|
|
@@ -409,10 +582,17 @@ function createCyberdeskClient(apiKey, baseUrl) {
|
|
|
409
582
|
* @returns Paginated list of trajectories
|
|
410
583
|
*/
|
|
411
584
|
list: (params) => __awaiter(this, void 0, void 0, function* () {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
585
|
+
var _a;
|
|
586
|
+
const query = {
|
|
587
|
+
skip: params === null || params === void 0 ? void 0 : params.skip,
|
|
588
|
+
limit: params === null || params === void 0 ? void 0 : params.limit,
|
|
589
|
+
workflow_id: (_a = params === null || params === void 0 ? void 0 : params.workflow_id) !== null && _a !== void 0 ? _a : undefined,
|
|
590
|
+
created_at_from: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_from),
|
|
591
|
+
created_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_to),
|
|
592
|
+
updated_at_from: toIsoUtc(params === null || params === void 0 ? void 0 : params.updated_at_from),
|
|
593
|
+
updated_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.updated_at_to),
|
|
594
|
+
};
|
|
595
|
+
return (0, sdk_gen_1.listTrajectoriesV1TrajectoriesGet)({ client, query });
|
|
416
596
|
}),
|
|
417
597
|
/**
|
|
418
598
|
* Create a new trajectory
|