UNPKG

n8n

Version:

n8n Workflow Automation Tool

34 lines (33 loc) 1.38 kB
import { Logger } from '@n8n/backend-common'; import { AuthenticatedRequest } from '@n8n/db'; import { ContextEstablishmentOptions, ContextEstablishmentResult, HookDescription, IContextEstablishmentHook } from '@n8n/decorators'; import { Cipher } from 'n8n-core'; import { z } from 'zod'; declare const ChatHubAuthenticationMetadataSchema: z.ZodObject<{ authToken: z.ZodString; browserId: z.ZodOptional<z.ZodString>; method: z.ZodString; endpoint: z.ZodString; }, "strip", z.ZodTypeAny, { method: string; authToken: string; endpoint: string; browserId?: string | undefined; }, { method: string; authToken: string; endpoint: string; browserId?: string | undefined; }>; export type ChatHubAuthenticationMetadata = z.output<typeof ChatHubAuthenticationMetadataSchema>; export declare const CHATHUB_EXTRACTOR_NAME = "ChatHubExtractor"; export declare function extractAuthenticationMetadata(req: AuthenticatedRequest): ChatHubAuthenticationMetadata; export declare class ChatHubExtractor implements IContextEstablishmentHook { private readonly logger; private readonly cipher; constructor(logger: Logger, cipher: Cipher); hookDescription: HookDescription; isApplicableToTriggerNode(_nodeType: string): boolean; execute(options: ContextEstablishmentOptions): Promise<ContextEstablishmentResult>; } export {};