Enumeration: ValueHintType¶
Defined in: schema.ts:48
Synthetic types that instruct Coda how to coerce values from primitives at ingestion time.
Enumeration Members¶
Attachment¶
Attachment:
"attachment"
Defined in: schema.ts:157
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.
Currency¶
Currency:
"currency"
Defined in: schema.ts:96
Indicates to interpret and render the value as a currency value.
Date¶
Date:
"date"
Defined in: schema.ts:52
Indicates to interpret the value as a date (e.g. March 3, 2021).
DateTime¶
DateTime:
"datetime"
Defined in: schema.ts:60
Indicates to interpret the value as a datetime (e.g. March 3, 2021 at 5:24pm).
Duration¶
Duration:
"duration"
Defined in: schema.ts:64
Indicates to interpret the value as a duration (e.g. 3 hours).
Email¶
Email:
"email"
Defined in: schema.ts:68
Indicates to interpret the value as an email address (e.g. joe@foo.com).
Embed¶
Embed:
"embed"
Defined in: schema.ts:126
Indicates to interpret and render a value as an embed. The provided value should be a URL pointing to an embeddable web page.
Html¶
Html:
"html"
Defined in: schema.ts:121
Indicates to interpret a text value as HTML, which will be converted and rendered as Coda rich text.
ImageAttachment¶
ImageAttachment:
"imageAttachment"
Defined in: schema.ts:109
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.
ImageReference¶
ImageReference:
"image"
Defined in: schema.ts:104
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.
Markdown¶
Markdown:
"markdown"
Defined in: schema.ts:117
Indicates to interpret a text value as Markdown, which will be converted and rendered as Coda rich text.
Percent¶
Percent:
"percent"
Defined in: schema.ts:92
Indicates to interpret and render the value as a percentage.
Person¶
Person:
"person"
Defined in: schema.ts:88
Indicates to interpret and render the value as a Coda person reference. The provided value should be
an object whose idProperty 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,
properties: {
email: {type: ValueType.String, required: true},
name: {type: ValueType.String, required: true},
},
displayProperty: "name",
idProperty: "email",
});
ProgressBar¶
ProgressBar:
"progressBar"
Defined in: schema.ts:169
Indicates to render a numeric value as a progress bar UI component.
Reference¶
Reference:
"reference"
Defined in: schema.ts:152
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},
},
});
Scale¶
Scale:
"scale"
Defined in: schema.ts:165
Indicates to render a numeric value as a scale UI component (e.g. a star rating).
SelectList¶
SelectList:
"selectList"
Defined in: schema.ts:180
Indicates to render a value as a select list.
Slider¶
Slider:
"slider"
Defined in: schema.ts:161
Indicates to render a numeric value as a slider UI component.
Time¶
Time:
"time"
Defined in: schema.ts:56
Indicates to interpret the value as a time (e.g. 5:24pm).
Toggle¶
Toggle:
"toggle"
Defined in: schema.ts:173
Indicates to render a boolean value as a toggle.
Url¶
Url:
"url"
Defined in: schema.ts:113
Indicates to interpret and render the value as a URL link.