From 156371d4818345dc3d3acf65dddc98a0a0daa252 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 17 Nov 2021 16:25:24 -0500 Subject: [PATCH] @urbit/api: resync group-view types --- pkg/npm/api/groups/lib.ts | 17 ++++++++++++----- pkg/npm/api/groups/view.ts | 4 ++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pkg/npm/api/groups/lib.ts b/pkg/npm/api/groups/lib.ts index 97b0de9d6..b79b08b3d 100644 --- a/pkg/npm/api/groups/lib.ts +++ b/pkg/npm/api/groups/lib.ts @@ -99,11 +99,17 @@ export const changePolicy = ( export const join = ( ship: string, - name: string + name: string, + app: "groups" | "graph", + autojoin: boolean, + share: boolean ): Poke => 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 => 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, diff --git a/pkg/npm/api/groups/view.ts b/pkg/npm/api/groups/view.ts index 70d006754..c6e432b24 100644 --- a/pkg/npm/api/groups/view.ts +++ b/pkg/npm/api/groups/view.ts @@ -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 {