/**
 * 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 { SourceEnum } from "./source_enum";
import type { ModeEnum } from "./mode_enum";

/**
 * Body of ``POST /mailboxes/{id}/imports/`` — starts a file or IMAP import.

The target mailbox comes from the URL. ``source`` discriminates: ``file``
needs the ``file_key`` returned by the upload endpoint (unique per upload —
nothing in the bucket is ever overwritten) plus the original ``filename``
(display + MIME-type hint); ``imap`` needs the connection fields.
``continuous`` mode is IMAP-only. Read-only run state is returned via
``ImportRunSerializer``.
 */
export interface ImportCreateRequest {
  /** 'file' (an uploaded archive — the backend sniffs eml/mbox/pst) or 'imap' (a live server).

* `file` - file
* `imap` - imap */
  source: SourceEnum;
  /**
   * Storage key returned when the archive was uploaded.
   * @minLength 1
   */
  file_key?: string;
  /**
   * Original archive filename (display + MIME-type hint).
   * @minLength 1
   */
  filename?: string;
  /** @minLength 1 */
  imap_server?: string;
  /**
   * @minimum 1
   * @maximum 65535
   */
  imap_port?: number;
  /** @minLength 1 */
  username?: string;
  /** @minLength 1 */
  password?: string;
  use_ssl?: boolean;
  mode?: ModeEnum;
}
