mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:10:45 +00:00
refactor: hide google meet helper internals
This commit is contained in:
@@ -1053,7 +1053,7 @@ function renderTranscriptMarkdown(result: GoogleMeetArtifactsResult): string {
|
||||
return `${lines.join("\n")}\n`;
|
||||
}
|
||||
|
||||
export function collectGoogleMeetArtifactWarnings(
|
||||
function collectGoogleMeetArtifactWarnings(
|
||||
result: GoogleMeetArtifactsResult,
|
||||
): GoogleMeetExportWarning[] {
|
||||
const warnings: GoogleMeetExportWarning[] = [];
|
||||
|
||||
@@ -19,14 +19,14 @@ function normalizeMode(value: unknown): GoogleMeetMode | undefined {
|
||||
return value === "realtime" || value === "transcribe" ? value : undefined;
|
||||
}
|
||||
|
||||
export function normalizeGoogleMeetAccessType(value: unknown): GoogleMeetAccessType | undefined {
|
||||
function normalizeGoogleMeetAccessType(value: unknown): GoogleMeetAccessType | undefined {
|
||||
const normalized = normalizeOptionalString(value)?.toUpperCase().replaceAll("-", "_");
|
||||
return normalized === "OPEN" || normalized === "TRUSTED" || normalized === "RESTRICTED"
|
||||
? normalized
|
||||
: undefined;
|
||||
}
|
||||
|
||||
export function normalizeGoogleMeetEntryPointAccess(
|
||||
function normalizeGoogleMeetEntryPointAccess(
|
||||
value: unknown,
|
||||
): GoogleMeetEntryPointAccess | undefined {
|
||||
const normalized = normalizeOptionalString(value)?.toUpperCase().replaceAll("-", "_");
|
||||
@@ -84,10 +84,6 @@ function hasGoogleMeetOAuth(config: GoogleMeetConfig, raw: Record<string, unknow
|
||||
);
|
||||
}
|
||||
|
||||
export function shouldJoinCreatedMeet(raw: Record<string, unknown>): boolean {
|
||||
return raw.join !== false && raw.join !== "false";
|
||||
}
|
||||
|
||||
export async function createMeetFromParams(params: {
|
||||
config: GoogleMeetConfig;
|
||||
runtime: OpenClawPluginApi["runtime"];
|
||||
|
||||
@@ -454,7 +454,7 @@ export async function endGoogleMeetActiveConference(params: {
|
||||
}
|
||||
}
|
||||
|
||||
export async function fetchGoogleMeetConferenceRecord(params: {
|
||||
async function fetchGoogleMeetConferenceRecord(params: {
|
||||
accessToken: string;
|
||||
conferenceRecord: string;
|
||||
}): Promise<GoogleMeetConferenceRecord> {
|
||||
|
||||
@@ -6,11 +6,11 @@ import {
|
||||
} from "openclaw/plugin-sdk/provider-auth-runtime";
|
||||
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
||||
|
||||
export const GOOGLE_MEET_REDIRECT_URI = "http://localhost:8085/oauth2callback";
|
||||
export const GOOGLE_MEET_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
||||
export const GOOGLE_MEET_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
||||
const GOOGLE_MEET_REDIRECT_URI = "http://localhost:8085/oauth2callback";
|
||||
const GOOGLE_MEET_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
||||
const GOOGLE_MEET_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
||||
const GOOGLE_MEET_TOKEN_HOST = "oauth2.googleapis.com";
|
||||
export const GOOGLE_MEET_SCOPES = [
|
||||
const GOOGLE_MEET_SCOPES = [
|
||||
"https://www.googleapis.com/auth/meetings.space.created",
|
||||
"https://www.googleapis.com/auth/meetings.space.readonly",
|
||||
"https://www.googleapis.com/auth/meetings.space.settings",
|
||||
@@ -138,7 +138,7 @@ export async function refreshGoogleMeetAccessToken(params: {
|
||||
);
|
||||
}
|
||||
|
||||
export function shouldUseCachedGoogleMeetAccessToken(params: {
|
||||
function shouldUseCachedGoogleMeetAccessToken(params: {
|
||||
accessToken?: string;
|
||||
expiresAt?: number;
|
||||
now?: number;
|
||||
|
||||
Reference in New Issue
Block a user