Skip to content
SurfaceDocs
FRGet started
DocsModel reference

WorkspaceExactData · types

Interfaces, values and named contracts for WorkspaceExactData.

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.

ManagedExactDataValueType

Declared numeric value type and unit used to type the expression program.

export type ManagedExactDataValueType = z.infer<typeof managedExactDataValueTypeSchema>;

ManagedExactDataExpression

Typed numeric syntax has no scripts, arbitrary function names or unregistered conversion operators.

export type ManagedExactDataExpression =
  | { kind: 'literal'; type: ManagedExactDataValueType; value: string }
  | { kind: 'field'; type: ManagedExactDataValueType; field: ExactFieldReference }
  | { kind: 'calculation'; type: ManagedExactDataValueType; key: string }
  | {
      kind: 'arithmetic';
      operator: 'add' | 'subtract' | 'multiply' | 'divide';
      left: ManagedExactDataExpression;
      right: ManagedExactDataExpression;
      type: ManagedExactDataValueType;
      rounding: Rounding | null;
      unitOperation: { key: string; version: string } | null;
    }
  | {
      kind: 'round';
      operand: ManagedExactDataExpression;
      type: ManagedExactDataValueType;
      rounding: Rounding;
    }
  | {
      kind: 'conditional';
      condition: ManagedExactDataPredicate;
      whenTrue: ManagedExactDataExpression;
      whenFalse: ManagedExactDataExpression;
      type: ManagedExactDataValueType;
    }
  | {
      kind: 'conversion';
      conversionKey: string;
      conversionVersion: string;
      operand: ManagedExactDataExpression;
      type: ManagedExactDataValueType;
    }
  | {
      kind: 'query-total';
      queryKey: string;
      parameters: Record<string, z.infer<typeof workspaceQueryBindingSchema>>;
      operator: 'count' | 'count-distinct';
      type: ManagedExactDataValueType;
    }
  | {
      kind: 'aggregate';
      queryKey: string;
      parameters: Record<string, z.infer<typeof workspaceQueryBindingSchema>>;
      field: ExactFieldReference;
      operator: 'sum' | 'min' | 'max' | 'average';
      type: ManagedExactDataValueType;
      rounding: Rounding | null;
    };

ManagedExactDataPredicate

Boolean conditions compare typed exact values; truthiness never substitutes for an explicit comparison.

Field Options / expected values Description
kind "compare" Required. Selects the variant and the properties admitted in this branch.
operator "eq" | "ne" | "lt" | "lte" | "gt" | "gte" Required. Variant comparison or operation; its value must match the expected type.
left ManagedExactDataExpression Required. Defines left for this object. Observe the type, variants and bounds in the Options column.
right ManagedExactDataExpression Required. Defines right for this object. Observe the type, variants and bounds in the Options column.
export interface ManagedExactDataPredicate {
  kind: 'compare';
  operator: 'eq' | 'ne' | 'lt' | 'lte' | 'gt' | 'gte';
  left: ManagedExactDataExpression;
  right: ManagedExactDataExpression;
}

WorkspaceExactData

Admitted units, conversions and calculations; evaluation belongs to the shared numeric engine.

export type WorkspaceExactData = z.infer<typeof workspaceExactDataSchema>;

All references

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.

  1. Client identity
  2. Notes and follow-up
  3. Settings
  4. Linked quotes
ILLUSTRATIVE LAYOUTClients / Quotes app
SurfaceClients / North StudioExample
WorkspaceExactData · typesRequired text and business choices
Clients
NS
North StudioActive client · Professional services
StatusActive
Notes and follow-up

The client wants a proposal for a new project. Clarify requirements and confirm the budget before review.

Editable text on the Surface
Record settings
Search for a concept, field or action.Esc