mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 01:52:04 +00:00
Google Chat: restore public sdk exports
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
import { isSecretRef, createAccountListHelpers, type OpenClawConfig } from "../runtime-api.js";
|
||||
import { isSecretRef, type OpenClawConfig } from "openclaw/plugin-sdk/core";
|
||||
import type { GoogleChatAccountConfig } from "./types.config.js";
|
||||
|
||||
export type GoogleChatCredentialSource = "file" | "inline" | "env" | "none";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
||||
import type { OpenClawConfig } from "../runtime-api.js";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
|
||||
|
||||
type GoogleChatGroupContext = {
|
||||
cfg: OpenClawConfig;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { OpenClawConfig } from "../runtime-api.js";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
|
||||
import type { ResolvedGoogleChatAccount } from "./accounts.js";
|
||||
import type { GoogleChatAudienceType } from "./auth.js";
|
||||
import { getGoogleChatRuntime } from "./runtime.js";
|
||||
|
||||
@@ -54,6 +54,7 @@ export type {
|
||||
PluginInteractiveTelegramHandlerContext,
|
||||
} from "../plugins/types.js";
|
||||
export type { OpenClawConfig } from "../config/config.js";
|
||||
export { isSecretRef } from "../config/types.secrets.js";
|
||||
export type { GatewayRequestHandlerOptions } from "../gateway/server-methods/types.js";
|
||||
export type {
|
||||
ChannelOutboundSessionRoute,
|
||||
|
||||
@@ -20,6 +20,7 @@ export {
|
||||
export { buildComputedAccountStatusSnapshot } from "./status-helpers.js";
|
||||
export { buildChannelConfigSchema } from "../channels/plugins/config-schema.js";
|
||||
export { createAccountStatusSink, runPassiveAccountLifecycle } from "./channel-lifecycle.js";
|
||||
export { resolveGoogleChatGroupRequireMention } from "../../extensions/googlechat/src/group-policy.js";
|
||||
export { formatPairingApproveHint } from "../channels/plugins/helpers.js";
|
||||
export { resolveChannelMediaMaxBytes } from "../channels/plugins/media-limits.js";
|
||||
export {
|
||||
@@ -64,6 +65,8 @@ export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../routing/session-key.j
|
||||
export { resolveDmGroupAccessWithLists } from "../security/dm-policy-shared.js";
|
||||
export { formatDocsLink } from "../terminal/links.js";
|
||||
export type { WizardPrompter } from "../wizard/prompts.js";
|
||||
export { googlechatSetupAdapter } from "../../extensions/googlechat/api.js";
|
||||
export { googlechatSetupWizard } from "../../extensions/googlechat/api.js";
|
||||
export { resolveInboundRouteEnvelopeBuilderWithRuntime } from "./inbound-envelope.js";
|
||||
export { createScopedPairingAccess } from "./pairing-access.js";
|
||||
export { issuePairingChallenge } from "../pairing/pairing-challenge.js";
|
||||
|
||||
@@ -73,6 +73,7 @@ describe("plugin-sdk subpath exports", () => {
|
||||
expect(typeof coreSdk.defineChannelPluginEntry).toBe("function");
|
||||
expect(typeof coreSdk.defineSetupPluginEntry).toBe("function");
|
||||
expect(typeof coreSdk.createChannelPluginBase).toBe("function");
|
||||
expect(typeof coreSdk.isSecretRef).toBe("function");
|
||||
expect(typeof coreSdk.optionalStringEnum).toBe("function");
|
||||
expect("runPassiveAccountLifecycle" in asExports(coreSdk)).toBe(false);
|
||||
expect("createLoggerBackedRuntime" in asExports(coreSdk)).toBe(false);
|
||||
@@ -262,6 +263,19 @@ describe("plugin-sdk subpath exports", () => {
|
||||
expect(typeof googlechatSdk.buildChannelConfigSchema).toBe("function");
|
||||
expect(typeof googlechatSdk.createWebhookInFlightLimiter).toBe("function");
|
||||
expect(typeof googlechatSdk.fetchWithSsrFGuard).toBe("function");
|
||||
expect(typeof googlechatSdk.googlechatSetupWizard).toBe("object");
|
||||
expect(typeof googlechatSdk.googlechatSetupAdapter).toBe("object");
|
||||
expect(typeof googlechatSdk.resolveGoogleChatGroupRequireMention).toBe("function");
|
||||
});
|
||||
|
||||
it("keeps the Google Chat runtime seam aligned with the public SDK subpath", async () => {
|
||||
const googlechatRuntimeApi = await import("../../extensions/googlechat/runtime-api.js");
|
||||
|
||||
expect(typeof googlechatRuntimeApi.buildChannelConfigSchema).toBe("function");
|
||||
expect(typeof googlechatRuntimeApi.createWebhookInFlightLimiter).toBe("function");
|
||||
expect(typeof googlechatRuntimeApi.fetchWithSsrFGuard).toBe("function");
|
||||
expect(typeof googlechatRuntimeApi.createActionGate).toBe("function");
|
||||
expect(typeof googlechatRuntimeApi.resolveWebhookTargetWithAuthOrReject).toBe("function");
|
||||
});
|
||||
|
||||
it("exports Zalo helpers", async () => {
|
||||
|
||||
Reference in New Issue
Block a user