Skip to content

Commit 92acd6d

Browse files
committed
feat(seed): add SeedIdentity context and update TypeScript imports
1 parent cd3ffd2 commit 92acd6d

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

content/docs/references/data/seed-loader.mdx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ relationship resolution, dependency ordering, and multi-pass insertion.
4444
## TypeScript Usage
4545

4646
```typescript
47-
import { DatasetLoadResult, ObjectDependencyGraph, ObjectDependencyNode, ReferenceResolution, ReferenceResolutionError, SeedLoaderConfig, SeedLoaderRequest, SeedLoaderResult } from '@objectstack/spec/data';
48-
import type { DatasetLoadResult, ObjectDependencyGraph, ObjectDependencyNode, ReferenceResolution, ReferenceResolutionError, SeedLoaderConfig, SeedLoaderRequest, SeedLoaderResult } from '@objectstack/spec/data';
47+
import { DatasetLoadResult, ObjectDependencyGraph, ObjectDependencyNode, ReferenceResolution, ReferenceResolutionError, SeedIdentity, SeedLoaderConfig, SeedLoaderRequest, SeedLoaderResult } from '@objectstack/spec/data';
48+
import type { DatasetLoadResult, ObjectDependencyGraph, ObjectDependencyNode, ReferenceResolution, ReferenceResolutionError, SeedIdentity, SeedLoaderConfig, SeedLoaderRequest, SeedLoaderResult } from '@objectstack/spec/data';
4949

5050
// Validate data
5151
const result = DatasetLoadResult.parse(data);
@@ -138,6 +138,20 @@ Actionable error for a failed reference resolution
138138
| **message** | `string` || Human-readable error description |
139139

140140

141+
---
142+
143+
## SeedIdentity
144+
145+
Identity context for resolving os.user / os.org in seed CEL values
146+
147+
### Properties
148+
149+
| Property | Type | Required | Description |
150+
| :--- | :--- | :--- | :--- |
151+
| **user** | `Object` | optional | Subject bound to os.user in seed CEL expressions |
152+
| **org** | `Object` | optional | Organization bound to os.org in seed CEL expressions |
153+
154+
141155
---
142156

143157
## SeedLoaderConfig
@@ -156,6 +170,7 @@ Seed data loader configuration
156170
| **transaction** | `boolean` || Wrap entire load in a transaction (all-or-nothing) |
157171
| **env** | `Enum<'prod' \| 'dev' \| 'test'>` | optional | Only load datasets matching this environment |
158172
| **organizationId** | `string` | optional | Target organization id for per-tenant seed replay |
173+
| **identity** | `Object` | optional | Identity bound to os.user / os.org when resolving CEL seed values |
159174

160175

161176
---

0 commit comments

Comments
 (0)