-
-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api-mailboxes): Mailboxes API endpoints added to automatic API d…
…ocs generation ZMS-114 (#602) * added List Mailboxes for a User endpoint to API generation * Request Mailbox information endpoint added to API generation * Update Mailbox information endpoint added to API generation * added Delete a Mailbox endpoint to API generation. Add example to Request Mailbox information API endpoint * fix mailbox path param in Request Mailbox information * GetMailboxesResult retention should be not required, fix accidental typo
- Loading branch information
Showing
2 changed files
with
176 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
const Joi = require('joi'); | ||
const { mailboxId } = require('../request/general-schemas'); | ||
const { booleanSchema } = require('../../schemas'); | ||
|
||
const GetMailboxesResult = Joi.object({ | ||
id: mailboxId, | ||
name: Joi.string().required().description('Name for the mailbox (unicode string)'), | ||
path: Joi.string().required().description('Full path of the mailbox, folders are separated by slashes, ends with the mailbox name (unicode string)'), | ||
specialUse: Joi.string().required().description('Either special use identifier or null. One of Drafts, Junk, Sent or Trash'), | ||
modifyIndex: Joi.number().required().description('Modification sequence number. Incremented on every change in the mailbox.'), | ||
subscribed: booleanSchema.required().description('Mailbox subscription status. IMAP clients may unsubscribe from a folder.'), | ||
retention: Joi.number().description( | ||
'Default retention policy for this mailbox (in ms). If set then messages added to this maibox will be automatically deleted after retention time.' | ||
), | ||
hidden: booleanSchema.required().description('Is the folder hidden or not'), | ||
total: Joi.number().required().description('How many messages are stored in this mailbox'), | ||
unseen: Joi.number().required().description('How many unseen messages are stored in this mailbox'), | ||
size: Joi.number().description('Total size of mailbox in bytes.') | ||
}); | ||
|
||
module.exports = { | ||
GetMailboxesResult | ||
}; |