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

Function parseFolderId

apps/sim/connectors/granola/granola.ts:119–125  ·  view source on GitHub ↗

* Parses the optional `folderId` scope from source config. Returns a trimmed * folder id only when it matches Granola's `fol_…` identifier shape; otherwise * returns undefined so the request is not scoped to an invalid folder.

(sourceConfig: Record<string, unknown>)

Source from the content-addressed store, hash-verified

117 * returns undefined so the request is not scoped to an invalid folder.
118 */
119function parseFolderId(sourceConfig: Record<string, unknown>): string | undefined {
120 const raw = sourceConfig.folderId
121 if (typeof raw !== 'string') return undefined
122 const trimmed = raw.trim()
123 if (!trimmed) return undefined
124 return FOLDER_ID_PATTERN.test(trimmed) ? trimmed : undefined
125}
126
127/**
128 * Parses an optional ISO 8601 date filter from a named source-config field.

Callers 1

granola.tsFile · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected