@meltstudio/meltctl 4.163.0 → 4.165.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 +51 -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.165.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1052,6 +1052,31 @@ function createPmResource(config) {
|
|
|
1052
1052
|
});
|
|
1053
1053
|
unwrap("delete phase", res);
|
|
1054
1054
|
},
|
|
1055
|
+
// ── Scenarios (draft phases, #446 stage 6) ──────────────────────────────
|
|
1056
|
+
/** List saved draft scenarios for a project (hydrated like phases). */
|
|
1057
|
+
async listScenarios(projectId) {
|
|
1058
|
+
const res = await apiFetch(config, `/pm/projects/${projectId}/scenarios`);
|
|
1059
|
+
return unwrap("list scenarios", res);
|
|
1060
|
+
},
|
|
1061
|
+
/** Save a composed candidate phase as a draft. */
|
|
1062
|
+
async createScenario(projectId, input3) {
|
|
1063
|
+
const res = await apiFetch(config, `/pm/projects/${projectId}/scenarios`, { method: "POST", body: JSON.stringify(input3) });
|
|
1064
|
+
return unwrap("create scenario", res, 201);
|
|
1065
|
+
},
|
|
1066
|
+
async deleteScenario(id) {
|
|
1067
|
+
const res = await apiFetch(config, `/pm/scenarios/${id}`, {
|
|
1068
|
+
method: "DELETE"
|
|
1069
|
+
});
|
|
1070
|
+
unwrap("delete scenario", res);
|
|
1071
|
+
},
|
|
1072
|
+
/** Promote a draft scenario into a real active phase. */
|
|
1073
|
+
async promoteScenario(id, opts) {
|
|
1074
|
+
const res = await apiFetch(config, `/pm/scenarios/${id}/promote`, {
|
|
1075
|
+
method: "POST",
|
|
1076
|
+
body: JSON.stringify({ makePrimary: opts?.makePrimary ?? false })
|
|
1077
|
+
});
|
|
1078
|
+
return unwrap("promote scenario", res);
|
|
1079
|
+
},
|
|
1055
1080
|
async assignFeature(phaseId, featureId) {
|
|
1056
1081
|
const res = await apiFetch(config, `/pm/phases/${phaseId}/features`, { method: "POST", body: JSON.stringify({ featureId }) });
|
|
1057
1082
|
return unwrap("assign feature", res, 201);
|
|
@@ -4008,6 +4033,31 @@ function createPmResource2(config) {
|
|
|
4008
4033
|
});
|
|
4009
4034
|
unwrap2("delete phase", res);
|
|
4010
4035
|
},
|
|
4036
|
+
// ── Scenarios (draft phases, #446 stage 6) ──────────────────────────────
|
|
4037
|
+
/** List saved draft scenarios for a project (hydrated like phases). */
|
|
4038
|
+
async listScenarios(projectId) {
|
|
4039
|
+
const res = await apiFetch2(config, `/pm/projects/${projectId}/scenarios`);
|
|
4040
|
+
return unwrap2("list scenarios", res);
|
|
4041
|
+
},
|
|
4042
|
+
/** Save a composed candidate phase as a draft. */
|
|
4043
|
+
async createScenario(projectId, input3) {
|
|
4044
|
+
const res = await apiFetch2(config, `/pm/projects/${projectId}/scenarios`, { method: "POST", body: JSON.stringify(input3) });
|
|
4045
|
+
return unwrap2("create scenario", res, 201);
|
|
4046
|
+
},
|
|
4047
|
+
async deleteScenario(id) {
|
|
4048
|
+
const res = await apiFetch2(config, `/pm/scenarios/${id}`, {
|
|
4049
|
+
method: "DELETE"
|
|
4050
|
+
});
|
|
4051
|
+
unwrap2("delete scenario", res);
|
|
4052
|
+
},
|
|
4053
|
+
/** Promote a draft scenario into a real active phase. */
|
|
4054
|
+
async promoteScenario(id, opts) {
|
|
4055
|
+
const res = await apiFetch2(config, `/pm/scenarios/${id}/promote`, {
|
|
4056
|
+
method: "POST",
|
|
4057
|
+
body: JSON.stringify({ makePrimary: opts?.makePrimary ?? false })
|
|
4058
|
+
});
|
|
4059
|
+
return unwrap2("promote scenario", res);
|
|
4060
|
+
},
|
|
4011
4061
|
async assignFeature(phaseId, featureId) {
|
|
4012
4062
|
const res = await apiFetch2(config, `/pm/phases/${phaseId}/features`, { method: "POST", body: JSON.stringify({ featureId }) });
|
|
4013
4063
|
return unwrap2("assign feature", res, 201);
|
package/package.json
CHANGED