@urbit/api: resync group-view types

This commit is contained in:
Liam Fitzgerald 2021-11-17 16:25:24 -05:00
parent 7e54e026cd
commit 156371d481
2 changed files with 16 additions and 5 deletions

View File

@ -99,11 +99,17 @@ export const changePolicy = (
export const join = (
ship: string,
name: string
name: string,
app: "groups" | "graph",
autojoin: boolean,
share: boolean
): Poke<any> => viewAction({
join: {
resource: makeResource(ship, name),
ship
ship,
shareContact: share || false,
app,
autojoin
}
});
@ -148,10 +154,10 @@ export const invite = (
}
});
export const hideGroup = (
export const abortJoin = (
resource: string
): Poke<any> => viewAction({
hide: resource
abort: resource
});
export const roleTags = ['janitor', 'moderator', 'admin'];
@ -164,7 +170,8 @@ export const groupBunts = {
export const joinError = ['no-perms', 'strange'] as const;
export const joinResult = ['done', ...joinError] as const;
export const joinProgress = ['start', 'added', ...joinResult] as const;
export const joinLoad = ['start', 'added', 'metadata'] as const;
export const joinProgress = [...joinLoad, ...joinResult] as const;
export const roleForShip = (
group: Group,

View File

@ -19,6 +19,10 @@ export interface JoinRequest {
started: number;
ship: Patp;
progress: JoinProgress;
shareContact: boolean;
autojoin: boolean;
app: 'graph' | 'groups';
invite: string[];
}
export interface JoinRequests {