---
title: "ManagedModelSource · types"
url: https://developers.dagio.ai/reference/types-managed-model-source/
---

# ManagedModelSource · types

   
                                   
                                                                             
                                            
                  
           
          
   

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.

## ManagedSurfaceVisibility

Closed visibility values authored by managed Surface Models.

```typescript
export type ManagedSurfaceVisibility = 'normal' | 'knowledge' | 'operational' | 'system';
```

```typescript
type ManagedSurfaceVisibility = "knowledge" | "normal" | "operational" | "system";
```

## ManagedAnchorPolicy

Closed Anchor protection values compiled into every Surface definition.

```typescript
export type ManagedAnchorPolicy = 'none' | 'structure' | 'section';
```

```typescript
type ManagedAnchorPolicy = "none" | "section" | "structure";
```

## ManagedSurfaceFieldType

Scalar storage types supported by Model-declared Surface Fields.

```typescript
export type ManagedSurfaceFieldType = 'boolean' | 'date' | 'datetime' | 'number' | 'text';
```

```typescript
type ManagedSurfaceFieldType = "number" | "boolean" | "text" | "date" | "datetime";
```

## ManagedScalarFieldDefinition

One closed Field definition owned by a Surface definition in a Model Revision.

| Field | Options / expected values | Description |
| --- | --- | --- |
| `key` | `string` | **Required.** Stable semantic identifier used by references; changing it changes identity. |
| `type` | `ManagedSurfaceFieldType` | **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. |
| `default` | `string \| number \| boolean \| readonly (string \| number \| boolean)[] \| undefined` | Optional. Initial value matching the declared type; does not replace an existing saved value. |
| `options` | `readonly string[] \| undefined` | Optional. Suggested and admitted values for a declared choice. |

```typescript
export interface ManagedScalarFieldDefinition {
  key: string;
  type: ManagedSurfaceFieldType;
  required: boolean;
  repeatable: boolean;
  default?: boolean | number | string | readonly (boolean | number | string)[];
  options?: readonly string[];
}
```

## ManagedAnchorPrototype

One stable Anchor prototype and its exact structural/cardinality policy.

| Field | Options / expected values | Description |
| --- | --- | --- |
| `prototypeId` | `string` | **Required.** Stable Anchor prototype identity used by its instances. |
| `parentPrototypeId` | `string \| null` | **Required.** Parent prototype or null for an admitted root. |
| `level` | `1 \| 3 \| 4 \| 2` | **Required.** Anchor structural depth in the admitted hierarchy. |
| `title` | `string` | **Required.** Title of the object or section in the interface. |
| `protection` | `ManagedAnchorPolicy` | **Required.** Content or structure protection checked during operations. |
| `repeatable` | `boolean` | **Required.** Whether multiple values or instances are admitted. |
| `minimumInstances` | `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. |
| `maximumInstances` | `number \| null` | **Required.** Cardinality or budget bound for the named resource. Exceeding the bound is refused; null denotes no bound only where admitted by the schema. |
| `tagPaths` | `readonly string[]` | **Required.** Defines tag Paths for this object. Observe the type, variants and bounds in the Options column. |

```typescript
export interface ManagedAnchorPrototype {
  prototypeId: string;
  parentPrototypeId: string | null;
  level: 1 | 2 | 3 | 4;
  title: string;
  protection: ManagedAnchorPolicy;
  repeatable: boolean;
  minimumInstances: number;
  maximumInstances: number | null;
  tagPaths: readonly string[];
}
```

## ManagedSurfaceFieldDefinition

Current Fields preserve scalar, exact-decimal and typed-value storage semantics.

```typescript
export type ManagedSurfaceFieldDefinition =
  ManagedScalarFieldDefinition | ManagedNumericFieldV2 | ManagedTypedFieldV2;
