mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-15 03:51:04 +00:00
Add createInviteLink to account rest client (#8456)
* Add createInviteLink to account rest client Signed-off-by: Nikolay Chunosov <Chunosov.N@gmail.com> * fix typo Signed-off-by: Nikolay Chunosov <Chunosov.N@gmail.com> * fix type Signed-off-by: Nikolay Chunosov <Chunosov.N@gmail.com> --------- Signed-off-by: Nikolay Chunosov <Chunosov.N@gmail.com>
This commit is contained in:
parent
cac7902e50
commit
8038a47bf2
@ -61,6 +61,15 @@ export interface AccountClient {
|
|||||||
requestPasswordReset: (email: string) => Promise<void>
|
requestPasswordReset: (email: string) => Promise<void>
|
||||||
sendInvite: (email: string, role: AccountRole) => Promise<void>
|
sendInvite: (email: string, role: AccountRole) => Promise<void>
|
||||||
resendInvite: (email: string, role: AccountRole) => Promise<void>
|
resendInvite: (email: string, role: AccountRole) => Promise<void>
|
||||||
|
createInviteLink: (
|
||||||
|
email: string,
|
||||||
|
role: AccountRole,
|
||||||
|
autoJoin: boolean,
|
||||||
|
firstName: string,
|
||||||
|
lastName: string,
|
||||||
|
navigateUrl?: string,
|
||||||
|
expHours?: number
|
||||||
|
) => Promise<string>
|
||||||
leaveWorkspace: (account: string) => Promise<LoginInfo | null>
|
leaveWorkspace: (account: string) => Promise<LoginInfo | null>
|
||||||
changeUsername: (first: string, last: string) => Promise<void>
|
changeUsername: (first: string, last: string) => Promise<void>
|
||||||
changePassword: (oldPassword: string, newPassword: string) => Promise<void>
|
changePassword: (oldPassword: string, newPassword: string) => Promise<void>
|
||||||
@ -309,6 +318,23 @@ class AccountClientImpl implements AccountClient {
|
|||||||
await this.rpc(request)
|
await this.rpc(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async createInviteLink (
|
||||||
|
email: string,
|
||||||
|
role: AccountRole,
|
||||||
|
autoJoin: boolean,
|
||||||
|
firstName: string,
|
||||||
|
lastName: string,
|
||||||
|
navigateUrl?: string,
|
||||||
|
expHours?: number
|
||||||
|
): Promise<string> {
|
||||||
|
const request = {
|
||||||
|
method: 'createInviteLink' as const,
|
||||||
|
params: { email, role, autoJoin, firstName, lastName, navigateUrl, expHours }
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.rpc(request)
|
||||||
|
}
|
||||||
|
|
||||||
async leaveWorkspace (account: string): Promise<LoginInfo | null> {
|
async leaveWorkspace (account: string): Promise<LoginInfo | null> {
|
||||||
const request = {
|
const request = {
|
||||||
method: 'leaveWorkspace' as const,
|
method: 'leaveWorkspace' as const,
|
||||||
|
Loading…
Reference in New Issue
Block a user