import { AuthApiTransports } from "../../shared/transports.js"; import { PolyesterMutationOptions, PolyesterRequestOptions } from "../../shared/request-options.js"; import { ConfirmVerificationInput, GetVerificationResponse, SocialProviderInputSchema, StartVerificationInput, StartVerificationResponse, UnlinkSocialAccountInput, VerificationReadyResponse } from "./social-verification.schemas.js"; import * as v from "valibot"; //#region src/services/social-verification/social-verification.d.ts /** * Verifies ownership of external social accounts for the authenticated caller. */ declare class SocialVerificationService { #private; constructor(transports: AuthApiTransports); /** * Starts or restarts provider verification. Twitter requires a handle and strips a leading @; Discord and Telegram get their identity from the provider bot. An omitted method uses the provider default (Twitter profile, Discord channel, Telegram dm). Discord and Telegram return an empty challengeCode when no new challenge is issued. For Telegram, open `actionUrl` to send the code to the Polyester bot, poll `get` until `awaiting_confirmation`, then `confirm`; while a Telegram account is linked, starting again throws until it is unlinked. */ start(input: StartVerificationInput, options?: PolyesterMutationOptions): Promise; /** * Queues a provider check after the caller has placed the challenge code according to the selected verification method. Not used for Telegram, which links through `confirm`. */ markReady(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Returns the caller's current verification state for a provider, including status, challenge metadata, attempts, last error, and verified timestamp. API keys need `read-social-verification` and must be scoped to the main account. */ get(input: v.InferInput, options?: PolyesterRequestOptions): Promise; /** * Links the Telegram account that sent the challenge code. Pass the `providerUserId` shown * while the verification is `awaiting_confirmation`, so the user links exactly the account * they were shown. Requires enrolled MFA and a fresh `stepUpToken`; a retried confirmation of * an existing link needs no new token. A mismatched ID or no account awaiting confirmation * fails with `social_verification_invalid_state`; a Telegram account linked elsewhere fails * the verification with `social_account_already_linked`. */ confirm(input: ConfirmVerificationInput, options?: PolyesterMutationOptions): Promise; /** * Unlinks the Telegram account, or cancels a link in progress, and returns the `canceled` * verification (absent if none was ever started). Repeating it changes nothing; start a new * verification to link again. */ unlink(input: UnlinkSocialAccountInput, options?: PolyesterMutationOptions): Promise; } //#endregion export { SocialVerificationService }; //# sourceMappingURL=social-verification.d.ts.map