MCPcopy Create free account
hub / github.com/simstudioai/sim / itemMetadata

Function itemMetadata

apps/sim/connectors/monday/monday.ts:217–231  ·  view source on GitHub ↗

* Builds the metadata object carried on every document, used both for tag mapping * (`mapTags`) and for downstream display. Kept in one place so listing and * single-item fetches emit identical metadata.

(
  item: MondayItem,
  board: { id: string; name: string }
)

Source from the content-addressed store, hash-verified

215 * single-item fetches emit identical metadata.
216 */
217function itemMetadata(
218 item: MondayItem,
219 board: { id: string; name: string }
220): Record<string, unknown> {
221 return {
222 boardId: board.id,
223 boardName: board.name,
224 itemName: item.name ?? '',
225 groupTitle: item.group?.title ?? '',
226 state: item.state ?? '',
227 creatorName: item.creator?.name ?? '',
228 createdAt: item.created_at ?? undefined,
229 updatedAt: item.updated_at ?? undefined,
230 }
231}
232
233/**
234 * Produces a fully-hydrated document from a single `items_page` element. The list

Callers 1

itemToDocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected