added endpoint to update inbox

This commit is contained in:
Miodec 2022-09-01 17:45:01 +02:00
parent a28ac81b2e
commit 7b18a44512

View file

@ -194,6 +194,17 @@ export default class Users {
}
async getInbox(): Promise<Ape.EndpointData> {
return await this.httpClient.patch(`${BASE_PATH}/inbox`);
return await this.httpClient.get(`${BASE_PATH}/inbox`);
}
async updateInbox(options: {
mailIdsToDelete?: string[];
mailIdsToMarkRead?: string[];
}): Promise<Ape.EndpointData> {
const payload = {
mailIdsToDelete: options.mailIdsToDelete,
mailIdsToMarkRead: options.mailIdsToMarkRead,
};
return await this.httpClient.patch(`${BASE_PATH}/inbox`, { payload });
}
}