* Build the storage `metadata` that records a trusted ownership binding for a * synced `kb/` object. Returns `undefined` for legacy null-workspace KBs (no * workspace-scoped ownership to bind), which `uploadFile` treats as "no binding".
( kbOwner: KnowledgeBaseOwner, originalName: string )
| 1082 | * workspace-scoped ownership to bind), which `uploadFile` treats as "no binding". |
| 1083 | */ |
| 1084 | function kbOwnershipMetadata( |
| 1085 | kbOwner: KnowledgeBaseOwner, |
| 1086 | originalName: string |
| 1087 | ): { workspaceId: string; userId: string; originalName: string } | undefined { |
| 1088 | return kbOwner.workspaceId |
| 1089 | ? { workspaceId: kbOwner.workspaceId, userId: kbOwner.userId, originalName } |
| 1090 | : undefined |
| 1091 | } |
| 1092 | |
| 1093 | /** Builds a content-less `failed` document row for a skipped (e.g. oversized) file. */ |
| 1094 | function buildSkippedDocumentRow( |
no outgoing calls
no test coverage detected