Skip to content

Commit

Permalink
Added active user sieve.
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSamuel committed May 13, 2021
1 parent 0870699 commit 454092b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ mcc.mailbox.get().then((e) => {
- [x] Update mailbox ACL
- [x] Get mailboxes
- [x] Edit mailbox spam filter score
- [x] Get Active User Sieve

### Aliases
- [ ] Create alias
- [ ] Delete alias
- [ ] Update alias
- [ ] Get aliases
- [x] Create alias
- [x] Delete alias
- [x] Update alias
- [x] Get aliases

### Sync Jobs
- [ ] Create sync job
Expand Down
4 changes: 4 additions & 0 deletions src/Endpoints/mailbox-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ export default {
editUserACL: function (this: MailCowClient, payload: ACLEditRequest): Promise<MailcowResponse> {
return requestFactory.post<MailcowResponse>(`${this.BASE_URL}/edit/user-acl`, payload, this.HEADERS);
},

getActiveUserSieve: function (this: MailCowClient, username: string): Promise<string[]> {
return requestFactory.get<string[]>(`${this.BASE_URL}/get/active-user-sieve/${username}`, this.HEADERS);
},
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default class MailCowClient {
delete: MailboxEndpoints.deleteMailbox.bind(this),
edit: MailboxEndpoints.editMailbox.bind(this),
get: MailboxEndpoints.getMailbox.bind(this),
getUserSieve: MailboxEndpoints.getActiveUserSieve.bind(this),
spamscore: {
edit: MailboxEndpoints.editSpamScore.bind(this),
}
Expand Down

0 comments on commit 454092b

Please sign in to comment.