Support the client’s new project with a clear, documented proposal.
surface-asset · types
Interfaces, values and named contracts for surface-asset.
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.
SurfaceAssetMediaType
Native raster formats admitted by the first qualified binary asset protocol.
export type SurfaceAssetMediaType = 'image/png' | 'image/jpeg';
type SurfaceAssetMediaType = "image/png" | "image/jpeg";
SurfaceAssetPayloadReference
Provider-specific immutable bytes are referenced, never embedded in canonical Revision JSON.
| Field | Options / expected values | Description |
|---|---|---|
storageLocation |
"r2-asset" |
Required. Controlled storage reference, distinct from content encoded in the Model. |
payloadHash |
string |
Required. Defines payload Hash for this object. Observe the type, variants and bounds in the Options column. |
payloadSize |
number |
Required. Defines payload Size for this object. Observe the type, variants and bounds in the Options column. |
export interface SurfaceAssetPayloadReference {
storageLocation: 'r2-asset';
payloadHash: string;
payloadSize: number;
}
SurfaceAssetContent
Explicit native content kind; a legacy Markdown document is never reinterpreted as an asset.
| Field | Options / expected values | Description |
|---|---|---|
type |
"surface_asset" |
Required. Defines type for this object. Observe the type, variants and bounds in the Options column. |
schema_version |
1 |
Required. Defines schema_version for this object. Observe the type, variants and bounds in the Options column. |
mediaType |
SurfaceAssetMediaType |
Required. Resource MIME type that must belong to admitted formats. |
pixelWidth |
number |
Required. Defines pixel Width for this object. Observe the type, variants and bounds in the Options column. |
pixelHeight |
number |
Required. Defines pixel Height for this object. Observe the type, variants and bounds in the Options column. |
payload |
SurfaceAssetPayloadReference |
Required. Defines payload for this object. Observe the type, variants and bounds in the Options column. |
export interface SurfaceAssetContent {
type: 'surface_asset';
schema_version: 1;
mediaType: SurfaceAssetMediaType;
pixelWidth: number;
pixelHeight: number;
payload: SurfaceAssetPayloadReference;
}
SurfaceAssetPolicy
Immutable Model capability for asset instances, distinct from a user or source grant.
| Field | Options / expected values | Description |
|---|---|---|
contract |
"SurfaceAssetPolicy@1" |
Required. Exact discriminant of this contract variant. Match the literal value shown. |
mediaTypes |
SurfaceAssetMediaType[] |
Required. Admitted resource MIME types under this policy. |
maximumBytes |
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. |
maximumPixels |
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. |
export interface SurfaceAssetPolicy {
contract: 'SurfaceAssetPolicy@1';
mediaTypes: SurfaceAssetMediaType[];
maximumBytes: number;
maximumPixels: number;
}
SurfaceAssetReference
Revision-pinned source address; neither a media id nor a content hash grants access.
| Field | Options / expected values | Description |
|---|---|---|
contract |
"SurfaceAssetReference@1" |
Required. Exact discriminant of this contract variant. Match the literal value shown. |
surfaceId |
string |
Required. Defines surface Id for this object. Observe the type, variants and bounds in the Options column. |
revisionId |
string |
Required. Defines revision Id for this object. Observe the type, variants and bounds in the Options column. |
workspaceId |
string |
Required. Defines workspace Id for this object. Observe the type, variants and bounds in the Options column. |
modelId |
string |
Required. Defines model Id for this object. Observe the type, variants and bounds in the Options column. |
modelRevisionId |
string |
Required. Defines model Revision Id for this object. Observe the type, variants and bounds in the Options column. |
definitionPath |
string |
Required. Exact path of a definition in the Model; this is not a record instance ID. |
payloadHash |
string |
Required. Defines payload Hash for this object. Observe the type, variants and bounds in the Options column. |
export interface SurfaceAssetReference {
contract: 'SurfaceAssetReference@1';
surfaceId: string;
revisionId: string;
workspaceId: string;
modelId: string;
modelRevisionId: string;
definitionPath: string;
payloadHash: string;
}
Applied examples : Choose Surface content
Component properties select the native editor; each content kind retains its own format.
Configuration
Component properties NativeContent.props. Properties and accepted values.
{
"recordProfileKey": "client",
"contentKind": "document"
}
Variation and connection
Component properties NativeContent.props. Properties and accepted values.
{
"recordProfileKey": "client",
"contentKind": "code"
}
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.
- Quote S-1042
- Subject and need
- Proposal
- Retained references