@myspec/mcp-server 0.1.2-next.36 → 0.1.2-next.37
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/index.js +33 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1139,6 +1139,7 @@ function transformSpecFileResponse(raw) {
|
|
|
1139
1139
|
revisionCount: raw.revision_count,
|
|
1140
1140
|
createdAt: new Date(raw.created_at),
|
|
1141
1141
|
updatedAt: new Date(raw.updated_at),
|
|
1142
|
+
trashedAt: raw.trashed_at ? new Date(raw.trashed_at) : void 0,
|
|
1142
1143
|
deletedAt: raw.deleted_at ? new Date(raw.deleted_at) : void 0
|
|
1143
1144
|
};
|
|
1144
1145
|
}
|
|
@@ -1475,18 +1476,49 @@ var HttpFileClient = class {
|
|
|
1475
1476
|
if (opts?.offset !== void 0) queryParams.set("offset", String(opts.offset));
|
|
1476
1477
|
if (opts?.hideArchivedIncomplete)
|
|
1477
1478
|
queryParams.set("hide_archived_incomplete", "true");
|
|
1479
|
+
if (opts?.includeTrashed) queryParams.set("include_trashed", "true");
|
|
1478
1480
|
const query = queryParams.toString();
|
|
1479
1481
|
const path4 = `/project/v1/files?${query}`;
|
|
1480
1482
|
const raw = await this.httpClient.get(path4, jwtToken, {});
|
|
1481
1483
|
return transformFileListResult(raw);
|
|
1482
1484
|
}
|
|
1483
|
-
async
|
|
1485
|
+
async trashFile(fileId, jwtToken) {
|
|
1484
1486
|
await this.httpClient.delete(
|
|
1485
1487
|
`/project/v1/files/${fileId}`,
|
|
1486
1488
|
jwtToken,
|
|
1487
1489
|
{}
|
|
1488
1490
|
);
|
|
1489
1491
|
}
|
|
1492
|
+
async restoreFile(fileId, jwtToken) {
|
|
1493
|
+
await this.httpClient.post(
|
|
1494
|
+
`/project/v1/files/${fileId}/restore`,
|
|
1495
|
+
{},
|
|
1496
|
+
jwtToken,
|
|
1497
|
+
{}
|
|
1498
|
+
);
|
|
1499
|
+
}
|
|
1500
|
+
async deleteFilePermanently(fileId, jwtToken) {
|
|
1501
|
+
await this.httpClient.delete(
|
|
1502
|
+
`/project/v1/files/${fileId}/permanent`,
|
|
1503
|
+
jwtToken,
|
|
1504
|
+
{}
|
|
1505
|
+
);
|
|
1506
|
+
}
|
|
1507
|
+
async listTrashedFiles(projectId, jwtToken) {
|
|
1508
|
+
const raw = await this.httpClient.get(
|
|
1509
|
+
`/project/v1/projects/${projectId}/files/trashed`,
|
|
1510
|
+
jwtToken,
|
|
1511
|
+
{}
|
|
1512
|
+
);
|
|
1513
|
+
return (raw.files ?? []).map(transformSpecFileResponse);
|
|
1514
|
+
}
|
|
1515
|
+
/**
|
|
1516
|
+
* @deprecated Alias of {@link trashFile}. Moves the file to the Trash Bin
|
|
1517
|
+
* (recoverable); for a permanent delete use {@link deleteFilePermanently}.
|
|
1518
|
+
*/
|
|
1519
|
+
async deleteFile(fileId, jwtToken) {
|
|
1520
|
+
await this.trashFile(fileId, jwtToken);
|
|
1521
|
+
}
|
|
1490
1522
|
async deleteRevision(fileId, revisionNumber, jwtToken) {
|
|
1491
1523
|
const response = await this.httpClient.delete(
|
|
1492
1524
|
`/project/v1/files/${fileId}/revisions/${revisionNumber}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myspec/mcp-server",
|
|
3
|
-
"version": "0.1.2-next.
|
|
3
|
+
"version": "0.1.2-next.37",
|
|
4
4
|
"description": "MySpec MCP server — exposes MySpec platform projects, files and attachments to MCP-aware clients via OAuth-authenticated access tokens.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|