Lime Web Components API Documentation - v7.4.0
    Preparing search index...

    Interface Query

    Query configuration for loading objects from the Lime CRM database.

    A Query defines what data to retrieve, how to filter it, and how to format the response. Used primarily with QueryService to execute complex queries with filtering, sorting, pagination, and aggregation.

    The query system supports:

    • Complex filter expressions with AND/OR/NOT logic
    • Multiple sort orders
    • Pagination via limit/offset
    • Aggregate calculations (COUNT, SUM, AVG, etc.)

    Define the query inline or with satisfies Query to keep the literal responseFormat that QueryResponse infers the response shape from.

    import { Operator, Query } from '@limetech/lime-web-components';

    const query = {
    limetype: 'deal',
    filter: {
    key: 'status',
    op: Operator.EQUALS,
    exp: 'active',
    },
    responseFormat: {
    object: { name: null, value: null },
    },
    } satisfies Query;
    import { Operator, Query } from '@limetech/lime-web-components';

    const secondPage = {
    limetype: 'deal',
    limit: 25,
    offset: 25,
    filter: {
    key: 'value',
    op: Operator.GREATER_OR_EQUAL,
    exp: 100_000,
    },
    orderBy: [{ name: 'value', direction: 'DESC' }],
    responseFormat: {
    object: { name: null, value: null },
    },
    } satisfies Query;
    interface Query {
        filter?: Expression;
        limetype: string;
        limit?: number;
        offset?: number;
        orderBy?: PropertyOrder[];
        responseFormat: QueryResponseFormat;
    }
    Index

    Properties

    filter?: Expression

    Filter expression to limit which objects are returned.

    Expression for building filter conditions

    limetype: string

    Name of the limetype to query.

    limit?: number

    Maximum number of objects to return.

    offset?: number

    Number of objects to skip before starting to return results.

    orderBy?: PropertyOrder[]

    Properties to sort by with their sort direction.

    responseFormat: QueryResponseFormat

    Defines what data to include in the response.