Skip to content

Function: makeDynamicSyncTable

core.makeDynamicSyncTable

makeDynamicSyncTable<K, L, ParamDefsT, SchemaT>(params): DynamicSyncTableDef<K, L, ParamDefsT, any>

Creates a dynamic sync table definition.

Example

coda.makeDynamicSyncTable({
  name: "MySyncTable",
  getName: async function(context) => {
    const response = await context.fetcher.fetch({method: "GET", url: context.sync.dynamicUrl});
    return response.body.name;
  },
  getName: async function(context) => {
    const response = await context.fetcher.fetch({method: "GET", url: context.sync.dynamicUrl});
    return response.body.browserLink;
  },
  ...
});

Type parameters

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

Parameters

Name Type
params Object
params.connectionRequirement? ConnectionRequirement
params.defaultAddDynamicColumns? boolean
params.description? string
params.entityName? string
params.formula SyncFormulaDef<K, L, ParamDefsT, any>
params.getDisplayUrl MetadataFormulaDef
params.getName MetadataFormulaDef
params.getSchema MetadataFormulaDef
params.identityName string
params.listDynamicUrls? MetadataFormulaDef
params.name string
params.placeholderSchema? SchemaT
params.searchDynamicUrls? MetadataFormulaDef

Returns

DynamicSyncTableDef<K, L, ParamDefsT, any>

Defined in

api.ts:2269