MCPcopy Create free account
hub / github.com/codeaashu/claude-code / createShareLink

Function createShareLink

web/lib/collaboration/permissions.ts:59–74  ·  view source on GitHub ↗
(
  sessionId: string,
  role: CollabRole,
  expiry: LinkExpiry,
  createdBy: string
)

Source from the content-addressed store, hash-verified

57};
58
59export function createShareLink(
60 sessionId: string,
61 role: CollabRole,
62 expiry: LinkExpiry,
63 createdBy: string
64): ShareLink {
65 const expiryMs = EXPIRY_MS[expiry];
66 return {
67 id: nanoid(12),
68 sessionId,
69 role,
70 createdAt: Date.now(),
71 expiresAt: expiryMs !== null ? Date.now() + expiryMs : null,
72 createdBy,
73 };
74}
75
76export function isLinkExpired(link: ShareLink): boolean {
77 return link.expiresAt !== null && Date.now() > link.expiresAt;

Callers 1

CollaborationProviderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected