@meltstudio/meltctl 4.74.0 → 4.76.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/index.js +49 -2
- 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.76.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -714,6 +714,52 @@ function createTrackerResource(config2) {
|
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
716
|
|
|
717
|
+
// ../sdk/dist/resources/board-audits.js
|
|
718
|
+
function createBoardAuditsResource(config2) {
|
|
719
|
+
return {
|
|
720
|
+
async run(projectId) {
|
|
721
|
+
const { data, status } = await apiFetch(config2, "/board-audits/run", { method: "POST", body: JSON.stringify({ projectId }) });
|
|
722
|
+
if (status === 403)
|
|
723
|
+
throw new Error("Access denied. Only Team Managers can run board audits.");
|
|
724
|
+
if (status !== 200)
|
|
725
|
+
throw new Error(data.error ?? `Failed to run board audit (${status})`);
|
|
726
|
+
return data;
|
|
727
|
+
},
|
|
728
|
+
async list(filters) {
|
|
729
|
+
const params = new URLSearchParams();
|
|
730
|
+
if (filters?.projectId)
|
|
731
|
+
params.set("projectId", String(filters.projectId));
|
|
732
|
+
if (filters?.limit)
|
|
733
|
+
params.set("limit", String(filters.limit));
|
|
734
|
+
const path8 = `/board-audits${params.toString() ? `?${params}` : ""}`;
|
|
735
|
+
const { data, status } = await apiFetch(config2, path8);
|
|
736
|
+
if (status === 403)
|
|
737
|
+
throw new Error("Access denied. Only Team Managers can view board audits.");
|
|
738
|
+
if (status !== 200)
|
|
739
|
+
throw new Error(data.error ?? `Failed to list board audits (${status})`);
|
|
740
|
+
return data;
|
|
741
|
+
},
|
|
742
|
+
async get(id) {
|
|
743
|
+
const { data, status } = await apiFetch(config2, `/board-audits/${id}`);
|
|
744
|
+
if (status === 403)
|
|
745
|
+
throw new Error("Access denied. Only Team Managers can view board audits.");
|
|
746
|
+
if (status === 404)
|
|
747
|
+
throw new Error("Board audit not found");
|
|
748
|
+
if (status !== 200)
|
|
749
|
+
throw new Error(data.error ?? `Failed to fetch board audit (${status})`);
|
|
750
|
+
return data;
|
|
751
|
+
},
|
|
752
|
+
async getLatestByProject() {
|
|
753
|
+
const { data, status } = await apiFetch(config2, "/board-audits/latest-by-project");
|
|
754
|
+
if (status === 403)
|
|
755
|
+
throw new Error("Access denied. Only Team Managers can view board audits.");
|
|
756
|
+
if (status !== 200)
|
|
757
|
+
throw new Error(data.error ?? `Failed to fetch latest board audits (${status})`);
|
|
758
|
+
return data;
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
|
|
717
763
|
// ../sdk/dist/client.js
|
|
718
764
|
async function apiFetch(config2, path8, options = {}) {
|
|
719
765
|
const response = await fetch(`${config2.baseUrl}${path8}`, {
|
|
@@ -740,7 +786,8 @@ function createMeltClient(config2) {
|
|
|
740
786
|
people: createPeopleResource(config2),
|
|
741
787
|
projects: createProjectsResource(config2),
|
|
742
788
|
findings: createFindingsResource(config2),
|
|
743
|
-
tracker: createTrackerResource(config2)
|
|
789
|
+
tracker: createTrackerResource(config2),
|
|
790
|
+
boardAudits: createBoardAuditsResource(config2)
|
|
744
791
|
};
|
|
745
792
|
}
|
|
746
793
|
|
package/package.json
CHANGED