cyberdesk 2.2.36 → 2.2.38
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/client/client.gen.d.ts +2 -0
- package/dist/client/client/client.gen.js +217 -0
- package/dist/client/client/index.d.ts +8 -0
- package/dist/client/client/index.js +17 -0
- package/dist/client/client/types.gen.d.ts +117 -0
- package/dist/client/client/types.gen.js +3 -0
- package/dist/client/client/utils.gen.d.ts +33 -0
- package/dist/client/client/utils.gen.js +247 -0
- package/dist/client/client.gen.d.ts +4 -4
- package/dist/client/client.gen.js +2 -4
- package/dist/client/core/auth.gen.d.ts +18 -0
- package/dist/client/core/auth.gen.js +27 -0
- package/dist/client/core/bodySerializer.gen.d.ts +25 -0
- package/dist/client/core/bodySerializer.gen.js +60 -0
- package/dist/client/core/params.gen.d.ts +43 -0
- package/dist/client/core/params.gen.js +104 -0
- package/dist/client/core/pathSerializer.gen.d.ts +33 -0
- package/dist/client/core/pathSerializer.gen.js +115 -0
- package/dist/client/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/client/core/queryKeySerializer.gen.js +98 -0
- package/dist/client/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/client/core/serverSentEvents.gen.js +160 -0
- package/dist/client/core/types.gen.d.ts +78 -0
- package/dist/client/core/types.gen.js +3 -0
- package/dist/client/core/utils.gen.d.ts +19 -0
- package/dist/client/core/utils.gen.js +93 -0
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +113 -17
- package/dist/client/sdk.gen.d.ts +217 -141
- package/dist/client/sdk.gen.js +217 -665
- package/dist/client/types.gen.d.ts +2588 -132
- package/dist/index.d.ts +217 -249
- package/dist/index.js +18 -43
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -51,7 +51,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
51
51
|
};
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.createCyberdeskClient = createCyberdeskClient;
|
|
54
|
-
const
|
|
54
|
+
const client_1 = require("./client/client");
|
|
55
55
|
// Import SDK methods from sdk.gen
|
|
56
56
|
const sdk_gen_1 = require("./client/sdk.gen");
|
|
57
57
|
// Export all generated types and methods for direct use
|
|
@@ -242,7 +242,7 @@ function createApiClient(apiKey, baseUrl = DEFAULT_API_BASE_URL, options = {}) {
|
|
|
242
242
|
retry: retryOptions,
|
|
243
243
|
idempotency: idempotencyOptions,
|
|
244
244
|
});
|
|
245
|
-
return (0,
|
|
245
|
+
return (0, client_1.createClient)({
|
|
246
246
|
baseUrl,
|
|
247
247
|
headers: {
|
|
248
248
|
'Content-Type': 'application/json',
|
|
@@ -617,10 +617,13 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
|
|
|
617
617
|
* @param params.limit - Maximum number of items to return
|
|
618
618
|
* @param params.search - Search workflows by name (case-insensitive substring match)
|
|
619
619
|
* @param params.tag_ids - Comma-separated list of tag UUIDs. Returns workflows with ALL specified tags (AND logic)
|
|
620
|
-
* @param params.include_tags -
|
|
620
|
+
* @param params.include_tags - Legacy flag to include tags in the response
|
|
621
|
+
* @param params.include - Related resources to include. Use `["tags"]`, `["post_run_checks"]`,
|
|
622
|
+
* or both. When provided, this overrides `include_tags`.
|
|
621
623
|
* @returns Paginated list of workflows
|
|
622
624
|
*/
|
|
623
625
|
list: (params) => __awaiter(this, void 0, void 0, function* () {
|
|
626
|
+
var _a;
|
|
624
627
|
const query = {
|
|
625
628
|
skip: params === null || params === void 0 ? void 0 : params.skip,
|
|
626
629
|
limit: params === null || params === void 0 ? void 0 : params.limit,
|
|
@@ -631,6 +634,7 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
|
|
|
631
634
|
updated_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.updated_at_to),
|
|
632
635
|
tag_ids: params === null || params === void 0 ? void 0 : params.tag_ids,
|
|
633
636
|
include_tags: params === null || params === void 0 ? void 0 : params.include_tags,
|
|
637
|
+
include: (_a = params === null || params === void 0 ? void 0 : params.include) === null || _a === void 0 ? void 0 : _a.join(','),
|
|
634
638
|
};
|
|
635
639
|
return (0, sdk_gen_1.listWorkflowsV1WorkflowsGet)({ client, query });
|
|
636
640
|
}),
|
|
@@ -659,12 +663,18 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
|
|
|
659
663
|
* Get a specific workflow by ID
|
|
660
664
|
*
|
|
661
665
|
* @param workflowId - The ID of the workflow
|
|
666
|
+
* @param params - Optional parameters
|
|
667
|
+
* @param params.include - Related resources to include. Allowed values:
|
|
668
|
+
* `["tags"]`, `["post_run_checks"]`. When omitted,
|
|
669
|
+
* the backend currently defaults to both.
|
|
662
670
|
* @returns Workflow details
|
|
663
671
|
*/
|
|
664
|
-
get: (workflowId) => __awaiter(this, void 0, void 0, function* () {
|
|
672
|
+
get: (workflowId, params) => __awaiter(this, void 0, void 0, function* () {
|
|
673
|
+
var _a;
|
|
665
674
|
return (0, sdk_gen_1.getWorkflowV1WorkflowsWorkflowIdGet)({
|
|
666
675
|
client,
|
|
667
676
|
path: { workflow_id: workflowId },
|
|
677
|
+
query: { include: (_a = params === null || params === void 0 ? void 0 : params.include) === null || _a === void 0 ? void 0 : _a.join(',') },
|
|
668
678
|
});
|
|
669
679
|
}),
|
|
670
680
|
/**
|
|
@@ -1032,39 +1042,6 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
|
|
|
1032
1042
|
});
|
|
1033
1043
|
}),
|
|
1034
1044
|
},
|
|
1035
|
-
// Computer endpoints
|
|
1036
|
-
computer: {
|
|
1037
|
-
/**
|
|
1038
|
-
* Create an ad hoc computer task for a connected machine.
|
|
1039
|
-
*
|
|
1040
|
-
* Accepts either the current desktop-compatible raw JSON string task body
|
|
1041
|
-
* or the forward-compatible object form `{ task: string }`.
|
|
1042
|
-
*/
|
|
1043
|
-
createAdHocTask: (machineId, task, params) => __awaiter(this, void 0, void 0, function* () {
|
|
1044
|
-
return (0, sdk_gen_1.createAdHocComputerTaskV1ComputerMachineIdTaskPost)({
|
|
1045
|
-
client,
|
|
1046
|
-
path: { machine_id: machineId },
|
|
1047
|
-
body: task,
|
|
1048
|
-
headers: (params === null || params === void 0 ? void 0 : params.idempotencyKey)
|
|
1049
|
-
? { "Idempotency-Key": params.idempotencyKey }
|
|
1050
|
-
: undefined,
|
|
1051
|
-
});
|
|
1052
|
-
}),
|
|
1053
|
-
/**
|
|
1054
|
-
* Notify Cyberdriver that a task has completed.
|
|
1055
|
-
*
|
|
1056
|
-
* This is primarily useful for lower-level integrations and testing.
|
|
1057
|
-
*/
|
|
1058
|
-
notifyTaskDone: (machineId, params) => __awaiter(this, void 0, void 0, function* () {
|
|
1059
|
-
return (0, sdk_gen_1.notifyTaskDoneV1ComputerMachineIdTaskDonePost)({
|
|
1060
|
-
client,
|
|
1061
|
-
path: { machine_id: machineId },
|
|
1062
|
-
headers: (params === null || params === void 0 ? void 0 : params.idempotencyKey)
|
|
1063
|
-
? { "Idempotency-Key": params.idempotencyKey }
|
|
1064
|
-
: undefined,
|
|
1065
|
-
});
|
|
1066
|
-
}),
|
|
1067
|
-
},
|
|
1068
1045
|
// Run endpoints
|
|
1069
1046
|
runs: {
|
|
1070
1047
|
/**
|
|
@@ -1078,7 +1055,6 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
|
|
|
1078
1055
|
* @param params.limit - Maximum number of items to return
|
|
1079
1056
|
* @param params.status - Filter by run status (scheduling, running, success, cancelled, error)
|
|
1080
1057
|
* @param params.workflow_id - Filter by workflow ID
|
|
1081
|
-
* @param params.run_kind - Filter by run kind ("workflow" or "ad_hoc")
|
|
1082
1058
|
* @param params.machine_id - Filter by machine ID
|
|
1083
1059
|
* @param params.session_id - Filter by session ID
|
|
1084
1060
|
* @param params.search - Search runs by input_values, output_data, error, session_alias (case-insensitive)
|
|
@@ -1095,22 +1071,21 @@ function createCyberdeskClient(apiKey, baseUrl, options) {
|
|
|
1095
1071
|
* - included: Related resources (when include parameter is used)
|
|
1096
1072
|
*/
|
|
1097
1073
|
list: (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1098
|
-
var _a, _b, _c, _d, _e
|
|
1074
|
+
var _a, _b, _c, _d, _e;
|
|
1099
1075
|
const query = {
|
|
1100
1076
|
skip: params === null || params === void 0 ? void 0 : params.skip,
|
|
1101
1077
|
limit: params === null || params === void 0 ? void 0 : params.limit,
|
|
1102
1078
|
status: (_a = params === null || params === void 0 ? void 0 : params.status) !== null && _a !== void 0 ? _a : undefined,
|
|
1103
1079
|
workflow_id: (_b = params === null || params === void 0 ? void 0 : params.workflow_id) !== null && _b !== void 0 ? _b : undefined,
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
session_id: (_e = params === null || params === void 0 ? void 0 : params.session_id) !== null && _e !== void 0 ? _e : undefined,
|
|
1080
|
+
machine_id: (_c = params === null || params === void 0 ? void 0 : params.machine_id) !== null && _c !== void 0 ? _c : undefined,
|
|
1081
|
+
session_id: (_d = params === null || params === void 0 ? void 0 : params.session_id) !== null && _d !== void 0 ? _d : undefined,
|
|
1107
1082
|
search: params === null || params === void 0 ? void 0 : params.search,
|
|
1108
1083
|
deep_search: params === null || params === void 0 ? void 0 : params.deep_search,
|
|
1109
1084
|
sort_mode: params === null || params === void 0 ? void 0 : params.sort_mode,
|
|
1110
1085
|
created_at_from: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_from),
|
|
1111
1086
|
created_at_to: toIsoUtc(params === null || params === void 0 ? void 0 : params.created_at_to),
|
|
1112
1087
|
fields: params === null || params === void 0 ? void 0 : params.fields,
|
|
1113
|
-
include: (
|
|
1088
|
+
include: (_e = params === null || params === void 0 ? void 0 : params.include) === null || _e === void 0 ? void 0 : _e.join(','),
|
|
1114
1089
|
};
|
|
1115
1090
|
return (0, sdk_gen_1.listRunsV1RunsGet)({ client, query });
|
|
1116
1091
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyberdesk",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.38",
|
|
4
4
|
"description": "The official TypeScript SDK for Cyberdesk",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"README.md"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"generate": "openapi-ts",
|
|
13
|
+
"generate": "openapi-ts && node scripts/normalize-generated-client.js",
|
|
14
14
|
"build": "npm run generate && tsc",
|
|
15
15
|
"test": "vitest run",
|
|
16
16
|
"test:watch": "vitest",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/cyberdesk-hq/cyberdesk#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@hey-api/client-fetch": "^0.
|
|
32
|
+
"@hey-api/client-fetch": "^0.13.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@hey-api/openapi-ts": "^0.
|
|
35
|
+
"@hey-api/openapi-ts": "^0.94.4",
|
|
36
36
|
"@types/node": "^20.0.0",
|
|
37
37
|
"dotenv": "^16.0.0",
|
|
38
38
|
"svix": "^1.0.0",
|
|
39
39
|
"typescript": "^5.0.0",
|
|
40
|
-
"vitest": "^1.0
|
|
40
|
+
"vitest": "^4.1.0"
|
|
41
41
|
}
|
|
42
42
|
}
|