/**
 * Generated by orval 🍺
 * Do not edit manually.
 * messages API
 * This is the messages API schema.
 * OpenAPI spec version: 1.0.0 (v1.0)
 */
import type { MessageTemplateTypeChoices } from "./message_template_type_choices";
import type { ReadMessageTemplateMetadata } from "./read_message_template_metadata";

/**
 * Serialize message templates with dynamic body field inclusion.

Body fields (html_body, text_body, raw_body) are only included when
explicitly requested via the ``?bodies=`` query parameter or the
``body_fields`` keyword argument (for nested usage).

Allowed values: ``raw``, ``html``, ``text`` (comma-separated).
Mapping: ``raw`` → ``raw_body``, ``html`` → ``html_body``, ``text`` → ``text_body``.

When neither query param nor kwarg is provided, no body field is returned.
 */
export interface ReadMessageTemplate {
  /** primary key for the record as UUID */
  readonly id: string;
  /** Name of the template (e.g., 'Standard Reply', 'Out of Office', 'Work Signature') */
  readonly name: string;
  /** @nullable */
  html_body?: string | null;
  /** @nullable */
  text_body?: string | null;
  /** @nullable */
  raw_body?: string | null;
  type: MessageTemplateTypeChoices;
  /** Whether this template is available for use */
  readonly is_active: boolean;
  /** Whether this template is forced; no other template of the same type can be used in the same scope */
  readonly is_forced: boolean;
  /** Whether this template is the default; it will be automatically loaded when composing a new message */
  readonly is_default: boolean;
  metadata?: ReadMessageTemplateMetadata;
  /** primary key for the record as UUID */
  readonly signature: string;
  /** @nullable */
  readonly is_active_autoreply: boolean | null;
  /** date and time at which a record was created */
  readonly created_at: string;
  /** date and time at which a record was last updated */
  readonly updated_at: string;
}
