import { Logger } from '@n8n/backend-common'; 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'; import { UserRepository } from '@n8n/db'; 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; }, "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; grant: z.ZodOptional; executeAccessWorkflowId: z.ZodOptional; }, "strip", z.ZodTypeAny, { audiences: string[]; executeAccessWorkflowId?: string | undefined; }, { audiences: string[]; executeAccessWorkflowId?: string | undefined; }>>; subject: z.ZodOptional; establishedAt: z.ZodOptional; executionPath: z.ZodOptional>; }, "strip", z.ZodTypeAny, { source: "n8n-oauth"; resource: string; grant?: { audiences: string[]; executeAccessWorkflowId?: string | undefined; } | undefined; subject?: string | undefined; establishedAt?: number | undefined; executionPath?: string[] | undefined; }, { source: "n8n-oauth"; resource: string; grant?: { audiences: string[]; executeAccessWorkflowId?: string | undefined; } | undefined; subject?: string | undefined; establishedAt?: number | undefined; executionPath?: string[] | undefined; }>]>; export declare const N8N_IDENTITY_SOURCES: readonly string[]; export declare function carriesN8nIdentity(context: ICredentialContext): boolean; export declare class N8NIdentifier implements ITokenIdentifier { private readonly logger; private readonly authService; private readonly oauthTokenVerifierProxy; private readonly userRepository; constructor(logger: Logger, authService: AuthService, oauthTokenVerifierProxy: OAuthTokenVerifierProxy, userRepository: UserRepository); validateOptions(_: Record): Promise; resolve(context: ICredentialContext, _: Record, executionId?: string): Promise; identify(context: ICredentialContext): Promise; }