---
title: "FunctionVersion"
description: "The `FunctionVersion` entity."
section: "Reference"
group: "Types"
order: 107
---

## Definition

```ts
interface FunctionVersion {
  id: string;
  functionId: string;
  name: string;
  parentId: string | null;
  inputSchemaId: string;
  outputSchemaId: string;
  files: Array<{ id: string; name: string; source: string; createdAt: string }>;
  createdAt: string;
  updatedAt: string;
}
```

## Fields

| Field            | Type                                                                      | Notes                                                                                                                                                                                 |
| ---------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`             | `string`                                                                  | `readonly` `required`                                                                                                                                                                 |
| `functionId`     | `string`                                                                  | `required` — Function this version belongs to.                                                                                                                                        |
| `name`           | `string`                                                                  | `required` — Version label (e.g. 'v1', 'experiment').                                                                                                                                 |
| `parentId`       | `string \| null`                                                          | `required` — Version this one was forked from; null for the initial version.                                                                                                          |
| `inputSchemaId`  | `string`                                                                  | `required` — Schema enforced on function input.                                                                                                                                       |
| `outputSchemaId` | `string`                                                                  | `required` — Schema the function is expected to produce.                                                                                                                              |
| `files`          | `Array<{ id: string; name: string; source: string; createdAt: string; }>` | `required` — Source files captured at the time this version was created. The runtime bundler resolves any `package.json` deps and compiles TS/JS to a Worker Loader bundle on demand. |
| `createdAt`      | `string`                                                                  | `readonly` `required` — ISO-8601 timestamp of creation.                                                                                                                               |
| `updatedAt`      | `string`                                                                  | `readonly` `required` — ISO-8601 timestamp of the last update.                                                                                                                        |
