UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

24 lines (23 loc) • 701 B
import { r as fetchWithSsrFGuard } from "./fetch-guard-BLMw2n18.mjs"; import "./ssrf-runtime-B6q6NM4E.mjs"; //#region extensions/openai/openai-oauth-http.runtime.ts async function withOpenAIOAuthResponse(e, t) { const { response: n, release: r } = await fetchWithSsrFGuard(e); try { return await t(n); } finally { await r(); } } function createOpenAIAuthorizationCodeForm(e) { return new URLSearchParams({ grant_type: "authorization_code", client_id: e.clientId, code: e.code, code_verifier: e.verifier, redirect_uri: e.redirectUri, ...e.resource ? { resource: e.resource } : {} }); } //#endregion export { withOpenAIOAuthResponse as n, createOpenAIAuthorizationCodeForm as t };