mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-01 17:06:23 +08:00
Add placeholders for various routes that N1 uses.
This commit is contained in:
parent
0fe6343137
commit
7906e3303d
5 changed files with 125 additions and 0 deletions
27
packages/nylas-api/routes/calendars.js
Normal file
27
packages/nylas-api/routes/calendars.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
const Joi = require('joi');
|
||||
|
||||
// TODO: This is a placeholder
|
||||
module.exports = (server) => {
|
||||
server.route({
|
||||
method: 'GET',
|
||||
path: '/calendars',
|
||||
config: {
|
||||
description: 'Returns calendars.',
|
||||
notes: 'Notes go here',
|
||||
tags: ['metadata'],
|
||||
validate: {
|
||||
query: {
|
||||
limit: Joi.number().integer().min(1).max(2000).default(100),
|
||||
offset: Joi.number().integer().min(0).default(0),
|
||||
view: Joi.string().valid('count'),
|
||||
},
|
||||
},
|
||||
response: {
|
||||
schema: Joi.array(),
|
||||
},
|
||||
},
|
||||
handler: (request, reply) => {
|
||||
reply('[]');
|
||||
},
|
||||
});
|
||||
}
|
|
@ -66,4 +66,21 @@ module.exports = (server) => {
|
|||
})
|
||||
},
|
||||
})
|
||||
|
||||
// TODO: This is a placeholder
|
||||
server.route({
|
||||
method: 'GET',
|
||||
path: '/contacts/rankings',
|
||||
config: {
|
||||
description: 'Returns contact rankings.',
|
||||
notes: 'Notes go here',
|
||||
tags: ['contacts'],
|
||||
response: {
|
||||
schema: Serialization.jsonSchema('Contact'),
|
||||
},
|
||||
},
|
||||
handler: (request, reply) => {
|
||||
reply('{}');
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
27
packages/nylas-api/routes/drafts.js
Normal file
27
packages/nylas-api/routes/drafts.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
const Joi = require('joi');
|
||||
|
||||
// TODO: This is a placeholder
|
||||
module.exports = (server) => {
|
||||
server.route({
|
||||
method: 'GET',
|
||||
path: '/drafts',
|
||||
config: {
|
||||
description: 'Returns drafts.',
|
||||
notes: 'Notes go here',
|
||||
tags: ['drafts'],
|
||||
validate: {
|
||||
query: {
|
||||
limit: Joi.number().integer().min(1).max(2000).default(100),
|
||||
offset: Joi.number().integer().min(0).default(0),
|
||||
view: Joi.string().valid('count'),
|
||||
},
|
||||
},
|
||||
response: {
|
||||
schema: Joi.array(),
|
||||
},
|
||||
},
|
||||
handler: (request, reply) => {
|
||||
reply('[]');
|
||||
},
|
||||
});
|
||||
}
|
27
packages/nylas-api/routes/events.js
Normal file
27
packages/nylas-api/routes/events.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
const Joi = require('joi');
|
||||
|
||||
// TODO: This is a placeholder
|
||||
module.exports = (server) => {
|
||||
server.route({
|
||||
method: 'GET',
|
||||
path: '/events',
|
||||
config: {
|
||||
description: 'Returns events.',
|
||||
notes: 'Notes go here',
|
||||
tags: ['events'],
|
||||
validate: {
|
||||
query: {
|
||||
limit: Joi.number().integer().min(1).max(2000).default(100),
|
||||
offset: Joi.number().integer().min(0).default(0),
|
||||
view: Joi.string().valid('count'),
|
||||
},
|
||||
},
|
||||
response: {
|
||||
schema: Joi.array(),
|
||||
},
|
||||
},
|
||||
handler: (request, reply) => {
|
||||
reply('[]');
|
||||
},
|
||||
});
|
||||
}
|
27
packages/nylas-api/routes/metadata.js
Normal file
27
packages/nylas-api/routes/metadata.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
const Joi = require('joi');
|
||||
|
||||
// TODO: This is a placeholder
|
||||
module.exports = (server) => {
|
||||
server.route({
|
||||
method: 'GET',
|
||||
path: '/metadata',
|
||||
config: {
|
||||
description: 'Returns metadata.',
|
||||
notes: 'Notes go here',
|
||||
tags: ['metadata'],
|
||||
validate: {
|
||||
query: {
|
||||
limit: Joi.number().integer().min(1).max(2000).default(100),
|
||||
offset: Joi.number().integer().min(0).default(0),
|
||||
view: Joi.string().valid('count'),
|
||||
},
|
||||
},
|
||||
response: {
|
||||
schema: Joi.array(),
|
||||
},
|
||||
},
|
||||
handler: (request, reply) => {
|
||||
reply('[]');
|
||||
},
|
||||
});
|
||||
}
|
Loading…
Add table
Reference in a new issue