MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeSdkVault

Function normalizeSdkVault

apps/sim/app/api/tools/onepassword/utils.ts:363–377  ·  view source on GitHub ↗
(vault: VaultOverview)

Source from the content-addressed store, hash-verified

361
362/** Normalize an SDK VaultOverview to match Connect API vault shape. */
363export function normalizeSdkVault(vault: VaultOverview): NormalizedVault {
364 return {
365 id: vault.id,
366 name: vault.title,
367 description: null,
368 attributeVersion: 0,
369 contentVersion: 0,
370 items: 0,
371 type: 'USER_CREATED',
372 createdAt:
373 vault.createdAt instanceof Date ? vault.createdAt.toISOString() : (vault.createdAt ?? null),
374 updatedAt:
375 vault.updatedAt instanceof Date ? vault.updatedAt.toISOString() : (vault.updatedAt ?? null),
376 }
377}
378
379/** Normalize an SDK ItemOverview to match Connect API item summary shape. */
380export function normalizeSdkItemOverview(item: ItemOverview): NormalizedItemOverview {

Callers 1

route.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected