Skip to content

Commit

Permalink
Add JSDoc tags
Browse files Browse the repository at this point in the history
  • Loading branch information
steunix committed Sep 29, 2024
1 parent 82a9f38 commit 3b5f3d9
Show file tree
Hide file tree
Showing 39 changed files with 81 additions and 4 deletions.
4 changes: 3 additions & 1 deletion api/v1/controllers/events.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Events controller module
* @module controllers/events
* @author Stefano Rivoir <[email protected]>
*/
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as R from '../../../lib/response.mjs'
import * as Events from '../../../lib/event.mjs'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/folders.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Folders controller module
* @module controllers/folders
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { newId } from '../../../lib/id.mjs'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/groups.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Groups controller module
* @module controllers/groups
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { newId } from '../../../lib/id.mjs'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/items.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Items controller module
* @module controllers/items
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Prisma } from '@prisma/client'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/itemtypes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Item types controller module
* @module controllers/itemtypes
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as R from '../../../lib/response.mjs'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/login.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Login controller module
* @module controllers/login
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as LDAP from 'ldap-authentication'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/onetimetokens.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* One type tokens module
* @module controllers/onetimetokens
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as R from '../../../lib/response.mjs'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/personal.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Personal folder controller module
* @module controllers/personal
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as R from '../../../lib/response.mjs'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/users.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* User controller module
* @module controllers/users
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { newId } from '../../../lib/id.mjs'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/usersettings.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* User settings controller module
* @module controllers/usersettings
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as R from '../../../lib/response.mjs'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/controllers/util.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Util controller module
* @module controllers/util
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import generator from 'generate-password'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/events.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Events route module
* @module routes/events
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/folders.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Folders route module
* @module routes/folders
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/groups.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Groups route module
* @module routes/groups
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/items.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Items route module
* @module routes/items
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/itemtypes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Item types route module
* @module routes/itemtypes
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/login.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Login route module
* @module routes/login
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/onetimetokens.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* One time tokens module
* @module routes/onetimetokens
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/personal.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Personal folders route module
* @module routes/personal
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/users.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Users route module
* @module routes/users
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/routes/util.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Util route module
* @module routes/util
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { Router } from 'express'
Expand Down
2 changes: 2 additions & 0 deletions lib/auth.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Authorization module
* @module lib/auth
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import jsonwebtoken from 'jsonwebtoken'
Expand Down
2 changes: 2 additions & 0 deletions lib/cache.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Cache module
* @module lib/cache
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as Config from './config.mjs'
Expand Down
2 changes: 2 additions & 0 deletions lib/cache/cache-node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Cache with node-cache
* @module lib/cache-node
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import NodeCache from 'node-cache'
Expand Down
4 changes: 3 additions & 1 deletion lib/cache/cache-redis.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Cache with Redis
* @module lib/cache-redis
* @author Stefano Rivoir <[email protected]>
*/
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { createClient } from 'redis'

Expand Down
2 changes: 2 additions & 0 deletions lib/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Config module
* @module lib/config
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { readFile } from 'fs/promises'
Expand Down
2 changes: 2 additions & 0 deletions lib/const.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Const module
* @module lib/const
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

export const PW_USER_ADMINID = '0'
Expand Down
3 changes: 3 additions & 0 deletions lib/crypt.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
* Crypto module
* @module lib/crypt
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as Config from '../lib/config.mjs'
import * as crypto from 'crypto'
import bcrypt from 'bcrypt'
Expand Down
2 changes: 2 additions & 0 deletions lib/db.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* DB module
* @module lib/db
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { PrismaClient } from '@prisma/client'
Expand Down
2 changes: 2 additions & 0 deletions lib/event.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Action log
* @module lib/action
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import DB from './db.mjs'
Expand Down
2 changes: 2 additions & 0 deletions lib/id.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* IDs module
* @module lib/id
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { uuidv7obj } from 'uuidv7'
Expand Down
2 changes: 2 additions & 0 deletions lib/jsonvalidator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* JSON schema validator module
* @module lib/jsonvalidator
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import Ajv from 'ajv'
Expand Down
2 changes: 2 additions & 0 deletions lib/ratelimiter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Rate limiter module
* @module lib/random
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import { rateLimit } from 'express-rate-limit'
Expand Down
2 changes: 2 additions & 0 deletions lib/response.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Response module
* @module lib/response
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

export const CREATED = 201
Expand Down
2 changes: 2 additions & 0 deletions model/folder.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Folder object module
* @module model/folder
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as Cache from '../lib/cache.mjs'
Expand Down
2 changes: 2 additions & 0 deletions model/group.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Group object module
* @module model/group
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as Cache from '../lib/cache.mjs'
Expand Down
2 changes: 2 additions & 0 deletions model/item.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Item object module
* @module model/item
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import * as Folder from './folder.mjs'
Expand Down
2 changes: 2 additions & 0 deletions model/user.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* User object module
* @module model/user
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import DB from '../lib/db.mjs'
Expand Down
4 changes: 2 additions & 2 deletions passweaver-api.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* PassWeaver, a collaborative password manager
*
* (c) 2023 - Stefano Rivoir <[email protected]>
*
* @module main
* @author Stefano Rivoir <[email protected]>
* @licence MIT
* @copyright (c) 2023-2024 - Stefano Rivoir <[email protected]>
*/

import Express from 'express'
Expand Down

0 comments on commit 3b5f3d9

Please sign in to comment.