/** * Represents the response from an authorization check, containing * information about whether access was granted or denied. * * @example * ```js * const response = AuthorizationResponse.deny('Access denied', 403) * response.t('errors.forbidden', { resource: 'post' }) * ``` */ export declare class AuthorizationResponse { authorized: boolean; /** * Create a deny response * * @param message Optional message explaining why access was denied * @param statusCode Optional HTTP status code for the response * * @example * ```js * AuthorizationResponse.deny('Insufficient permissions', 403) * ``` */ static deny(message?: string, statusCode?: number): AuthorizationResponse; /** * Create an allowed response * * @example * ```js * AuthorizationResponse.allow() * ``` */ static allow(): AuthorizationResponse; /** * HTTP status for the authorization response */ status?: number; /** * Response message */ message?: string; /** * Translation identifier to use for creating the * authorization response */ translation?: { identifier: string; data?: Record; }; /** * Whether the authorization was successful */ constructor(authorized: boolean); /** * Define the translation identifier for the authorization response * * @param identifier Translation key to use for internationalization * @param data Optional data to pass to the translation function * * @example * ```js * response.t('errors.access_denied', { resource: 'posts' }) * ``` */ t(identifier: string, data?: Record): this; }