/** * #app_permission.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ /** This enum is used to represent the consent status of an app permission. */ export declare enum ConsentStatus { /** CONSENT_STATUS_UNKNOWN - The consent status is unknown, which means it has not been set or is not applicable. */ CONSENT_STATUS_UNKNOWN = 0, /** REVOKED - The user has explicitly denied consent for the app permissions. */ REVOKED = 1, /** GRANTED - The user has granted consent for the app permissions. */ GRANTED = 2, UNRECOGNIZED = -1 } /** This enum is used to represent the scopes of permissions that can be granted to an app. */ export declare enum Scope { /** SCOPE_UNKNOWN - The scope is unknown, which means it has not been set or is not applicable. */ SCOPE_UNKNOWN = 0, /** SUBMIT_POST - Allows the app to submit posts on behalf of the user. */ SUBMIT_POST = 1, /** SUBMIT_COMMENT - Allows the app to submit comments on behalf of the user. */ SUBMIT_COMMENT = 2, /** SUBSCRIBE_TO_SUBREDDIT - Allows the app to subscribe the user to a subreddit. */ SUBSCRIBE_TO_SUBREDDIT = 3, UNRECOGNIZED = -1 } export type AppPermission = { appSlug: string; subredditId: string; scopes: Scope[]; consentStatus: ConsentStatus; updatedAt?: string | undefined; }; export type DevvitApp = { appSlug: string; appName: string; termsAndConditions?: string | undefined; privacyPolicy?: string | undefined; }; export type GetAppPermissionsByUserIdRequest = { userId: string; }; export type GetAppPermissionsByUserIdResponse = { appPermissions: AppPermission[]; devvitApps: DevvitApp[]; }; export type GrantAppPermissionRequest = { userId: string; appSlug: string; subredditId: string; scopes: Scope[]; }; export type GrantAppPermissionResponse = { error?: ErrorMessage | undefined; }; export type RevokeAppPermissionRequest = { appSlug: string; userId: string; subredditId: string; }; export type RevokeAppPermissionResponse = { error?: ErrorMessage | undefined; }; export type ErrorMessage = { message: string; }; //# sourceMappingURL=app_permission.d.ts.map