@carrierllc/mcp 0.13.10 → 0.13.12
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/{chunk-AUOGFI2I.js → chunk-IQDAU7WA.js} +69 -15
- package/dist/chunk-IQDAU7WA.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +28 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-AUOGFI2I.js.map +0 -1
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -17,8 +17,10 @@ import {
|
|
|
17
17
|
deploySite,
|
|
18
18
|
esimStatusPerAccountParams,
|
|
19
19
|
extractDailyUsage,
|
|
20
|
+
extractEsimStatusByAccount,
|
|
20
21
|
extractEsimStatusCounts,
|
|
21
22
|
extractResellerBalance,
|
|
23
|
+
extractSimProviderStatus,
|
|
22
24
|
extractSubscriberStatus,
|
|
23
25
|
filterActiveSubscribers,
|
|
24
26
|
fleetScreen,
|
|
@@ -69,8 +71,9 @@ import {
|
|
|
69
71
|
summarizeNetworkEvents,
|
|
70
72
|
usageOverPeriodParams,
|
|
71
73
|
verifyStorefront,
|
|
72
|
-
withOcsListSummary
|
|
73
|
-
|
|
74
|
+
withOcsListSummary,
|
|
75
|
+
withTemplateResellerId
|
|
76
|
+
} from "./chunk-IQDAU7WA.js";
|
|
74
77
|
import "./chunk-SHKKVIIA.js";
|
|
75
78
|
|
|
76
79
|
// src/index.ts
|
|
@@ -2212,7 +2215,11 @@ function registerAllTools(server2, ctx) {
|
|
|
2212
2215
|
content: [{ type: "text", text: `Error: ${params.error}` }]
|
|
2213
2216
|
};
|
|
2214
2217
|
}
|
|
2215
|
-
|
|
2218
|
+
const withReseller = await withTemplateResellerId(
|
|
2219
|
+
params,
|
|
2220
|
+
() => getDefaultResellerId(ctx.env, token2)
|
|
2221
|
+
);
|
|
2222
|
+
return ocsCall(ctx.env, token2, "createPrepaidPackageTemplate", withReseller);
|
|
2216
2223
|
}
|
|
2217
2224
|
)
|
|
2218
2225
|
);
|
|
@@ -3763,7 +3770,7 @@ function registerIntelligenceTools(server2, ctx) {
|
|
|
3763
3770
|
const simId = subscriberSimId(sub.data);
|
|
3764
3771
|
const sim = simId !== void 0 ? await safeCall(ctx.env, token2, "getSimProviderStatus", simId) : { data: null, error: null };
|
|
3765
3772
|
if (sim.data) {
|
|
3766
|
-
const simStatus =
|
|
3773
|
+
const simStatus = (extractSimProviderStatus(sim.data) ?? "").toUpperCase();
|
|
3767
3774
|
if (simStatus && !["ENABLED", "ACTIVE", "ACTIVATED"].includes(simStatus)) {
|
|
3768
3775
|
findings.push(`SIM provider status is ${simStatus} \u2014 SIM may be disabled at network level`);
|
|
3769
3776
|
actions.push(`Enable SIM via change_sim_status`);
|
|
@@ -10671,19 +10678,23 @@ function extractAccounts(json) {
|
|
|
10671
10678
|
function toFleetInput(raw) {
|
|
10672
10679
|
const counts = extractEsimStatusCounts(raw.status);
|
|
10673
10680
|
const accountRecords = extractAccounts(raw.accounts);
|
|
10674
|
-
const
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10681
|
+
const byId = /* @__PURE__ */ new Map();
|
|
10682
|
+
for (const row of extractEsimStatusByAccount(raw.status)) {
|
|
10683
|
+
if (row.id !== void 0) byId.set(row.id, row);
|
|
10684
|
+
}
|
|
10685
|
+
const accounts = accountRecords.map((a) => {
|
|
10686
|
+
const id = Number(a.id ?? a.accountId);
|
|
10687
|
+
const status = Number.isFinite(id) ? byId.get(id) : void 0;
|
|
10688
|
+
return {
|
|
10689
|
+
name: String(a.name ?? a.accountId ?? "?"),
|
|
10690
|
+
balance: Number(a.balance ?? 0),
|
|
10691
|
+
active: status?.active ?? 0,
|
|
10692
|
+
suspended: status?.suspended ?? 0,
|
|
10693
|
+
inventory: status?.inventory ?? 0,
|
|
10694
|
+
other: status?.other ?? 0,
|
|
10695
|
+
packageOnly: Boolean(a.packageOnly)
|
|
10696
|
+
};
|
|
10697
|
+
});
|
|
10687
10698
|
const unavailable = [];
|
|
10688
10699
|
if (raw.statusError) unavailable.push(`esimStatusPerAccount: ${raw.statusError}`);
|
|
10689
10700
|
if (raw.accountsError) unavailable.push(`listResellerAccount: ${raw.accountsError}`);
|