import { BaseCommand } from '@adonisjs/core/ace'; import type { CommandOptions } from '@adonisjs/core/types/ace'; /** * AdonisJS Ace command for generating bouncer policy classes. This command * creates new policy files with optional method stubs. * * @example * ```sh * node ace make:policy PostPolicy * node ace make:policy UserPolicy view edit delete --model=User * node ace make:policy PostPolicy * ``` */ export default class MakePolicy extends BaseCommand { /** * Command name used to invoke this command */ static commandName: string; /** * Human-readable description of the command */ static description: string; /** * Command configuration options */ static options: CommandOptions; /** * The name of the policy file to create */ name: string; /** * Optional array of method names to pre-define on the policy class */ actions?: string[]; /** * The model name for which to generate the policy */ model?: string; /** * Execute the make:policy command. This method handles the entire * policy generation workflow including prompting for registration, * creating the policy file from a stub, and optionally registering * the policy in the main policies file. * * @example * ```bash * # Creates PostPolicy.ts with view, edit, delete methods * node ace make:policy PostPolicy view edit delete * * # Creates UserPolicy.ts without auto-registration * node ace make:policy UserPolicy --no-register * ``` */ run(): Promise; }