ManagedTypedValue · types
Interfaces, values and named contracts for ManagedTypedValue.
The following types define named objects and their relationships. Tables include inherited properties. Schema-derived types refer to their validated structures; a TypeScript declaration does not replace the compiler’s semantic checks.
ManagedIntegerValueSchema
Exact integers have their own declared bounds, not an implicit decimal scale or unsafe JSON number.
| Field | Options / expected values | Description |
|---|---|---|
kind |
"integer" |
Required. Selects the variant and the properties admitted in this branch. |
minimum |
string |
Required. Cardinality or budget bound for the named resource. Exceeding the bound is refused; null denotes no bound only where admitted by the schema. |
maximum |
string |
Required. Cardinality or budget bound for the named resource. Exceeding the bound is refused; null denotes no bound only where admitted by the schema. |
unit |
{ kind: "dimensionless"; } | { kind: "unit"; key: string; } | { kind: "currency"; key: string; } |
Required. Defines unit for this object. Observe the type, variants and bounds in the Options column. |
export interface ManagedIntegerValueSchema {
readonly kind: 'integer';
readonly minimum: string;
readonly maximum: string;
readonly unit: ManagedExactDataUnit;
}
ManagedApproximateRealValueSchema
Approximation is explicitly binary64; tolerances are comparison policy, never input rounding.
| Field | Options / expected values | Description |
|---|---|---|
kind |
"real" |
Required. Selects the variant and the properties admitted in this branch. |
representation |
"binary64" |
Required. Defines representation for this object. Observe the type, variants and bounds in the Options column. |
precisionBits |
53 |
Required. Defines precision Bits for this object. Observe the type, variants and bounds in the Options column. |
minimum |
number |
Required. Cardinality or budget bound for the named resource. Exceeding the bound is refused; null denotes no bound only where admitted by the schema. |
maximum |
number |
Required. Cardinality or budget bound for the named resource. Exceeding the bound is refused; null denotes no bound only where admitted by the schema. |
tolerance |
{ readonly absolute: number; readonly relative: number; } |
Required. Defines tolerance for this object. Observe the type, variants and bounds in the Options column. |
unit |
{ kind: "dimensionless"; } | { kind: "unit"; key: string; } |
Required. Defines unit for this object. Observe the type, variants and bounds in the Options column. |
export interface ManagedApproximateRealValueSchema {
readonly kind: 'real';
readonly representation: 'binary64';
readonly precisionBits: 53;
readonly minimum: number;
readonly maximum: number;
readonly tolerance: { readonly absolute: number; readonly relative: number };
readonly unit: Exclude<ManagedExactDataUnit, { kind: 'currency' }>;
}
ManagedChoiceValueSchema
Labels have stable authored language keys; the selected label locale must exist for every choice.
| Field | Options / expected values | Description |
|---|---|---|
kind |
"choice" |
Required. Selects the variant and the properties admitted in this branch. |
labelLocale |
string |
Required. Defines label Locale for this object. Observe the type, variants and bounds in the Options column. |
choices |
readonly { readonly key: string; readonly labels: Readonly<Record<string, string>>; }[] |
Required. Defines choices for this object. Observe the type, variants and bounds in the Options column. |
export interface ManagedChoiceValueSchema {
readonly kind: 'choice';
readonly labelLocale: string;
readonly choices: readonly { readonly key: string; readonly labels: Readonly<Record<string, string>> }[];
}
ManagedTypedValueSchema
Closed value trees cannot declare identities, rights, Links, content kinds or arbitrary JSON branches.
export type ManagedTypedValueSchema =
| { readonly kind: 'text'; readonly minimumLength: number; readonly maximumLength: number }
| { readonly kind: 'boolean' }
| ManagedIntegerValueSchema
| ManagedApproximateRealValueSchema
| ManagedChoiceValueSchema
| { readonly kind: 'decimal'; readonly precision: number; readonly scale: number; readonly unit: ManagedExactDataUnit;
readonly minimum?: string | undefined; readonly maximum?: string | undefined }
| { readonly kind: 'object'; readonly properties: readonly {
readonly key: string; readonly required: boolean; readonly nullable: boolean;
readonly schema: ManagedTypedValueSchema;
}[] }
| { readonly kind: 'list'; readonly minimumItems: number; readonly maximumItems: number;
readonly itemsNullable: boolean; readonly items: ManagedTypedValueSchema };
type ManagedTypedValueSchema = ManagedIntegerValueSchema | ManagedApproximateRealValueSchema | ManagedChoiceValueSchema | { readonly kind: "text"; readonly minimumLength: number; readonly maximumLength: number; } | { readonly kind: "boolean"; } | { readonly kind: "decimal"; readonly precision: number; readonly scale: number; readonly unit: ManagedExactDataUnit; readonly minimum?: string | undefined; readonly maximum?: string | undefined; } | { readonly kind: "object"; readonly properties: readonly { readonly key: string; readonly required: boolean; readonly nullable: boolean; readonly schema: ManagedTypedValueSchema; }[]; } | { readonly kind: "list"; readonly minimumItems: number; readonly maximumItems: number; readonly itemsNullable: boolean; readonly items: ManagedTypedValueSchema; };
ManagedTypedValue
Canonical JSON primitives and closed composites retain null, empty objects/lists, false and zero distinctly.
export type ManagedTypedValue = string | number | boolean | null | readonly ManagedTypedValue[] | { readonly [key: string]: ManagedTypedValue };
type ManagedTypedValue = string | number | boolean | readonly ManagedTypedValue[] | { readonly [key: string]: ManagedTypedValue; } | null;
ManagedTypedFieldV2
A Field’s presence and outer repeatability remain separate from its typed value’s own list schema.
| Field | Options / expected values | Description |
|---|---|---|
contract |
"ManagedTypedField@2" |
Required. Exact discriminant of this contract variant. Match the literal value shown. |
key |
string |
Required. Stable semantic identifier used by references; changing it changes identity. |
type |
"object" | "choice" | "integer" | "real" | "list" |
Required. Defines type for this object. Observe the type, variants and bounds in the Options column. |
required |
boolean |
Required. Whether a value is required by this declaration. |
repeatable |
boolean |
Required. Whether multiple values or instances are admitted. |
nullable |
boolean |
Required. Defines nullable for this object. Observe the type, variants and bounds in the Options column. |
schema |
ManagedIntegerValueSchema | ManagedApproximateRealValueSchema | ManagedChoiceValueSchema | { readonly kind: "object"; readonly properties: readonly { readonly key: string; readonly required: boolean; readonly nullable: boolean; readonly schema: ManagedTypedValueSchema; }[]; } | { readonly kind: "list"; readonly minimumItems: number; readonly maximumItems: number; readonly itemsNullable: boolean; readonly items: ManagedTypedValueSchema; } |
Required. Defines schema for this object. Observe the type, variants and bounds in the Options column. |
default |
ManagedTypedValue | undefined |
Optional. Initial value matching the declared type; does not replace an existing saved value. |
export interface ManagedTypedFieldV2 {
readonly contract: 'ManagedTypedField@2';
readonly key: string;
readonly type: 'integer' | 'real' | 'choice' | 'object' | 'list';
readonly required: boolean;
readonly repeatable: boolean;
readonly nullable: boolean;
readonly schema: Exclude<ManagedTypedValueSchema, { kind: 'text' | 'boolean' | 'decimal' }>;
readonly default?: ManagedTypedValue | undefined;
}
Applied examples : Required text and business choices
Company uses required text input; Status uses a declared list of choices.
Configuration
Fragment placed in forms[].fields[]. Properties and accepted values.
{
"contract": "WorkspaceFormControl@2",
"repeatable": false,
"key": "company",
"label": "Company",
"input": "text",
"binding": {
"kind": "field",
"fieldKey": "company"
},
"required": true,
"ruleKeys": [],
"options": []
}
Variation and connection
Fragment placed in forms[].fields[]. Properties and accepted values.
{
"contract": "WorkspaceFormControl@2",
"repeatable": false,
"key": "status",
"label": "Status",
"input": "choice",
"binding": {
"kind": "field",
"fieldKey": "status"
},
"required": true,
"ruleKeys": [],
"options": [
"prospect",
"active"
]
}
UI layout example
The illustrative layout below places this configuration in the Clients/Quotes app. Insert each fragment at the stated location, with Field, Query and Action references matching the Model declarations.
- Client identity
- Notes and follow-up
- Settings
- Linked quotes
The client wants a proposal for a new project. Clarify requirements and confirm the budget before review.
Editable text on the Surface