@meltstudio/meltctl 4.68.0 → 4.69.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/index.js +16 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var CLI_VERSION;
|
|
|
14
14
|
var init_version = __esm({
|
|
15
15
|
"src/utils/version.ts"() {
|
|
16
16
|
"use strict";
|
|
17
|
-
CLI_VERSION = "4.
|
|
17
|
+
CLI_VERSION = "4.69.1";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -367,6 +367,21 @@ function createPlansResource(config2) {
|
|
|
367
367
|
if (status !== 200)
|
|
368
368
|
throw new Error(data.error ?? `Failed to score plan (${status})`);
|
|
369
369
|
return data;
|
|
370
|
+
},
|
|
371
|
+
async getStats(filters) {
|
|
372
|
+
const params = new URLSearchParams();
|
|
373
|
+
if (filters?.projectId)
|
|
374
|
+
params.set("projectId", String(filters.projectId));
|
|
375
|
+
if (filters?.author)
|
|
376
|
+
params.set("author", filters.author);
|
|
377
|
+
const query = params.toString();
|
|
378
|
+
const path8 = `/plans/stats${query ? `?${query}` : ""}`;
|
|
379
|
+
const { data, status } = await apiFetch(config2, path8);
|
|
380
|
+
if (status === 403)
|
|
381
|
+
throw new Error("Access denied. Only Team Managers can view plan stats.");
|
|
382
|
+
if (status !== 200)
|
|
383
|
+
throw new Error(data.error ?? `Failed to fetch plan stats (${status})`);
|
|
384
|
+
return data;
|
|
370
385
|
}
|
|
371
386
|
};
|
|
372
387
|
}
|
package/package.json
CHANGED