---
id: "packages/active-grid/api/capability-contract"
title: "Capability contract"
description: "GridServerAggregateOp, GridServerCapabilities, GridServerFilterCapability, GridServerFilterType: generated from the source of active-grid."
url: "/packages/active-grid/api/capability-contract"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:capability-contract"
---

# Capability contract

Exported by `@workspace/active-grid`. Generated from the package source; part of [the index of every export](/packages/active-grid/api).

## Types

**GridServerAggregateOp**

```ts
type GridServerAggregateOp = 'sum' | 'avg' | 'min' | 'max' | 'count';
```

Mirror of `active-resources`' `AggregateOp`.

**GridServerCapabilities**

```ts
interface GridServerCapabilities {
  filter: Record<string, GridServerFilterCapability>;
  sort: string[];
  group: string[];
  aggregate: Record<string, GridServerAggregateOp[]>;
  search: boolean;
  presets: string[];
}
```

Server-declared UI capabilities for a resource-backed grid. FULL structural
mirror of `active-resources`' `ResourceCapabilities` — a consumer passes
the resource capability map straight through, nothing is narrowed away:
operators, filterType, nullable, aggregate, search and presets all reach
the client.

This is the single source of a resource grid's interaction surface, down
to operator granularity. When present it REPLACES the per-column
`column.server` contract: the setup synthesizes an internal contract from
it (`applyCapabilityContract`) so enable-flag resolution and the
hydration pruning run unchanged, and stamps the per-field filter
capability on `column.meta` so the filter components derive their
operators, filter semantics and nullability from the map instead of the
built-in per-type defaults.

**GridServerFilterCapability**

```ts
interface GridServerFilterCapability {
  filterType: GridServerFilterType;
  nullable?: boolean;
  nullValueToken?: string;
  operators: FilterOperator[];
}
```

Per-field filter capability as the server declares it. Structural mirror of
`active-resources`' `ResourceCapabilities['filter'][string]` — the grid
stays decoupled (no import); the contract-parity test in `active-actions`
asserts the two types stay identical.

**GridServerFilterType**

```ts
type GridServerFilterType =
  'text' | 'number' | 'date' | 'boolean' | 'select';
```

Server-side filter type vocabulary — mirror of `active-resources`'
`FieldFilterType`. Deliberately narrower than the grid's own
`ColumnFilterType` (no `'interval'`): the server declares what a field IS,
the column declares how it renders.
