






















@@ -220,26 +220,6 @@ export function getMessageApi(appId: string): MessageApiClass {
220220return resolveAccount(appId).messageApi;
221221}
222222223-/** Get the MediaApi instance for the given appId. */
224-export function getMediaApi(appId: string): MediaApiClass {
225-return resolveAccount(appId).mediaApi;
226-}
227-228-/** Get the ChunkedMediaApi instance for the given appId. */
229-export function getChunkedMediaApi(appId: string): ChunkedMediaApiClass {
230-return resolveAccount(appId).chunkedMediaApi;
231-}
232-233-/** Get the TokenManager instance for the given appId. */
234-export function getTokenManager(appId: string): TokenManager {
235-return resolveAccount(appId).tokenMgr;
236-}
237-238-/** Get the ApiClient instance for the given appId. */
239-export function getApiClient(appId: string): ApiClient {
240-return resolveAccount(appId).client;
241-}
242-243223// ============ Per-appId config ============
244224245225type OnMessageSentCallback = (refIdx: string, meta: OutboundMeta) => void;
@@ -249,11 +229,6 @@ export function onMessageSent(appId: string, callback: OnMessageSentCallback): v
249229resolveAccount(appId).messageApi.onMessageSent(callback);
250230}
251231252-/** Return whether markdown is enabled for the given appId. */
253-export function isMarkdownSupport(appId: string): boolean {
254-return _accountRegistry.get(appId.trim())?.markdownSupport ?? false;
255-}
256-257232// ============ Token management ============
258233259234export async function getAccessToken(appId: string, clientSecret: string): Promise<string> {
@@ -270,13 +245,6 @@ export function clearTokenCache(appId?: string): void {
270245}
271246}
272247273-export function getTokenStatus(appId: string): {
274-status: "valid" | "expired" | "refreshing" | "none";
275-expiresAt: number | null;
276-} {
277-return resolveAccount(appId).tokenMgr.getStatus(appId);
278-}
279-280248export function startBackgroundTokenRefresh(
281249appId: string,
282250clientSecret: string,
@@ -305,18 +273,6 @@ export function stopBackgroundTokenRefresh(appId?: string): void {
305273}
306274}
307275308-export function isBackgroundTokenRefreshRunning(appId?: string): boolean {
309-if (appId) {
310-return resolveAccount(appId).tokenMgr.isBackgroundRefreshRunning(appId);
311-}
312-for (const ctx of _accountRegistry.values()) {
313-if (ctx.tokenMgr.isBackgroundRefreshRunning()) {
314-return true;
315-}
316-}
317-return false;
318-}
319-320276// ============ Gateway URL ============
321277322278export async function getGatewayUrl(accessToken: string, appId: string): Promise<string> {
@@ -450,35 +406,6 @@ export async function sendText(
450406return api.sendChannelMessage({ channelId: target.id, content, creds: c, msgId: opts?.msgId });
451407}
452408453-/**
454- * Send text with automatic token-retry.
455- */
456-export async function sendTextWithRetry(
457-target: DeliveryTarget,
458-content: string,
459-creds: AccountCreds,
460-opts?: { msgId?: string; messageReference?: string },
461-log?: EngineLogger,
462-): Promise<MessageResponse> {
463-return withTokenRetry(
464-creds,
465-async () => sendText(target, content, creds, opts),
466-log,
467-creds.appId,
468-);
469-}
470-471-/**
472- * Send a proactive text message (no msgId).
473- */
474-export async function sendProactiveText(
475-target: DeliveryTarget,
476-content: string,
477-creds: AccountCreds,
478-): Promise<MessageResponse> {
479-return sendText(target, content, creds);
480-}
481-482409// ============ Input notify ============
483410484411/**
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。