mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-01 19:46:36 +03:00
@urbit/api: resync group-view types
This commit is contained in:
parent
7e54e026cd
commit
156371d481
@ -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,
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user