feat(core): Add delete user functionality and necessary tests
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@apiclient.xyz/zitadel',
|
||||
version: '1.0.9',
|
||||
version: '1.1.0',
|
||||
description: 'An unofficial client for interacting with Zitadel API, enabling user and project management functionalities.'
|
||||
}
|
||||
|
@ -79,6 +79,12 @@ export class ZitaldelClient {
|
||||
familyName: optionsArg.lastName,
|
||||
}
|
||||
});
|
||||
console.log(response);
|
||||
// const allUsers = await this.listUsers();
|
||||
// console.log(JSON.stringify(allUsers, null, 2));
|
||||
return new ZitaldelUser(this, {
|
||||
id: response.userId,
|
||||
lastLogin: null,
|
||||
username: optionsArg.email,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -64,4 +64,13 @@ export class ZitaldelUser {
|
||||
userId: this.data.id,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* deletes the user
|
||||
*/
|
||||
public async delete() {
|
||||
const response = await this.zitadelclientRef.userClient.deleteUser({
|
||||
userId: this.data.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user