SharingManager

interface SharingManager

Functions

Link copied to clipboard
abstract suspend fun addCollaborator(sharedLinkId: String, phoneOrEmail: String, permission: SharedLinkPermission)

Adds a collaborator to a shared link with sharedLinkId.

Link copied to clipboard
abstract fun createCollaboratorsFlow(sharedLinkId: String): Flow<List<CollaboratorItem>>
Link copied to clipboard
abstract suspend fun createSharedLink(setShareLink: String, type: SharedLinkType, permission: SharedLinkPermission? = null, password: String? = null, expires: String? = null, collaborators: List<CreateCollaboratorMeta>? = null): ShareOperationResult

Creates a shared link to the resource by the setShareLink with the specified configuration.

Link copied to clipboard
abstract suspend fun deleteCollaborator(collaboratorId: String)

Removes a collaborator.

Link copied to clipboard
abstract suspend fun deleteSharedLink(sharedLinkId: String)

Removes a shared link by sharedLinkId.

Link copied to clipboard
abstract suspend fun editCollaborator(collaboratorId: String, permission: SharedLinkPermission): CollaboratorItem

Edited by a collaborator.

Link copied to clipboard
abstract suspend fun editSharedLink(sharedLinkId: String, type: SharedLinkType? = null, permission: SharedLinkPermission? = null, password: String? = null, expires: String? = null, collaborators: List<CreateCollaboratorMeta>? = null): ShareOperationResult

Edits a shared link by sharedLinkId and configuration.

Link copied to clipboard
abstract suspend fun fetchCollaborators(sharedLinkId: String)

Gets a list of shared link collaborators from the backend by sharedLinkId.

Link copied to clipboard
abstract suspend fun getPublicSharedLink(sharedLinkId: String, password: String? = null): PublicShareSchema

Authorizes in the sharedLinkId and gets its content. If the link is password-protected, then uses a password for authorization.

Link copied to clipboard
abstract suspend fun getSharedLink(sharedLinkUrl: String): SharedLinkItem?

It receives the shared link from the backend via sharedLinkUrl, updates it in the database, and returns the SharedLinkItem.