MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / getLuckmailPurchaseById

Function getLuckmailPurchaseById

background.js:2265–2277  ·  view source on GitHub ↗
(state, purchaseId, options = {})

Source from the content-addressed store, hash-verified

2263}
2264
2265async function getLuckmailPurchaseById(state, purchaseId, options = {}) {
2266 const normalizedPurchaseId = Number(normalizeLuckmailPurchaseId(purchaseId)) || 0;
2267 if (!normalizedPurchaseId) {
2268 throw new Error('LuckMail 邮箱 ID 无效。');
2269 }
2270
2271 const purchases = await listLuckmailPurchasesByProject(state, options);
2272 const purchase = purchases.find((item) => item.id === normalizedPurchaseId) || null;
2273 if (!purchase) {
2274 throw new Error(`未找到 ID=${normalizedPurchaseId} 的 openai LuckMail 邮箱。`);
2275 }
2276 return purchase;
2277}
2278
2279async function listLuckmailPurchasesForManagement() {
2280 const state = await getState();

Calls 2

Tested by

no test coverage detected