@webitel/api-services
    Preparing search index...
    type SearchContactsParams = {
        fields?: string[];
        group?: string[];
        id?: string[];
        label?: string[];
        mode?: SearchContactsMode;
        notIdGroup?: string;
        owner?: string[];
        page?: number;
        q?: string;
        qin?: string[];
        size?: number;
        sort?: string[];
        user?: boolean;
    }
    Index

    Properties

    fields?: string[]

    Fields [Q]uery to build result dataset record.

    fields ::= field [ *( "," field ) ]
    field ::= name [ *( func ) ] [ inner ]
    inner ::= "{" fields "}"
    funcs ::= *( func )
    func ::= "." name "(" [ args ] ")"
    name ::= ALPHA / DIGIT / USCORE

    ALPHA = %x41-5A / %x61-7A ; "A"-"Z" / "a"-"z"
    DIGIT = %x30-39 ; "0"-"9"
    USCORE = %x5F ; underscore ; "_"
    group?: string[]

    Filters contacts by the specified group(s).

    • Includes only contacts that belong to one or more of the given group Group(s).
    id?: string[]

    Records with unique IDentifier(s). Accept: id -or- etag.

    label?: string[]

    Filters contacts by the specified label(s).

    • Includes only contacts that have one or more of the given Label(s).

    Source access mode requirement.

    • READ: Can fetch record. [GET]
    • WRITE: Can update record. [PUT|PATCH]
    • DELETE: Can delete record. [DELETE]
    notIdGroup?: string

    Excludes contacts that belong to the specified group ID.

    • Filters out contacts associated with the given group_id.
    owner?: string[]

    Filters contacts by the specified owner(s).

    • Includes only contacts whose owner matches one or more of the given Owner(s).
    • The owner ID corresponds to contact_id in the directory.wbt_user table.
    page?: number

    Page number of result records. default(1); offset=(size*(page-1));

    let
    offset = 0
    , page = req.page
    ;
    if (page <= 0)
    page = 1;
    if (page > 1)
    offset = ((page-1)*size);
    // . . .
    q?: string

    Search term: ? - matches any character * - matches 0 or more characters Used to query records within a set of qin fields, eg: name,emails{type},labels etc...

    qin?: string[]

    [Q]uery[IN] is a set of search fields for term q. Default: name{common_name}.

    size?: number

    Limit of result page records count. default(16); limit=(size<=0?-1:size+1);

    const
    default = 16
    , maximum = 32
    ;
    let limit = req.size;
    if (limit <= 0)
    limit = default;
    if (maximum < limit)
    limit = maximum;
    // . . .
    sort?: string[]

    Sort result dataset of records by fields.

    sort ::= *( ORDER name )

    ORDER = ASC / DESC
    DESC = "-" / "!"
    ASC = [ "+" ] ; Default

    Fields available

    • id(seq)
    • domain{name}
    • created_at
    • created_by{name}
    • updated_at
    • updated_by{name}

    Use ?fields=field.sort() option to sort Edge fields.

    user?: boolean

    Filters contacts based on whether they are user-associated.

    • true → Includes only user-associated contacts.
    • false → Includes only contacts that are NOT user-associated.
    • A contact is considered user-associated if it exists in directory.wbt_user.