@carrierllc/mcp 0.13.11 → 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-ZLPXWOYO.js → chunk-IQDAU7WA.js} +43 -15
- package/dist/chunk-IQDAU7WA.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZLPXWOYO.js.map +0 -1
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
deploySite,
|
|
18
18
|
esimStatusPerAccountParams,
|
|
19
19
|
extractDailyUsage,
|
|
20
|
+
extractEsimStatusByAccount,
|
|
20
21
|
extractEsimStatusCounts,
|
|
21
22
|
extractResellerBalance,
|
|
22
23
|
extractSimProviderStatus,
|
|
@@ -70,8 +71,9 @@ import {
|
|
|
70
71
|
summarizeNetworkEvents,
|
|
71
72
|
usageOverPeriodParams,
|
|
72
73
|
verifyStorefront,
|
|
73
|
-
withOcsListSummary
|
|
74
|
-
|
|
74
|
+
withOcsListSummary,
|
|
75
|
+
withTemplateResellerId
|
|
76
|
+
} from "./chunk-IQDAU7WA.js";
|
|
75
77
|
import "./chunk-SHKKVIIA.js";
|
|
76
78
|
|
|
77
79
|
// src/index.ts
|
|
@@ -2213,7 +2215,11 @@ function registerAllTools(server2, ctx) {
|
|
|
2213
2215
|
content: [{ type: "text", text: `Error: ${params.error}` }]
|
|
2214
2216
|
};
|
|
2215
2217
|
}
|
|
2216
|
-
|
|
2218
|
+
const withReseller = await withTemplateResellerId(
|
|
2219
|
+
params,
|
|
2220
|
+
() => getDefaultResellerId(ctx.env, token2)
|
|
2221
|
+
);
|
|
2222
|
+
return ocsCall(ctx.env, token2, "createPrepaidPackageTemplate", withReseller);
|
|
2217
2223
|
}
|
|
2218
2224
|
)
|
|
2219
2225
|
);
|
|
@@ -10672,19 +10678,23 @@ function extractAccounts(json) {
|
|
|
10672
10678
|
function toFleetInput(raw) {
|
|
10673
10679
|
const counts = extractEsimStatusCounts(raw.status);
|
|
10674
10680
|
const accountRecords = extractAccounts(raw.accounts);
|
|
10675
|
-
const
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
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
|
+
});
|
|
10688
10698
|
const unavailable = [];
|
|
10689
10699
|
if (raw.statusError) unavailable.push(`esimStatusPerAccount: ${raw.statusError}`);
|
|
10690
10700
|
if (raw.accountsError) unavailable.push(`listResellerAccount: ${raw.accountsError}`);
|