```

```typescript
type ManagedSurfaceFieldDefinition = ManagedScalarFieldDefinition | { contract: "ManagedNumericField@2"; key: string; type: "decimal"; required: boolean; repeatable: boolean; precision: number; scale: number; unit: { kind: "dimensionless"; } | { kind: "unit"; key: string; } | { kind: "currency"; key: string; }; default?: string | string[] | undefined; minimum?: string | undefined; maximum?: string | undefined; } | ManagedTypedFieldV2;
```

## ManagedSurfaceSource

Complete Surface declaration; Canvas content and policy use their sole current native owner.

| Field | Options / expected values | Description |
| --- | --- | --- |
| `key` | `string` | **Required.** Stable semantic identifier used by references; changing it changes identity. |
| `tagPath` | `string` | **Required.** Structural tag path identifying a type; distinct from record user tags. |
| `title` | `string` | **Required.** Title of the object or section in the interface. |
| `description` | `string` | **Required.** Explanation of this element’s purpose, content or effect. |
| `seed` | `boolean` | **Required.** Provisions initial content rather than only declaring an instance type. |
| `role` | `string \| undefined` | Optional. Semantic role recognized by this contract; not an access grant. |
| `visibility` | `ManagedSurfaceVisibility` | **Required.** Determines presentation visibility or category using this variant’s values. |
| `contentKind` | `"document" \| "canvas" \| "asset" \| "markdown"` | **Required.** Selects the native content engine and corresponding format. |
| `content` | `unknown` | **Required.** Native content matching the selected type and profile; not a UI composition. |
| `canvasPolicy` | `CanvasPolicy \| undefined` | Optional. Policy governing admitted Canvas operations and capabilities. |
| `assetPolicy` | `SurfaceAssetPolicy \| undefined` | Optional. Policy for Asset formats, sources, dimensions and budgets. |
| `anchorPolicy` | `ManagedAnchorPolicy` | **Required.** Structural protection applied to the Surface root Anchor. |
| `fields` | `readonly ManagedSurfaceFieldDefinition[]` | **Required.** Typed value definitions or selections within the enclosing context. |
| `anchors` | `readonly ManagedAnchorPrototype[]` | **Required.** Document section prototypes with identity, protection and cardinality. |
| `children` | `readonly ManagedSurfaceSource[]` | **Required.** Ordered child elements with admitted types and references. |

```typescript
export interface ManagedSurfaceSource {
  key: string;
  tagPath: string;
  title: string;
  description: string;
  seed: boolean;
  role?: string;
  visibility: ManagedSurfaceVisibility;
  contentKind: 'document' | 'markdown' | 'canvas' | 'asset';
  content: unknown;
  canvasPolicy?: CanvasPolicy;
  assetPolicy?: SurfaceAssetPolicy;
  anchorPolicy: ManagedAnchorPolicy;
  fields: readonly ManagedSurfaceFieldDefinition[];
  anchors: readonly ManagedAnchorPrototype[];
  children: readonly ManagedSurfaceSource[];
}
```

## ManagedWorkspaceSource

One Workspace definition whose Surface hierarchy uses the v3 structural contract.

| Field | Options / expected values | Description |
| --- | --- | --- |
| `key` | `string` | **Required.** Stable semantic identifier used by references; changing it changes identity. |
| `tagPath` | `string` | **Required.** Structural tag path identifying a type; distinct from record user tags. |
| `title` | `string` | **Required.** Title of the object or section in the interface. |
| `description` | `string` | **Required.** Explanation of this element’s purpose, content or effect. |
| `provision` | `"per-principal" \| "per-tenant" \| "on-demand"` | **Required.** Determines whether the container is provisioned per principal, per tenant or on demand. |
| `role` | `"account-home" \| "system-knowledge" \| "knowledge-workspace" \| "work-workspace" \| undefined` | Optional. Semantic role recognized by this contract; not an access grant. |
| `visibility` | `ManagedSurfaceVisibility` | **Required.** Determines presentation visibility or category using this variant’s values. |
| `surfaces` | `readonly ManagedSurfaceSource[]` | **Required.** Root Surface type definitions for the container. |

```typescript
export interface ManagedWorkspaceSource {
  key: string;
  tagPath: string;
  title: string;
  description: string;
  provision: 'per-principal' | 'per-tenant' | 'on-demand';
  role?: 'account-home' | 'system-knowledge' | 'knowledge-workspace' | 'work-workspace';
  visibility: ManagedSurfaceVisibility;
  surfaces: readonly ManagedSurfaceSource[];
}
```

## ManagedModelSource

The only source grammar; an admitted Foundation supplies the application capability.

| Field | Options / expected values | Description |
| --- | --- | --- |
| `contract` | `"ManagedModelSource@1"` | **Required.** Exact discriminant of this contract variant. Match the literal value shown. |
| `id` | `string` | **Required.** Stable object identity; do not use its title as an identifier. |
| `version` | `string` | **Required.** Declared content or publication version identifying the applicable interpretation. |
| `name` | `string` | **Required.** Readable name of the element in its presentation context. |
| `description` | `string` | **Required.** Explanation of this element’s purpose, content or effect. |
| `managed` | `true` | **Required.** Identifies a lifecycle-managed Model source; does not grant user permissions. |
| `capabilities` | `readonly string[]` | **Required.** Declared capabilities needed by the Model; effective availability is checked separately. |
| `presentationRoles` | `Readonly<Record<string, string>>` | **Required.** Maps presentation keys to recognized rendering roles. |
| `linkTypes` | `readonly { path: string; label: string; }[]` | **Required.** Catalog of relation types available to declarations. |
| `workspaces` | `readonly ManagedWorkspaceSource[]` | **Required.** Application container definitions and their Surface types. |
| `appProfiles` | `readonly ModelAppProfile[]` | **Required.** Profiles assembling application experience sections and destinations. |
| `flowBlueprints` | `readonly FlowBlueprint[]` | **Required.** Reusable work definitions and their dependencies. |
| `taskActions` | `readonly TaskActionDefinition[]` | **Required.** Task instruction, input and result definitions. |
| `views` | `readonly ViewDefinition[]` | **Required.** Declared views presenting content within the relevant scope. |
| `searchProjections` | `readonly SearchProjectionDefinition[]` | **Required.** Search projections defining searchable objects and values. |
| `commentProfiles` | `readonly (CommentProfile & { containsLinkTypePath: string; })[]` | **Required.** Profiles for comments, threads and reply relations. |
| `documentProfiles` | `readonly DocumentProfile[]` | **Required.** Document composition, collection and export profiles. |
| `workspaceProjections` | `readonly WorkspaceProjectionDefinitionV2[]` | **Required.** Workspace projections used to organize the Portfolio. |
| `semanticCommands` | `readonly SemanticCommandDefinition[]` | **Required.** Named canonical operations whose parameters and permissions remain checked by their owner. |
| `surfaceViews` | `readonly WorkExperienceSurfaceViewDefinition[]` | **Required.** View declarations available for a Surface and its content. |
| `surfaceViewProfiles` | `readonly SurfaceViewProfile[]` | **Required.** Associates a Surface type with its views and default view. |
| `actionGroups` | `readonly ActionGroupDefinition[]` | **Required.** Groups Action variants presented together in the interface. |
| `dataProtectionProfiles` | `readonly DataProtectionProfile[]` | **Required.** Content classification and policies for search, AI disclosure and export. |
| `vocabulary` | `ProductVocabulary` | **Required.** Business labels shared by app views and operations. |
| `marketplace` | `MarketplaceListingDefinition` | **Required.** Public information presenting the app in the catalog. |
| `foundation` | `Managed by Surface; supplied by the Model tools.` | Optional. Application foundation connecting composition, Forms, Queries, Actions and policies. |

```typescript
export interface ManagedModelSource {
  contract: 'ManagedModelSource@1';
  id: string;
  version: string;
  name: string;
  description: string;
  managed: true;
  capabilities: readonly string[];
  presentationRoles: Readonly<Record<string, string>>;
  linkTypes: readonly { path: string; label: string }[];
  workspaces: readonly ManagedWorkspaceSource[];
  appProfiles: readonly ModelAppProfile[];
  flowBlueprints: readonly FlowBlueprint[];
  taskActions: readonly TaskActionDefinition[];
  views: readonly ViewDefinition[];
  searchProjections: readonly SearchProjectionDefinition[];
  commentProfiles: readonly (CommentProfile & { containsLinkTypePath: string })[];
  documentProfiles: readonly DocumentProfile[];
  workspaceProjections: readonly WorkspaceProjectionDefinitionV2[];
  semanticCommands: readonly SemanticCommandDefinition[];
  surfaceViews: readonly WorkExperienceSurfaceViewDefinition[];
  surfaceViewProfiles: readonly SurfaceViewProfile[];
  actionGroups: readonly ActionGroupDefinition[];
  dataProtectionProfiles: readonly DataProtectionProfile[];
  vocabulary: ProductVocabulary;
  marketplace: MarketplaceListingDefinition;
  foundation?: WorkspaceModelFoundation;
}
```

## ManagedApplicationModel

Application capability is present only after the full Foundation was admitted.

```typescript
export type ManagedApplicationModel = ManagedModelSource & {
  readonly foundation: WorkspaceModelFoundation;
};
```

```typescript
type ManagedApplicationModel = ManagedModelSource & { readonly foundation: WorkspaceModelFoundation; };
```

[All references](https://developers.dagio.ai/reference/)

<!-- surface-examples:start -->

## Applied examples : Assemble a coherent definition

The Form and record profile reference the same company, status and notes Fields.

### Configuration

Fragment placed in `forms[]`. [Properties and accepted values](https://developers.dagio.ai/reference/workspace-model-foundation/).

```json
{
  "contract": "WorkspaceForm@2",
  "key": "new-client",
  "label": "New client",
  "actionKey": "create-client",
  "targetDefinitionPath": "workspace/clients/surface/client",
  "mode": "create",
  "fields": [
    {
      "contract": "WorkspaceFormControl@2",
      "repeatable": false,
      "key": "company",
      "label": "Company",
      "input": "text",
      "binding": {
        "kind": "field",
        "fieldKey": "company"
      },
      "required": true,
      "ruleKeys": [],
      "options": []
    },
    {
      "contract": "WorkspaceFormControl@2",
      "repeatable": false,
      "key": "status",
      "label": "Status",
      "input": "choice",
      "binding": {
        "kind": "field",
        "fieldKey": "status"
      },
      "required": true,
      "ruleKeys": [],
      "options": [
        "prospect",
        "active"
      ]
    }
  ],
  "ruleKeys": []
}
```

### Variation and connection

Fragment placed in `presentation.recordProfiles[]`. [Properties and accepted values](https://developers.dagio.ai/reference/workspace-record-profile/).

```json
{
  "key": "client",
  "definitionPaths": [
    "workspace/clients/surface/client"
  ],
  "editActionKey": "edit-client",
  "identity": {
    "title": {
      "kind": "field",
      "fieldPath": "fields/company"
    },
    "avatar": {
      "kind": "initials",
      "maximumLetters": 2
    },
    "subtitle": {
      "kind": "field",
      "fieldPath": "fields/status"
    }
  },
  "valueLabels": [
    {
      "fieldPath": "fields/status",
      "values": [
        {
          "value": "prospect",
          "label": "Prospect"
        },
        {
          "value": "active",
          "label": "Active"
        }
      ]
    }
  ],
  "card": {
    "summary": {
      "kind": "field",
      "fieldPath": "fields/notes"
    },
    "tags": {
      "namespace": "user",
      "maximumVisible": 3
    },
    "metricKeys": [],
    "openLabel": "Open client"
  },
  "queryBindings": [],
  "metrics": [],
  "detail": {
    "primaryActionKey": null,
    "creationActionKeys": [],
    "actionKeys": [],
    "sections": [
      {
        "kind": "fields",
        "key": "follow-up",
        "label": "Client follow-up",
        "fieldPaths": [
          "fields/notes",
          "fields/status"
        ]
      }
    ],
    "settings": {
      "fieldPaths": [
        "fields/email"
      ]
    },
    "tags": {
      "namespace": "user",
      "maximumVisible": 3
    },
    "relatedGroups": [],
    "primaryActionLabel": 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. Clients · Data
2. References · Knowledge
3. Preparation · Work
4. Quotes · Product

<!-- surface-examples:end -->
