Skip to main content

Module groups

Module groups 

Source

Structs§

EmailInvite
An email invite waiting to be accepted, as the group’s admins see it.
Group
A group as someone in it sees it. A group holds people and other groups: everyone in a nested group is in this one too, never the other way.
GroupMatch
A person found by query, with every group they are in.
GroupMember
One way someone is in a group. through is the group’s own id when they are directly in it, else the nested group they come in through.
GroupNest
A group invited inside another, or asking to go inside one, waiting for the other side’s admins.
GroupQuery
What query found: people with every group they are in, and groups by name. Only a signed in admin gets total, how many groups there are.
GroupRef
A group named inside another record.
GroupSummary
A group as anyone signed in may see it: no balance, no member list. member_count counts everyone in it, directly or through a nested group.
InviteOptions
The options argument of invite, invite_group and request_group.
JoinLink
A join link, as the group’s admins see it. People join with it, and admins of other groups put their group inside this one with it.
JoinResult
The { group, alreadyMember } accept_invite and join resolve to.
LinkOptions
The options argument of generate_link.
MatchedGroup
A group a person found by query is in, and how: through is the group’s own id when they are directly in it, else the nested group they come in through.
NamedGroup
A group query found by its name. A signed in admin also sees its admins’ emails, how many people are directly in it, and its paid balance, credit and debt in dollars; everyone else gets none of those.
PartialGroup
Partial<Group> in the TypeScript SDK.
Partnership
Two groups with people only chats between them. group is the one of yours it was listed for.
StartedPartnershipChat
The { partnership, chat } start_partnership_chat resolves to.

Enums§

NestOffer
What invite_group and request_group did: nested at once when you administer both groups, else waiting on the other side with token.
NestSide
Which side sent a nesting: Parent invited the child, whose admins accept; Child asked to go inside the parent, whose admins approve.

Functions§

accept_invite
Join the group an email invite points at, using the token from the invite. already_member says you were directly in it already.
accept_nest
Accept an invite into a group, or approve a request to join one, by its token. An admin of the side it waits on only. Resolves to the parent group.
create
Start a group. You are its first admin. Needs a subscription, and room under fauna/groups:N, the most groups you may administer.
create_partnership_chat
Another chat in a partnership. Resolves to its id.
delete_partnership_chat
Delete a partnership chat, for both groups.
demote
Make an admin a member again. Admins only; a group keeps at least one admin.
edit
Change the group’s name or icon. Admins only.
end_partnership
End a partnership. Its chats and their files go with it, for both groups.
generate_link
A join code. Admins only. People join with it, and admins of other groups put their group inside this one with it. max_uses caps how many it lets in; without it, any number can join until it expires. It expires at expires, in the future and at most a year out, or in seven days without it.
get
A group you are in, directly or through a nested group.
invite
Invite an email to a group. Admins only. Nobody joins until they accept the invite with its token (accept_invite), whether or not the email already has a Fauna account, and the answer is the same either way. Fauna emails the invite unless notify is false, so an app can send its own email carrying the token. Resolves to the token.
invite_group
Invite group child inside group id; the child’s admins accept with the token (accept_nest). Admins of id only. Nests at once when you administer both. Unless notify is false, the child’s admins hear about it in their Fauna inbox. Nesting is at most 5 groups deep and never makes a loop.
invites
The group’s email invites waiting to be accepted, newest first. Admins only.
join
Join a group with a join code. With group, a group you administer goes inside it instead, and you are in it through that group. already_member says you (or group) were in it already.
kick
Remove a person who is directly in the group. Admins only.
leave
Leave a group you are directly in. The last admin can’t while anyone else is in it, directly or through a nested group: make someone else an admin, or delete the group. When nobody else is in it, leaving deletes it.
links
The group’s join links that still work, newest first. Admins only.
list
Every group you are in, directly or through a nested group, oldest first. Each says how you are in it (through).
list_partnerships
A group’s partnerships, each with their chats and what you haven’t read. An API key reads them too.
nests
The invites and requests waiting on or from a group, newest first. Admins only.
promote
Make a person who is directly in the group an admin. Admins only. Someone in it only through a nested group is invited directly first. They need room under their own fauna/groups:N, the most groups they may administer.
query
People matching a partial email or name, best first, each with every group they are in and how; only people in at least one group come back. And groups whose name matches either text, best first: only groups you are in, unless a signed in admin asks. An admin finds every group, with its admins and balances, and an admin’s empty search lists the first 20 groups by name.
remove
Delete a group with its chats, files, calendar, rooms, webhooks and partnerships. It leaves every group it was in; the groups inside it stay. Its direct admins may, and so may anyone holding fauna/groups:delete:global.
request_group
Ask to put group id inside group parent; the parent’s admins approve with the token (accept_nest). Admins of id only. Nests at once when you administer both. Unless notify is false, the parent’s admins hear about it in their Fauna inbox.
revoke_invite
An email invite stops working, by its token. An admin of its group, or whoever sent it.
revoke_link
A join link stops working. Admins only.
revoke_nest
Drop a waiting invite or request by its token. An admin of either group.
show_partnership
Bring a hidden partnership out of Hidden for your group.
start_partnership_chat
Start a chat between your group id and partner. The first chat partners the groups.
summaries
Name, icon and member count of groups by id, including groups you are not in. Unknown ids are left out.
unnest
Take group child out of group id. An admin of either group. Everyone who was in id only through it loses it.