import { AuthErrorCode } from "./auth_pb.js"; import { Message } from "@bufbuild/protobuf"; import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { Timestamp } from "@bufbuild/protobuf/wkt"; declare namespace social_verification_pb_d_exports { export { ConfirmSocialVerificationRequest, ConfirmSocialVerificationRequestSchema, ConfirmSocialVerificationResponse, ConfirmSocialVerificationResponseSchema, GetSocialVerificationRequest, GetSocialVerificationRequestSchema, GetSocialVerificationResponse, GetSocialVerificationResponseSchema, SocialProvider, SocialProviderSchema, SocialVerification, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationReadyRequest, SocialVerificationReadyRequestSchema, SocialVerificationReadyResponse, SocialVerificationReadyResponseSchema, SocialVerificationSchema, SocialVerificationService, SocialVerificationStatus, SocialVerificationStatusSchema, StartSocialVerificationRequest, StartSocialVerificationRequestSchema, StartSocialVerificationResponse, StartSocialVerificationResponseSchema, UnlinkSocialAccountRequest, UnlinkSocialAccountRequestSchema, UnlinkSocialAccountResponse, UnlinkSocialAccountResponseSchema, file_auth_v1_social_verification }; } /** * Describes the file auth/v1/social_verification.proto. */ declare const file_auth_v1_social_verification: GenFile; /** * SocialVerification describes the caller's current verification state for one * social provider. * * @generated from message auth.v1.SocialVerification */ type SocialVerification = Message<"auth.v1.SocialVerification"> & { /** * Verification identifier. * * @generated from field: int64 id = 12; */ id: bigint; /** * Provider account being verified. * * @generated from field: auth.v1.SocialProvider provider = 1; */ provider: SocialProvider; /** * Method used for this verification. If unspecified at start time, the * provider default is used. * * @generated from field: auth.v1.SocialVerificationMethod method = 11; */ method: SocialVerificationMethod; /** * Provider handle being verified. Handles are returned lowercase and without * a leading "@". For Telegram, the username of the account that submitted the * code; empty when that account has no username. * * @generated from field: string handle = 2; */ handle: string; /** * Stable provider-side user identifier. Empty until verification succeeds, * except for Telegram: while the status is STATUS_AWAITING_CONFIRMATION, it is * the numeric user ID of the Telegram account that submitted the code, the * value ConfirmSocialVerification takes. * * @generated from field: string provider_user_id = 3; */ providerUserId: string; /** * Provider display name of the account being verified, for showing it to the * user. Telegram only: the account's name, set once the code is submitted. * Empty for other providers. * * @generated from field: string display_name = 17; */ displayName: string; /** * Challenge code the user must submit according to the verification method. * Discord and Telegram codes are returned only when a challenge is issued. * Codes expire after 15 minutes. * * @generated from field: string challenge_code = 13; */ challengeCode: string; /** * Current verification status. * * @generated from field: auth.v1.SocialVerificationStatus status = 4; */ status: SocialVerificationStatus; /** * Time in UTC when the current challenge code was issued. * * @generated from field: google.protobuf.Timestamp requested_at = 5; */ requestedAt?: Timestamp | undefined; /** * Time in UTC when the current challenge code expires. * * @generated from field: google.protobuf.Timestamp expires_at = 6; */ expiresAt?: Timestamp | undefined; /** * Time in UTC when verification succeeded. Empty until status is STATUS_VERIFIED. * * @generated from field: google.protobuf.Timestamp verified_at = 7; */ verifiedAt?: Timestamp | undefined; /** * Number of recorded provider-check attempts for this challenge. * * @generated from field: int32 attempts = 9; */ attempts: number; /** * Last verification error, if the most recent check failed. Empty when there * is no recorded error. * * @generated from field: string last_error = 10; */ lastError: string; /** * Stable machine-readable error code for the current failed verification. * AUTH_UNSPECIFIED when no typed error applies. * * @generated from field: auth.v1.AuthErrorCode error_code = 16; */ errorCode: AuthErrorCode; /** * Time in UTC when this verification state last changed. * * @generated from field: google.protobuf.Timestamp updated_at = 15; */ updatedAt?: Timestamp | undefined; }; /** * Describes the message auth.v1.SocialVerification. * Use `create(SocialVerificationSchema)` to create a new message. */ declare const SocialVerificationSchema: GenMessage; /** * StartSocialVerificationRequest starts or restarts social account verification. * Starting again for the same provider replaces the previous challenge. * * @generated from message auth.v1.StartSocialVerificationRequest */ type StartSocialVerificationRequest = Message<"auth.v1.StartSocialVerificationRequest"> & { /** * Provider account to verify. * * @generated from field: auth.v1.SocialProvider provider = 1; */ provider: SocialProvider; /** * Verification method. If unspecified, profile verification is used for * X/Twitter, channel verification for Discord and direct message * verification for Telegram. * * @generated from field: auth.v1.SocialVerificationMethod method = 3; */ method: SocialVerificationMethod; /** * Provider handle the user claims. Required for X/Twitter and omitted for * Discord and Telegram, where the provider bot supplies the provider identity. * A leading "@" is accepted and removed from X/Twitter handles. * * @generated from field: string handle = 2; */ handle: string; }; /** * Describes the message auth.v1.StartSocialVerificationRequest. * Use `create(StartSocialVerificationRequestSchema)` to create a new message. */ declare const StartSocialVerificationRequestSchema: GenMessage; /** * Response returned after starting social account verification. * * @generated from message auth.v1.StartSocialVerificationResponse */ type StartSocialVerificationResponse = Message<"auth.v1.StartSocialVerificationResponse"> & { /** * Newly issued challenge code the user must submit according to the * verification method. * * @generated from field: string challenge_code = 1; */ challengeCode: string; /** * Time in UTC when the challenge code expires. Social verification challenges * expire after 15 minutes. * * @generated from field: google.protobuf.Timestamp expires_at = 2; */ expiresAt?: Timestamp | undefined; /** * Current verification state after issuing the challenge. * * @generated from field: auth.v1.SocialVerification verification = 3; */ verification?: SocialVerification | undefined; /** * Link that completes the user action, when the provider has one. Telegram: * opening it starts a chat with the Polyester bot that submits the code. * Empty for other providers. * * @generated from field: string action_url = 4; */ actionUrl: string; }; /** * Describes the message auth.v1.StartSocialVerificationResponse. * Use `create(StartSocialVerificationResponseSchema)` to create a new message. */ declare const StartSocialVerificationResponseSchema: GenMessage; /** * SocialVerificationReadyRequest tells the API that the challenge code has been * placed and the provider account is ready to check. * * @generated from message auth.v1.SocialVerificationReadyRequest */ type SocialVerificationReadyRequest = Message<"auth.v1.SocialVerificationReadyRequest"> & { /** * Provider account to check. * * @generated from field: auth.v1.SocialProvider provider = 1; */ provider: SocialProvider; }; /** * Describes the message auth.v1.SocialVerificationReadyRequest. * Use `create(SocialVerificationReadyRequestSchema)` to create a new message. */ declare const SocialVerificationReadyRequestSchema: GenMessage; /** * SocialVerificationReadyResponse returns the verification after it has been * queued for a provider check. * * @generated from message auth.v1.SocialVerificationReadyResponse */ type SocialVerificationReadyResponse = Message<"auth.v1.SocialVerificationReadyResponse"> & { /** * Current verification state after the provider check was requested. * * @generated from field: auth.v1.SocialVerification verification = 1; */ verification?: SocialVerification | undefined; }; /** * Describes the message auth.v1.SocialVerificationReadyResponse. * Use `create(SocialVerificationReadyResponseSchema)` to create a new message. */ declare const SocialVerificationReadyResponseSchema: GenMessage; /** * GetSocialVerificationRequest fetches the caller's current social verification * state for one provider. * * @generated from message auth.v1.GetSocialVerificationRequest */ type GetSocialVerificationRequest = Message<"auth.v1.GetSocialVerificationRequest"> & { /** * Provider account to inspect. * * @generated from field: auth.v1.SocialProvider provider = 1; */ provider: SocialProvider; }; /** * Describes the message auth.v1.GetSocialVerificationRequest. * Use `create(GetSocialVerificationRequestSchema)` to create a new message. */ declare const GetSocialVerificationRequestSchema: GenMessage; /** * GetSocialVerificationResponse contains the caller's current social * verification state for one provider. A successful response with verification * absent means the caller has not started verification for that provider. * * @generated from message auth.v1.GetSocialVerificationResponse */ type GetSocialVerificationResponse = Message<"auth.v1.GetSocialVerificationResponse"> & { /** * Current verification state for the requested provider. Absent when no * verification has been started. * * @generated from field: auth.v1.SocialVerification verification = 1; */ verification?: SocialVerification | undefined; }; /** * Describes the message auth.v1.GetSocialVerificationResponse. * Use `create(GetSocialVerificationResponseSchema)` to create a new message. */ declare const GetSocialVerificationResponseSchema: GenMessage; /** * ConfirmSocialVerificationRequest links the provider account that submitted * the caller's challenge code. * * @generated from message auth.v1.ConfirmSocialVerificationRequest */ type ConfirmSocialVerificationRequest = Message<"auth.v1.ConfirmSocialVerificationRequest"> & { /** * Provider account to confirm. Only TELEGRAM is accepted. * * @generated from field: auth.v1.SocialProvider provider = 1; */ provider: SocialProvider; /** * Provider user ID the user confirms, as provider_user_id of the verification * in STATUS_AWAITING_CONFIRMATION. The request fails when it is not the * account that submitted the code, so the user links exactly the account * they were shown. * * @generated from field: string provider_user_id = 2; */ providerUserId: string; }; /** * Describes the message auth.v1.ConfirmSocialVerificationRequest. * Use `create(ConfirmSocialVerificationRequestSchema)` to create a new message. */ declare const ConfirmSocialVerificationRequestSchema: GenMessage; /** * ConfirmSocialVerificationResponse returns the verification after the * provider account was linked. * * @generated from message auth.v1.ConfirmSocialVerificationResponse */ type ConfirmSocialVerificationResponse = Message<"auth.v1.ConfirmSocialVerificationResponse"> & { /** * Current verification state, STATUS_VERIFIED. * * @generated from field: auth.v1.SocialVerification verification = 1; */ verification?: SocialVerification | undefined; }; /** * Describes the message auth.v1.ConfirmSocialVerificationResponse. * Use `create(ConfirmSocialVerificationResponseSchema)` to create a new message. */ declare const ConfirmSocialVerificationResponseSchema: GenMessage; /** * UnlinkSocialAccountRequest removes the caller's linked provider account, or * cancels a link in progress. * * @generated from message auth.v1.UnlinkSocialAccountRequest */ type UnlinkSocialAccountRequest = Message<"auth.v1.UnlinkSocialAccountRequest"> & { /** * Provider account to unlink. Only TELEGRAM is accepted. * * @generated from field: auth.v1.SocialProvider provider = 1; */ provider: SocialProvider; }; /** * Describes the message auth.v1.UnlinkSocialAccountRequest. * Use `create(UnlinkSocialAccountRequestSchema)` to create a new message. */ declare const UnlinkSocialAccountRequestSchema: GenMessage; /** * UnlinkSocialAccountResponse returns the verification after unlinking. * * @generated from message auth.v1.UnlinkSocialAccountResponse */ type UnlinkSocialAccountResponse = Message<"auth.v1.UnlinkSocialAccountResponse"> & { /** * Current verification state, STATUS_CANCELLED. Absent when no verification * was ever started for the provider. * * @generated from field: auth.v1.SocialVerification verification = 1; */ verification?: SocialVerification | undefined; }; /** * Describes the message auth.v1.UnlinkSocialAccountResponse. * Use `create(UnlinkSocialAccountResponseSchema)` to create a new message. */ declare const UnlinkSocialAccountResponseSchema: GenMessage; /** * Social account provider used for account ownership verification. * * @generated from enum auth.v1.SocialProvider */ declare enum SocialProvider { /** * No social provider was specified. * * @generated from enum value: PROVIDER_UNSPECIFIED = 0; */ PROVIDER_UNSPECIFIED = 0, /** * X/Twitter account verification. * * @generated from enum value: TWITTER = 1; */ TWITTER = 1, /** * Discord account verification. * * @generated from enum value: DISCORD = 2; */ DISCORD = 2, /** * Telegram account linking. The user sends the challenge code to the Polyester * Telegram bot, then confirms the Telegram account that sent it. * * @generated from enum value: TELEGRAM = 3; */ TELEGRAM = 3 } /** * Describes the enum auth.v1.SocialProvider. */ declare const SocialProviderSchema: GenEnum; /** * Current state of a social account verification attempt. * * @generated from enum auth.v1.SocialVerificationStatus */ declare enum SocialVerificationStatus { /** * No verification status was specified. * * @generated from enum value: STATUS_UNSPECIFIED = 0; */ STATUS_UNSPECIFIED = 0, /** * Code issued; waiting for the user to complete the provider-specific action. * * @generated from enum value: STATUS_PENDING_USER_ACTION = 1; */ STATUS_PENDING_USER_ACTION = 1, /** * User marked the code as placed and the verification check is waiting to run. * * @generated from enum value: STATUS_QUEUED = 2; */ STATUS_QUEUED = 2, /** * Verification check is currently running. * * @generated from enum value: STATUS_IN_PROGRESS = 3; */ STATUS_IN_PROGRESS = 3, /** * Provider account ownership was verified successfully. * * @generated from enum value: STATUS_VERIFIED = 4; */ STATUS_VERIFIED = 4, /** * Verification failed. Start a new verification to receive a new challenge code. * * @generated from enum value: STATUS_FAILED = 5; */ STATUS_FAILED = 5, /** * Challenge code expired before verification completed. * * @generated from enum value: STATUS_EXPIRED = 6; */ STATUS_EXPIRED = 6, /** * Verification was cancelled, or the linked account was unlinked. * * @generated from enum value: STATUS_CANCELLED = 7; */ STATUS_CANCELLED = 7, /** * A provider account submitted the challenge code. The user must confirm that * account with ConfirmSocialVerification before it is linked. Telegram only. * * @generated from enum value: STATUS_AWAITING_CONFIRMATION = 8; */ STATUS_AWAITING_CONFIRMATION = 8 } /** * Describes the enum auth.v1.SocialVerificationStatus. */ declare const SocialVerificationStatusSchema: GenEnum; /** * How the user proves control of the provider account. * * @generated from enum auth.v1.SocialVerificationMethod */ declare enum SocialVerificationMethod { /** * No method was specified. The provider default is used. * * @generated from enum value: METHOD_UNSPECIFIED = 0; */ METHOD_UNSPECIFIED = 0, /** * User places the challenge code in their public provider profile. * * @generated from enum value: METHOD_PROFILE = 1; */ METHOD_PROFILE = 1, /** * User posts the challenge code in a provider channel. * * @generated from enum value: METHOD_CHANNEL = 2; */ METHOD_CHANNEL = 2, /** * User sends the challenge code in a direct message. * * @generated from enum value: METHOD_DM = 3; */ METHOD_DM = 3 } /** * Describes the enum auth.v1.SocialVerificationMethod. */ declare const SocialVerificationMethodSchema: GenEnum; /** * SocialVerificationService verifies ownership of external social accounts. * * @generated from service auth.v1.SocialVerificationService */ declare const SocialVerificationService: GenService<{ /** * Start or restart social verification by issuing a new challenge code. * For Telegram, open action_url to send the code to the Polyester bot, then * confirm the account with ConfirmSocialVerification. * AUTH_SOCIAL_VERIFICATION_INVALID_STATE for Telegram means a Telegram account is already linked; unlink it first. * * @generated from rpc auth.v1.SocialVerificationService.StartSocialVerification */ startSocialVerification: { methodKind: "unary"; input: typeof StartSocialVerificationRequestSchema; output: typeof StartSocialVerificationResponseSchema; }; /** * Mark a verification as ready after the challenge code has been placed. * AUTH_RESOURCE_NOT_FOUND means no verification exists; start one first. * AUTH_SOCIAL_VERIFICATION_EXPIRED means the challenge window passed; start a new verification, then mark it ready again. * AUTH_SOCIAL_VERIFICATION_INVALID_STATE means Ready is not valid in the current state; call GetSocialVerification for the current status. * Telegram linking does not use Ready and always answers AUTH_SOCIAL_VERIFICATION_INVALID_STATE. * * @generated from rpc auth.v1.SocialVerificationService.SocialVerificationReady */ socialVerificationReady: { methodKind: "unary"; input: typeof SocialVerificationReadyRequestSchema; output: typeof SocialVerificationReadyResponseSchema; }; /** * Link the Telegram account that submitted the caller's challenge code. A * linked Telegram account becomes a channel to the account, so the caller * needs enrolled MFA and a fresh, single-use step-up proof in the * X-Auth-Step-Up header, obtained by completing an MFA challenge for fresh * step-up. The link consumes the proof; a retried confirmation of an existing * link needs no new proof. * AUTH_RESOURCE_NOT_FOUND means no verification exists; start one first. * AUTH_SOCIAL_VERIFICATION_EXPIRED means the challenge window passed; start a new verification. * AUTH_SOCIAL_VERIFICATION_INVALID_STATE means no submitted account awaits confirmation, or provider_user_id is not the account that submitted the code. * AUTH_SOCIAL_ACCOUNT_ALREADY_LINKED means that Telegram account is linked to another Polyester account; the verification fails. * AUTH_MFA_NOT_ENROLLED means enroll MFA first; AUTH_STEP_UP_REQUIRED and AUTH_STEP_UP_PROOF_UNAVAILABLE mean complete a new fresh step-up and retry. * * @generated from rpc auth.v1.SocialVerificationService.ConfirmSocialVerification */ confirmSocialVerification: { methodKind: "unary"; input: typeof ConfirmSocialVerificationRequestSchema; output: typeof ConfirmSocialVerificationResponseSchema; }; /** * Unlink the caller's Telegram account, or cancel a Telegram link in progress. * Unlinking again succeeds and changes nothing. To link again, start a new * verification. * * @generated from rpc auth.v1.SocialVerificationService.UnlinkSocialAccount */ unlinkSocialAccount: { methodKind: "unary"; input: typeof UnlinkSocialAccountRequestSchema; output: typeof UnlinkSocialAccountResponseSchema; }; /** * Get current verification status for the caller. * A failed verification uses error_code for its machine-readable outcome. * An API key needs READ_SOCIAL_VERIFICATION and must be scoped to the main * account. It reads the status only: provider, method, handle, status, and * verification time, with every other field left empty. * * @generated from rpc auth.v1.SocialVerificationService.GetSocialVerification */ getSocialVerification: { methodKind: "unary"; input: typeof GetSocialVerificationRequestSchema; output: typeof GetSocialVerificationResponseSchema; }; }>; //#endregion export { ConfirmSocialVerificationRequest, ConfirmSocialVerificationRequestSchema, ConfirmSocialVerificationResponse, ConfirmSocialVerificationResponseSchema, GetSocialVerificationRequest, GetSocialVerificationRequestSchema, GetSocialVerificationResponse, GetSocialVerificationResponseSchema, SocialProvider, SocialProviderSchema, SocialVerification, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationReadyRequest, SocialVerificationReadyRequestSchema, SocialVerificationReadyResponse, SocialVerificationReadyResponseSchema, SocialVerificationSchema, SocialVerificationService, SocialVerificationStatus, SocialVerificationStatusSchema, StartSocialVerificationRequest, StartSocialVerificationRequestSchema, StartSocialVerificationResponse, StartSocialVerificationResponseSchema, UnlinkSocialAccountRequest, UnlinkSocialAccountRequestSchema, UnlinkSocialAccountResponse, UnlinkSocialAccountResponseSchema, file_auth_v1_social_verification, social_verification_pb_d_exports }; //# sourceMappingURL=social_verification_pb.d.ts.map