mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 12:26:38 -06:00
13 lines
482 B
TypeScript
13 lines
482 B
TypeScript
// Feishu JSON response helpers shared by credentialed API paths.
|
|
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
|
|
/** Feishu control-plane JSON responses are tiny; 16 MiB leaves ample headroom. */
|
|
const FEISHU_JSON_MAX_BYTES = 16 * 1024 * 1024;
|
|
|
|
export async function readFeishuJsonResponse<T>(
|
|
response: Response,
|
|
label = "feishu.api",
|
|
): Promise<T> {
|
|
return readProviderJsonResponse<T>(response, label, { maxBytes: FEISHU_JSON_MAX_BYTES });
|
|
}
|