From 8038a47bf2ae779471efefa3fe415c86c1f0079e Mon Sep 17 00:00:00 2001 From: Chunosov Date: Thu, 3 Apr 2025 22:13:49 +0700 Subject: [PATCH] Add createInviteLink to account rest client (#8456) * Add createInviteLink to account rest client Signed-off-by: Nikolay Chunosov * fix typo Signed-off-by: Nikolay Chunosov * fix type Signed-off-by: Nikolay Chunosov --------- Signed-off-by: Nikolay Chunosov --- packages/account-client/src/client.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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,