| 361 | |
| 362 | /** Normalize an SDK VaultOverview to match Connect API vault shape. */ |
| 363 | export 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. */ |
| 380 | export function normalizeSdkItemOverview(item: ItemOverview): NormalizedItemOverview { |