Commit graph

45 commits

Author SHA1 Message Date
NickOvt
ee870b9fed
fix(api&imap-mailboxes): Added mailbox subpath and whole path max length limits to API and IMAP ZMS-169 (#732)
* Added submission api endpoint to api docs generation

* mailboxes.js, check for max subpath length and max count on create and rename of a mailbox

* add mailboxes tests

* IMAP rename err code fix. IMAP mailbox create and rename tests added

* IMAP tests, remove magic numbers

* mailboxes tests, remove magic numbers

* mailboxes tests fix broken tests

* remove repetitions
2024-09-23 12:38:02 +03:00
Louis Laureys
3c8e2d97a4
Fix openapi docs spelling errors (#694) 2024-06-02 11:25:59 +03:00
NickOvt
76d0e8f9e2
feat(api-mailboxes): Mailboxes API endpoints added to automatic API docs 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
2024-01-12 12:54:56 +02:00
NickOvt
ea24b9328b
feat(apidocs): Autogenerate OpenAPI docs ZMS-100 (#552)
* api.js added endpoint for generating openapi docs. added new info to one route in mailboxes.js and messages.js files so that the api docs generation can be done at all

* try to first generate json representation of the api docs

* add initial Joi Object parsing

* api.js make generation dynamic. messages.js add schemas from separate file. messages-schemas.js used for messages endpoint schemas

* add additions to schemas. Add new schemas to messages.js and also add response object there. Add response object parsing functionality to api.js

* add initial openapi doc yml file generation

* remove manual yaml parsing with js-yaml JSON -> YAML parsing

* fix replaceWithRefs and parseComponentsDecoupled functions, refactor, remove unnecessary comments and logs

* add support for another endpoint

* move big code from api.js to tools

* fix array type representation, fix response objects, add necessary data and changes to endpoints

* redo include logic into exclude login

* fix api generation in tools.js to accomodate new naming of objects

* fix messages.js, add structuredClone check in tools.js

* fix structured clone definition

* add one endpoint in messages.js to the api generation

* messages.js add one more endpoint to API generation

* add response to prev commit. Add new endpoint to API generation. Archive message and archive messages

* finish with post endpoints in messages.js

* added general request and response schemas. Also added req and res schemas for messages

* add multiple GET endpoints to API generation and changed them to new design. Use general schemas made earlier

* fix incorrect import of successRes

* fix mailboxes.js

* refactor general-schemas.js. Fix searchSchema in messages.js. Mailboxes.js fix response

* tools.js rename methodObj in API generation to operationObj

* tools.js api generation remove string fallbacks

* messages.js finish with GET endpoints, addition to API doc generation

* for openApi doc generation use JSON now instead of YAML
2023-11-10 17:55:16 +02:00
NickOvt
779bb11e83
feat(mailbox-count-limit): Set a limit for maximum number of mailbox folders ZMS-93 (#542)
* add max mailboxes to settings and consts

* rewrite mailbox handler create function, convert it to async as well as add check for max mailboxes

* mailboxes.js add support for new createAsync function, refactor. tools.js add support for new error code

* make userDate check the first check

* fix error message, make it clearer. Remove OVERQUOTA error code and replace with CANNOT. Remove OVERQUOTA error in the tools.js as well

* fix createAsync wrapper, strict ordering. Settings handler remove unnecessary second param
2023-10-24 11:07:12 +03:00
NickOvt
e43ba60069
chore(tests): Zms 90 (#503)
* mailbox-handler create() returns errors, code and http status codes correctly

* mailboxes handler now correctly return errors, error codes and appropriate http status codes, fixed tests

* mailbox-handler.js codes fix + tests fix in mailboxes-test.js

* mailbox-handler.js correct error handling for update and rename

* fix mailboxes.js http status part for PUT request, fix appropriate tests

* update responseWrapper, remove unnecessary try catches, fix mailbox-handler error codes and http status response codes, fix tests

* fix imap-core create

* reverted 405 errors to 400

* fix tests
2023-09-28 12:44:06 +03:00
Andris Reinman
35f3c111af Fix invalid mailbox hidden flag in mailboxes API response 2023-08-17 09:51:02 +03:00
Andris Reinman
e27eea14ff
Upgraded to Restify v9. Removed next() calls. 2022-11-24 12:26:10 +02:00
Andris Reinman
53cda36329 Upgrade Mongodb library from 3 to 4
update
2021-08-30 11:21:50 +03:00
Andris Reinman
25eb5b198b ensure non-200 response for errors 2021-05-20 14:47:20 +03:00
Andris Reinman
0869d7b391 include retention info in mailboxes list 2021-03-26 11:22:50 +02:00
Andris Reinman
766746945d Do not use _id in API response 2021-01-07 09:41:48 +02:00
Louis Laureys
4843208761 Delete all apidoc jsdoc 2020-11-06 01:34:32 +01:00
Andris Reinman
488f41c93e Upgraded joi to latest 2020-07-19 20:51:06 +03:00
Andris Reinman
6d17dbccf3 v1.27.3 2020-07-16 16:57:13 +03:00
Andris Reinman
e4b11e557e show validation errors in JSON response 2020-07-16 11:31:58 +03:00
Andris Reinman
8957ec028b default GET+POST to req.params 2020-07-16 11:15:04 +03:00
Andris Reinman
2ebd36f2d5 fix creating hidden folders 2020-07-02 13:23:06 +03:00
Andris Reinman
58eb010a9c allow to hide folders 2020-07-02 13:08:16 +03:00
Andris Reinman
dcef8e22cd migrated API tests from icedfrisby to supertest 2019-07-31 16:05:59 +03:00
Andris Reinman
2d3f959f4a Fixed mailbox counter counters 2019-07-31 11:32:41 +03:00
Andris Reinman
f1752817a2 IMAP compiler 2019-07-31 11:26:38 +03:00
Louis Laureys
08927831b7 an user > a user 2019-07-08 18:14:55 +02:00
Andris Reinman
7af4641e7c Include mailbox size in mailbox listing 2018-11-23 21:39:42 +02:00
Andris Reinman
624654a84d v1.7.0 2018-10-18 19:07:13 +03:00
Andris Reinman
5596f47a1a updated api permissions 2018-10-12 11:13:54 +03:00
Andris Reinman
abf5084573 added command logs track 2018-09-28 11:30:30 +03:00
Andris Reinman
aa64123766 allow using string 1 as truthy value for boolean arguments 2018-09-10 14:51:57 +03:00
Andris Reinman
500317ecc2 update specialuse 2018-09-10 14:41:56 +03:00
Andris Reinman
ca852d6290 allow listing only special use mailboxes 2018-09-10 14:13:14 +03:00
Andris Reinman
573787f1c3 allow ip and sess for all API calls. added hashedPassword argument for user create and update 2018-09-07 09:58:05 +03:00
Andris Reinman
e0f7eb89bf messages 2018-08-30 13:14:13 +03:00
Andris Reinman
5ea528acd0 messages 2018-08-30 12:47:31 +03:00
Andris Reinman
6deafd7bf4 messages 2018-08-30 12:42:06 +03:00
Andris Reinman
509eb00e09 mailboxes 2018-08-30 12:32:59 +03:00
Andris Reinman
fabbc597b9 acl for mailbox listing 2018-08-30 12:24:21 +03:00
Andris Reinman
83c1bdc745 use projection instead of fields 2018-08-14 23:45:45 +03:00
Andris Reinman
408b081e37 allow returning mailbox info by path 2018-01-24 21:04:53 +02:00
Andris Reinman
53564ede30 bumped deps 2018-01-18 12:58:31 +02:00
Andris Reinman
ed72234d1f mailbox ordering 2018-01-17 14:27:32 +02:00
Andris Reinman
768dd02da2 updated boolean check in api 2018-01-11 09:43:31 +02:00
Andris Reinman
e721238a97 addes some error codes 2017-12-21 10:31:34 +02:00
Andris Reinman
38e60e35a4 Added new resolve method to find user id for an username 2017-12-21 09:59:56 +02:00
Andris Reinman
5ccbc35a38 updated api docs 2017-11-28 11:51:45 +02:00
Andris Reinman
9e767187cb refactor api 2017-07-26 11:52:55 +03:00