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 { GetSocialVerificationRequest, GetSocialVerificationRequestSchema, GetSocialVerificationResponse, GetSocialVerificationResponseSchema, SocialProvider, SocialProviderSchema, SocialVerification, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationReadyRequest, SocialVerificationReadyRequestSchema, SocialVerificationReadyResponse, SocialVerificationReadyResponseSchema, SocialVerificationSchema, SocialVerificationService, SocialVerificationStatus, SocialVerificationStatusSchema, StartSocialVerificationRequest, StartSocialVerificationRequestSchema, StartSocialVerificationResponse, StartSocialVerificationResponseSchema, 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 "@". * * @generated from field: string handle = 2; */ handle: string; /** * Stable provider-side user identifier. Empty until verification succeeds. * * @generated from field: string provider_user_id = 3; */ providerUserId: string; /** * Challenge code the user must submit according to the verification method. * Discord 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 and channel verification is used for Discord. * * @generated from field: auth.v1.SocialVerificationMethod method = 3; */ method: SocialVerificationMethod; /** * Provider handle the user claims. Required for X/Twitter and omitted for * Discord, where the authenticated 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; }; /** * 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; /** * 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 } /** * 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. * * @generated from enum value: STATUS_CANCELLED = 7; */ STATUS_CANCELLED = 7 } /** * 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. * * @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. * * @generated from rpc auth.v1.SocialVerificationService.SocialVerificationReady */ socialVerificationReady: { methodKind: "unary"; input: typeof SocialVerificationReadyRequestSchema; output: typeof SocialVerificationReadyResponseSchema; }; /** * Get current verification status for the caller. * A failed verification uses error_code for its machine-readable outcome. * * @generated from rpc auth.v1.SocialVerificationService.GetSocialVerification */ getSocialVerification: { methodKind: "unary"; input: typeof GetSocialVerificationRequestSchema; output: typeof GetSocialVerificationResponseSchema; }; }>; //#endregion export { GetSocialVerificationRequest, GetSocialVerificationRequestSchema, GetSocialVerificationResponse, GetSocialVerificationResponseSchema, SocialProvider, SocialProviderSchema, SocialVerification, SocialVerificationMethod, SocialVerificationMethodSchema, SocialVerificationReadyRequest, SocialVerificationReadyRequestSchema, SocialVerificationReadyResponse, SocialVerificationReadyResponseSchema, SocialVerificationSchema, SocialVerificationService, SocialVerificationStatus, SocialVerificationStatusSchema, StartSocialVerificationRequest, StartSocialVerificationRequestSchema, StartSocialVerificationResponse, StartSocialVerificationResponseSchema, file_auth_v1_social_verification, social_verification_pb_d_exports }; //# sourceMappingURL=social_verification_pb.d.ts.map