"""
CollaboratorApplication describes the relationship between a Collaborator and an ApplicationV2.
Implements TenantApplication interface.
"""
type CollaboratorApplication implements TenantApplication {
    """
    The Application that the Collaborator has access to.
    """
    application: ApplicationV2!
    """
    The roles that the Collaborator has access to in the Application.
    """
    roles: [RoleV2!]!
    """
    The Collaborator that has access to the Application.
    """
    tenant: Collaborator!
    """
    The URL to the application that is dependent on the Collaborator.
    """
    url: String!
}

"""
Collaborator describes identities that have access to that resource.
"""
type Collaborator implements Tenant @key(fields: "id") @key(fields: "uuid") {
    """
    The applications that the Collaborator has access to.
    """
    applications: [CollaboratorApplication!]!
    id: ID! @shareable
    identitiesWithAccess(
        active: Boolean
        pending: Boolean
        limit: Int
        offset: Int
        term: String
        profileTypes: [String!]
    ): UserResults
    uuid: ID!
}
