Search uses a structured JSON body under the search key.
final res = await repo.search(
text: TextSearch(value: 'example'),
page: 1,
limit: 20,
scopes: [Scope(name: 'active')],
filters: [
// Explicit null is supported
Filter(field: 'status', operator: '=', value: null),
],
sorts: [Sort(field: 'created_at', direction: 'desc')],
selects: [Select(field: 'id'), Select(field: 'name')],
includes: [
Include(
relation: 'author',
selects: [Select(field: 'id'), Select(field: 'name')],
includes: [Include(relation: 'company')],
),
],
aggregates: [
Aggregate(relation: 'comments', type: 'count', field: 'id'),
],
instructions: [
Instruction(
name: 'customInstruction',
fields: [
InstructionField(field: 'flag', value: true),
InstructionField(field: 'note', value: null),
],
),
],
);
Filter.value can be null and will be sent explicitly in JSON.page + limit.