// This file was auto-generated by Fern from our API Definition.

import type * as Vapi from "../../../../index.js";

/**
 * @example
 *     {
 *         assistantIdAny: "assistant-1,assistant-2,assistant-3",
 *         customerNumberAny: "+1234567890,+0987654321"
 *     }
 */
export interface ListSessionsRequest {
    /** This is the unique identifier for the session to filter by. */
    id?: string;
    /**
     * This is the name of the customer. This is just for your own reference.
     *
     * For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" <sip:username@domain>`.
     */
    name?: string;
    /** This is the ID of the assistant to filter sessions by. */
    assistantId?: string;
    /** Filter by multiple assistant IDs. Provide as comma-separated values. */
    assistantIdAny?: string;
    /** This is the ID of the squad to filter sessions by. */
    squadId?: string;
    /** This is the ID of the workflow to filter sessions by. */
    workflowId?: string;
    /**
     * This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.
     *
     * Use cases:
     * - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.
     * - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.
     *
     * If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`).
     *
     * @default true (E164 check is enabled)
     */
    numberE164CheckEnabled?: boolean;
    /** This is the extension that will be dialed after the call is answered. */
    extension?: string;
    /**
     * These are the overrides for the assistant's settings and template variables specific to this customer.
     * This allows customization of the assistant's behavior for individual customers in batch calls.
     */
    assistantOverrides?: string;
    /** This is the number of the customer. */
    number?: string;
    /** This is the SIP URI of the customer. */
    sipUri?: string;
    /** This is the email of the customer. */
    email?: string;
    /** This is the external ID of the customer. */
    externalId?: string;
    /** Filter by any of the specified customer phone numbers (comma-separated). */
    customerNumberAny?: string;
    /** This will return sessions with the specified phoneNumberId. */
    phoneNumberId?: string;
    /** This will return sessions with any of the specified phoneNumberIds. */
    phoneNumberIdAny?: string | string[];
    /** This is the page number to return. Defaults to 1. */
    page?: number;
    /** This is the sort order for pagination. Defaults to 'DESC'. */
    sortOrder?: Vapi.ListSessionsRequestSortOrder;
    /** This is the maximum number of items to return. Defaults to 100. */
    limit?: number;
    /** This will return items where the createdAt is greater than the specified value. */
    createdAtGt?: string;
    /** This will return items where the createdAt is less than the specified value. */
    createdAtLt?: string;
    /** This will return items where the createdAt is greater than or equal to the specified value. */
    createdAtGe?: string;
    /** This will return items where the createdAt is less than or equal to the specified value. */
    createdAtLe?: string;
    /** This will return items where the updatedAt is greater than the specified value. */
    updatedAtGt?: string;
    /** This will return items where the updatedAt is less than the specified value. */
    updatedAtLt?: string;
    /** This will return items where the updatedAt is greater than or equal to the specified value. */
    updatedAtGe?: string;
    /** This will return items where the updatedAt is less than or equal to the specified value. */
    updatedAtLe?: string;
}
