Skip to content

Interface: SyncTableOptions<K, L, ParamDefsT, SchemaT>

Input options for defining a sync table. See makeSyncTable.

Type parameters

Name Type
K extends string
L extends string
ParamDefsT extends ParamDefs
SchemaT extends ObjectSchemaDefinition<K, L>

Properties

connectionRequirement

Optional connectionRequirement: ConnectionRequirement

A ConnectionRequirement that will be used for all formulas contained within this sync table (including autocomplete formulas).

Defined in

api.ts:1273


description

Optional description: string

The description of the sync table. This is shown to users in the Coda UI. This should describe what the sync table does in more detailed language. For example, the description for a 'Products' sync table could be: 'Returns products from the e-commerce platform.'

Defined in

api.ts:1242


dynamicOptions

Optional dynamicOptions: DynamicOptions

A set of options used internally by makeDynamicSyncTable, or for static sync tables that have a dynamic schema.

Defined in

api.ts:1278


formula

formula: SyncFormulaDef<K, L, ParamDefsT, SchemaT>

The definition of the formula that implements this sync. This is a Coda packs formula that returns an array of objects fitting the given schema and optionally a Continuation. (The SyncFormulaDef.name is redundant and should be the same as the name parameter here. These will eventually be consolidated.)

Defined in

api.ts:1268


identityName

identityName: string

The "unique identifier" for the entity being synced. This will serve as the unique id for this table, and must be unique across other sync tables for your pack. This is often the singular form of the table name, e.g. if your table name was 'Products' you might choose 'Product' as the identity name.

When returning objects from other syncs or formulas, you may create Coda references to objects in this table by defining an Identity in that schema that refers to this identity name.

For example, if your identity name was 'Product', another formula or sync could return shell objects that reference rows in this table, so long as they contain the id of the object, and the schema is declared as {identity: {name: 'Products'}}.

Defined in

api.ts:1256


name

name: string

The name of the sync table. This is shown to users in the Coda UI. This should describe the entities being synced. For example, a sync table that syncs products from an e-commerce platform should be called 'Products'. This name must not contain spaces.

Defined in

api.ts:1236


schema

schema: SchemaT

The definition of the schema that describes a single response object. For example, the schema for a single product. The sync formula will return an array of objects that fit this schema.

Defined in

api.ts:1261