cyberdesk 1.11.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/sdk.gen.d.ts +83 -37
- package/dist/client/sdk.gen.js +165 -38
- package/dist/client/types.gen.d.ts +292 -5
- package/dist/index.d.ts +144 -2
- package/dist/index.js +151 -0
- package/package.json +1 -1
|
@@ -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
|
*/
|
|
@@ -89,12 +107,14 @@ export type MachineResponse = {
|
|
|
89
107
|
hostname?: string | null;
|
|
90
108
|
os_info?: string | null;
|
|
91
109
|
id: string;
|
|
92
|
-
user_id
|
|
110
|
+
user_id?: string | null;
|
|
111
|
+
organization_id?: string | null;
|
|
93
112
|
unkey_key_id: string;
|
|
94
113
|
status: MachineStatus;
|
|
95
114
|
is_available: boolean;
|
|
96
115
|
created_at: string;
|
|
97
116
|
last_seen: string;
|
|
117
|
+
pools?: Array<PoolResponse> | null;
|
|
98
118
|
};
|
|
99
119
|
export type MachineStatus = 'connected' | 'disconnected' | 'error';
|
|
100
120
|
/**
|
|
@@ -147,6 +167,12 @@ export type PaginatedResponseMachineResponse = {
|
|
|
147
167
|
skip: number;
|
|
148
168
|
limit: number;
|
|
149
169
|
};
|
|
170
|
+
export type PaginatedResponsePoolResponse = {
|
|
171
|
+
items: Array<PoolResponse>;
|
|
172
|
+
total: number;
|
|
173
|
+
skip: number;
|
|
174
|
+
limit: number;
|
|
175
|
+
};
|
|
150
176
|
export type PaginatedResponseRunAttachmentResponse = {
|
|
151
177
|
items: Array<RunAttachmentResponse>;
|
|
152
178
|
total: number;
|
|
@@ -171,6 +197,51 @@ export type PaginatedResponseWorkflowResponse = {
|
|
|
171
197
|
skip: number;
|
|
172
198
|
limit: number;
|
|
173
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
|
+
};
|
|
174
245
|
export type PowerShellExecRequest = {
|
|
175
246
|
/**
|
|
176
247
|
* PowerShell command to execute
|
|
@@ -227,6 +298,7 @@ export type RequestLogResponse = {
|
|
|
227
298
|
error_message?: string | null;
|
|
228
299
|
id: string;
|
|
229
300
|
machine_id: string;
|
|
301
|
+
organization_id?: string | null;
|
|
230
302
|
created_at: string;
|
|
231
303
|
completed_at: string | null;
|
|
232
304
|
};
|
|
@@ -279,7 +351,8 @@ export type RunAttachmentResponse = {
|
|
|
279
351
|
target_path?: string | null;
|
|
280
352
|
cleanup_imports_after_run?: boolean;
|
|
281
353
|
id: string;
|
|
282
|
-
user_id
|
|
354
|
+
user_id?: string | null;
|
|
355
|
+
organization_id?: string | null;
|
|
283
356
|
run_id: string;
|
|
284
357
|
size_bytes: number;
|
|
285
358
|
storage_path: string;
|
|
@@ -301,6 +374,10 @@ export type RunBulkCreate = {
|
|
|
301
374
|
* Machine ID. If not provided, an available machine will be automatically selected.
|
|
302
375
|
*/
|
|
303
376
|
machine_id?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* Pool IDs to filter available machines. Machine must belong to at least one of these pools.
|
|
379
|
+
*/
|
|
380
|
+
pool_ids?: Array<string> | null;
|
|
304
381
|
/**
|
|
305
382
|
* Input values for workflow variables
|
|
306
383
|
*/
|
|
@@ -333,6 +410,10 @@ export type RunCreate = {
|
|
|
333
410
|
* Machine ID. If not provided, an available machine will be automatically selected.
|
|
334
411
|
*/
|
|
335
412
|
machine_id?: string | null;
|
|
413
|
+
/**
|
|
414
|
+
* Pool IDs to filter available machines. Machine must belong to at least one of these pools.
|
|
415
|
+
*/
|
|
416
|
+
pool_ids?: Array<string> | null;
|
|
336
417
|
/**
|
|
337
418
|
* Input values for workflow variables
|
|
338
419
|
*/
|
|
@@ -351,7 +432,8 @@ export type RunResponse = {
|
|
|
351
432
|
workflow_id: string;
|
|
352
433
|
machine_id: string | null;
|
|
353
434
|
id: string;
|
|
354
|
-
user_id
|
|
435
|
+
user_id?: string | null;
|
|
436
|
+
organization_id?: string | null;
|
|
355
437
|
status: RunStatus;
|
|
356
438
|
error: Array<string> | null;
|
|
357
439
|
output_data: {
|
|
@@ -365,6 +447,7 @@ export type RunResponse = {
|
|
|
365
447
|
input_values: {
|
|
366
448
|
[key: string]: unknown;
|
|
367
449
|
} | null;
|
|
450
|
+
pool_ids?: Array<string> | null;
|
|
368
451
|
created_at: string;
|
|
369
452
|
};
|
|
370
453
|
export type RunStatus = 'scheduling' | 'running' | 'success' | 'cancelled' | 'error';
|
|
@@ -427,7 +510,8 @@ export type TrajectoryResponse = {
|
|
|
427
510
|
[key: string]: unknown;
|
|
428
511
|
} | null;
|
|
429
512
|
id: string;
|
|
430
|
-
user_id
|
|
513
|
+
user_id?: string | null;
|
|
514
|
+
organization_id?: string | null;
|
|
431
515
|
created_at: string;
|
|
432
516
|
updated_at: string;
|
|
433
517
|
};
|
|
@@ -474,7 +558,8 @@ export type WorkflowResponse = {
|
|
|
474
558
|
*/
|
|
475
559
|
includes_file_exports?: boolean;
|
|
476
560
|
id: string;
|
|
477
|
-
user_id
|
|
561
|
+
user_id?: string | null;
|
|
562
|
+
organization_id?: string | null;
|
|
478
563
|
includes_input_variables?: boolean;
|
|
479
564
|
old_versions?: Array<{
|
|
480
565
|
[key: string]: unknown;
|
|
@@ -640,6 +725,208 @@ export type UpdateMachineV1MachinesMachineIdPatchResponses = {
|
|
|
640
725
|
200: MachineResponse;
|
|
641
726
|
};
|
|
642
727
|
export type UpdateMachineV1MachinesMachineIdPatchResponse = UpdateMachineV1MachinesMachineIdPatchResponses[keyof UpdateMachineV1MachinesMachineIdPatchResponses];
|
|
728
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetData = {
|
|
729
|
+
body?: never;
|
|
730
|
+
path: {
|
|
731
|
+
machine_id: string;
|
|
732
|
+
};
|
|
733
|
+
query?: never;
|
|
734
|
+
url: '/v1/machines/{machine_id}/pools';
|
|
735
|
+
};
|
|
736
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetErrors = {
|
|
737
|
+
/**
|
|
738
|
+
* Validation Error
|
|
739
|
+
*/
|
|
740
|
+
422: HttpValidationError;
|
|
741
|
+
};
|
|
742
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetError = GetMachinePoolsV1MachinesMachineIdPoolsGetErrors[keyof GetMachinePoolsV1MachinesMachineIdPoolsGetErrors];
|
|
743
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetResponses = {
|
|
744
|
+
/**
|
|
745
|
+
* Successful Response
|
|
746
|
+
*/
|
|
747
|
+
200: Array<PoolResponse>;
|
|
748
|
+
};
|
|
749
|
+
export type GetMachinePoolsV1MachinesMachineIdPoolsGetResponse = GetMachinePoolsV1MachinesMachineIdPoolsGetResponses[keyof GetMachinePoolsV1MachinesMachineIdPoolsGetResponses];
|
|
750
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutData = {
|
|
751
|
+
body: MachinePoolUpdate;
|
|
752
|
+
path: {
|
|
753
|
+
machine_id: string;
|
|
754
|
+
};
|
|
755
|
+
query?: never;
|
|
756
|
+
url: '/v1/machines/{machine_id}/pools';
|
|
757
|
+
};
|
|
758
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutErrors = {
|
|
759
|
+
/**
|
|
760
|
+
* Validation Error
|
|
761
|
+
*/
|
|
762
|
+
422: HttpValidationError;
|
|
763
|
+
};
|
|
764
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutError = UpdateMachinePoolsV1MachinesMachineIdPoolsPutErrors[keyof UpdateMachinePoolsV1MachinesMachineIdPoolsPutErrors];
|
|
765
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutResponses = {
|
|
766
|
+
/**
|
|
767
|
+
* Successful Response
|
|
768
|
+
*/
|
|
769
|
+
200: MachineResponse;
|
|
770
|
+
};
|
|
771
|
+
export type UpdateMachinePoolsV1MachinesMachineIdPoolsPutResponse = UpdateMachinePoolsV1MachinesMachineIdPoolsPutResponses[keyof UpdateMachinePoolsV1MachinesMachineIdPoolsPutResponses];
|
|
772
|
+
export type ListPoolsV1PoolsGetData = {
|
|
773
|
+
body?: never;
|
|
774
|
+
path?: never;
|
|
775
|
+
query?: {
|
|
776
|
+
skip?: number;
|
|
777
|
+
limit?: number;
|
|
778
|
+
};
|
|
779
|
+
url: '/v1/pools';
|
|
780
|
+
};
|
|
781
|
+
export type ListPoolsV1PoolsGetErrors = {
|
|
782
|
+
/**
|
|
783
|
+
* Validation Error
|
|
784
|
+
*/
|
|
785
|
+
422: HttpValidationError;
|
|
786
|
+
};
|
|
787
|
+
export type ListPoolsV1PoolsGetError = ListPoolsV1PoolsGetErrors[keyof ListPoolsV1PoolsGetErrors];
|
|
788
|
+
export type ListPoolsV1PoolsGetResponses = {
|
|
789
|
+
/**
|
|
790
|
+
* Successful Response
|
|
791
|
+
*/
|
|
792
|
+
200: PaginatedResponsePoolResponse;
|
|
793
|
+
};
|
|
794
|
+
export type ListPoolsV1PoolsGetResponse = ListPoolsV1PoolsGetResponses[keyof ListPoolsV1PoolsGetResponses];
|
|
795
|
+
export type CreatePoolV1PoolsPostData = {
|
|
796
|
+
body: PoolCreate;
|
|
797
|
+
path?: never;
|
|
798
|
+
query?: never;
|
|
799
|
+
url: '/v1/pools';
|
|
800
|
+
};
|
|
801
|
+
export type CreatePoolV1PoolsPostErrors = {
|
|
802
|
+
/**
|
|
803
|
+
* Validation Error
|
|
804
|
+
*/
|
|
805
|
+
422: HttpValidationError;
|
|
806
|
+
};
|
|
807
|
+
export type CreatePoolV1PoolsPostError = CreatePoolV1PoolsPostErrors[keyof CreatePoolV1PoolsPostErrors];
|
|
808
|
+
export type CreatePoolV1PoolsPostResponses = {
|
|
809
|
+
/**
|
|
810
|
+
* Successful Response
|
|
811
|
+
*/
|
|
812
|
+
201: PoolResponse;
|
|
813
|
+
};
|
|
814
|
+
export type CreatePoolV1PoolsPostResponse = CreatePoolV1PoolsPostResponses[keyof CreatePoolV1PoolsPostResponses];
|
|
815
|
+
export type DeletePoolV1PoolsPoolIdDeleteData = {
|
|
816
|
+
body?: never;
|
|
817
|
+
path: {
|
|
818
|
+
pool_id: string;
|
|
819
|
+
};
|
|
820
|
+
query?: never;
|
|
821
|
+
url: '/v1/pools/{pool_id}';
|
|
822
|
+
};
|
|
823
|
+
export type DeletePoolV1PoolsPoolIdDeleteErrors = {
|
|
824
|
+
/**
|
|
825
|
+
* Validation Error
|
|
826
|
+
*/
|
|
827
|
+
422: HttpValidationError;
|
|
828
|
+
};
|
|
829
|
+
export type DeletePoolV1PoolsPoolIdDeleteError = DeletePoolV1PoolsPoolIdDeleteErrors[keyof DeletePoolV1PoolsPoolIdDeleteErrors];
|
|
830
|
+
export type DeletePoolV1PoolsPoolIdDeleteResponses = {
|
|
831
|
+
/**
|
|
832
|
+
* Successful Response
|
|
833
|
+
*/
|
|
834
|
+
204: void;
|
|
835
|
+
};
|
|
836
|
+
export type DeletePoolV1PoolsPoolIdDeleteResponse = DeletePoolV1PoolsPoolIdDeleteResponses[keyof DeletePoolV1PoolsPoolIdDeleteResponses];
|
|
837
|
+
export type GetPoolV1PoolsPoolIdGetData = {
|
|
838
|
+
body?: never;
|
|
839
|
+
path: {
|
|
840
|
+
pool_id: string;
|
|
841
|
+
};
|
|
842
|
+
query?: {
|
|
843
|
+
/**
|
|
844
|
+
* Include full machine details
|
|
845
|
+
*/
|
|
846
|
+
include_machines?: boolean;
|
|
847
|
+
};
|
|
848
|
+
url: '/v1/pools/{pool_id}';
|
|
849
|
+
};
|
|
850
|
+
export type GetPoolV1PoolsPoolIdGetErrors = {
|
|
851
|
+
/**
|
|
852
|
+
* Validation Error
|
|
853
|
+
*/
|
|
854
|
+
422: HttpValidationError;
|
|
855
|
+
};
|
|
856
|
+
export type GetPoolV1PoolsPoolIdGetError = GetPoolV1PoolsPoolIdGetErrors[keyof GetPoolV1PoolsPoolIdGetErrors];
|
|
857
|
+
export type GetPoolV1PoolsPoolIdGetResponses = {
|
|
858
|
+
/**
|
|
859
|
+
* Successful Response
|
|
860
|
+
*/
|
|
861
|
+
200: PoolWithMachines;
|
|
862
|
+
};
|
|
863
|
+
export type GetPoolV1PoolsPoolIdGetResponse = GetPoolV1PoolsPoolIdGetResponses[keyof GetPoolV1PoolsPoolIdGetResponses];
|
|
864
|
+
export type UpdatePoolV1PoolsPoolIdPatchData = {
|
|
865
|
+
body: PoolUpdate;
|
|
866
|
+
path: {
|
|
867
|
+
pool_id: string;
|
|
868
|
+
};
|
|
869
|
+
query?: never;
|
|
870
|
+
url: '/v1/pools/{pool_id}';
|
|
871
|
+
};
|
|
872
|
+
export type UpdatePoolV1PoolsPoolIdPatchErrors = {
|
|
873
|
+
/**
|
|
874
|
+
* Validation Error
|
|
875
|
+
*/
|
|
876
|
+
422: HttpValidationError;
|
|
877
|
+
};
|
|
878
|
+
export type UpdatePoolV1PoolsPoolIdPatchError = UpdatePoolV1PoolsPoolIdPatchErrors[keyof UpdatePoolV1PoolsPoolIdPatchErrors];
|
|
879
|
+
export type UpdatePoolV1PoolsPoolIdPatchResponses = {
|
|
880
|
+
/**
|
|
881
|
+
* Successful Response
|
|
882
|
+
*/
|
|
883
|
+
200: PoolResponse;
|
|
884
|
+
};
|
|
885
|
+
export type UpdatePoolV1PoolsPoolIdPatchResponse = UpdatePoolV1PoolsPoolIdPatchResponses[keyof UpdatePoolV1PoolsPoolIdPatchResponses];
|
|
886
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteData = {
|
|
887
|
+
body: MachinePoolAssignment;
|
|
888
|
+
path: {
|
|
889
|
+
pool_id: string;
|
|
890
|
+
};
|
|
891
|
+
query?: never;
|
|
892
|
+
url: '/v1/pools/{pool_id}/machines';
|
|
893
|
+
};
|
|
894
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteErrors = {
|
|
895
|
+
/**
|
|
896
|
+
* Validation Error
|
|
897
|
+
*/
|
|
898
|
+
422: HttpValidationError;
|
|
899
|
+
};
|
|
900
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteError = RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteErrors[keyof RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteErrors];
|
|
901
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteResponses = {
|
|
902
|
+
/**
|
|
903
|
+
* Successful Response
|
|
904
|
+
*/
|
|
905
|
+
204: void;
|
|
906
|
+
};
|
|
907
|
+
export type RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteResponse = RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteResponses[keyof RemoveMachinesFromPoolV1PoolsPoolIdMachinesDeleteResponses];
|
|
908
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostData = {
|
|
909
|
+
body: MachinePoolAssignment;
|
|
910
|
+
path: {
|
|
911
|
+
pool_id: string;
|
|
912
|
+
};
|
|
913
|
+
query?: never;
|
|
914
|
+
url: '/v1/pools/{pool_id}/machines';
|
|
915
|
+
};
|
|
916
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostErrors = {
|
|
917
|
+
/**
|
|
918
|
+
* Validation Error
|
|
919
|
+
*/
|
|
920
|
+
422: HttpValidationError;
|
|
921
|
+
};
|
|
922
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostError = AddMachinesToPoolV1PoolsPoolIdMachinesPostErrors[keyof AddMachinesToPoolV1PoolsPoolIdMachinesPostErrors];
|
|
923
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostResponses = {
|
|
924
|
+
/**
|
|
925
|
+
* Successful Response
|
|
926
|
+
*/
|
|
927
|
+
200: PoolWithMachines;
|
|
928
|
+
};
|
|
929
|
+
export type AddMachinesToPoolV1PoolsPoolIdMachinesPostResponse = AddMachinesToPoolV1PoolsPoolIdMachinesPostResponses[keyof AddMachinesToPoolV1PoolsPoolIdMachinesPostResponses];
|
|
643
930
|
export type ListWorkflowsV1WorkflowsGetData = {
|
|
644
931
|
body?: never;
|
|
645
932
|
path?: never;
|
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';
|
|
@@ -107,6 +107,144 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
107
107
|
request: Request;
|
|
108
108
|
response: Response;
|
|
109
109
|
}>;
|
|
110
|
+
/**
|
|
111
|
+
* Get all pools that a machine belongs to
|
|
112
|
+
*
|
|
113
|
+
* @param machineId - The ID of the machine
|
|
114
|
+
* @returns List of pools the machine belongs to
|
|
115
|
+
*/
|
|
116
|
+
getPools: (machineId: string) => Promise<{
|
|
117
|
+
data?: PoolResponse[];
|
|
118
|
+
error?: any;
|
|
119
|
+
}>;
|
|
120
|
+
/**
|
|
121
|
+
* Update a machine's pool assignments
|
|
122
|
+
*
|
|
123
|
+
* This replaces all existing pool assignments with the new ones.
|
|
124
|
+
*
|
|
125
|
+
* @param machineId - The ID of the machine
|
|
126
|
+
* @param data - MachinePoolUpdate with pool_ids list
|
|
127
|
+
* @returns Updated machine details
|
|
128
|
+
*/
|
|
129
|
+
updatePools: (machineId: string, data: MachinePoolUpdate) => Promise<{
|
|
130
|
+
data?: MachineResponse;
|
|
131
|
+
error?: any;
|
|
132
|
+
}>;
|
|
133
|
+
};
|
|
134
|
+
pools: {
|
|
135
|
+
/**
|
|
136
|
+
* List pools for the organization
|
|
137
|
+
*
|
|
138
|
+
* @param params - Optional query parameters
|
|
139
|
+
* @param params.skip - Number of items to skip (for pagination)
|
|
140
|
+
* @param params.limit - Maximum number of items to return
|
|
141
|
+
* @returns Paginated list of pools
|
|
142
|
+
*/
|
|
143
|
+
list: (params?: {
|
|
144
|
+
skip?: number;
|
|
145
|
+
limit?: number;
|
|
146
|
+
}) => Promise<{
|
|
147
|
+
data?: PaginatedResponsePoolResponse;
|
|
148
|
+
error?: any;
|
|
149
|
+
}>;
|
|
150
|
+
/**
|
|
151
|
+
* Create a new pool
|
|
152
|
+
*
|
|
153
|
+
* @param data - Pool configuration
|
|
154
|
+
* @returns Created pool details
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* const pool = await client.pools.create({
|
|
159
|
+
* name: 'Customer A',
|
|
160
|
+
* description: 'All Customer A machines'
|
|
161
|
+
* });
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
create: (data: PoolCreate) => Promise<{
|
|
165
|
+
data?: PoolResponse;
|
|
166
|
+
error?: any;
|
|
167
|
+
}>;
|
|
168
|
+
/**
|
|
169
|
+
* Get a specific pool by ID
|
|
170
|
+
*
|
|
171
|
+
* @param poolId - The ID of the pool
|
|
172
|
+
* @param includeMachines - Whether to include full machine details
|
|
173
|
+
* @returns Pool details, optionally with machine list
|
|
174
|
+
*/
|
|
175
|
+
get: (poolId: string, includeMachines?: boolean) => Promise<{
|
|
176
|
+
data?: PoolResponse | PoolWithMachines;
|
|
177
|
+
error?: any;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* Update a pool's details
|
|
181
|
+
*
|
|
182
|
+
* @param poolId - The ID of the pool to update
|
|
183
|
+
* @param data - Update data (name, description)
|
|
184
|
+
* @returns Updated pool details
|
|
185
|
+
*/
|
|
186
|
+
update: (poolId: string, data: PoolUpdate) => Promise<{
|
|
187
|
+
data?: PoolResponse;
|
|
188
|
+
error?: any;
|
|
189
|
+
}>;
|
|
190
|
+
/**
|
|
191
|
+
* Delete a pool
|
|
192
|
+
*
|
|
193
|
+
* This will not delete the machines in the pool.
|
|
194
|
+
*
|
|
195
|
+
* @param poolId - The ID of the pool to delete
|
|
196
|
+
*/
|
|
197
|
+
delete: (poolId: string) => Promise<({
|
|
198
|
+
data: undefined;
|
|
199
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
200
|
+
} | {
|
|
201
|
+
data: void;
|
|
202
|
+
error: undefined;
|
|
203
|
+
}) & {
|
|
204
|
+
request: Request;
|
|
205
|
+
response: Response;
|
|
206
|
+
}>;
|
|
207
|
+
/**
|
|
208
|
+
* Add machines to a pool
|
|
209
|
+
*
|
|
210
|
+
* @param poolId - The ID of the pool
|
|
211
|
+
* @param data - MachinePoolAssignment with machine_ids list
|
|
212
|
+
* @returns Pool with updated machine list
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* await client.pools.addMachines('pool-id', {
|
|
217
|
+
* machine_ids: ['machine1-id', 'machine2-id']
|
|
218
|
+
* });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
addMachines: (poolId: string, data: MachinePoolAssignment) => Promise<{
|
|
222
|
+
data?: PoolWithMachines;
|
|
223
|
+
error?: any;
|
|
224
|
+
}>;
|
|
225
|
+
/**
|
|
226
|
+
* Remove machines from a pool
|
|
227
|
+
*
|
|
228
|
+
* @param poolId - The ID of the pool
|
|
229
|
+
* @param data - MachinePoolAssignment with machine_ids list
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```typescript
|
|
233
|
+
* await client.pools.removeMachines('pool-id', {
|
|
234
|
+
* machine_ids: ['machine1-id']
|
|
235
|
+
* });
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
removeMachines: (poolId: string, data: MachinePoolAssignment) => Promise<({
|
|
239
|
+
data: undefined;
|
|
240
|
+
error: import("./client/types.gen").HttpValidationError;
|
|
241
|
+
} | {
|
|
242
|
+
data: void;
|
|
243
|
+
error: undefined;
|
|
244
|
+
}) & {
|
|
245
|
+
request: Request;
|
|
246
|
+
response: Response;
|
|
247
|
+
}>;
|
|
110
248
|
};
|
|
111
249
|
workflows: {
|
|
112
250
|
/**
|
|
@@ -208,6 +346,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
208
346
|
* @param data - Run configuration
|
|
209
347
|
* @param data.workflow_id - The workflow to run
|
|
210
348
|
* @param data.machine_id - Optional machine ID (auto-selected if not provided)
|
|
349
|
+
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
211
350
|
* @param data.input_values - Optional input values for workflow variables
|
|
212
351
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
213
352
|
* @returns Created run details
|
|
@@ -216,6 +355,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
216
355
|
* ```typescript
|
|
217
356
|
* const run = await client.runs.create({
|
|
218
357
|
* workflow_id: 'workflow-id',
|
|
358
|
+
* pool_ids: ['pool1-id', 'pool2-id'], // Machine must be in both pools
|
|
219
359
|
* input_values: { prompt: 'Hello' },
|
|
220
360
|
* file_inputs: [{
|
|
221
361
|
* filename: 'data.txt',
|
|
@@ -242,6 +382,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
242
382
|
* @param data.count - Number of runs to create (1-1000)
|
|
243
383
|
* @param data.workflow_id - The workflow to run
|
|
244
384
|
* @param data.machine_id - Optional machine ID (auto-selected if not provided)
|
|
385
|
+
* @param data.pool_ids - Optional list of pool IDs (machine must be in ALL specified pools)
|
|
245
386
|
* @param data.input_values - Optional input values for workflow variables
|
|
246
387
|
* @param data.file_inputs - Optional files to upload to the machine
|
|
247
388
|
* @returns Details about created runs and any failures
|
|
@@ -251,6 +392,7 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
251
392
|
* const result = await client.runs.bulkCreate({
|
|
252
393
|
* count: 100,
|
|
253
394
|
* workflow_id: 'workflow-id',
|
|
395
|
+
* pool_ids: ['pool1-id'], // All runs require machines in this pool
|
|
254
396
|
* input_values: { prompt: 'Bulk task' },
|
|
255
397
|
* file_inputs: [{
|
|
256
398
|
* filename: 'data.txt',
|
|
@@ -534,4 +676,4 @@ export declare function createCyberdeskClient(apiKey: string, baseUrl?: string):
|
|
|
534
676
|
}>;
|
|
535
677
|
};
|
|
536
678
|
};
|
|
537
|
-
export type { MachineResponse, WorkflowResponse, RunResponse, RunBulkCreate, RunBulkCreateResponse, ConnectionResponse, TrajectoryResponse, RunAttachmentResponse, RunAttachmentDownloadUrlResponse, FileInput, AttachmentType, PaginatedResponseMachineResponse, PaginatedResponseWorkflowResponse, PaginatedResponseRunResponse, PaginatedResponseConnectionResponse, PaginatedResponseTrajectoryResponse, PaginatedResponseRunAttachmentResponse, };
|
|
679
|
+
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, };
|