Skip to content
SurfaceDocs
FRGet started
DocsModel reference

SurfaceCompositionBindings · types

Interfaces, values and named contracts for SurfaceCompositionBindings.

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.

SurfaceCompositionQueryBinding

The runtime session resolves this declaration to its exact native read context.

export type SurfaceCompositionQueryBinding = z.infer<typeof surfaceCompositionQueryBindingSchema>;

SurfaceCompositionModelReferences

Native Model validation produces these facts; this package neither parses a Model nor grants access.

Field Options / expected values Description
workExperiences readonly { readonly key: string; readonly defaultSectionKey: string; readonly sections: readonly { readonly key: string; readonly bindingKeys: readonly string[]; }[]; readonly bindings: readonly ({ readonly key: string; readonly kind: "query-view" | "native-document" | "sources" | "flow-inspection"; readonly scope: "rootWork" | "selectedStage" | "retainedTarget"; } | { readonly key: string; readonly kind: "action"; readonly scope: "rootWork" | "selectedStage" | "retainedTarget"; readonly actionKey: string; } | { readonly key: string; readonly kind: "consolidation"; readonly scope: "rootWork" | "selectedStage" | "retainedTarget"; readonly profileKey: string; } | { readonly key: string; readonly kind: "criteria"; readonly scope: "rootWork" | "selectedStage" | "retainedTarget"; readonly lifecycleKey: string; readonly stateValue: string; })[]; }[] Required. Defines work Experiences for this object. Observe the type, variants and bounds in the Options column.
records readonly { readonly key: string; readonly definitionPaths: readonly string[]; readonly settingsFieldPaths: readonly string[]; readonly metricKeys: readonly string[]; readonly relatedGroupKeys: readonly string[]; readonly tags: boolean; readonly contentKinds: readonly string[]; }[] Required. Defines records for this object. Observe the type, variants and bounds in the Options column.
fields readonly { readonly recordProfileKey: string; readonly fieldPath: string; readonly type: string; readonly repeatable: boolean; readonly formKey: string; readonly controlKey: string; readonly placement: "surface" | "settings"; }[] Required. Typed value definitions or selections within the enclosing context.
queries readonly { readonly placement: SurfaceCompositionQueryBinding; readonly queryKey: string; readonly viewKind: string; readonly definitionPaths: readonly string[]; }[] Required. Named reads with admitted sources, parameters and operations.
actions readonly { readonly key: string; readonly definitionPaths: readonly string[]; }[] Required. Application operations offered by views according to context and permissions.
icons Managed by Surface; supplied by the Model tools. Required. Defines icons for this object. Observe the type, variants and bounds in the Options column.

All references

Applied examples : Quotes for the current client

The Query declares clientId; the binding supplies the identity of the open record.

Configuration

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

{
  "contract": "WorkspaceQuery@1",
  "key": "client-quotes",
  "label": "Client quotes",
  "spaceKeys": [
    "quotes"
  ],
  "definitionPaths": [
    "workspace/quotes/surface/quote"
  ],
  "parameters": [
    {
      "key": "clientId",
      "type": "node-id",
      "required": true
    }
  ],
  "predicates": [],
  "relations": [
    {
      "linkTypePath": "application/client",
      "direction": "outgoing",
      "parameterKey": "clientId",
      "distinct": true
    }
  ],
  "orderBy": [
    {
      "fieldKey": "updatedAt",
      "direction": "descending"
    }
  ],
  "aggregate": "none",
  "pageSize": 25,
  "maximumDepth": 1
}

Variation and connection

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

{
  "key": "client-quotes",
  "queryKey": "client-quotes",
  "parameters": {
    "clientId": {
      "kind": "entity-id",
      "definitionPath": "workspace/clients/surface/client"
    }
  }
}

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. Number
  2. Status
  3. Amount
  4. Last updated
ILLUSTRATIVE LAYOUTClients / Quotes app
SurfaceClients / North StudioExample
SurfaceCompositionBindings · typesQuotes for the current client
Clients
Client : North StudioStatus: All ⌄Search…
NumberStatusAmountOpen
S-1042Draft12 500↗
S-1041Approved8 200↗
S-1040Sent4 750↗
Client Query resultsNext page →
Search for a concept, field or action.Esc