mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:30:47 +00:00
refactor: trim google chat helper exports
This commit is contained in:
@@ -12,7 +12,7 @@ import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
||||
import { z } from "zod";
|
||||
import type { GoogleChatAccountConfig } from "./types.config.js";
|
||||
|
||||
export type GoogleChatCredentialSource = "file" | "inline" | "env" | "none";
|
||||
type GoogleChatCredentialSource = "file" | "inline" | "env" | "none";
|
||||
|
||||
export type ResolvedGoogleChatAccount = {
|
||||
accountId: string;
|
||||
@@ -38,7 +38,7 @@ const {
|
||||
} = createAccountListHelpers("googlechat");
|
||||
export { listGoogleChatAccountIds, resolveDefaultGoogleChatAccountId };
|
||||
|
||||
export function mergeGoogleChatAccountConfig(
|
||||
function mergeGoogleChatAccountConfig(
|
||||
cfg: OpenClawConfig,
|
||||
accountId: string,
|
||||
): GoogleChatAccountConfig {
|
||||
|
||||
@@ -8,10 +8,9 @@ import {
|
||||
import { type ResolvedGoogleChatAccount } from "./accounts.js";
|
||||
import { downloadGoogleChatMedia, sendGoogleChatMessage } from "./api.js";
|
||||
import { type GoogleChatAudienceType } from "./auth.js";
|
||||
import { applyGoogleChatInboundAccessPolicy, isSenderAllowed } from "./monitor-access.js";
|
||||
import { applyGoogleChatInboundAccessPolicy } from "./monitor-access.js";
|
||||
import { deliverGoogleChatReply } from "./monitor-reply-delivery.js";
|
||||
import {
|
||||
handleGoogleChatWebhookRequest,
|
||||
registerGoogleChatWebhookTarget,
|
||||
setGoogleChatWebhookEventProcessor,
|
||||
} from "./monitor-routing.js";
|
||||
@@ -24,12 +23,6 @@ import type {
|
||||
import { warnAppPrincipalMisconfiguration } from "./monitor-webhook.js";
|
||||
import { getGoogleChatRuntime } from "./runtime.js";
|
||||
import type { GoogleChatAttachment, GoogleChatEvent } from "./types.js";
|
||||
export type { GoogleChatMonitorOptions, GoogleChatRuntimeEnv } from "./monitor-types.js";
|
||||
export {
|
||||
handleGoogleChatWebhookRequest,
|
||||
registerGoogleChatWebhookTarget,
|
||||
} from "./monitor-routing.js";
|
||||
export { isSenderAllowed };
|
||||
|
||||
setGoogleChatWebhookEventProcessor(processGoogleChatEvent);
|
||||
|
||||
@@ -376,7 +369,7 @@ async function downloadAttachment(
|
||||
return { path: saved.path, contentType: saved.contentType };
|
||||
}
|
||||
|
||||
export function monitorGoogleChatProvider(options: GoogleChatMonitorOptions): () => void {
|
||||
function monitorGoogleChatProvider(options: GoogleChatMonitorOptions): () => void {
|
||||
const core = getGoogleChatRuntime();
|
||||
const webhookPath = resolveWebhookPath({
|
||||
webhookPath: options.webhookPath,
|
||||
|
||||
@@ -11,12 +11,12 @@ export type GoogleChatUser = {
|
||||
type?: string;
|
||||
};
|
||||
|
||||
export type GoogleChatThread = {
|
||||
type GoogleChatThread = {
|
||||
name?: string;
|
||||
threadKey?: string;
|
||||
};
|
||||
|
||||
export type GoogleChatAttachmentDataRef = {
|
||||
type GoogleChatAttachmentDataRef = {
|
||||
resourceName?: string;
|
||||
attachmentUploadToken?: string;
|
||||
};
|
||||
@@ -32,7 +32,7 @@ export type GoogleChatAttachment = {
|
||||
driveDataRef?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type GoogleChatUserMention = {
|
||||
type GoogleChatUserMention = {
|
||||
user?: GoogleChatUser;
|
||||
type?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user