@lgriffin/esi.ts - EVE Online ESI API Client - v12.3.0
    Preparing search index...

    The base of the custom domain clients: an endpoint map turned into methods, plus the stream*/fetchAll* page helpers and withMetadata/withSafeMode. Extend it for a custom domain client of your own.

    Hierarchy (View Summary)

    Index
    api: ClientMethods<T>
    _client: ApiClient
    _endpoints: {
        getCharacterMailHeaders: {
            path: "characters/{characterId}/mail/";
            method: "GET";
            requiresAuth: true;
            pathParams: readonly ["characterId"];
            responseSchema: ZodArray<
                ZodObject<
                    {
                        mail_id: ZodOptional<ZodNumber>;
                        subject: ZodOptional<ZodString>;
                        from: ZodOptional<ZodNumber>;
                        timestamp: ZodOptional<ZodString>;
                        labels: ZodOptional<ZodArray<ZodNumber>>;
                        is_read: ZodOptional<ZodBoolean>;
                        recipients: ZodOptional<
                            ZodArray<
                                ZodObject<
                                    {
                                        recipient_id: ZodNumber;
                                        recipient_type: ZodType<
                                            (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...),
                                            unknown,
                                            $ZodTypeInternals<(...), (...)>,
                                        >;
                                    },
                                    $loose,
                                >,
                            >,
                        >;
                    },
                    $loose,
                >,
            >;
        };
        sendMail: {
            path: "characters/{characterId}/mail/";
            method: "POST";
            responseSchema: ZodNumber;
            requiresAuth: true;
            pathParams: readonly ["characterId"];
            hasBody: true;
            requestSchema: ZodObject<
                {
                    recipients: ZodArray<
                        ZodObject<
                            {
                                recipient_id: ZodNumber;
                                recipient_type: ZodEnum<
                                    {
                                        character: "character";
                                        corporation: "corporation";
                                        alliance: "alliance";
                                        mailing_list: "mailing_list";
                                    },
                                >;
                            },
                            $loose,
                        >,
                    >;
                    subject: ZodString;
                    body: ZodString;
                },
                $loose,
            >;
        };
        getMail: {
            path: "characters/{characterId}/mail/{mailId}/";
            method: "GET";
            requiresAuth: true;
            pathParams: readonly ["characterId", "mailId"];
            responseSchema: ZodObject<
                {
                    subject: ZodOptional<ZodString>;
                    from: ZodOptional<ZodNumber>;
                    timestamp: ZodOptional<ZodString>;
                    labels: ZodOptional<ZodArray<ZodNumber>>;
                    read: ZodOptional<ZodBoolean>;
                    body: ZodOptional<ZodString>;
                    recipients: ZodOptional<
                        ZodArray<
                            ZodObject<
                                {
                                    recipient_id: ZodNumber;
                                    recipient_type: ZodType<
                                        | (...) & (...)
                                        | "character"
                                        | "corporation"
                                        | "alliance"
                                        | "mailing_list",
                                        unknown,
                                        $ZodTypeInternals<(...) | (...) | (...) | (...) | (...), unknown>,
                                    >;
                                },
                                $loose,
                            >,
                        >,
                    >;
                },
                $loose,
            >;
        };
        deleteMail: {
            path: "characters/{characterId}/mail/{mailId}/";
            method: "DELETE";
            requiresAuth: true;
            pathParams: readonly ["characterId", "mailId"];
        };
        updateMailMetadata: {
            path: "characters/{characterId}/mail/{mailId}/";
            method: "PUT";
            requiresAuth: true;
            pathParams: readonly ["characterId", "mailId"];
            hasBody: true;
        };
        getMailLabels: {
            path: "characters/{characterId}/mail/labels/";
            method: "GET";
            requiresAuth: true;
            pathParams: readonly ["characterId"];
            responseSchema: ZodObject<
                {
                    labels: ZodOptional<
                        ZodArray<
                            ZodObject<
                                {
                                    label_id: ZodOptional<ZodNumber>;
                                    name: ZodOptional<ZodString>;
                                    color: ZodOptional<ZodString>;
                                    unread_count: ZodOptional<ZodNumber>;
                                },
                                $loose,
                            >,
                        >,
                    >;
                    total_unread_count: ZodOptional<ZodNumber>;
                },
                $loose,
            >;
        };
        createMailLabel: {
            path: "characters/{characterId}/mail/labels/";
            method: "POST";
            responseSchema: ZodNumber;
            requiresAuth: true;
            pathParams: readonly ["characterId"];
            hasBody: true;
        };
        deleteMailLabel: {
            path: "characters/{characterId}/mail/labels/{labelId}/";
            method: "DELETE";
            requiresAuth: true;
            pathParams: readonly ["characterId", "labelId"];
        };
        getMailingLists: {
            path: "characters/{characterId}/mail/lists/";
            method: "GET";
            requiresAuth: true;
            pathParams: readonly ["characterId"];
            responseSchema: ZodArray<
                ZodObject<{ mailing_list_id: ZodNumber; name: ZodString }, $loose>,
            >;
        };
    }
    • Type Parameters

      • R

      Parameters

      • endpointName:
            | "getCharacterMailHeaders"
            | "sendMail"
            | "getMail"
            | "deleteMail"
            | "updateMailMetadata"
            | "getMailLabels"
            | "createMailLabel"
            | "deleteMailLabel"
            | "getMailingLists"
      • ...args: unknown[]

      Returns AsyncGenerator<PageResult<R>, void, undefined>

    • Type Parameters

      • R

      Parameters

      • endpointName:
            | "getCharacterMailHeaders"
            | "sendMail"
            | "getMail"
            | "deleteMail"
            | "updateMailMetadata"
            | "getMailLabels"
            | "createMailLabel"
            | "deleteMailLabel"
            | "getMailingLists"
      • args: unknown[]
      • Optionalconcurrency: number

      Returns Promise<R[]>

    • Retrieves the mail headers (subject, sender, timestamp) for a character's inbox.

      Parameters

      • characterId: number

        The ID of the character whose mail headers to fetch

      Returns Promise<
          {
              mail_id?: number;
              subject?: string;
              from?: number;
              timestamp?: string;
              labels?: number[];
              is_read?: boolean;
              recipients?: {
                  recipient_id: number;
                  recipient_type: | string & {}
                  | "character"
                  | "corporation"
                  | "alliance"
                  | "mailing_list";
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          }[],
      >

      A list of mail message headers

      Authentication

    • Sends a new mail on behalf of a character via POST.

      Parameters

      • characterId: number

        The ID of the character sending the mail

      • body: object

        The mail content including recipients, subject, and body text

      Returns Promise<number>

      The ID of the newly created mail

      Authentication

    • Deletes a specific mail from a character's mailbox.

      Parameters

      • characterId: number

        The ID of the character who owns the mail

      • mailId: number

        The ID of the mail to delete

      Returns Promise<void>

      void

      Authentication

    • Retrieves the full contents of a specific mail including its body text.

      Parameters

      • characterId: number

        The ID of the character who owns the mail

      • mailId: number

        The ID of the mail to retrieve

      Returns Promise<
          {
              subject?: string;
              from?: number;
              timestamp?: string;
              labels?: number[];
              read?: boolean;
              body?: string;
              recipients?: {
                  recipient_id: number;
                  recipient_type: | string & {}
                  | "character"
                  | "corporation"
                  | "alliance"
                  | "mailing_list";
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          },
      >

      The full mail message including body, sender, and recipients

      Authentication

    • Updates the metadata of a mail, such as read status or labels, via PUT.

      Parameters

      • characterId: number

        The ID of the character who owns the mail

      • mailId: number

        The ID of the mail to update

      • body: object

        The metadata fields to update (e.g., labels, read status)

      Returns Promise<void>

      void

      Authentication

    • Retrieves the mail labels and total unread count for a character.

      Parameters

      • characterId: number

        The ID of the character whose labels to fetch

      Returns Promise<
          {
              total_unread_count?: number;
              labels?: {
                  label_id?: number;
                  name?: string;
                  color?: string;
                  unread_count?: number;
                  [key: string]: unknown;
              }[];
          },
      >

      The character's mail labels and total unread mail count

      Authentication

    • Creates a new custom mail label for a character via POST.

      Parameters

      • characterId: number

        The ID of the character to create the label for

      • body: object

        The label definition including name and optional color

      Returns Promise<number>

      The ID of the newly created label

      Authentication

    • Deletes a custom mail label from a character's mailbox.

      Parameters

      • characterId: number

        The ID of the character who owns the label

      • labelId: number

        The ID of the label to delete

      Returns Promise<void>

      void

      Authentication

    • Retrieves the mailing lists that a character is subscribed to.

      Parameters

      • characterId: number

        The ID of the character whose mailing lists to fetch

      Returns Promise<{ mailing_list_id: number; name: string }[]>

      A list of mailing lists with their IDs and names

      Authentication

    • Parameters

      • characterId: number
      • Optionalconcurrency: number

      Returns Promise<
          {
              mail_id?: number;
              subject?: string;
              from?: number;
              timestamp?: string;
              labels?: number[];
              is_read?: boolean;
              recipients?: {
                  recipient_id: number;
                  recipient_type: | string & {}
                  | "character"
                  | "corporation"
                  | "alliance"
                  | "mailing_list";
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          }[],
      >

    • Parameters

      • characterId: number
      • Optionalconcurrency: number

      Returns Promise<{ mailing_list_id: number; name: string }[]>

    • Parameters

      • characterId: number

      Returns AsyncGenerator<
          PageResult<
              {
                  mail_id?: number;
                  subject?: string;
                  from?: number;
                  timestamp?: string;
                  labels?: number[];
                  is_read?: boolean;
                  recipients?: {
                      recipient_id: number;
                      recipient_type: | string & {}
                      | "character"
                      | "corporation"
                      | "alliance"
                      | "mailing_list";
                      [key: string]: unknown;
                  }[];
                  [key: string]: unknown;
              },
          >,
          void,
          undefined,
      >

    • Parameters

      • characterId: number

      Returns AsyncGenerator<
          PageResult<{ mailing_list_id: number; name: string }>,
          void,
          undefined,
      >