|
1 | 1 | --- |
2 | 2 | title: Field Value schema — Data Protocol reference |
3 | 3 | navTitle: Field Value |
4 | | -description: "Field runtime VALUE-shape contract. Reference for Address, AddressValue, CalendarDateValue, ClockTimeValue and 7 more: every property with its type and default." |
| 4 | +description: "Field runtime VALUE-shape contract. Reference for Address, AddressValue, CalendarDateValue, ClockTimeValue and 8 more: every property with its type and default." |
5 | 5 | --- |
6 | 6 |
|
7 | 7 | {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} |
@@ -41,8 +41,8 @@ this contract has (ADR-0104 performance budget). |
41 | 41 | ## TypeScript Usage |
42 | 42 |
|
43 | 43 | ```typescript |
44 | | -import { AddressSchema, AddressValueSchema, CalendarDateValueSchema, ClockTimeValueSchema, FileLikeValueSchema, FileReferenceIdValueSchema, FileRefusedValueSchema, FileValueSchema, InstantValueSchema, LocationValueSchema, ReferenceIdValueSchema } from '@objectstack/spec/data'; |
45 | | -import type { Address, AddressValue, CalendarDateValue, ClockTimeValue, FileLikeValue, FileReferenceIdValue, FileRefusedValue, FileValue, InstantValue, LocationValue, ReferenceIdValue } from '@objectstack/spec/data'; |
| 44 | +import { AddressSchema, AddressValueSchema, CalendarDateValueSchema, ClockTimeValueSchema, FileLikeValueSchema, FileReferenceIdValueSchema, FileRefusedValueSchema, FileValueSchema, InstantValueSchema, LocationValueSchema, ReferenceIdValueSchema, ReferenceNameOnlyValueSchema } from '@objectstack/spec/data'; |
| 45 | +import type { Address, AddressValue, CalendarDateValue, ClockTimeValue, FileLikeValue, FileReferenceIdValue, FileRefusedValue, FileValue, InstantValue, LocationValue, ReferenceIdValue, ReferenceNameOnlyValue } from '@objectstack/spec/data'; |
46 | 46 |
|
47 | 47 | // Validate data |
48 | 48 | const result = AddressSchema.parse(data); |
@@ -193,3 +193,16 @@ Type: `string` |
193 | 193 |
|
194 | 194 | --- |
195 | 195 |
|
| 196 | +## ReferenceNameOnlyValue |
| 197 | + |
| 198 | +### Properties |
| 199 | + |
| 200 | +| Property | Type | Required | Description | |
| 201 | +| :--- | :--- | :--- | :--- | |
| 202 | +| **id** | `string` | ✅ | The id of the referenced record, as the referencing record holds it | |
| 203 | +| **name** | `string` | ✅ | The referenced record's display name (its object's `nameField`, else `displayNameField`, else the derived title field), or the `Record #` floor with the id where a field-level rule on that field holds | |
| 204 | +| **readRefused** | `true` | ✅ | The reader was refused the referenced record (the object's read gate or its row scope): only its id and display name are served, and the name links nothing. Distinct from an expanded record and from a bare id. | |
| 205 | + |
| 206 | + |
| 207 | +--- |
| 208 | + |
0 commit comments