Class NetworkOperations
Methods
list
-
List one page of your organization's memory networks, narrowed by the filters given.
Parameters
- options: ListNetworksOptions = {}
Filters, the page, and a deadline.
Returns Promise<NetworkList>
The page of networks, and how many match in all.
- options: ListNetworksOptions = {}
create
-
Create a memory network.
Parameters
- options: CreateNetworkOptions
The network's name, where it goes, and a deadline.
Returns Promise<Network>
The network as created.
- options: CreateNetworkOptions
createOrGet
-
Create a memory network, or return the one already holding its name.
Safe when two callers race to create one network: the loser is handed the winner's. The existing network is returned only if it has the owner asked for (no owner matches a network without one) and, when a domain or a scope is given, that domain and scope; a network that merely shares the name is never adopted. Names are matched exactly, case included.
Parameters
- options: CreateNetworkOptions
The network's name, where it goes, and a deadline for each call made.
Returns Promise<Network>
The network as created, or as it already was.
- options: CreateNetworkOptions
update
-
Change a network's name, parent, scope, owner or description.
Parameters
- networkId: string
The network to change.
- options: UpdateNetworkOptions = {}
What to change, and a deadline. A field left out stays as it is; an empty string clears it.
Returns Promise<Network>
The network as it now is.
- networkId: string
delete
-
Delete a network, and everything that hangs off it.
Cannot be undone. The result reports what the deletion removed with the network, so its cost can be seen.
Parameters
- networkId: string
The network to delete.
- options: TimeoutOptions = {}
Per-call deadline.
Returns Promise<DeletedNetwork>
The network deleted, and how many rows the cascade removed from each table.
- networkId: string
listMembers
-
List one page of the users placed in a network.
Parameters
- networkId: string
The network whose members to list.
- options: ListMembersOptions = {}
A search, the page, and a deadline.
Returns Promise<MemberList>
The page of members, and how many match in all.
- networkId: string
addMember
-
Place a user in a network.
A user holds one network per memory domain. One already placed in another network of the same domain is refused with MemcoUserAlreadyAssignedNetworkError, naming that network, unless
forceis set, which moves them. An external user can be placed only in a customer network; any other is refused with MemcoExternalUserNeedsCustomerNetworkError.Parameters
- networkId: string
The network to place the user in.
- options: AddMemberOptions
The user, whether to move them, and a deadline.
Returns Promise<MemberPlacement>
Where the user was placed, and the network they were moved out of, if any.
- networkId: string
removeMember
-
Take a user out of a network.
Parameters
- networkId: string
The network to take the user out of.
- options: RemoveMemberOptions
The user, and a deadline.
Returns Promise<void>
- networkId: string
listGroups
-
List one page of your organization's identity-provider groups.
Groups are how an enterprise organization places its people in networks, and are available to enterprise organizations only; the service refuses this call for any other with MemcoPermissionError.
Parameters
- options: ListGroupsOptions = {}
Filters, the page, and a deadline.
Returns Promise<GroupList>
The page of groups, and how many match in all.
- options: ListGroupsOptions = {}
listGroupMembers
-
List the users in an identity-provider group.
The identity provider manages who is in a group; this only reads it. Available to enterprise organizations only.
Parameters
- groupId: string
The group whose members to list.
- options: TimeoutOptions = {}
Per-call deadline.
Returns Promise<readonly Member[]>
The group's members.
- groupId: string
addGroup
-
Assign an identity-provider group to a network, placing its members there.
A group holds one network per memory domain, so this replaces the group's network in this network's domain. A group limited to moderation instead keeps its others, and may be bound to several networks in one domain. Available to enterprise organizations only.
Parameters
- networkId: string
The network to assign the group to.
- options: AddGroupOptions
The group, the roles it is limited to, and a deadline.
Returns Promise<void>
- networkId: string
removeGroup
-
Take an identity-provider group out of a network.
The group's networks in other memory domains are unaffected. Available to enterprise organizations only.
Parameters
- networkId: string
The network to take the group out of.
- options: NetworkGroupOptions
The group, and a deadline.
Returns Promise<void>
- networkId: string
Memory networks, their members and their identity-provider groups, reached as
client.networks.Example