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

Function mapShareRecord

apps/sim/lib/public-shares/share-manager.ts:34–46  ·  view source on GitHub ↗
(row: PublicShareRow)

Source from the content-addressed store, hash-verified

32}
33
34function mapShareRecord(row: PublicShareRow): ShareRecord {
35 return {
36 id: row.id,
37 token: row.token,
38 url: buildShareUrl(row.token),
39 isActive: row.isActive,
40 resourceType: row.resourceType as ShareResourceType,
41 resourceId: row.resourceId,
42 authType: row.authType as ShareAuthType,
43 hasPassword: Boolean(row.password),
44 allowedEmails: Array.isArray(row.allowedEmails) ? (row.allowedEmails as string[]) : [],
45 }
46}
47
48export async function getShareForResource(
49 resourceType: ShareResourceType,

Callers 3

getShareForResourceFunction · 0.85
getSharesForResourcesFunction · 0.85
upsertFileShareFunction · 0.85

Calls 1

buildShareUrlFunction · 0.85

Tested by

no test coverage detected