@meltstudio/meltctl 4.119.1 → 4.121.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 +97 -3
- 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.121.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1094,6 +1094,53 @@ function createSlackResource(config) {
|
|
|
1094
1094
|
};
|
|
1095
1095
|
}
|
|
1096
1096
|
|
|
1097
|
+
// ../sdk/dist/resources/jobs.js
|
|
1098
|
+
function createJobsResource(config) {
|
|
1099
|
+
return {
|
|
1100
|
+
async enqueue(body) {
|
|
1101
|
+
const { data, status } = await apiFetch(config, "/jobs", {
|
|
1102
|
+
method: "POST",
|
|
1103
|
+
body: JSON.stringify(body)
|
|
1104
|
+
});
|
|
1105
|
+
if (status === 403)
|
|
1106
|
+
throw new Error("Access denied. Only Team Managers can enqueue jobs.");
|
|
1107
|
+
if (status === 400)
|
|
1108
|
+
throw new Error(data.error ?? "Invalid job input");
|
|
1109
|
+
if (status !== 200 && status !== 202) {
|
|
1110
|
+
throw new Error(data.error ?? `Failed to enqueue job (${status})`);
|
|
1111
|
+
}
|
|
1112
|
+
return data;
|
|
1113
|
+
},
|
|
1114
|
+
async get(id) {
|
|
1115
|
+
const { data, status } = await apiFetch(config, `/jobs/${id}`);
|
|
1116
|
+
if (status === 404)
|
|
1117
|
+
throw new Error("Job not found");
|
|
1118
|
+
if (status === 403)
|
|
1119
|
+
throw new Error("Access denied. Only Team Managers can view jobs.");
|
|
1120
|
+
if (status !== 200)
|
|
1121
|
+
throw new Error(data.error ?? `Failed to fetch job (${status})`);
|
|
1122
|
+
return data;
|
|
1123
|
+
},
|
|
1124
|
+
async list(filters) {
|
|
1125
|
+
const params = new URLSearchParams();
|
|
1126
|
+
if (filters?.kind)
|
|
1127
|
+
params.set("kind", filters.kind);
|
|
1128
|
+
if (filters?.status)
|
|
1129
|
+
params.set("status", filters.status);
|
|
1130
|
+
if (filters?.limit)
|
|
1131
|
+
params.set("limit", String(filters.limit));
|
|
1132
|
+
const query = params.toString();
|
|
1133
|
+
const path9 = `/jobs${query ? `?${query}` : ""}`;
|
|
1134
|
+
const { data, status } = await apiFetch(config, path9);
|
|
1135
|
+
if (status === 403)
|
|
1136
|
+
throw new Error("Access denied. Only Team Managers can list jobs.");
|
|
1137
|
+
if (status !== 200)
|
|
1138
|
+
throw new Error(data.error ?? `Failed to list jobs (${status})`);
|
|
1139
|
+
return data;
|
|
1140
|
+
}
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1097
1144
|
// ../sdk/dist/client.js
|
|
1098
1145
|
async function apiFetch(config, path9, options = {}) {
|
|
1099
1146
|
const response = await fetch(`${config.baseUrl}${path9}`, {
|
|
@@ -1123,7 +1170,8 @@ function createMeltClient(config) {
|
|
|
1123
1170
|
tracker: createTrackerResource(config),
|
|
1124
1171
|
boardAudits: createBoardAuditsResource(config),
|
|
1125
1172
|
pm: createPmResource(config),
|
|
1126
|
-
slack: createSlackResource(config)
|
|
1173
|
+
slack: createSlackResource(config),
|
|
1174
|
+
jobs: createJobsResource(config)
|
|
1127
1175
|
};
|
|
1128
1176
|
}
|
|
1129
1177
|
|
|
@@ -3537,6 +3585,51 @@ function createSlackResource2(config) {
|
|
|
3537
3585
|
}
|
|
3538
3586
|
};
|
|
3539
3587
|
}
|
|
3588
|
+
function createJobsResource2(config) {
|
|
3589
|
+
return {
|
|
3590
|
+
async enqueue(body) {
|
|
3591
|
+
const { data, status } = await apiFetch2(config, "/jobs", {
|
|
3592
|
+
method: "POST",
|
|
3593
|
+
body: JSON.stringify(body)
|
|
3594
|
+
});
|
|
3595
|
+
if (status === 403)
|
|
3596
|
+
throw new Error("Access denied. Only Team Managers can enqueue jobs.");
|
|
3597
|
+
if (status === 400)
|
|
3598
|
+
throw new Error(data.error ?? "Invalid job input");
|
|
3599
|
+
if (status !== 200 && status !== 202) {
|
|
3600
|
+
throw new Error(data.error ?? `Failed to enqueue job (${status})`);
|
|
3601
|
+
}
|
|
3602
|
+
return data;
|
|
3603
|
+
},
|
|
3604
|
+
async get(id) {
|
|
3605
|
+
const { data, status } = await apiFetch2(config, `/jobs/${id}`);
|
|
3606
|
+
if (status === 404)
|
|
3607
|
+
throw new Error("Job not found");
|
|
3608
|
+
if (status === 403)
|
|
3609
|
+
throw new Error("Access denied. Only Team Managers can view jobs.");
|
|
3610
|
+
if (status !== 200)
|
|
3611
|
+
throw new Error(data.error ?? `Failed to fetch job (${status})`);
|
|
3612
|
+
return data;
|
|
3613
|
+
},
|
|
3614
|
+
async list(filters) {
|
|
3615
|
+
const params = new URLSearchParams();
|
|
3616
|
+
if (filters?.kind)
|
|
3617
|
+
params.set("kind", filters.kind);
|
|
3618
|
+
if (filters?.status)
|
|
3619
|
+
params.set("status", filters.status);
|
|
3620
|
+
if (filters?.limit)
|
|
3621
|
+
params.set("limit", String(filters.limit));
|
|
3622
|
+
const query = params.toString();
|
|
3623
|
+
const path22 = `/jobs${query ? `?${query}` : ""}`;
|
|
3624
|
+
const { data, status } = await apiFetch2(config, path22);
|
|
3625
|
+
if (status === 403)
|
|
3626
|
+
throw new Error("Access denied. Only Team Managers can list jobs.");
|
|
3627
|
+
if (status !== 200)
|
|
3628
|
+
throw new Error(data.error ?? `Failed to list jobs (${status})`);
|
|
3629
|
+
return data;
|
|
3630
|
+
}
|
|
3631
|
+
};
|
|
3632
|
+
}
|
|
3540
3633
|
async function apiFetch2(config, path22, options = {}) {
|
|
3541
3634
|
const response = await fetch(`${config.baseUrl}${path22}`, {
|
|
3542
3635
|
...options,
|
|
@@ -3565,7 +3658,8 @@ function createMeltClient2(config) {
|
|
|
3565
3658
|
tracker: createTrackerResource2(config),
|
|
3566
3659
|
boardAudits: createBoardAuditsResource2(config),
|
|
3567
3660
|
pm: createPmResource2(config),
|
|
3568
|
-
slack: createSlackResource2(config)
|
|
3661
|
+
slack: createSlackResource2(config),
|
|
3662
|
+
jobs: createJobsResource2(config)
|
|
3569
3663
|
};
|
|
3570
3664
|
}
|
|
3571
3665
|
var auditFindingSchema2 = z2.object({
|
package/package.json
CHANGED