import type { AuthOAuthProviderConfig, AuthOAuthProviderId } from '@ankhorage/contracts'; import type { StudioAuthSettings, StudioAuthSettingsMutation } from '../../../authSettings'; export interface StoredOAuthCredentialLink { readonly providerId: AuthOAuthProviderId; readonly providerLabel: string; readonly credentialsRef: string; readonly providerDefaults: Omit; readonly successMessage: string; } export type StoredOAuthCredentialLinkResult = { readonly ok: true; readonly message: string; } | { readonly ok: false; readonly pendingLink: StoredOAuthCredentialLink; readonly message: string; }; export declare function persistStoredOAuthCredentialLink(args: { readonly link: StoredOAuthCredentialLink; readonly mutateAuthSettings: (mutation: StudioAuthSettingsMutation) => StudioAuthSettings | null; readonly flushManifest: () => Promise; readonly refreshHealth: () => Promise; readonly toMessage: (error: unknown) => string; }): Promise; export declare function patchLocalAuthDraftWithStoredOAuthCredentialLink(settings: StudioAuthSettings, link: StoredOAuthCredentialLink): StudioAuthSettings; export declare function persistStoredOAuthCredentialLinkAndPatchLocalDraft(args: { readonly link: StoredOAuthCredentialLink; readonly persistCredentialLink: (link: StoredOAuthCredentialLink) => Promise; readonly patchDraft: (mutation: (current: StudioAuthSettings) => StudioAuthSettings) => void; }): Promise; export declare function applyStoredOAuthCredentialLink(settings: StudioAuthSettings | null, link: StoredOAuthCredentialLink): StudioAuthSettings; //# sourceMappingURL=adminAuthCredentialFlow.d.ts.map