import { BaseConnector } from '../../base/base.connector.js'; import type { IChatOptions, IChatProvider, ISendMessageSuccessResponse, WithPassthrough, ChatSendResult, IChatConnector } from '../../types/index.js'; import { ChannelTypeEnum } from '../../types/index.js'; import type { GoogleChatConfig } from './google-chat.config.js'; import type { GoogleChatNarrowedInput } from './google-chat.types.js'; /** * Webhook-URL-as-auth. No Authorization header; the webhookUrl IS the * credential. The `?key=&token=` query parameters embedded in the * URL are part of the credential surface — forwarded verbatim, never parsed. * * Google Chat is unusual among the chat providers in using **camelCase wire keys** * (matching Google's API style guide). They are written explicitly in object * literals, so no `Casing` helper runs on the `send()` path; the * `protected casing = CasingEnum.CAMEL_CASE` field exists only for the * Novu-compatible `sendMessage()` surface. * * Unlike Slack/MS Teams (plain-text response), Google Chat returns a full JSON * `Message` resource on success; `providerMessageId` carries the full resource * name `'spaces//messages/'`. */ export declare class GoogleChatChatConnector extends BaseConnector implements IChatProvider, IChatConnector { private config; readonly id: "google-chat"; readonly channelType: ChannelTypeEnum.CHAT; constructor(config: GoogleChatConfig, fetchImpl?: typeof fetch); /** * Thinwrap-native send. Implements `IChatConnector`. * * `to` is intentionally absent from `GoogleChatNarrowedInput` — the webhook * URL targets the space directly. All wire keys (`cardsV2`, * `thread`, `fallbackText`) are camelCase — written * explicitly in the object literal, no transform helper. */ send(input: GoogleChatNarrowedInput): Promise; /** * HTTP-layer mapping. ConnectorError carries no * `retryAfterSeconds` field — retry is consumer policy: * parsed seconds embedded in `providerMessage` text, raw header preserved on * `cause.retryAfter`. Wrapper performs no retry. * * 401/403/404 all map to `auth_failed` — invalid `key`, revoked * webhook, or deleted webhook/space are all credential failures. */ private mapVendorError; sendMessage(options: IChatOptions, bridgeProviderData?: WithPassthrough>): Promise; }