import { RcSdk } from "./RcSdk"; export class RcSdkUser { private sdk: RcSdk; constructor(sdk: RcSdk) { this.sdk = sdk; } public async list(): Promise { const response = await this.sdk.get( `users.list?query={"type":{"$eq":"user"}}&fields={"createdAt":1}`, ); return this.sdk.parseResponse(response); } public async info(userId: string): Promise { const response = await this.sdk.get(`users.info?userId=${userId}`); return this.sdk.parseResponse(response); } public async update(body: IUserUpdate): Promise { const response = await this.sdk.post(`users.update`, body); return this.sdk.parseResponse(response); } public async delete(body: IUserDelete): Promise { const response = await this.sdk.post(`users.delete`); return this.sdk.parseResponse(response); } public async create(body: IUserCreate): Promise { const response = await this.sdk.post(`users.create`, body); return this.sdk.parseResponse(response); } }