/** * useShareDocument Hook * Document sharing operations (API service) * Manages collaborators, permissions, and share links */ export type ShareRole = 'viewer' | 'editor' | 'owner'; export type ShareLinkRole = 'viewer' | 'editor' | 'commenter'; export interface Collaborator { userId: string; email: string; name: string; avatarUrl?: string; role: ShareRole; grantedAt: string; grantedBy: string; expiresAt?: string; isOwner: boolean; } export interface ShareLink { id: string; documentId: string; token: string; role: ShareLinkRole; hasPassword: boolean; maxUses?: number; useCount: number; expiresAt?: string; name?: string; createdBy: string; createdAt: string; updatedAt: string; lastAccessedAt?: string; isActive: boolean; } export interface ShareDocumentRequest { userId?: string; workspaceId?: string; role: ShareRole; expiresAt?: string; } export interface CreateShareLinkRequest { role: ShareLinkRole; password?: string; maxUses?: number; expiresAt?: string; name?: string; } export interface UpdateShareLinkRequest { role?: ShareLinkRole; password?: string; maxUses?: number; expiresAt?: string; name?: string; isActive?: boolean; } export interface CollaboratorsResponse { collaborators: Collaborator[]; shareLinks: ShareLink[]; totalCount: number; } export interface UseShareDocumentOptions { documentId: string; /** Base URL for the API (e.g., "https://api.example.com/api/v1"). Falls back to "/api/v1" */ apiBaseUrl?: string; /** JWT access token for authentication */ authToken?: string; onError?: (error: Error) => void; onSuccess?: (message: string) => void; } export declare const useShareDocument: ({ documentId, apiBaseUrl, authToken, onError, onSuccess, }: UseShareDocumentOptions) => { collaborators: Collaborator[]; shareLinks: ShareLink[]; isLoading: boolean; error: Error; fetchCollaborators: () => Promise; shareWithUser: (request: ShareDocumentRequest) => Promise; updateCollaboratorPermission: (userId: string, role: ShareRole) => Promise; removeCollaborator: (userId: string) => Promise; createShareLink: (request: CreateShareLinkRequest) => Promise; updateShareLink: (linkId: string, request: UpdateShareLinkRequest) => Promise; deleteShareLink: (linkId: string) => Promise; copyShareLinkUrl: (token: string) => Promise; getShareLinkUrl: (token: string) => string; }; //# sourceMappingURL=useShareDocument.d.ts.map