Skip to content

Enumeration: ValueHintType

core.ValueHintType

Synthetic types that instruct Coda how to coerce values from primitives at ingestion time.

Enumeration Members

Attachment

Attachment = "attachment"

Indicates to interpret and render a value as a file attachment. The provided value should be a URL pointing to a file of a Coda-supported type. Coda will ingest the file and host it from Coda infrastructure.

Defined in

schema.ts:157


Currency

Currency = "currency"

Indicates to interpret and render the value as a currency value.

Defined in

schema.ts:96


Date

Date = "date"

Indicates to interpret the value as a date (e.g. March 3, 2021).

Defined in

schema.ts:52


DateTime

DateTime = "datetime"

Indicates to interpret the value as a datetime (e.g. March 3, 2021 at 5:24pm).

Defined in

schema.ts:60


Duration

Duration = "duration"

Indicates to interpret the value as a duration (e.g. 3 hours).

Defined in

schema.ts:64


Email

Email = "email"

Indicates to interpret the value as an email address (e.g. joe@foo.com).

Defined in

schema.ts:68


Embed

Embed = "embed"

Indicates to interpret and render a value as an embed. The provided value should be a URL pointing to an embeddable web page.

Defined in

schema.ts:126


Html

Html = "html"

Indicates to interpret a text value as HTML, which will be converted and rendered as Coda rich text.

Defined in

schema.ts:121


ImageAttachment

ImageAttachment = "imageAttachment"

Indicates to interpret and render the value as an image. The provided value should be a URL that points to an image. Coda will ingest the image and host it from Coda infrastructure.

Defined in

schema.ts:109


ImageReference

ImageReference = "image"

Indicates to interpret and render the value as an image. The provided value should be a URL that points to an image. Coda will hotlink to the image when rendering it a doc.

Using ImageAttachment is recommended instead, so that the image is always accessible and won't appear as broken if the source image is later deleted.

Defined in

schema.ts:104


Markdown

Markdown = "markdown"

Indicates to interpret a text value as Markdown, which will be converted and rendered as Coda rich text.

Defined in

schema.ts:117


Percent

Percent = "percent"

Indicates to interpret and render the value as a percentage.

Defined in

schema.ts:92


Person

Person = "person"

Indicates to interpret and render the value as a Coda person reference. The provided value should be an object whose id property is an email address, which Coda will try to resolve to a user and render an @-reference to the user.

Example

makeObjectSchema({
  type: ValueType.Object,
  codaType: ValueHintType.Person,
  id: 'email',
  primary: 'name',
  properties: {
    email: {type: ValueType.String, required: true},
    name: {type: ValueType.String, required: true},
  },
});

Defined in

schema.ts:88


ProgressBar

ProgressBar = "progressBar"

Indicates to render a numeric value as a progress bar UI component.

Defined in

schema.ts:169


Reference

Reference = "reference"

Indicates to interpret and render the value as a Coda @-reference to a table row. The provided value should be an object whose id value matches the id of some row in a sync table. The schema where this hint type is used must specify an identity that specifies the desired sync table.

Normally a reference schema is constructed from the schema object being referenced using the helper makeReferenceSchemaFromObjectSchema.

Example

makeObjectSchema({
  type: ValueType.Object,
  codaType: ValueHintType.Reference,
  identity: {
    name: "SomeSyncTableIdentity"
  },
  id: 'identifier',
  primary: 'name',
  properties: {
    identifier: {type: ValueType.Number, required: true},
    name: {type: ValueType.String, required: true},
  },
});

Defined in

schema.ts:152


Scale

Scale = "scale"

Indicates to render a numeric value as a scale UI component (e.g. a star rating).

Defined in

schema.ts:165


SelectList

SelectList = "selectList"

Indicates to render a value as a select list.

Defined in

schema.ts:180


Slider

Slider = "slider"

Indicates to render a numeric value as a slider UI component.

Defined in

schema.ts:161


Time

Time = "time"

Indicates to interpret the value as a time (e.g. 5:24pm).

Defined in

schema.ts:56


Toggle

Toggle = "toggle"

Indicates to render a boolean value as a toggle.

Defined in

schema.ts:173


Url

Url = "url"

Indicates to interpret and render the value as a URL link.

Defined in

schema.ts:113