---
title: Enums
description: Enums protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

Aggregation functions used across query, data-engine, analytics, field

<Callout type="info">
**Source:** `packages/spec/src/shared/enums.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { AggregationFunctionEnum, CacheStrategyEnum, IsolationLevelEnum, MutationEventEnum, SortDirectionEnum, SortItem } from '@objectstack/spec/shared';
import type { AggregationFunctionEnum, CacheStrategyEnum, IsolationLevelEnum, MutationEventEnum, SortDirectionEnum, SortItem } from '@objectstack/spec/shared';

// Validate data
const result = AggregationFunctionEnum.parse(data);
```

---

## AggregationFunctionEnum

Standard aggregation functions

### Allowed Values

* `count`
* `sum`
* `avg`
* `min`
* `max`
* `count_distinct`
* `percentile`
* `median`
* `stddev`
* `variance`


---

## CacheStrategyEnum

Cache eviction strategy

### Allowed Values

* `lru`
* `lfu`
* `ttl`
* `fifo`


---

## IsolationLevelEnum

Transaction isolation levels (snake_case standard)

### Allowed Values

* `read_uncommitted`
* `read_committed`
* `repeatable_read`
* `serializable`
* `snapshot`


---

## MutationEventEnum

Data mutation event types

### Allowed Values

* `insert`
* `update`
* `delete`
* `upsert`


---

## SortDirectionEnum

Sort order direction

### Allowed Values

* `asc`
* `desc`


---

## SortItem

Sort field and direction pair

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **field** | `string` | ✅ | Field name to sort by |
| **order** | `Enum<'asc' \| 'desc'>` | ✅ | Sort direction |


---

