@ocxp/client 0.2.0 → 0.2.3
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.cjs +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -7
- package/dist/index.d.ts +72 -7
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1546,13 +1546,14 @@ var OCXPClient = class {
|
|
|
1546
1546
|
// ============== Tree & Stats ==============
|
|
1547
1547
|
/**
|
|
1548
1548
|
* Get hierarchical tree structure from S3 context
|
|
1549
|
+
* @param includeVersions - If true, includes S3 version IDs for files
|
|
1549
1550
|
*/
|
|
1550
|
-
async tree(type, path, depth) {
|
|
1551
|
+
async tree(type, path, depth, includeVersions) {
|
|
1551
1552
|
const headers = await this.getHeaders();
|
|
1552
1553
|
const response = await getContentTree({
|
|
1553
1554
|
client: this.client,
|
|
1554
1555
|
path: { content_type: type },
|
|
1555
|
-
query: { path, depth },
|
|
1556
|
+
query: { path, depth, includeVersions },
|
|
1556
1557
|
headers
|
|
1557
1558
|
});
|
|
1558
1559
|
return extractData(response);
|
|
@@ -2499,10 +2500,11 @@ var MissionNamespace = class {
|
|
|
2499
2500
|
}
|
|
2500
2501
|
/**
|
|
2501
2502
|
* Get mission content tree structure from S3
|
|
2502
|
-
* @
|
|
2503
|
+
* @param includeVersions - If true, includes S3 version IDs for files
|
|
2504
|
+
* @example ocxp.mission.tree('mission-id', 5, true)
|
|
2503
2505
|
*/
|
|
2504
|
-
async tree(path, depth) {
|
|
2505
|
-
return this.client.tree("mission", path, depth);
|
|
2506
|
+
async tree(path, depth, includeVersions) {
|
|
2507
|
+
return this.client.tree("mission", path, depth, includeVersions);
|
|
2506
2508
|
}
|
|
2507
2509
|
};
|
|
2508
2510
|
var ProjectNamespace = class {
|
|
@@ -2580,10 +2582,11 @@ var ProjectNamespace = class {
|
|
|
2580
2582
|
}
|
|
2581
2583
|
/**
|
|
2582
2584
|
* Get project content tree structure from S3
|
|
2583
|
-
* @
|
|
2585
|
+
* @param includeVersions - If true, includes S3 version IDs for files
|
|
2586
|
+
* @example ocxp.project.tree('subfolder', 5, true)
|
|
2584
2587
|
*/
|
|
2585
|
-
async tree(path, depth) {
|
|
2586
|
-
return this.client.tree("project", path, depth);
|
|
2588
|
+
async tree(path, depth, includeVersions) {
|
|
2589
|
+
return this.client.tree("project", path, depth, includeVersions);
|
|
2587
2590
|
}
|
|
2588
2591
|
};
|
|
2589
2592
|
var SessionNamespace = class {
|
|
@@ -3412,6 +3415,7 @@ var TreeNodeSchema = zod.z.lazy(
|
|
|
3412
3415
|
path: zod.z.string(),
|
|
3413
3416
|
type: zod.z.enum(["file", "directory"]),
|
|
3414
3417
|
size: zod.z.number().optional(),
|
|
3418
|
+
version_id: zod.z.string().optional(),
|
|
3415
3419
|
children: zod.z.array(TreeNodeSchema).optional()
|
|
3416
3420
|
})
|
|
3417
3421
|
);
|