---
title: "SpecMember"
description: "The `SpecMember` entity."
section: "Reference"
group: "Types"
order: 210
---

## Definition

```ts
interface SpecMember {
  id: string;
  specId: string;
  entityId: string;
  memberKind:
    | "function"
    | "trigger"
    | "schema-input"
    | "schema-output"
    | "tool";
  operationRef: string | null;
  addedBy: string;
  deletedAt: string | null;
  retentionTier: "short" | "medium" | "long" | "none" | null;
  addedAt: string;
}
```

## Fields

| Field           | Type                                                                     | Notes                                                                                                                                                            |
| --------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`            | `string`                                                                 | `readonly` `required`                                                                                                                                            |
| `specId`        | `string`                                                                 | `required` — Parent spec.                                                                                                                                        |
| `entityId`      | `string`                                                                 | `required` — Polymorphic prefixed ID of the generated entity. Entity type is derived via `detectEntityType`.                                                     |
| `memberKind`    | `"function" \| "trigger" \| "schema-input" \| "schema-output" \| "tool"` | `required`                                                                                                                                                       |
| `operationRef`  | `string \| null`                                                         | `required` — OpenAPI operationId (or `${method}:${path}` fallback) the entity was generated from. Populated for `function` and `schema-*` kinds; null otherwise. |
| `addedBy`       | `string`                                                                 | `required` — User whose action created this membership (typically the spec creator at ingest time).                                                              |
| `deletedAt`     | `string \| null`                                                         | `required` — ISO-8601 timestamp of soft-removal; null while active. Soft-removed when refresh drops the underlying operation.                                    |
| `retentionTier` | `"short" \| "medium" \| "long" \| "none" \| null`                        | `required` — Retention tier snapshotted at soft-remove time.                                                                                                     |
| `addedAt`       | `string`                                                                 | `required`                                                                                                                                                       |
