UNPKG

n8n

Version:

n8n Workflow Automation Tool

46 lines (45 loc) 1.76 kB
import type { ICredentialContext } from 'n8n-workflow'; import { ITokenIdentifier } from './identifier-interface'; import { AuthService } from '../../../../auth/auth.service'; import { z } from 'zod'; import { OAuthTokenVerifierProxy } from '../../../../services/oauth-token-verifier-proxy.service'; export declare const N8NIdentifierMetadataSchema: z.ZodDiscriminatedUnion<"source", [z.ZodObject<{ source: z.ZodLiteral<"manual-execution">; }, "strip", z.ZodTypeAny, { source: "manual-execution"; }, { source: "manual-execution"; }>, z.ZodObject<{ source: z.ZodEnum<["chat-hub-injected", "cookie-source"]>; method: z.ZodString; endpoint: z.ZodString; browserId: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { source: "chat-hub-injected" | "cookie-source"; method: string; endpoint: string; browserId?: string | undefined; }, { source: "chat-hub-injected" | "cookie-source"; method: string; endpoint: string; browserId?: string | undefined; }>, z.ZodObject<{ source: z.ZodLiteral<"n8n-oauth">; resource: z.ZodString; }, "strip", z.ZodTypeAny, { source: "n8n-oauth"; resource: string; }, { source: "n8n-oauth"; resource: string; }>]>; export declare const N8N_IDENTITY_SOURCES: readonly string[]; export declare function carriesN8nIdentity(context: ICredentialContext): boolean; export declare class N8NIdentifier implements ITokenIdentifier { private readonly authService; private readonly oauthTokenVerifierProxy; constructor(authService: AuthService, oauthTokenVerifierProxy: OAuthTokenVerifierProxy); validateOptions(_: Record<string, unknown>): Promise<void>; resolve(context: ICredentialContext, _: Record<string, unknown>): Promise<string>; }