/** * Canonical credential-type registry. Single source of truth for the * list of credential types HostWebhook supports — used by: * * - api Mongoose schema enum (`credential.entity.ts`) * - api class-validator DTO (`create-credential.dto.ts`) * - dashboard display + form metadata (`lib/credentials/display.ts`) * - any future consumer that needs to enumerate types * * Adding a new credential type happens HERE first; both repos pick it * up on the next `@hostwebhook/node-types` bump. The bug we kept * hitting (entity accepting "postgres" but the DTO rejecting it) * stops being possible — both sides import from this list. * * Each entry is **deliberately minimal**: just the `type` string + * a couple of cross-repo flags that affect runtime behavior. * UI-specific metadata (icons, labels, replace-form copy) lives in * the dashboard's `display.ts`, where it can evolve without * forcing an api-side npm bump. */ export interface CredentialTypeRegistration { /** Stable id stored in `credentials.type`. Never rename — it's the * primary key for joins from nodes that reference credentials. */ type: string; /** When true, the URI inside `data` is validated against the SSRF * guard before storage. Tunneled credentials skip the guard since * the agent reaches the customer's own private network on their * behalf. Currently honored by `mongodb` and `postgres`. */ ssrfValidated?: boolean; /** When true, the underlying connection can be routed via a reverse * TCP tunnel. The credential carries `metadata.tunnelId` and the * runtime/test paths register a forwarder via `TcpTunnelPool`. */ tunnelable?: boolean; } /** * Registry — order matters for fallthrough behavior in pickers (most * common types first), but not for correctness. */ export declare const CREDENTIAL_TYPES: readonly [{ readonly type: "google_service_account"; }, { readonly type: "oauth2_google"; }, { readonly type: "oauth2_atlassian"; }, { readonly type: "mongodb"; readonly ssrfValidated: true; readonly tunnelable: true; }, { readonly type: "postgres"; readonly ssrfValidated: true; readonly tunnelable: true; }, { readonly type: "slack_webhook"; }, { readonly type: "slack_oauth"; }, { readonly type: "discord_webhook"; }, { readonly type: "llm_anthropic"; }, { readonly type: "llm_openai"; }, { readonly type: "llm_google"; }, { readonly type: "llm_groq"; }, { readonly type: "llm_openrouter"; }, { readonly type: "llm_ollama"; }, { readonly type: "firecrawl"; }, { readonly type: "apify"; }, { readonly type: "calendly_oauth2"; }, { readonly type: "calendly"; }, { readonly type: "airtable_oauth2"; }, { readonly type: "stripe_oauth2"; }, { readonly type: "hubspot_oauth2"; }, { readonly type: "todoist_oauth2"; }, { readonly type: "http_auth"; }, { readonly type: "aws_s3"; }, { readonly type: "memory_mongodb"; readonly ssrfValidated: true; readonly tunnelable: true; }, { readonly type: "mcp_server"; }, { readonly type: "voice_agent"; }, { readonly type: "telegram_bot"; }, { readonly type: "whatsapp_business"; }, { readonly type: "discord_bot"; }, { readonly type: "discord_oauth"; }, { readonly type: "bluesky_app_password"; }, { readonly type: "twitter_oauth2"; }, { readonly type: "mastodon_oauth2"; }, { readonly type: "linkedin_oauth2"; }, { readonly type: "threads_oauth2"; }, { readonly type: "instagram_oauth2"; }, { readonly type: "facebook_oauth2"; }, { readonly type: "notion_internal"; }, { readonly type: "notion_oauth"; }, { readonly type: "mailchimp_oauth2"; }, { readonly type: "shopify_oauth2"; }, { readonly type: "github_app"; }, { readonly type: "github_pat"; }, { readonly type: "woocommerce"; }, { readonly type: "microsoft_outlook_oauth2"; }, { readonly type: "microsoft_calendar_oauth2"; }, { readonly type: "microsoft_onedrive_oauth2"; }, { readonly type: "microsoft_excel_oauth2"; }, { readonly type: "microsoft_word_oauth2"; }, { readonly type: "microsoft_teams_oauth2"; }, { readonly type: "microsoft_todo_oauth2"; }, { readonly type: "microsoft_sharepoint_oauth2"; }]; /** * Plain string array — what the Mongoose `enum` field and the * class-validator `@IsIn(...)` decorator both consume. Keep it as a * readonly array so misuse (push/pop) breaks at compile time. */ export declare const CREDENTIAL_TYPE_VALUES: readonly string[]; /** Mutable copy for APIs that take `string[]` (Mongoose `enum`, * class-validator). The array itself is freshly built each access * so callers can't mutate the canonical list. */ export declare const credentialTypeValues: () => string[]; /** * Discriminated union of every supported type. Use as the field type * on entities + DTOs so a typo at the call site fails at compile * time, not at runtime via a Mongoose validation error. * * ⚠️ Y ahora ES una unión. Hasta la 1.69.0 esto valía `string` —la anotación * de `CREDENTIAL_TYPES` ensanchaba los literales— así que la frase de arriba * describía una protección que no existía. Ver el comentario del `satisfies` * al final del registro. */ export type CredentialType = (typeof CREDENTIAL_TYPES)[number]['type']; export declare function getCredentialType(type: string): CredentialTypeRegistration | undefined; export declare function isCredentialType(type: string): type is CredentialType;