@meltstudio/meltctl 4.184.0 → 4.185.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 +75 -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.185.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1410,6 +1410,42 @@ function createChatResource(config) {
|
|
|
1410
1410
|
};
|
|
1411
1411
|
}
|
|
1412
1412
|
|
|
1413
|
+
// ../sdk/dist/resources/me.js
|
|
1414
|
+
function createMeResource(config) {
|
|
1415
|
+
return {
|
|
1416
|
+
/**
|
|
1417
|
+
* The authenticated developer's own self-service overview (#499). The API
|
|
1418
|
+
* derives identity from the JWT — there is no way to request another
|
|
1419
|
+
* person's data through this call.
|
|
1420
|
+
*/
|
|
1421
|
+
async overview() {
|
|
1422
|
+
const { data, status } = await apiFetch(config, "/me/overview");
|
|
1423
|
+
if (status !== 200)
|
|
1424
|
+
throw new Error(data.error ?? `Failed to fetch overview (${status})`);
|
|
1425
|
+
return data;
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
// ../sdk/dist/resources/developers.js
|
|
1431
|
+
function createDevelopersResource(config) {
|
|
1432
|
+
return {
|
|
1433
|
+
/**
|
|
1434
|
+
* Manager-only: the same self-service overview as `me.overview()`, but for
|
|
1435
|
+
* an arbitrary developer (#499). Backed by GET /pm/developers/:email/overview,
|
|
1436
|
+
* which calls `checkManagerRole` before building. Non-managers get a 403.
|
|
1437
|
+
*/
|
|
1438
|
+
async overview(email) {
|
|
1439
|
+
const { data, status } = await apiFetch(config, `/pm/developers/${encodeURIComponent(email)}/overview`);
|
|
1440
|
+
if (status === 403)
|
|
1441
|
+
throw new Error("Access denied. Only Team Managers can view other developers.");
|
|
1442
|
+
if (status !== 200)
|
|
1443
|
+
throw new Error(data.error ?? `Failed to fetch overview (${status})`);
|
|
1444
|
+
return data;
|
|
1445
|
+
}
|
|
1446
|
+
};
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1413
1449
|
// ../sdk/dist/client.js
|
|
1414
1450
|
async function apiFetch(config, path9, options = {}) {
|
|
1415
1451
|
const response = await fetch(`${config.baseUrl}${path9}`, {
|
|
@@ -1441,7 +1477,9 @@ function createMeltClient(config) {
|
|
|
1441
1477
|
pm: createPmResource(config),
|
|
1442
1478
|
slack: createSlackResource(config),
|
|
1443
1479
|
jobs: createJobsResource(config),
|
|
1444
|
-
chat: createChatResource(config)
|
|
1480
|
+
chat: createChatResource(config),
|
|
1481
|
+
me: createMeResource(config),
|
|
1482
|
+
developers: createDevelopersResource(config)
|
|
1445
1483
|
};
|
|
1446
1484
|
}
|
|
1447
1485
|
|
|
@@ -4533,6 +4571,38 @@ function createChatResource2(config) {
|
|
|
4533
4571
|
}
|
|
4534
4572
|
};
|
|
4535
4573
|
}
|
|
4574
|
+
function createMeResource2(config) {
|
|
4575
|
+
return {
|
|
4576
|
+
/**
|
|
4577
|
+
* The authenticated developer's own self-service overview (#499). The API
|
|
4578
|
+
* derives identity from the JWT — there is no way to request another
|
|
4579
|
+
* person's data through this call.
|
|
4580
|
+
*/
|
|
4581
|
+
async overview() {
|
|
4582
|
+
const { data, status } = await apiFetch2(config, "/me/overview");
|
|
4583
|
+
if (status !== 200)
|
|
4584
|
+
throw new Error(data.error ?? `Failed to fetch overview (${status})`);
|
|
4585
|
+
return data;
|
|
4586
|
+
}
|
|
4587
|
+
};
|
|
4588
|
+
}
|
|
4589
|
+
function createDevelopersResource2(config) {
|
|
4590
|
+
return {
|
|
4591
|
+
/**
|
|
4592
|
+
* Manager-only: the same self-service overview as `me.overview()`, but for
|
|
4593
|
+
* an arbitrary developer (#499). Backed by GET /pm/developers/:email/overview,
|
|
4594
|
+
* which calls `checkManagerRole` before building. Non-managers get a 403.
|
|
4595
|
+
*/
|
|
4596
|
+
async overview(email) {
|
|
4597
|
+
const { data, status } = await apiFetch2(config, `/pm/developers/${encodeURIComponent(email)}/overview`);
|
|
4598
|
+
if (status === 403)
|
|
4599
|
+
throw new Error("Access denied. Only Team Managers can view other developers.");
|
|
4600
|
+
if (status !== 200)
|
|
4601
|
+
throw new Error(data.error ?? `Failed to fetch overview (${status})`);
|
|
4602
|
+
return data;
|
|
4603
|
+
}
|
|
4604
|
+
};
|
|
4605
|
+
}
|
|
4536
4606
|
async function apiFetch2(config, path22, options = {}) {
|
|
4537
4607
|
const response = await fetch(`${config.baseUrl}${path22}`, {
|
|
4538
4608
|
...options,
|
|
@@ -4563,7 +4633,9 @@ function createMeltClient2(config) {
|
|
|
4563
4633
|
pm: createPmResource2(config),
|
|
4564
4634
|
slack: createSlackResource2(config),
|
|
4565
4635
|
jobs: createJobsResource2(config),
|
|
4566
|
-
chat: createChatResource2(config)
|
|
4636
|
+
chat: createChatResource2(config),
|
|
4637
|
+
me: createMeResource2(config),
|
|
4638
|
+
developers: createDevelopersResource2(config)
|
|
4567
4639
|
};
|
|
4568
4640
|
}
|
|
4569
4641
|
var auditFindingSchema2 = z2.object({
|
package/package.json
CHANGED