Skip to content

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

Defined in: api.ts:2303

Input options for defining a sync table. See makeSyncTable.

Type Parameters

Type Parameter
K extends string
L extends string
ParamDefsT extends ParamDefs
SchemaT extends ObjectSchemaDefinition<K, L>
ContextT extends SyncExecutionContext<any, any>
PermissionsContextT extends SyncPassthroughData

Properties

connectionRequirement?

optional connectionRequirement: ConnectionRequirement

Defined in: api.ts:2363

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


description?

optional description: string

Defined in: api.ts:2332

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.'


displayName?

optional displayName: string

Defined in: api.ts:2325

This is the name shown to users in the Coda UI. If not present, SyncTableOptions.name will be used. Changing this value will not affect existing tables and only affects newly created tables.


dynamicOptions?

optional dynamicOptions: DynamicOptions

Defined in: api.ts:2368

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


formula

formula: FormulaOptions<ParamDefsT, SyncFormulaDef<K, L, ParamDefsT, SchemaT, ContextT, PermissionsContextT>>

Defined in: api.ts:2358

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.)


identityName

identityName: string

Defined in: api.ts:2346

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'}}.


name

name: string

Defined in: api.ts:2319

The name of the sync table. This is shown to users in the Coda UI if displayName is not present. 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.

Important: This value acts as a unique ID for the table, and updating it later is a breaking change. If you want to change the value shown to the users, set displayName instead.


schema

schema: SchemaT

Defined in: api.ts:2351

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.