@sudoplatform/sudo-secure-communications
    Preparing search index...

    Interface GroupsModule

    Group management for the Secure Communications Service.

    interface GroupsModule {
        acceptInvitation(input: AcceptGroupInvitationInput): Promise<void>;
        banHandle(input: BanGroupHandleInput): Promise<void>;
        createGroup(input: CreateGroupInput): Promise<Group>;
        declineInvitation(input: DeclineGroupInvitationInput): Promise<void>;
        deleteGroup(input: DeleteGroupInput): Promise<void>;
        getGroup(input: GetGroupInput): Promise<Group | undefined>;
        getGroupMembers(input: GetGroupMembersInput): Promise<GroupMember[]>;
        getGroups(input: GetGroupsInput): Promise<Group[]>;
        kickHandle(input: KickGroupHandleInput): Promise<void>;
        leaveGroup(input: LeaveGroupInput): Promise<void>;
        listInvitations(handleId: HandleId): Promise<Group[]>;
        listJoined(handleId: HandleId): Promise<Group[]>;
        sendInvitations(input: SendGroupInvitationsInput): Promise<void>;
        unbanHandle(input: UnbanGroupHandleInput): Promise<void>;
        updateGroup(input: UpdateGroupInput): Promise<Group>;
        updateGroupMemberRole(input: UpdateGroupMemberRoleInput): Promise<void>;
        withdrawInvitation(input: WithdrawGroupInvitationInput): Promise<void>;
    }

    Implemented by

    Index

    Methods

    • Accepts an invitation to join a group.

      Parameters

      Returns Promise<void>

    • Bans a handle from a group. Must have a higher role than the target handle to perform this action.

      Parameters

      Returns Promise<void>

    • Create a new group.

      Invites handles to the newly created group if a list of handle identifiers are supplied in the input.

      Parameters

      • input: CreateGroupInput

        Parameters with the initial fields state for the new group.

      Returns Promise<Group>

      The newly created group.

    • Declines an invitation to join a group.

      Parameters

      Returns Promise<void>

    • Deletes an existing group.

      Note: The handle has to have a higher role than everyone else in the group in order to delete it for others. This usually means that only the creator of the group can delete it.

      Parameters

      Returns Promise<void>

    • Retrieve an individual group by the group's identifier.

      Parameters

      Returns Promise<Group | undefined>

      The group matching the input identifier, or undefined if not found.

    • Retrieves a list of all members of a group that the current handle is a member of.

      Parameters

      • input: GetGroupMembersInput

        Parameters used to retrieve a list of all group members of a group that this handle is a member of.

      Returns Promise<GroupMember[]>

      The list of group members in the group.

    • Batch retrieve groups with a list of group identifiers.

      Parameters

      Returns Promise<Group[]>

      List of groups matching the supplied identifiers, less any identifiers that did not correspond to a group.

    • Kicks a handle from a group. Must have a higher role than the target handle to perform this action. Can kick yourself.

      Parameters

      Returns Promise<void>

    • Remove this handle from a specified group by identifier.

      Parameters

      Returns Promise<void>

    • Retrieve a list of all groups this handle has an active invitation for.

      Parameters

      • handleId: HandleId

        Identifier of the handle owned by this client.

      Returns Promise<Group[]>

      A list of groups this handle has been invited to.

    • Retrieve a list of all groups this handle is included in as a member.

      Parameters

      • handleId: HandleId

        Identifier of the handle owned by this client.

      Returns Promise<Group[]>

      A list of groups containing all of the handle's joined groups.

    • Invite handles to join an existing group.

      Parameters

      Returns Promise<void>

    • Unbans a handle from a group. Must have a higher role than the target handle to perform this action.

      Parameters

      Returns Promise<void>

    • Update the editable fields of a group.

      Parameters

      Returns Promise<Group>

      The updated group.

    • Updates the group role for a specific member of a group. Must have a higher role than the target handle to perform this action. Can downgrade your own role.

      Parameters

      Returns Promise<void>