mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-11-12 09:20:37 +08:00
* Added list registered TLS certificates api endpoint to api docs generation. Add examples to res types * fix last commit's typo * Resolve ID for a server name api endpoint added to api docs generation. Add examples to res types * added create or update TLS sertificate for server name api endpoint to api docs generation * add acme to response of last commit's changes * added Delete a TLS certificate api endpoint to api docs generation * delete cert api endpoint change certs -> cert path param * fix cert-handler typo and bug. Added Request TLS certificate information api endpoint to api docs generation * last commit add certs.js
34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
'use strict';
|
|
|
|
const Joi = require('joi');
|
|
const { booleanSchema } = require('../../schemas');
|
|
|
|
const successRes = booleanSchema.required().description('Indicates successful response').example(true);
|
|
const totalRes = Joi.number().required().description('How many results were found').example(541);
|
|
const pageRes = Joi.number().required().description('Current page number. Derived from page query argument').example(1);
|
|
const previousCursorRes = Joi.alternatives()
|
|
.try(Joi.string(), booleanSchema)
|
|
.required()
|
|
.description('Either a cursor string or false if there are not any previous results')
|
|
.example('eyIkb2lkIjoiNWRmMWZkMmQ3NzkyNTExOGI2MDdjNjg0In0');
|
|
const nextCursorRes = Joi.alternatives()
|
|
.try(Joi.string(), booleanSchema)
|
|
.required()
|
|
.description('Either a cursor string or false if there are not any next results')
|
|
.example('TMIjjIy23ZGM2kk0lIixygWomEknQDWdmzMNIkbNeO0NNjR');
|
|
|
|
const quotaRes = Joi.object({
|
|
allowed: Joi.number().required().description('Allowed quota of the user in bytes'),
|
|
used: Joi.number().required().description('Space used in bytes')
|
|
})
|
|
.$_setFlag('objectName', 'Quota')
|
|
.description('Quota usage limits');
|
|
|
|
module.exports = {
|
|
successRes,
|
|
totalRes,
|
|
pageRes,
|
|
previousCursorRes,
|
|
nextCursorRes,
|
|
quotaRes
|
|
};
|