/** * #externalendpoints_internal.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ /** * Snapshot of the request context at the time a callback URL was generated. * "Generator" here refers to whoever called `getCallbackUrl()`. This data is * used to revive the generator's context when the callback is invoked some * minutes later in a new request context. */ export type CallbackContext = { /** Generator's Reddit user ID. Eg, `t2_abc123`. May be empty. */ userT2: string; /** * Generator's installation identifier (UUID). Eg, * `f47ac10b-58cc-4372-a567-0e02b2c3d479`. */ installationId: string; /** Generator's subreddit ID. Eg, `t5_2qh1i`. May be empty. */ subredditT5: string; /** Generator's post ID. Eg, `t3_1a2b3c`. May be empty. */ postT3: string; /** Generator's comment ID. Eg, `t1_abc123`. May be empty. */ commentT1: string; /** Generator's logged-out user identifier (HMAC of `installationId:LOID`). */ userLoid: string; /** Generator's user locale at callback creation time. Eg, `en-US`. */ acceptLanguage: string; /** * Generator's user timezone at callback creation time. Eg, * `America/Los_Angeles`. */ acceptTimezone: string; }; export type ConsumeCallbackTokenRequest = { /** The UUID of the callback token to delete. */ tokenId: string; }; export type ConsumeCallbackTokenResponse = {}; export type CreateManagedTokenRequest = { /** Unique user provided name to identify the token. Eg, `game-api-token`. */ tokenName: string; }; export type CreateManagedTokenResponse = { token?: Token | undefined; }; export type ListTokensRequest = { /** The app slug to list tokens for. Eg, `wsbapp`. */ appSlug: string; }; export type ListTokensResponse = { /** All tokens associated with the app. */ tokens: Token[]; }; export type RevokeTokenRequest = { /** The UUID of the token to revoke. */ tokenId: string; }; export type RevokeTokenResponse = {}; /** No field is considered sensitive except `Token.token`. */ export type Token = { /** Token UUID. */ id: string; /** * Unique user provided token identifier conforming to `[a-zA-Z0-9_-]+`. Eg, * `game-api-token`. Always present for managed tokens, absent for single-use * callback tokens. */ name: string; /** The token value (only returned on creation). Eg, `devvit_at_abc123`. */ token?: string | undefined; /** When the token was created. */ createdAt?: string | undefined; /** Reddit user ID (`t2_abc123`) of the token creator. */ createdByT2: string; }; export type ValidateTokenRequest = { /** The token to validate. Eg, `devvit_at_abc123`. */ token: string; }; export type ValidateTokenResponse = { /** The app slug that owns this token (populated when valid). Eg, `wsbapp`. */ appSlug: string; /** * Callback context (populated only for valid callback tokens). * Presence indicates a callback token; absence indicates a managed token. */ callbackContext?: CallbackContext | undefined; /** Token UUID. Non-empty means the token is valid; empty means invalid. */ tokenId: string; }; //# sourceMappingURL=externalendpoints_internal.d.ts.map