/**
 * Standard response structure for API requests returning data of type T.
 * Provides consistent error handling and result access across the application.
 *
 * @template T - The type of data contained in the result property
 */
export interface ResponseArgs<T> {
  /**
   * Indicates whether the request resulted in an error
   * When true, the result may be undefined or contain partial data
   */
  error: boolean;

  /**
   * Map of property names to error messages for validation failures
   * Keys represent property names, values contain validation error messages
   */
  invalidProperties?: Record<string, string>;

  /**
   * Optional message providing additional information about the response
   * Typically used for error descriptions or success confirmations
   */
  message?: string;

  /**
   * The actual data returned by the request
   */
  result: T;
}
