diff --git a/packages/account-client/src/client.ts b/packages/account-client/src/client.ts index 216b3864df..7041c8e983 100644 --- a/packages/account-client/src/client.ts +++ b/packages/account-client/src/client.ts @@ -61,6 +61,15 @@ export interface AccountClient { requestPasswordReset: (email: string) => Promise sendInvite: (email: string, role: AccountRole) => Promise resendInvite: (email: string, role: AccountRole) => Promise + createInviteLink: ( + email: string, + role: AccountRole, + autoJoin: boolean, + firstName: string, + lastName: string, + navigateUrl?: string, + expHours?: number + ) => Promise leaveWorkspace: (account: string) => Promise changeUsername: (first: string, last: string) => Promise changePassword: (oldPassword: string, newPassword: string) => Promise @@ -309,6 +318,23 @@ class AccountClientImpl implements AccountClient { await this.rpc(request) } + async createInviteLink ( + email: string, + role: AccountRole, + autoJoin: boolean, + firstName: string, + lastName: string, + navigateUrl?: string, + expHours?: number + ): Promise { + const request = { + method: 'createInviteLink' as const, + params: { email, role, autoJoin, firstName, lastName, navigateUrl, expHours } + } + + return await this.rpc(request) + } + async leaveWorkspace (account: string): Promise { const request = { method: 'leaveWorkspace' as const,