ReferenceSchema
ExtractRecord
Extract the record type from an ObjectBuilder instance Includes support for custom attributes added via UI Also includes system metadata (id, createdAt, updatedAt)
Extract the record type from an ObjectBuilder instance Includes support for custom attributes added via UI Also includes system metadata (id, createdAt, updatedAt)
Signature
anyType
Prop
Type
Examples
```typescript
const PRODUCT = object({ name: "products", label: "Product" })
.attribute(text({ name: "name", label: "Name" }).required())
.attribute(number({ name: "price", label: "Price" }));
type ProductRecord = ExtractRecord<typeof PRODUCT>;
// → { id?: string; createdAt?: Date; updatedAt?: Date; name: string; price?: number } & { [key: string]: CustomAttributeValue }
const product: ProductRecord = {
id: "rec-123",
name: "Nike Air Max",
price: 129.99,
customField: "added via UI", // ✅ Allowed
};