Skip to content
SurfaceDocs
FRGet started
DocsModel reference

SurfaceRelationPolicy · types

Interfaces, values and named contracts for SurfaceRelationPolicy.

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.

SurfaceRelationPolicy

One versioned relation declaration shared by compiler admission and native mutation.

export type SurfaceRelationPolicy = z.infer<typeof surfaceRelationPolicySchema>;

All references

Applied examples : One client, many quotes

The constraint governs links; the presentation group shows four results and access to the full list.

Configuration

Fragment placed in relationPolicies[]. Properties and accepted values.

{
  "contract": "SurfaceRelationPolicy@1",
  "key": "quote-client",
  "linkTypePath": "application/client",
  "source": {
    "definitionPaths": [
      "workspace/quotes/surface/quote"
    ],
    "fields": []
  },
  "target": {
    "definitionPaths": [
      "workspace/clients/surface/client"
    ],
    "fields": []
  },
  "maximumOutgoing": 1,
  "maximumIncoming": null,
  "acyclic": false,
  "deletion": "forbid",
  "maximumTraversalNodes": 1000
}

Variation and connection

Fragment placed in presentation.recordProfiles[].detail.relatedGroups[]. Properties and accepted values.

{
  "key": "quotes",
  "label": "Quotes",
  "queryBindingKey": "client-quotes",
  "maximumVisible": 4,
  "openAllLabel": "View all quotes",
  "rowIcon": null
}

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. Selected client
  2. Search
  3. Quotes
  4. View all quotes
ILLUSTRATIVE LAYOUTClients / Quotes app
SurfaceClients / North StudioExample
SurfaceRelationPolicy · typesOne client, many quotes
Clients
Quote S-1042
Linked clientNorth Studio
Select a client⌕ Search by name…North Studio ✓
Search for a concept, field or action.Esc