CollaborationsModule

public class CollaborationsModule

Provides Collaborations management.

  • Get information about a collaboration.

    Declaration

    Swift

    public func get(
        collaborationId: String,
        fields: [String]? = nil,
        completion: @escaping Callback<Collaboration>
    )

    Parameters

    collaborationId

    The ID of the collaboration to get details

    fields

    Comma-separated list of fields to include in the response.

    completion

    The collaboration object is returned or an error

  • Create a new collaboration that grants a group access to a file or folder in a specific role.

    Declaration

    Swift

    public func create(
        itemType: String,
        itemId: String,
        role: CollaborationRole,
        accessibleBy: String,
        accessibleByType: AccessibleBy,
        canViewPath: Bool? = nil,
        fields: [String]? = nil,
        notify: Bool? = nil,
        completion: @escaping Callback<Collaboration>
    )

    Parameters

    itemType

    The object type. Can be file or folder

    itemId

    The id of the file or the folder

    role

    The level of access granted. Can be editor, viewer, previewer, uploader, previewer uploader, viewer uploader, or co-owner.

    accessibleBy

    The ID of the group that is granted access

    accessibleByType

    Can be user or group

    canViewPath

    Whether view path collaboration feature is enabled or not. View path collaborations allow the invitee to see the entire ancestral path to the associated folder. this parameter is only available for folder collaborations The user will not gain privileges in any ancestral folder (e.g. see content the user is not collaborated on).

    fields

    Attribute(s) to include in the response

    notify

    Determines if the user, (or all the users in the group) should receive email notification of the collaboration.

    completion

    The collaboration object is returned or an error

  • Create a new collaboration that grants a user to a file or folder in a specific role.

    Declaration

    Swift

    public func createByUserEmail(
        itemType: String,
        itemId: String,
        role: CollaborationRole,
        login: String,
        canViewPath: Bool? = nil,
        fields: [String]? = nil,
        notify: Bool? = nil,
        completion: @escaping Callback<Collaboration>
    )

    Parameters

    itemType

    The object type. Can be file or folder

    itemId

    The id of the file or the folder

    role

    The level of access granted. Can be editor, viewer, previewer, uploader, previewer uploader, viewer uploader, or co-owner.

    login

    The ID of the user or group that is granted access

    canViewPath

    Whether view path collaboration feature is enabled or not. View path collaborations allow the invitee to see the entire ancestral path to the associated folder. this parameter is only available for folder collaborations The user will not gain privileges in any ancestral folder (e.g. see content the user is not collaborated on).

    fields

    Attribute(s) to include in the response

    notify

    Determines if the user, (or all the users in the group) should receive email notification of the collaboration.

    completion

    The collaboration object is returned or an error

  • Update a collaboration.

    Declaration

    Swift

    public func update(
        collaborationId: String,
        role: CollaborationRole,
        status: CollaborationStatus? = nil,
        canViewPath: Bool? = nil,
        fields: [String]? = nil,
        completion: @escaping Callback<Collaboration>
    )

    Parameters

    collaborationId

    The ID of the collaboration to get details

    role

    The level of access granted. Can be editor, viewer, previewer, uploader, previewer uploader, viewer uploader, co-owner, or owner.

    status

    The status of the collaboration invitation. Can be accepted or rejected.

    canViewPath

    Whether view path collaboration feature is enabled or not. View path collaborations allow the invitee to see the entire ancestral path to the associated folder. The user will not gain privileges in any ancestral folder (e.g. see content the user is not collaborated on). This parameter is only available for folder collaborations

    fields

    Attribute(s) to include in the response

    completion

    The collaboration object is returned or an error

  • Delete a collaboration.

    Declaration

    Swift

    public func delete(
        collaborationId: String,
        completion: @escaping Callback<Void>
    )

    Parameters

    collaborationId

    The ID of the collaboration to delete

    completion

    An empty response will be returned upon successful deletion or an error

  • Get information about a collaboration.

    Declaration

    Swift

    public func listPendingForEnterprise(
        offset: Int? = nil,
        limit: Int? = nil,
        fields: [String]? = nil
    ) -> PagingIterator<Collaboration>

    Parameters

    collaborationId

    The ID of the collaboration to get details

    fields

    Comma-separated list of fields to include in the response.

    completion

    The collaboration object is returned or an error

  • Retrieves the acceptance requirements status for a specified collaboration

    Declaration

    Swift

    public func getAcceptanceRequirementsStatus(
        collaborationId: String,
        completion: @escaping Callback<Collaboration.AcceptanceRequirementsStatus>
    )

    Parameters

    collaborationId

    The ID of the collaboration to get details

    fields

    Comma-separated list of fields to include in the response.

    completion

    The collaboration object is returned or an error