diff --git a/__tests__/users.test.ts b/__tests__/users.test.ts index 5baa341..80a30c2 100644 --- a/__tests__/users.test.ts +++ b/__tests__/users.test.ts @@ -191,10 +191,9 @@ describe("user API", () => { }); it("delete", async () => { - const response = await client.deleteUser({ userId: newUser.id }); + const response = await client.deleteUsers({ user_ids: [newUser.id] }); - expect(response.user?.id).toBe(newUser.id); - expect(response.user?.custom.color).toBe("blue"); + expect(response).toBeDefined(); }); afterAll(async () => { diff --git a/src/StreamClient.ts b/src/StreamClient.ts index d7133c6..54f7a69 100644 --- a/src/StreamClient.ts +++ b/src/StreamClient.ts @@ -241,6 +241,11 @@ export class StreamClient { return this.usersApi.deactivateUsers({ deactivateUsersRequest }); }; + /** + * @deprecated use `deleteUsers` instead + * @param deleteUsersRequest + * @returns + */ deleteUser = async (request: DeleteUserRequest) => { const response = await this.usersApi.deleteUser(request); response.user = this.mapCustomDataAfterReceive(response.user);