@letanure/resend-cli
Version:
A command-line interface for Resend email API
65 lines • 1.64 kB
TypeScript
import type { Command } from 'commander';
export declare enum Module {
main = "main",
email = "email",
domains = "domains",
apiKeys = "apikeys",
broadcasts = "broadcasts",
audiences = "audiences",
contacts = "contacts"
}
/**
* Module configuration that enforces AppState values for names
*/
export interface ModuleConfig {
name: Exclude<Module, Module.main>;
description: string;
registerCommands: (command: Command) => void;
}
/**
* Standard API result format used across all endpoints
*/
export interface ApiResult<T = unknown> {
success: boolean;
data?: T;
error?: string;
debug?: {
request?: unknown;
response?: unknown;
};
}
/**
* Select option for choice fields
*/
export interface SelectOption {
value: string | boolean;
label: string;
color?: 'green' | 'red' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray';
icon?: string;
}
/**
* Base field configuration for forms
*/
export interface FormField {
name: string;
label: string;
placeholder?: string;
helpText?: string;
type?: 'text' | 'textarea' | 'select' | 'input-with-selector';
options?: Array<SelectOption>;
display?: 'inline' | 'stacked' | 'compact';
cliFlag?: string;
cliShortFlag?: string;
onSelectorOpen?: () => void;
}
/**
* Extended field configuration for CLI commands
* Includes all form properties with required CLI-specific properties
*/
export interface CliField extends FormField {
placeholder: string;
helpText: string;
cliFlag: string;
cliShortFlag: string;
}
//# sourceMappingURL=index.d.ts.map