From 8ad5f569e9a7f1f5d712c431a254544f0f6a9ef0 Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Fri, 9 Dec 2022 00:22:24 +0700 Subject: [PATCH 01/12] init --- .editorconfig | 9 - .env | 7 +- .env.example | 3 + .eslintignore | 2 + .eslintrc.js | 15 + .eslintrc.json | 23 - .gitignore | 2 + .prettierignore | 3 +- .prettierrc | 16 - README.md | 119 - app.js | 31 - controllers/chatsController.js | 77 - controllers/getMessages.js | 37 - controllers/groupsController.js | 45 - controllers/sessionsController.js | 46 - dirname.js | 6 - examples/authenticating.js | 31 - examples/sending-message.js | 49 - external/baileys-store-1.tgz | Bin 0 -> 9739 bytes middlewares/requestValidator.js | 14 - middlewares/sessionValidator.js | 15 - package-lock.json | 4283 ----------------- package.json | 54 +- postman_collection.json | 1907 -------- prettier.config.js | 8 + .../20221208155846_init/migration.sql | 160 + prisma/migrations/migration_lock.toml | 3 + prisma/schema.prisma | 163 + response.js | 12 - routes.js | 17 - routes/chatsRoute.js | 26 - routes/groupsRoute.js | 26 - routes/sessionsRoute.js | 17 - sessions/.gitignore | 2 - src/index.ts | 15 + src/wa.ts | 98 + tsconfig.json | 15 + whatsapp.js | 282 -- yarn.lock | 2589 ++++++++++ 39 files changed, 3111 insertions(+), 7116 deletions(-) delete mode 100644 .editorconfig create mode 100644 .env.example create mode 100644 .eslintignore create mode 100644 .eslintrc.js delete mode 100644 .eslintrc.json delete mode 100644 .prettierrc delete mode 100644 README.md delete mode 100644 app.js delete mode 100644 controllers/chatsController.js delete mode 100644 controllers/getMessages.js delete mode 100644 controllers/groupsController.js delete mode 100644 controllers/sessionsController.js delete mode 100644 dirname.js delete mode 100644 examples/authenticating.js delete mode 100644 examples/sending-message.js create mode 100644 external/baileys-store-1.tgz delete mode 100644 middlewares/requestValidator.js delete mode 100644 middlewares/sessionValidator.js delete mode 100644 package-lock.json delete mode 100644 postman_collection.json create mode 100644 prettier.config.js create mode 100644 prisma/migrations/20221208155846_init/migration.sql create mode 100644 prisma/migrations/migration_lock.toml create mode 100644 prisma/schema.prisma delete mode 100644 response.js delete mode 100644 routes.js delete mode 100644 routes/chatsRoute.js delete mode 100644 routes/groupsRoute.js delete mode 100644 routes/sessionsRoute.js delete mode 100644 sessions/.gitignore create mode 100644 src/index.ts create mode 100644 src/wa.ts create mode 100644 tsconfig.json delete mode 100644 whatsapp.js create mode 100644 yarn.lock diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 677e36e2..00000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 4 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/.env b/.env index 235a42e1..d99f4aff 100644 --- a/.env +++ b/.env @@ -1,4 +1,3 @@ -HOST=127.0.0.1 -PORT=8000 -MAX_RETRIES=5 -RECONNECT_INTERVAL=5000 +HOST="localhost" +PORT="3000" +DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api" \ No newline at end of file diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..d99f4aff --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +HOST="localhost" +PORT="3000" +DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api" \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..b9470778 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..00663462 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,15 @@ +module.exports = { + root: true, + env: { + node: true, + }, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], + rules: { + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + }, +}; diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index c251a2b5..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "env": { - "node": true - }, - "extends": ["xo", "prettier"], - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module" - }, - "rules": { - "prettier/prettier": "error", - "one-var": "off", - "max-params": ["error", 5], - "arrow-body-style": ["error", "always"], - "radix": "off", - "no-unused-expressions": ["error", { "allowTernary": true }], - "curly": "error", - "new-cap": "off", - "no-return-assign": "off", - "no-await-in-loop": "off" - }, - "plugins": ["prettier"] -} diff --git a/.gitignore b/.gitignore index c2658d7d..f94630c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ node_modules/ +dist/ +.env \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index e41f7797..b9470778 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ -sessions/ +node_modules/ +dist/ diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 1958d3c9..00000000 --- a/.prettierrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "printWidth": 120, - "tabWidth": 4, - "useTabs": false, - "endOfLine": "lf", - "semi": false, - "singleQuote": true, - "overrides": [ - { - "files": "*.json", - "options": { - "tabWidth": 2 - } - } - ] -} diff --git a/README.md b/README.md deleted file mode 100644 index 99b43a49..00000000 --- a/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# Baileys API - -An implementation of [@adiwajshing/Baileys](https://github.com/adiwajshing/Baileys) as a simple RESTful API service with multiple device support. This project implements both **Legacy** (Normal WhatsApp Web) and **Beta Multi-Device** client so that you can choose and use one of them easily. - -## Requirements - -- **NodeJS** version **14.5.0** or higher. - -## Installation - -1. Download or clone this repo. -2. Enter to the project directory. -3. Install the dependencies. - -## `.env` Configurations - -```env -# Listening Host -HOST=127.0.0.1 - -# Listening Port -PORT=8000 - -# Maximum Reconnect Attempts -MAX_RETRIES=5 - -# Reconnect Interval (in Milliseconds) -RECONNECT_INTERVAL=5000 -``` - -## Usage - -1. You can start the app by executing `npm run start` or `node .`. -2. Now the endpoint should be available according to your environment variable configurations. Default is at `http://localhost:8000`. - -Also check out the `examples` directory for the basic usage examples. - -## API Docs - -The API documentation is available online [here](https://documenter.getpostman.com/view/18988925/UVeNni36). You can also import the **Postman Collection File** `(postman_collection.json)` into your Postman App alternatively. - -The server will respond in following JSON format: - -```javascript -{ - success: true|false, // bool - message: "", // string - data: {}|[] // object or array of object -} -``` - -## Sending Message - -All send message endpoints is now accept a JSON body, this gives you the ability to send any kind of supported message. You can pass any kind supported message into the `message` property. - -Here's some examples: - -```javascript -// Send text message -{ - receiver: '628231xxxxx', - message: { - text: 'Hello there!' - } -} - -// Send image -{ - receiver: '628231xxxxx', - message: { - image: { - url: 'https://example.com/logo.png' - }, - caption: 'My logo' - } -} - -// Send video -{ - receiver: '628231xxxxx', - message: { - video: { - url: 'https://example.com/intro.mp4' - }, - caption: 'My intro' - } -} - -// Send document -{ - receiver: '628231xxxxx', - message: { - document: { - url: 'https://example.com/presentation.pdf' - }, - mimetype: 'application/pdf', - fileName: 'presentation-1.pdf' - } -} -``` - -For more examples, check out Baileys's docs [here](https://github.com/adiwajshing/Baileys#sending-messages). - -## Known Issue - -Currently there's no known issues. If you find any, please kindly open a new one. - -## Notes - -- The app only provide a very simple validation, you may want to implement your own. -- When sending message, your `message` property will not be validated, so make sure you sent the right data! -- There's no authentication, you may want to implement your own. -- The **Beta Multi-Device** client use provided Baileys's `makeInMemoryStore` method which will store your data in memory and a json file, you may want to use a better data management. -- Automatically reading incoming messages is now disabled by default. Uncomment `whatsapp.js:91-105` to enable this behaviour. -- If you have problems when deploying on **CPanel** or any other similar hosting, transpiling your code into **CommonJS** should fix the problems. - -## Notice - -This project is intended for learning purpose only, don't use it for spamming or any activities that's prohibited by **WhatsApp**. diff --git a/app.js b/app.js deleted file mode 100644 index 1e31972e..00000000 --- a/app.js +++ /dev/null @@ -1,31 +0,0 @@ -import 'dotenv/config' -import express from 'express' -import nodeCleanup from 'node-cleanup' -import routes from './routes.js' -import { init, cleanup } from './whatsapp.js' -import cors from 'cors' - -const app = express() - -const host = process.env.HOST || undefined -const port = parseInt(process.env.PORT ?? 8000) - -app.use(cors()) -app.use(express.urlencoded({ extended: true })) -app.use(express.json()) -app.use('/', routes) - -const listenerCallback = () => { - init() - console.log(`Server is listening on http://${host ? host : 'localhost'}:${port}`) -} - -if (host) { - app.listen(port, host, listenerCallback) -} else { - app.listen(port, listenerCallback) -} - -nodeCleanup(cleanup) - -export default app diff --git a/controllers/chatsController.js b/controllers/chatsController.js deleted file mode 100644 index 5cbbe948..00000000 --- a/controllers/chatsController.js +++ /dev/null @@ -1,77 +0,0 @@ -import { getSession, getChatList, isExists, sendMessage, formatPhone } from './../whatsapp.js' -import response from './../response.js' - -const getList = (req, res) => { - return response(res, 200, true, '', getChatList(res.locals.sessionId)) -} - -const send = async (req, res) => { - const session = getSession(res.locals.sessionId) - const receiver = formatPhone(req.body.receiver) - const { message } = req.body - - try { - const exists = await isExists(session, receiver) - - if (!exists) { - return response(res, 400, false, 'The receiver number is not exists.') - } - - await sendMessage(session, receiver, message, 0) - - response(res, 200, true, 'The message has been successfully sent.') - } catch { - response(res, 500, false, 'Failed to send the message.') - } -} - -const sendBulk = async (req, res) => { - const session = getSession(res.locals.sessionId) - const errors = [] - - for (const [key, data] of req.body.entries()) { - let { receiver, message, delay } = data - - if (!receiver || !message) { - errors.push(key) - - continue - } - - if (!delay || isNaN(delay)) { - delay = 1000 - } - - receiver = formatPhone(receiver) - - try { - const exists = await isExists(session, receiver) - - if (!exists) { - errors.push(key) - - continue - } - - await sendMessage(session, receiver, message, delay) - } catch { - errors.push(key) - } - } - - if (errors.length === 0) { - return response(res, 200, true, 'All messages has been successfully sent.') - } - - const isAllFailed = errors.length === req.body.length - - response( - res, - isAllFailed ? 500 : 200, - !isAllFailed, - isAllFailed ? 'Failed to send all messages.' : 'Some messages has been successfully sent.', - { errors } - ) -} - -export { getList, send, sendBulk } diff --git a/controllers/getMessages.js b/controllers/getMessages.js deleted file mode 100644 index 80fd2b4b..00000000 --- a/controllers/getMessages.js +++ /dev/null @@ -1,37 +0,0 @@ -import { getSession } from '../whatsapp.js' -import response from './../response.js' - -const getMessages = async (req, res) => { - const session = getSession(res.locals.sessionId) - - /* eslint-disable camelcase */ - const { jid } = req.params - const { limit = 25, cursor_id = null, cursor_fromMe = null } = req.query - - const cursor = {} - - if (cursor_id) { - cursor.before = { - id: cursor_id, - fromMe: Boolean(cursor_fromMe && cursor_fromMe === 'true'), - } - } - /* eslint-enable camelcase */ - - try { - let messages - const useCursor = 'before' in cursor ? cursor : null - - if (session.isLegacy) { - messages = await session.fetchMessagesFromWA(jid, limit, useCursor) - } else { - messages = await session.store.loadMessages(jid, limit, useCursor) - } - - response(res, 200, true, '', messages) - } catch { - response(res, 500, false, 'Failed to load messages.') - } -} - -export default getMessages diff --git a/controllers/groupsController.js b/controllers/groupsController.js deleted file mode 100644 index 10a8a488..00000000 --- a/controllers/groupsController.js +++ /dev/null @@ -1,45 +0,0 @@ -import { getSession, getChatList, isExists, sendMessage, formatGroup } from './../whatsapp.js' -import response from './../response.js' - -const getList = (req, res) => { - return response(res, 200, true, '', getChatList(res.locals.sessionId, true)) -} - -const getGroupMetaData = async (req, res) => { - const session = getSession(res.locals.sessionId) - const { jid } = req.params - - try { - const data = await session.groupMetadata(jid) - - if (!data.id) { - return response(res, 400, false, 'The group is not exists.') - } - - response(res, 200, true, '', data) - } catch { - response(res, 500, false, 'Failed to get group metadata.') - } -} - -const send = async (req, res) => { - const session = getSession(res.locals.sessionId) - const receiver = formatGroup(req.body.receiver) - const { message } = req.body - - try { - const exists = await isExists(session, receiver, true) - - if (!exists) { - return response(res, 400, false, 'The group is not exists.') - } - - await sendMessage(session, receiver, message) - - response(res, 200, true, 'The message has been successfully sent.') - } catch { - response(res, 500, false, 'Failed to send the message.') - } -} - -export { getList, getGroupMetaData, send } diff --git a/controllers/sessionsController.js b/controllers/sessionsController.js deleted file mode 100644 index 5838aca5..00000000 --- a/controllers/sessionsController.js +++ /dev/null @@ -1,46 +0,0 @@ -import { isSessionExists, createSession, getSession, deleteSession } from './../whatsapp.js' -import response from './../response.js' - -const find = (req, res) => { - response(res, 200, true, 'Session found.') -} - -const status = (req, res) => { - const states = ['connecting', 'connected', 'disconnecting', 'disconnected'] - - const session = getSession(res.locals.sessionId) - let state = states[session.ws.readyState] - - state = - state === 'connected' && typeof (session.isLegacy ? session.state.legacy.user : session.user) !== 'undefined' - ? 'authenticated' - : state - - response(res, 200, true, '', { status: state }) -} - -const add = (req, res) => { - const { id, isLegacy } = req.body - - if (isSessionExists(id)) { - return response(res, 409, false, 'Session already exists, please use another id.') - } - - createSession(id, isLegacy === 'true', res) -} - -const del = async (req, res) => { - const { id } = req.params - const session = getSession(id) - - try { - await session.logout() - } catch { - } finally { - deleteSession(id, session.isLegacy) - } - - response(res, 200, true, 'The session has been successfully deleted.') -} - -export { find, status, add, del } diff --git a/dirname.js b/dirname.js deleted file mode 100644 index 450f3fee..00000000 --- a/dirname.js +++ /dev/null @@ -1,6 +0,0 @@ -import { dirname } from 'path' -import { fileURLToPath } from 'url' - -const __dirname = dirname(fileURLToPath(import.meta.url)) - -export default __dirname diff --git a/examples/authenticating.js b/examples/authenticating.js deleted file mode 100644 index ba333350..00000000 --- a/examples/authenticating.js +++ /dev/null @@ -1,31 +0,0 @@ -const BASE_URI = 'http://localhost:8000/' -const SESSION_ID = 'john' - -const sendRequest = async () => { - // Here we are using fetch API to send the request - const response = await fetch(`${BASE_URI}sessions/add`, { - method: 'POST', - body: JSON.stringify({ - id: SESSION_ID, - // A string value representing the client type. - // Use 'false' for Multi-Device, - // or 'true' for Legacy (Normal WhatsApp Web). - // This is important since the generated QR is not compatible each other. - // So make sure you generated the correct one. - isLegacy: 'false', - }), - headers: { - 'Content-Type': 'application/json', - }, - }) - - return response.json() -} - -;(async () => { - const response = await sendRequest() - - if (response.success && 'qr' in response.data) { - // Scan the QR - } -})() diff --git a/examples/sending-message.js b/examples/sending-message.js deleted file mode 100644 index 60f47825..00000000 --- a/examples/sending-message.js +++ /dev/null @@ -1,49 +0,0 @@ -const BASE_URI = 'http://localhost:8000/' -const SESSION_ID = 'john' - -const sendMessage = async (endpoint, data) => { - // Here we are using fetch API to send the request - const response = await fetch(`${BASE_URI}${endpoint}?id=${SESSION_ID}`, { - method: 'POST', - body: JSON.stringify(data), - headers: { - 'Content-Type': 'application/json', - }, - }) - - return response.json() -} - -;(async () => { - // Send Text Message to Someone - await sendMessage('chats/send', { - receiver: '628231xxxxx', - message: { - text: 'Hello there!', - }, - }) - - // Send Bulk Text Message to Multiple Person - await sendMessage('chats/send-bulk', [ - { - receiver: '628231xxxxx', - message: { - text: 'Hello! How are you?', - }, - }, - { - receiver: '628951xxxxx', - message: { - text: "I'm fine, thank you.", - }, - }, - ]) - - // Send Text Message to a Group - await sendMessage('groups/send', { - receiver: '628950xxxxx-1631xxxxx', - message: { - text: 'Hello guys!', - }, - }) -})() diff --git a/external/baileys-store-1.tgz b/external/baileys-store-1.tgz new file mode 100644 index 0000000000000000000000000000000000000000..e9fa52749d1b4fac756222e0cf024cc7c34d26b4 GIT binary patch literal 9739 zcmV+mCiK}KiwFP!000003hg~>ciT3y_p{E~|A07q)>5uaOY$pqnxu~HG}`)gEvLOb zzS)EpA)7Tta!JaLHtYX>XYe3F5+o%@mXof~hizg23i8Kl$GXPY+ww`R~zLVth@n1El zdt=bg=FoR$&J0!KzqQ$B3~29v4w~d}%znWC?1-|T(4pXl29V{sm)_nRV!9UD_4?O=XZEl5-jw$l z$i;H<2zWmJ73wIF0IzW1uvXjKIoo-&)7$^}{`BDG(r_I9(}6O9=SAD?&f5CMPmTv; za|K=5UR!Hzu3i9@={WotMnLtY%=pXsf6(3CKkDs22#;0F|4wUtlh6OHwau-KHJJbH z&5hP#{?8*FcF)Lx-KTCyYqed^9|!j3RYdCj2I;gq9dhc8uS~aAJE6hQhFJ()3&P-v z2J~V~E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A`5iUcyn;AFrjxx_N*@F=j;k58(hsRw9AS7g$g Z*^5Iwi?m3Kv`7z~{vTDCaMS<<0RRRoKIs4e literal 0 HcmV?d00001 diff --git a/middlewares/requestValidator.js b/middlewares/requestValidator.js deleted file mode 100644 index 78116b03..00000000 --- a/middlewares/requestValidator.js +++ /dev/null @@ -1,14 +0,0 @@ -import { validationResult } from 'express-validator' -import response from './../response.js' - -const validate = (req, res, next) => { - const errors = validationResult(req) - - if (!errors.isEmpty()) { - return response(res, 400, false, 'Please fill out all required input.') - } - - next() -} - -export default validate diff --git a/middlewares/sessionValidator.js b/middlewares/sessionValidator.js deleted file mode 100644 index beb092fe..00000000 --- a/middlewares/sessionValidator.js +++ /dev/null @@ -1,15 +0,0 @@ -import { isSessionExists } from '../whatsapp.js' -import response from './../response.js' - -const validate = (req, res, next) => { - const sessionId = req.query.id ?? req.params.id - - if (!isSessionExists(sessionId)) { - return response(res, 404, false, 'Session not found.') - } - - res.locals.sessionId = sessionId - next() -} - -export default validate diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 078f50ee..00000000 --- a/package-lock.json +++ /dev/null @@ -1,4283 +0,0 @@ -{ - "name": "baileys-api", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "baileys-api", - "dependencies": { - "@adiwajshing/baileys": "^4.2.0", - "@adiwajshing/keyed-db": "^0.2.4", - "cors": "^2.8.5", - "dotenv": "^16.0.0", - "express": "^4.17.2", - "express-validator": "^6.14.0", - "node-cleanup": "^2.1.2", - "pino": "^7.10.0", - "qrcode": "^1.5.0", - "qrcode-terminal": "^0.12.0" - }, - "devDependencies": { - "eslint": "^8.5.0", - "eslint-config-prettier": "^8.3.0", - "eslint-config-xo": "^0.39.0", - "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.5.1" - }, - "engines": { - "node": ">=14.5.0" - } - }, - "node_modules/@adiwajshing/baileys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@adiwajshing/baileys/-/baileys-4.2.0.tgz", - "integrity": "sha512-lNS6V8uDn8PrbH3YZM+4531v8/RVXGzVSJztp5GyKyjI8h1LHD2ZVq7NahK6jBBGR/zXz+OyDG+jJJhTHgJdlA==", - "dependencies": { - "@hapi/boom": "^9.1.3", - "axios": "^0.24.0", - "futoin-hkdf": "^1.5.0", - "libsignal": "git+https://github.com/adiwajshing/libsignal-node.git", - "music-metadata": "^7.12.3", - "node-cache": "^5.1.2", - "pino": "^7.0.0", - "protobufjs": "^6.11.3", - "ws": "^8.0.0" - }, - "peerDependencies": { - "@adiwajshing/keyed-db": "^0.2.4", - "jimp": "^0.16.1", - "link-preview-js": "^2.1.13", - "qrcode-terminal": "^0.12.0", - "sharp": "^0.30.5" - }, - "peerDependenciesMeta": { - "@adiwajshing/keyed-db": { - "optional": true - }, - "jimp": { - "optional": true - }, - "link-preview-js": { - "optional": true - }, - "qrcode-terminal": { - "optional": true - }, - "sharp": { - "optional": true - } - } - }, - "node_modules/@adiwajshing/keyed-db": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@adiwajshing/keyed-db/-/keyed-db-0.2.4.tgz", - "integrity": "sha512-yprSnAtj80/VKuDqRcFFLDYltoNV8tChNwFfIgcf6PGD4sjzWIBgs08pRuTqGH5mk5wgL6PBRSsMCZqtZwzFEw==" - }, - "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@hapi/boom": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz", - "integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==", - "dependencies": { - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" - }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" - }, - "node_modules/@types/node": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", - "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" - }, - "node_modules/atomic-sleep": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", - "dependencies": { - "follow-redirects": "^1.14.4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.10.3", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/confusing-browser-globals": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", - "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", - "dev": true - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" - }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/curve25519-js": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/curve25519-js/-/curve25519-js-0.0.4.tgz", - "integrity": "sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w==" - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/dijkstrajs": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.2.tgz", - "integrity": "sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg==" - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dotenv": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", - "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==", - "engines": { - "node": ">=12" - } - }, - "node_modules/duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/encode-utf8": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", - "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", - "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", - "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-config-xo": { - "version": "0.39.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.39.0.tgz", - "integrity": "sha512-QX+ZnQgzy/UtgF8dksIiIBzpYoEKmiL0CmZ8O0Gnby7rGXg8Cny1CXirmHp1zKYIpO7BuTmtWj8eUYOsGr0IGQ==", - "dev": true, - "dependencies": { - "confusing-browser-globals": "1.0.10" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - }, - "peerDependencies": { - "eslint": ">=7.20.0" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", - "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", - "dev": true, - "dependencies": { - "acorn": "^8.7.1", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.0", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.10.3", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express-validator": { - "version": "6.14.2", - "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-6.14.2.tgz", - "integrity": "sha512-8XfAUrQ6Y7dIIuy9KcUPCfG/uCbvREctrxf5EeeME+ulanJ4iiW71lWmm9r4YcKKYOCBMan0WpVg7FtHu4Z4Wg==", - "dependencies": { - "lodash": "^4.17.21", - "validator": "^13.7.0" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fast-redact": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.1.1.tgz", - "integrity": "sha512-odVmjC8x8jNeMZ3C+rPMESzXVSEU8tSWSHv9HFxP2mm89G/1WwqhrerJDQm9Zus8X6aoRgQDThKqptdNA6bt+A==", - "engines": { - "node": ">=6" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/file-type": { - "version": "16.5.3", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.3.tgz", - "integrity": "sha512-uVsl7iFhHSOY4bEONLlTK47iAHtNsFHWP5YE4xJfZ4rnX7S1Q3wce09XgqSC7E/xh8Ncv/be1lNoyprlUH/x6A==", - "dependencies": { - "readable-web-to-node-stream": "^3.0.0", - "strtok3": "^6.2.4", - "token-types": "^4.1.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "node_modules/futoin-hkdf": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/futoin-hkdf/-/futoin-hkdf-1.5.1.tgz", - "integrity": "sha512-g5d0Qp7ks55hYmYmfqn4Nz18XH49lcCR+vvIvHT92xXnsJaGZmY1EtWQWilJ6BQp57heCIXM/rRo+AFep8hGgg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/libsignal": { - "version": "2.0.1", - "resolved": "git+ssh://git@github.com/adiwajshing/libsignal-node.git#11dbd962ea108187c79a7c46fe4d6f790e23da97", - "license": "GPL-3.0", - "dependencies": { - "curve25519-js": "^0.0.4", - "protobufjs": "6.8.8" - } - }, - "node_modules/libsignal/node_modules/@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" - }, - "node_modules/libsignal/node_modules/protobufjs": { - "version": "6.8.8", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", - "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.0", - "@types/node": "^10.1.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "node_modules/media-typer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/music-metadata": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/music-metadata/-/music-metadata-7.12.3.tgz", - "integrity": "sha512-6pZngaroNxGBf8KZjE8reGZJiS533eJq7dBFsyoiEAZIORQAxmVVx20ABh9W2tsLT+5mKYyDzcNi5GuHf3jitg==", - "dependencies": { - "@tokenizer/token": "^0.3.0", - "content-type": "^1.0.4", - "debug": "^4.3.4", - "file-type": "16.5.3", - "media-typer": "^1.1.0", - "strtok3": "^6.3.0", - "token-types": "^4.2.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-cache": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/node-cache/-/node-cache-5.1.2.tgz", - "integrity": "sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg==", - "dependencies": { - "clone": "2.x" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/node-cleanup": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz", - "integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==" - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-exit-leak-free": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz", - "integrity": "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==" - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, - "node_modules/peek-readable": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz", - "integrity": "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==", - "engines": { - "node": ">=8" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/pino": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-7.11.0.tgz", - "integrity": "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==", - "dependencies": { - "atomic-sleep": "^1.0.0", - "fast-redact": "^3.0.0", - "on-exit-leak-free": "^0.2.0", - "pino-abstract-transport": "v0.5.0", - "pino-std-serializers": "^4.0.0", - "process-warning": "^1.0.0", - "quick-format-unescaped": "^4.0.3", - "real-require": "^0.1.0", - "safe-stable-stringify": "^2.1.0", - "sonic-boom": "^2.2.1", - "thread-stream": "^0.15.1" - }, - "bin": { - "pino": "bin.js" - } - }, - "node_modules/pino-abstract-transport": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz", - "integrity": "sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==", - "dependencies": { - "duplexify": "^4.1.2", - "split2": "^4.0.0" - } - }, - "node_modules/pino-std-serializers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz", - "integrity": "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==" - }, - "node_modules/pngjs": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", - "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/process-warning": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz", - "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==" - }, - "node_modules/protobufjs": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", - "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/qrcode": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.0.tgz", - "integrity": "sha512-9MgRpgVc+/+47dFvQeD6U2s0Z92EsKzcHogtum4QB+UNd025WOJSHvn/hjk9xmzj7Stj95CyUAs31mrjxliEsQ==", - "dependencies": { - "dijkstrajs": "^1.0.1", - "encode-utf8": "^1.0.3", - "pngjs": "^5.0.0", - "yargs": "^15.3.1" - }, - "bin": { - "qrcode": "bin/qrcode" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/qrcode-terminal": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", - "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==", - "bin": { - "qrcode-terminal": "bin/qrcode-terminal.js" - } - }, - "node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/quick-format-unescaped": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", - "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==" - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readable-web-to-node-stream": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", - "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", - "dependencies": { - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/real-require": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz", - "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==", - "engines": { - "node": ">= 12.13.0" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-stable-stringify": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz", - "integrity": "sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg==", - "engines": { - "node": ">=10" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/sonic-boom": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz", - "integrity": "sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==", - "dependencies": { - "atomic-sleep": "^1.0.0" - } - }, - "node_modules/split2": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", - "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==", - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strtok3": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.3.0.tgz", - "integrity": "sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==", - "dependencies": { - "@tokenizer/token": "^0.3.0", - "peek-readable": "^4.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/thread-stream": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-0.15.2.tgz", - "integrity": "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==", - "dependencies": { - "real-require": "^0.1.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/token-types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-4.2.0.tgz", - "integrity": "sha512-P0rrp4wUpefLncNamWIef62J0v0kQR/GfDVji9WKY7GDCWy5YbVSrKUTam07iWPZQGy0zWNOfstYTykMmPNR7w==", - "dependencies": { - "@tokenizer/token": "^0.3.0", - "ieee754": "^1.2.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/type-is/node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "node_modules/validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==" - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/ws": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", - "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" - }, - "node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - } - }, - "dependencies": { - "@adiwajshing/baileys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@adiwajshing/baileys/-/baileys-4.2.0.tgz", - "integrity": "sha512-lNS6V8uDn8PrbH3YZM+4531v8/RVXGzVSJztp5GyKyjI8h1LHD2ZVq7NahK6jBBGR/zXz+OyDG+jJJhTHgJdlA==", - "requires": { - "@hapi/boom": "^9.1.3", - "axios": "^0.24.0", - "futoin-hkdf": "^1.5.0", - "libsignal": "git+https://github.com/adiwajshing/libsignal-node.git", - "music-metadata": "^7.12.3", - "node-cache": "^5.1.2", - "pino": "^7.0.0", - "protobufjs": "^6.11.3", - "ws": "^8.0.0" - } - }, - "@adiwajshing/keyed-db": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@adiwajshing/keyed-db/-/keyed-db-0.2.4.tgz", - "integrity": "sha512-yprSnAtj80/VKuDqRcFFLDYltoNV8tChNwFfIgcf6PGD4sjzWIBgs08pRuTqGH5mk5wgL6PBRSsMCZqtZwzFEw==" - }, - "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.2", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@hapi/boom": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz", - "integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==", - "requires": { - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" - }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" - }, - "@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" - }, - "@types/node": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.0.tgz", - "integrity": "sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA==" - }, - "accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "requires": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - } - }, - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" - }, - "atomic-sleep": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==" - }, - "axios": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", - "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", - "requires": { - "follow-redirects": "^1.14.4" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", - "requires": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.10.3", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "confusing-browser-globals": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", - "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", - "dev": true - }, - "content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "requires": { - "safe-buffer": "5.2.1" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "curve25519-js": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/curve25519-js/-/curve25519-js-0.0.4.tgz", - "integrity": "sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" - }, - "destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" - }, - "dijkstrajs": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.2.tgz", - "integrity": "sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg==" - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dotenv": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", - "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==" - }, - "duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "encode-utf8": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", - "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", - "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - } - }, - "eslint-config-prettier": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", - "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", - "dev": true, - "requires": {} - }, - "eslint-config-xo": { - "version": "0.39.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.39.0.tgz", - "integrity": "sha512-QX+ZnQgzy/UtgF8dksIiIBzpYoEKmiL0CmZ8O0Gnby7rGXg8Cny1CXirmHp1zKYIpO7BuTmtWj8eUYOsGr0IGQ==", - "dev": true, - "requires": { - "confusing-browser-globals": "1.0.10" - } - }, - "eslint-plugin-prettier": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", - "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - }, - "espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", - "dev": true, - "requires": { - "acorn": "^8.7.1", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" - }, - "express": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", - "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", - "requires": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.0", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.10.3", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - } - } - }, - "express-validator": { - "version": "6.14.2", - "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-6.14.2.tgz", - "integrity": "sha512-8XfAUrQ6Y7dIIuy9KcUPCfG/uCbvREctrxf5EeeME+ulanJ4iiW71lWmm9r4YcKKYOCBMan0WpVg7FtHu4Z4Wg==", - "requires": { - "lodash": "^4.17.21", - "validator": "^13.7.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fast-redact": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.1.1.tgz", - "integrity": "sha512-odVmjC8x8jNeMZ3C+rPMESzXVSEU8tSWSHv9HFxP2mm89G/1WwqhrerJDQm9Zus8X6aoRgQDThKqptdNA6bt+A==" - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "file-type": { - "version": "16.5.3", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-16.5.3.tgz", - "integrity": "sha512-uVsl7iFhHSOY4bEONLlTK47iAHtNsFHWP5YE4xJfZ4rnX7S1Q3wce09XgqSC7E/xh8Ncv/be1lNoyprlUH/x6A==", - "requires": { - "readable-web-to-node-stream": "^3.0.0", - "strtok3": "^6.2.4", - "token-types": "^4.1.1" - } - }, - "finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - } - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", - "dev": true - }, - "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" - }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "futoin-hkdf": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/futoin-hkdf/-/futoin-hkdf-1.5.1.tgz", - "integrity": "sha512-g5d0Qp7ks55hYmYmfqn4Nz18XH49lcCR+vvIvHT92xXnsJaGZmY1EtWQWilJ6BQp57heCIXM/rRo+AFep8hGgg==" - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" - }, - "http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "libsignal": { - "version": "git+ssh://git@github.com/adiwajshing/libsignal-node.git#11dbd962ea108187c79a7c46fe4d6f790e23da97", - "from": "libsignal@git+https://github.com/adiwajshing/libsignal-node.git", - "requires": { - "curve25519-js": "^0.0.4", - "protobufjs": "6.8.8" - }, - "dependencies": { - "@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" - }, - "protobufjs": { - "version": "6.8.8", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", - "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.0", - "@types/node": "^10.1.0", - "long": "^4.0.0" - } - } - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "media-typer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==" - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "music-metadata": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/music-metadata/-/music-metadata-7.12.3.tgz", - "integrity": "sha512-6pZngaroNxGBf8KZjE8reGZJiS533eJq7dBFsyoiEAZIORQAxmVVx20ABh9W2tsLT+5mKYyDzcNi5GuHf3jitg==", - "requires": { - "@tokenizer/token": "^0.3.0", - "content-type": "^1.0.4", - "debug": "^4.3.4", - "file-type": "16.5.3", - "media-typer": "^1.1.0", - "strtok3": "^6.3.0", - "token-types": "^4.2.0" - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" - }, - "node-cache": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/node-cache/-/node-cache-5.1.2.tgz", - "integrity": "sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg==", - "requires": { - "clone": "2.x" - } - }, - "node-cleanup": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz", - "integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" - }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" - }, - "on-exit-leak-free": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz", - "integrity": "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==" - }, - "on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, - "peek-readable": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz", - "integrity": "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==" - }, - "pino": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-7.11.0.tgz", - "integrity": "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==", - "requires": { - "atomic-sleep": "^1.0.0", - "fast-redact": "^3.0.0", - "on-exit-leak-free": "^0.2.0", - "pino-abstract-transport": "v0.5.0", - "pino-std-serializers": "^4.0.0", - "process-warning": "^1.0.0", - "quick-format-unescaped": "^4.0.3", - "real-require": "^0.1.0", - "safe-stable-stringify": "^2.1.0", - "sonic-boom": "^2.2.1", - "thread-stream": "^0.15.1" - } - }, - "pino-abstract-transport": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz", - "integrity": "sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==", - "requires": { - "duplexify": "^4.1.2", - "split2": "^4.0.0" - } - }, - "pino-std-serializers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz", - "integrity": "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==" - }, - "pngjs": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", - "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==" - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true - }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "process-warning": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz", - "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==" - }, - "protobufjs": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", - "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - } - }, - "proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "requires": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qrcode": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.0.tgz", - "integrity": "sha512-9MgRpgVc+/+47dFvQeD6U2s0Z92EsKzcHogtum4QB+UNd025WOJSHvn/hjk9xmzj7Stj95CyUAs31mrjxliEsQ==", - "requires": { - "dijkstrajs": "^1.0.1", - "encode-utf8": "^1.0.3", - "pngjs": "^5.0.0", - "yargs": "^15.3.1" - } - }, - "qrcode-terminal": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", - "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==" - }, - "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "requires": { - "side-channel": "^1.0.4" - } - }, - "quick-format-unescaped": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", - "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==" - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "requires": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readable-web-to-node-stream": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", - "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", - "requires": { - "readable-stream": "^3.6.0" - } - }, - "real-require": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz", - "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==" - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safe-stable-stringify": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz", - "integrity": "sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "requires": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - } - } - }, - "serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" - }, - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "sonic-boom": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz", - "integrity": "sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==", - "requires": { - "atomic-sleep": "^1.0.0" - } - }, - "split2": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", - "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==" - }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "strtok3": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.3.0.tgz", - "integrity": "sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==", - "requires": { - "@tokenizer/token": "^0.3.0", - "peek-readable": "^4.1.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "thread-stream": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-0.15.2.tgz", - "integrity": "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==", - "requires": { - "real-require": "^0.1.0" - } - }, - "toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" - }, - "token-types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-4.2.0.tgz", - "integrity": "sha512-P0rrp4wUpefLncNamWIef62J0v0kQR/GfDVji9WKY7GDCWy5YbVSrKUTam07iWPZQGy0zWNOfstYTykMmPNR7w==", - "requires": { - "@tokenizer/token": "^0.3.0", - "ieee754": "^1.2.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "dependencies": { - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" - } - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==" - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "ws": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.0.tgz", - "integrity": "sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ==", - "requires": {} - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } -} diff --git a/package.json b/package.json index 3d74a972..9026dc91 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,9 @@ { "name": "baileys-api", "description": "Simple RESTful WhatsApp API", + "version": "1.0.0-beta.0", "private": true, - "main": "app.js", - "type": "module", - "scripts": { - "start": "node ." - }, + "main": "index.js", "repository": { "type": "git", "url": "git+https://github.com/ookamiiixd/baileys-api.git" @@ -16,26 +13,41 @@ "url": "https://github.com/ookamiiixd/baileys-api/issues" }, "homepage": "https://github.com/ookamiiixd/baileys-api#readme", - "engines": { - "node": ">=14.5.0" + "scripts": { + "build": "tsc", + "typecheck": "tsc --noEmit", + "lint": "eslint .", + "format": "prettier . --write" }, "dependencies": { - "@adiwajshing/baileys": "^4.2.0", - "@adiwajshing/keyed-db": "^0.2.4", - "dotenv": "^16.0.0", - "express": "^4.17.2", - "express-validator": "^6.14.0", - "node-cleanup": "^2.1.2", - "pino": "^7.10.0", - "qrcode": "^1.5.0", + "@adiwajshing/baileys": "https://github.com/ookamiiixd/Baileys.git#build", + "@hapi/boom": "^10.0.0", + "@prisma/client": "^4.7.1", + "baileys-store": "file:external/baileys-store-1.tgz", + "cors": "^2.8.5", + "dotenv": "^16.0.3", + "express": "^4.18.2", + "express-validator": "^6.14.2", + "link-preview-js": "^3.0.4", + "pino": "^8.7.0", + "qrcode": "^1.5.1", "qrcode-terminal": "^0.12.0", - "cors": "^2.8.5" + "sharp": "^0.31.2" }, "devDependencies": { - "eslint": "^8.5.0", - "eslint-config-prettier": "^8.3.0", - "eslint-config-xo": "^0.39.0", - "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.5.1" + "@types/cors": "^2.8.13", + "@types/express": "^4.17.14", + "@types/node": "^18.11.10", + "@typescript-eslint/eslint-plugin": "^5.45.0", + "@typescript-eslint/parser": "^5.45.0", + "eslint": "^8.29.0", + "eslint-config-prettier": "^8.5.0", + "prettier": "^2.8.0", + "prisma": "^4.7.1", + "ts-node": "^10.9.1", + "typescript": "^4.9.3" + }, + "engines": { + "node": ">=14.5.0" } } diff --git a/postman_collection.json b/postman_collection.json deleted file mode 100644 index 38243d7c..00000000 --- a/postman_collection.json +++ /dev/null @@ -1,1907 +0,0 @@ -{ - "info": { - "_postman_id": "f135a9fa-8b5c-454e-a5af-7aa9bc5790e1", - "name": "Baileys API v0.2", - "description": "API Documentation for [https://github.com/ookamiiixd/baileys-api](https://github.com/ookamiiixd/baileys-api).", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "18988925" - }, - "item": [ - { - "name": "Sessions", - "item": [ - { - "name": "Find Session", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/sessions/find/:id", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "find", - ":id" - ], - "variable": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - }, - "description": "Find a session." - }, - "response": [ - { - "name": "Session Found", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/sessions/find/:id", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "find", - ":id" - ], - "variable": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "53" - }, - { - "key": "ETag", - "value": "W/\"35-khYshx+O7ykPwxU1BA54yKAyByk\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:42:04 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"Session found.\",\n \"data\": {}\n}" - }, - { - "name": "Session Not Found", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/sessions/find/:id", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "find", - ":id" - ], - "variable": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "Not Found", - "code": 404, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "58" - }, - { - "key": "ETag", - "value": "W/\"3a-n9SkLlroaSpVRpF69SpOWOnBy+Q\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:39:45 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": false,\n \"message\": \"Session not found.\",\n \"data\": {}\n}" - } - ] - }, - { - "name": "Session Status", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/sessions/status/:id", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "status", - ":id" - ], - "variable": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - }, - "description": "Get session status. The status value is either `authenticated, connecting, connected, disconnecting` or `disconnected`." - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/sessions/status/:id", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "status", - ":id" - ], - "variable": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "63" - }, - { - "key": "ETag", - "value": "W/\"3f-RGosI+9nNJliG+uza0vX9GICMuE\"" - }, - { - "key": "Date", - "value": "Sun, 10 Apr 2022 10:20:48 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [ - { - "expires": "Invalid Date" - } - ], - "body": "{\n \"success\": true,\n \"message\": \"\",\n \"data\": {\n \"status\": \"authenticated\"\n }\n}" - } - ] - }, - { - "name": "Create New Session", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "id", - "value": "john", - "description": "Session id you want to use.", - "type": "default" - }, - { - "key": "isLegacy", - "value": "false", - "description": "Client type. Value: 'true' (Normal WhatsApp Web / Legacy) or 'false' (Beta Multi-Device).\n", - "type": "text" - } - ] - }, - "url": { - "raw": "{{base_url}}/sessions/add", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "add" - ] - }, - "description": "Create a new session." - }, - "response": [ - { - "name": "QR Code Received", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "id", - "value": "john", - "description": "Session id you want to use.", - "type": "default" - }, - { - "key": "isLegacy", - "value": "false", - "description": "Client type. Value: 'true' (Normal WhatsApp Web / Legacy) or 'false' (Beta Multi-Device).\n", - "type": "text" - } - ] - }, - "url": { - "raw": "{{base_url}}/sessions/add", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "add" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "6566" - }, - { - "key": "ETag", - "value": "W/\"19a6-vzlGWUlBSFJ765YPTkwCU1ZRPMw\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:40:50 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"QR code received, please scan the QR code.\",\n \"data\": {\n \"qr\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAEUCAYAAADqcMl5AAAAAklEQVR4AewaftIAABKhSURBVO3BQY7gRhLAQFLo/3+ZO8c8FSCoemwvMsL+YK21LnhYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVh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qiYVCaVqeKLh7XWuuRhrbUueVhrrUt+uKziJpUTlZOKqeJEZap4o2JSOal4Q2VSmSpOVN6o+E0qU8Wk8kXFpDJVTConFScVk8oXFTdV/KaHtda65GGttS55WGutS374ZSpvVPybqEwVX1ScqEwVJxWTylTxhspNFScqk8pUMalMFZPKVDFVnFScqJxUTBUnKpPKFxWTylTxmx7WWuuSh7XWuuRhrbUu+eH/TMWkclLxhspUMalMFScqU8WkcqIyVZxUnKi8UfGGyhcVJxWTyknFTSpTxRsVk8pUMalMKm+oTBVfPKy11iUPa611ycNaa13yw/8ZlTdUpoo3VKaKNypOKiaVqeINlaliqphUpooTlaliqphUpopJ5aRiUpkq3lC5SWWqmComlROVqeLf5GGttS55WGutSx7WWuuSH35ZxW+qeENlqphUTiq+UPlNKlPFVHGicqLyhspU8UbFpDKpnKi8UfGFylQxqZxUTCr/JQ9rrXXJw1prXfKw1lqX/HCZyt+kclJxk8pUcaIyVUwqU8WkcqIyVXxRMalMFScqU8Wk8obKVPFPUnlD5aRiUpkqTlROKiaV3/Sw1lqXPKy11iUPa611if3BWmtd8LDWWpc8rLXWJQ9rrXXJw1prXfKw1lqXPKy11iUPa611ycNaa13ysNZalzystdYlD2utdcnDWmtd8rDWWpc8rLXWJQ9rrXXJ/wAn7OuDxKQ82gAAAABJRU5ErkJggg==\"\n }\n}" - }, - { - "name": "Duplicate Session ID", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "id", - "value": "john", - "description": "Session id you want to use.", - "type": "default" - }, - { - "key": "isLegacy", - "value": "false", - "description": "Client type. Value: 'true' (Normal WhatsApp Web / Legacy) or 'false' (Beta Multi-Device).\n", - "type": "text" - } - ] - }, - "url": { - "raw": "{{base_url}}/sessions/add", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "add" - ] - } - }, - "status": "Conflict", - "code": 409, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "86" - }, - { - "key": "ETag", - "value": "W/\"56-me8/2a7Yu/zUpld2FLOxphmzhLE\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:42:36 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": false,\n \"message\": \"Session already exists, please use another id.\",\n \"data\": {}\n}" - }, - { - "name": "Response Failed", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "id", - "value": "john", - "description": "Session id you want to use.", - "type": "default" - }, - { - "key": "isLegacy", - "value": "false", - "description": "Client type. Value: 'true' (Normal WhatsApp Web / Legacy) or 'false' (Beta Multi-Device).\n", - "type": "text" - } - ] - }, - "url": { - "raw": "{{base_url}}/sessions/add", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "add" - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "65" - }, - { - "key": "ETag", - "value": "W/\"41-yr9kXk0+HoqFsLUzFrS67vhNCpo\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:44:20 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": false,\n \"message\": \"Unable to create session.\",\n \"data\": {}\n}" - } - ] - }, - { - "name": "Delete Session", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/sessions/delete/:id", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "delete", - ":id" - ], - "variable": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - }, - "description": "Delete a session." - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{base_url}}/sessions/delete/:id", - "host": [ - "{{base_url}}" - ], - "path": [ - "sessions", - "delete", - ":id" - ], - "variable": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "81" - }, - { - "key": "ETag", - "value": "W/\"51-sboVGYKvgXknbi2fZx1c7QmxdeM\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:37:26 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"The session has been successfully deleted.\",\n \"data\": {}\n}" - } - ] - } - ] - }, - { - "name": "Chats", - "item": [ - { - "name": "Get Chat List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/chats?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - }, - "description": "Get personal chat list." - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/chats?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "24103" - }, - { - "key": "ETag", - "value": "W/\"5e27-GvFZTma/gJIMYSu3bl/1hVF6MFc\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:48:04 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"\",\n \"data\": [\n {\n \"id\": \"628812xxxxx@s.whatsapp.net\",\n \"unreadCount\": 1,\n \"readOnly\": false,\n \"ephemeralExpiration\": 0,\n \"conversationTimestamp\": \"1644843624\",\n \"notSpam\": true,\n \"disappearingMode\": {\n \"initiator\": \"CHANGED_IN_CHAT\"\n },\n \"unreadMentionCount\": 0,\n \"contactPrimaryIdentityKey\": \"REDACTED\"\n },\n ...\n ]\n}" - } - ] - }, - { - "name": "Get Conversation", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/chats/:jid?id=john&limit=25&cursor_id=REDACTED&cursor_fromMe=true", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - ":jid" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - }, - { - "key": "limit", - "value": "25", - "description": "Limit data length. Default: 25 (Optional)." - }, - { - "key": "cursor_id", - "value": "REDACTED", - "description": "id field from message key used as cursor to fetch previous messages (Optional)." - }, - { - "key": "cursor_fromMe", - "value": "true", - "description": "fromMe field from message key used as cursor to fetch previous messages. Value: 'true' or 'false', default: 'false' (Optional)." - } - ], - "variable": [ - { - "key": "jid", - "value": "628950xxxxx@s.whatsapp.net", - "description": "Chat jid." - } - ] - }, - "description": "Load conversation with a person in paginated manner." - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/chats/:jid?id=john&limit=25&cursor_id=REDACTED", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - ":jid" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - }, - { - "key": "limit", - "value": "25", - "description": "Limit data length. Default: 25 (Optional)." - }, - { - "key": "cursor_id", - "value": "REDACTED", - "description": "id from any message key used as cursor to fetch previous messages (Optional)." - } - ], - "variable": [ - { - "key": "jid", - "value": "6289509xxxxx@s.whatsapp.net", - "description": "Chat jid." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "412" - }, - { - "key": "ETag", - "value": "W/\"19c-h/anIXQxB+0YE+KNxkgNf2rzj5Y\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:52:15 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"\",\n \"data\": [\n {\n \"key\": {\n \"remoteJid\": \"628950xxxxx@s.whatsapp.net\",\n \"fromMe\": true,\n \"id\": \"REDACTED\"\n },\n \"message\": {\n \"conversation\": \"Hello there!\"\n },\n \"messageTimestamp\": \"1631510231\",\n \"status\": \"READ\",\n \"messageC2STimestamp\": \"1631510232\",\n \"userReceipt\": [\n {\n \"userJid\": \"628950xxxxx@s.whatsapp.net\",\n \"receiptTimestamp\": \"1631510234000\",\n \"readTimestamp\": \"1631510939000\",\n \"playedTimestamp\": \"0\"\n }\n ]\n },\n ...\n ]\n}" - }, - { - "name": "Response Failed", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/chats/:jid?id=john&limit=25&cursor_id=REDACTED", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - ":jid" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - }, - { - "key": "limit", - "value": "25", - "description": "Limit data length. Default: 25 (Optional)." - }, - { - "key": "cursor_id", - "value": "REDACTED", - "description": "id from any message key used as cursor to fetch previous messages (Optional)." - } - ], - "variable": [ - { - "key": "jid", - "value": "6289509xxxxx@s.whatsapp.net", - "description": "Chat jid." - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "412" - }, - { - "key": "ETag", - "value": "W/\"19c-h/anIXQxB+0YE+KNxkgNf2rzj5Y\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:52:15 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": false,\n \"message\": \"Failed to load messages.\",\n \"data\": {}\n}" - } - ] - }, - { - "name": "Send Message", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text", - "disabled": true - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"receiver\": \"628231xxxxx\", \r\n \"message\": {\r\n \"text\": \"hello there!\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/chats/send?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - "send" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - }, - "description": "Send message to someone." - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"receiver\": \"628231xxxxx\", \r\n \"message\": {\r\n \"text\": \"hello there!\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/chats/send?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - "send" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "78" - }, - { - "key": "ETag", - "value": "W/\"4e-ZvkGSI8StDnkSjZX5UQTQVUBqSQ\"" - }, - { - "key": "Date", - "value": "Fri, 27 May 2022 14:57:19 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"The message has been successfully sent.\",\n \"data\": {}\n}" - }, - { - "name": "Response Failed", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"receiver\": \"628231xxxxx\", \r\n \"message\": {\r\n \"text\": \"hello there!\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/chats/send?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - "send" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "67" - }, - { - "key": "ETag", - "value": "W/\"43-VVa944bJzICOqHAXbrMtuGViNDY\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 13:58:14 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": false,\n \"message\": \"Failed to send the message.\",\n \"data\": {}\n}" - } - ] - }, - { - "name": "Send Bulk Message", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text", - "disabled": true - } - ], - "body": { - "mode": "raw", - "raw": "[\r\n {\r\n \"receiver\": \"628231xxxxx\", \r\n \"message\": {\r\n \"text\": \"hi! how are you?\"\r\n }\r\n },\r\n {\r\n \"receiver\": \"628950xxxxx\",\r\n \"delay\": 60000, \r\n \"message\": {\r\n \"text\": \"i'm fine, thank you!\"\r\n }\r\n }\r\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/chats/send-bulk?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - "send-bulk" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - }, - "description": "Send message to multiple person.\n\nYou can also set custom `delay` between each message by adding the delay (in milliseconds) to the `delay` properties. Default value is `1000` if you don't provide any delay or you provide an invalid delay.\n\nExample:\n\n``` javascript\n[\n {\n \"receiver\": \"628231xxxxx\",\n // 1000ms / 1 seconds delay before it try to send the message since we don't provide any delay\n \"message\": {\n \"text\": \"hi! how are you?\"\n }\n },\n {\n \"receiver\": \"628950xxxxx\",\n \"delay\": 60000, // 1 minutes delay before it try to send the message\n \"message\": {\n \"text\": \"i'm fine, thank you!\"\n }\n }\n]\n\n```" - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text", - "disabled": true - } - ], - "body": { - "mode": "raw", - "raw": "[\r\n {\r\n \"receiver\": \"628231xxxxx\", \r\n \"message\": {\r\n \"text\": \"hi! how are you?\"\r\n }\r\n },\r\n {\r\n \"receiver\": \"628950xxxxx\",\r\n \"delay\": 60000, \r\n \"message\": {\r\n \"text\": \"i'm fine, thank you!\"\r\n }\r\n }\r\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/chats/send-bulk?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - "send-bulk" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "79" - }, - { - "key": "ETag", - "value": "W/\"4f-WZISsPR0zkoRx3Ch/QHgiuzvzWw\"" - }, - { - "key": "Date", - "value": "Fri, 27 May 2022 15:19:02 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"All messages has been successfully sent.\",\n \"data\": {}\n}" - }, - { - "name": "Response Success With Partial Errors", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "[\r\n {\r\n \"message\": {\r\n \"text\": \"Whoops, some parameters is missing!\"\r\n }\r\n },\r\n {\r\n \"receiver\": \"628231xxxxx\", \r\n \"message\": {\r\n \"text\": \"yay, i'm sent!\"\r\n }\r\n },\r\n {\r\n \"receiver\": \"6281234567890\",\r\n \"message\": {\r\n \"text\": \"Looks like your phone number is not exists.\"\r\n }\r\n }\r\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/chats/send-bulk?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - "send-bulk" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "96" - }, - { - "key": "ETag", - "value": "W/\"60-f/z6nvDfETHAUZOj+Wj57JGlRLo\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 12:32:53 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"Some messages has been successfully sent.\",\n \"data\": {\n \"errors\": [\n 0,\n 2\n ]\n }\n}" - }, - { - "name": "Response Failed", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "[\r\n {\r\n \"message\": {\r\n \"text\": \"Whoops, some parameters is missing!\"\r\n }\r\n },\r\n {\r\n \"receiver\": \"628231xxxxx\"\r\n },\r\n {\r\n \"receiver\": \"6281234567890\",\r\n \"message\": {\r\n \"text\": \"Looks like your phone number is not exists.\"\r\n }\r\n }\r\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/chats/send-bulk?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "chats", - "send-bulk" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "96" - }, - { - "key": "ETag", - "value": "W/\"60-f/z6nvDfETHAUZOj+Wj57JGlRLo\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 12:32:53 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": false,\n \"message\": \"Failed to send all messages.\",\n \"data\": {\n \"errors\": [\n 0,\n 1,\n 2\n ]\n }\n}" - } - ] - } - ] - }, - { - "name": "Groups", - "item": [ - { - "name": "Get Chat List", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/groups?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - }, - "description": "Get group chat list." - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/groups?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "2540" - }, - { - "key": "ETag", - "value": "W/\"9ec-dkcBL4TQ52DrQkyrEMlAw+iTs/4\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 14:05:38 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"\",\n \"data\": [\n {\n \"id\": \"628950xxxxx-16310xxxxx@g.us\",\n \"unreadCount\": 0,\n \"readOnly\": false,\n \"ephemeralExpiration\": 0,\n \"conversationTimestamp\": \"1644825488\",\n \"name\": \"Raventale\",\n \"pHash\": \"xxxxx\",\n \"notSpam\": true,\n \"unreadMentionCount\": 0\n },\n ...\n ]\n}" - } - ] - }, - { - "name": "Get Conversation", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/groups/:jid?id=john&limit=25&cursor_id=REDACTED&cursor_fromMe=true", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups", - ":jid" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - }, - { - "key": "limit", - "value": "25", - "description": "Limit data length. Default: 25 (Optional)." - }, - { - "key": "cursor_id", - "value": "REDACTED", - "description": "id field from message key used as cursor to fetch previous messages (Optional)." - }, - { - "key": "cursor_fromMe", - "value": "true", - "description": "fromMe field from message key used as cursor to fetch previous messages. Value: 'true' or 'false', default: 'false' (Optional)." - } - ], - "variable": [ - { - "key": "jid", - "value": "628950xxxxx-16310xxxxx@g.us", - "description": "Group jid." - } - ] - }, - "description": "Load conversation in a group in paginated manner." - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/groups/:jid?id=john&limit=25&cursor_id=REDACTED", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups", - ":jid" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - }, - { - "key": "limit", - "value": "25", - "description": "Limit data length. Default: 25 (Optional)." - }, - { - "key": "cursor_id", - "value": "REDACTED", - "description": "id from message key used as cursor to fetch previous messages (Optional)." - } - ], - "variable": [ - { - "key": "jid", - "value": "628950xxxxx-16310xxxxx@g.us", - "description": "Group jid." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "1197" - }, - { - "key": "ETag", - "value": "W/\"4ad-7HAPLYY7YLdKVWwL9fjgeUM2CJs\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 14:08:52 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"\",\n \"data\": [\n {\n \"key\": {\n \"remoteJid\": \"628950xxxxx-16310xxxxx@g.us\",\n \"fromMe\": true,\n \"id\": \"REDACTED\"\n },\n \"message\": {\n \"conversation\": \"Hi guys, how are you?\"\n },\n \"messageTimestamp\": \"1644713060\",\n \"status\": \"READ\",\n \"userReceipt\": [\n {\n \"userJid\": \"628950xxxxx@s.whatsapp.net\",\n \"receiptTimestamp\": \"1644713064000\",\n \"readTimestamp\": \"1644713075000\",\n \"playedTimestamp\": \"0\"\n },\n {\n \"userJid\": \"628231xxxxx@s.whatsapp.net\",\n \"receiptTimestamp\": \"1644713064000\",\n \"readTimestamp\": \"1644713071000\",\n \"playedTimestamp\": \"0\"\n }\n ]\n },\n ...\n ]\n}" - }, - { - "name": "Response Failed", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/groups/:jid?id=john&limit=25&cursor_id=REDACTED", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups", - ":jid" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - }, - { - "key": "limit", - "value": "25", - "description": "Limit data length. Default: 25 (Optional)." - }, - { - "key": "cursor_id", - "value": "REDACTED", - "description": "Cursor id field (Optional)." - } - ], - "variable": [ - { - "key": "jid", - "value": "628950xxxxx-16310xxxxx@g.us", - "description": "Group jid." - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "1197" - }, - { - "key": "ETag", - "value": "W/\"4ad-7HAPLYY7YLdKVWwL9fjgeUM2CJs\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 14:08:52 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": false,\n \"message\": \"Failed to load messages.\",\n \"data\": {}\n}" - } - ] - }, - { - "name": "Get Group Metadata", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/groups/meta/:jid?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups", - "meta", - ":jid" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ], - "variable": [ - { - "key": "jid", - "value": "628950xxxxx-16310xxxxx@g.us", - "description": "Group jid." - } - ] - } - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/groups/meta/:jid?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups", - "meta", - ":jid" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ], - "variable": [ - { - "key": "jid", - "value": "628950xxxxx-16310xxxxx@g.us", - "description": "Group jid." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "422" - }, - { - "key": "ETag", - "value": "W/\"1a6-ydEaw0RfAhuvtlzdPdFtbsTmC4U\"" - }, - { - "key": "Date", - "value": "Thu, 12 May 2022 04:25:15 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"\",\n \"data\": {\n \"id\": \"628950xxxxx-16310xxxxx@g.us\",\n \"subject\": \"Raven\",\n \"creation\": 1631090896,\n \"owner\": \"628950xxxxx@s.whatsapp.net\",\n \"restrict\": false,\n \"announce\": false,\n \"participants\": [\n {\n \"id\": \"6281320xxxxx@s.whatsapp.net\",\n \"admin\": null\n },\n {\n \"id\": \"628950xxxxxx@s.whatsapp.net\",\n \"admin\": \"superadmin\"\n }\n ]\n }\n}" - } - ] - }, - { - "name": "Send Message", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "type": "text", - "disabled": true - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"receiver\": \"628950xxxxx-1631xxxxx\", \r\n \"message\": {\r\n \"text\": \"hello guys!\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/groups/send?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups", - "send" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - }, - "description": "Send message to a group." - }, - "response": [ - { - "name": "Response Success", - "originalRequest": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\r\n \"receiver\": \"628950xxxxx-1631xxxxx\", \r\n \"message\": {\r\n \"text\": \"hello guys!\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/groups/send?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups", - "send" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "78" - }, - { - "key": "ETag", - "value": "W/\"4e-ZvkGSI8StDnkSjZX5UQTQVUBqSQ\"" - }, - { - "key": "Date", - "value": "Fri, 27 May 2022 15:04:39 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": true,\n \"message\": \"The message has been successfully sent.\",\n \"data\": {}\n}" - }, - { - "name": "Response Failed", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"receiver\": \"628950xxxxx-1631xxxxx\", \r\n \"message\": {\r\n \"text\": \"hello guys!\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{base_url}}/groups/send?id=john", - "host": [ - "{{base_url}}" - ], - "path": [ - "groups", - "send" - ], - "query": [ - { - "key": "id", - "value": "john", - "description": "Your created session id." - } - ] - } - }, - "status": "Internal Server Error", - "code": 500, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "67" - }, - { - "key": "ETag", - "value": "W/\"43-VVa944bJzICOqHAXbrMtuGViNDY\"" - }, - { - "key": "Date", - "value": "Mon, 14 Feb 2022 14:14:51 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - }, - { - "key": "Keep-Alive", - "value": "timeout=5" - } - ], - "cookie": [], - "body": "{\n \"success\": false,\n \"message\": \"Failed to send the message.\",\n \"data\": {}\n}" - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..13828e03 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,8 @@ +module.exports = { + printWidth: 100, + tabWidth: 2, + useTabs: false, + endOfLine: 'lf', + semi: true, + singleQuote: true, +}; diff --git a/prisma/migrations/20221208155846_init/migration.sql b/prisma/migrations/20221208155846_init/migration.sql new file mode 100644 index 00000000..f90d5c4c --- /dev/null +++ b/prisma/migrations/20221208155846_init/migration.sql @@ -0,0 +1,160 @@ +-- CreateTable +CREATE TABLE `Chat` ( + `pkId` INTEGER NOT NULL AUTO_INCREMENT, + `sessionId` VARCHAR(128) NOT NULL, + `archived` BOOLEAN NULL, + `contactPrimaryIdentityKey` LONGBLOB NULL, + `conversationTimestamp` BIGINT NULL, + `createdAt` BIGINT NULL, + `createdBy` VARCHAR(128) NULL, + `description` VARCHAR(255) NULL, + `disappearingMode` JSON NULL, + `displayName` VARCHAR(128) NULL, + `endOfHistoryTransfer` BOOLEAN NULL, + `endOfHistoryTransferType` INTEGER NULL, + `ephemeralExpiration` INTEGER NULL, + `ephemeralSettingTimestamp` BIGINT NULL, + `id` VARCHAR(128) NOT NULL, + `isDefaultSubgroup` BOOLEAN NULL, + `isParentGroup` BOOLEAN NULL, + `lastMsgTimestamp` BIGINT NULL, + `lidJid` VARCHAR(128) NULL, + `markedAsUnread` BOOLEAN NULL, + `mediaVisibility` INTEGER NULL, + `messages` JSON NULL, + `muteEndTime` BIGINT NULL, + `name` VARCHAR(128) NULL, + `newJid` VARCHAR(128) NULL, + `notSpam` BOOLEAN NULL, + `oldJid` VARCHAR(128) NULL, + `pHash` VARCHAR(128) NULL, + `parentGroupId` VARCHAR(128) NULL, + `participant` JSON NULL, + `pinned` INTEGER NULL, + `pnJid` VARCHAR(128) NULL, + `pnhDuplicateLidThread` BOOLEAN NULL, + `readOnly` BOOLEAN NULL, + `shareOwnPn` BOOLEAN NULL, + `support` BOOLEAN NULL, + `suspended` BOOLEAN NULL, + `tcToken` LONGBLOB NULL, + `tcTokenSenderTimestamp` BIGINT NULL, + `tcTokenTimestamp` BIGINT NULL, + `terminated` BOOLEAN NULL, + `unreadCount` INTEGER NULL, + `unreadMentionCount` INTEGER NULL, + `wallpaper` JSON NULL, + `lastMessageRecvTimestamp` INTEGER NULL, + + INDEX `Chat_sessionId_idx`(`sessionId`), + UNIQUE INDEX `unique_id_per_session_id`(`sessionId`, `id`), + PRIMARY KEY (`pkId`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Contact` ( + `pkId` INTEGER NOT NULL AUTO_INCREMENT, + `sessionId` VARCHAR(128) NOT NULL, + `id` VARCHAR(128) NOT NULL, + `name` VARCHAR(128) NULL, + `notify` VARCHAR(128) NULL, + `verifiedName` VARCHAR(128) NULL, + `imgUrl` VARCHAR(255) NULL, + `status` VARCHAR(128) NULL, + + INDEX `Contact_sessionId_idx`(`sessionId`), + UNIQUE INDEX `unique_id_per_session_id`(`sessionId`, `id`), + PRIMARY KEY (`pkId`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `GroupMetadata` ( + `pkId` INTEGER NOT NULL AUTO_INCREMENT, + `sessionId` VARCHAR(128) NOT NULL, + `id` VARCHAR(128) NOT NULL, + `owner` VARCHAR(128) NULL, + `subject` VARCHAR(128) NOT NULL, + `subjectOwner` VARCHAR(128) NULL, + `subjectTime` INTEGER NULL, + `creation` INTEGER NULL, + `desc` VARCHAR(255) NULL, + `descOwner` VARCHAR(128) NULL, + `descId` VARCHAR(128) NULL, + `restrict` BOOLEAN NULL, + `announce` BOOLEAN NULL, + `size` INTEGER NULL, + `participants` JSON NOT NULL, + `ephemeralDuration` INTEGER NULL, + `inviteCode` VARCHAR(255) NULL, + + INDEX `GroupMetadata_sessionId_idx`(`sessionId`), + UNIQUE INDEX `unique_id_per_session_id`(`sessionId`, `id`), + PRIMARY KEY (`pkId`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Message` ( + `pkId` INTEGER NOT NULL AUTO_INCREMENT, + `sessionId` VARCHAR(128) NOT NULL, + `remoteJid` VARCHAR(128) NOT NULL, + `id` VARCHAR(128) NOT NULL, + `agentId` VARCHAR(128) NULL, + `bizPrivacyStatus` INTEGER NULL, + `broadcast` BOOLEAN NULL, + `clearMedia` BOOLEAN NULL, + `duration` INTEGER NULL, + `ephemeralDuration` INTEGER NULL, + `ephemeralOffToOn` BOOLEAN NULL, + `ephemeralOutOfSync` BOOLEAN NULL, + `ephemeralStartTimestamp` BIGINT NULL, + `finalLiveLocation` JSON NULL, + `futureproofData` LONGBLOB NULL, + `ignore` BOOLEAN NULL, + `keepInChat` JSON NULL, + `key` JSON NOT NULL, + `labels` JSON NULL, + `mediaCiphertextSha256` LONGBLOB NULL, + `mediaData` JSON NULL, + `message` JSON NULL, + `messageC2STimestamp` BIGINT NULL, + `messageSecret` LONGBLOB NULL, + `messageStubParameters` JSON NULL, + `messageStubType` INTEGER NULL, + `messageTimestamp` BIGINT NULL, + `multicast` BOOLEAN NULL, + `originalSelfAuthorUserJidString` VARCHAR(128) NULL, + `participant` VARCHAR(128) NULL, + `paymentInfo` JSON NULL, + `photoChange` JSON NULL, + `pollAdditionalMetadata` JSON NULL, + `pollUpdates` JSON NULL, + `pushName` VARCHAR(128) NULL, + `quotedPaymentInfo` JSON NULL, + `quotedStickerData` JSON NULL, + `reactions` JSON NULL, + `revokeMessageTimestamp` BIGINT NULL, + `starred` BOOLEAN NULL, + `status` INTEGER NULL, + `statusAlreadyViewed` BOOLEAN NULL, + `statusPsa` JSON NULL, + `urlNumber` BOOLEAN NULL, + `urlText` BOOLEAN NULL, + `userReceipt` JSON NULL, + `verifiedBizName` VARCHAR(128) NULL, + + INDEX `Message_sessionId_idx`(`sessionId`), + UNIQUE INDEX `unique_message_key_per_session_id`(`sessionId`, `remoteJid`, `id`), + PRIMARY KEY (`pkId`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Session` ( + `pkId` INTEGER NOT NULL AUTO_INCREMENT, + `sessionId` VARCHAR(128) NOT NULL, + `id` VARCHAR(255) NOT NULL, + `data` TEXT NOT NULL, + + INDEX `Session_sessionId_idx`(`sessionId`), + UNIQUE INDEX `unique_id_per_session_id`(`sessionId`, `id`), + PRIMARY KEY (`pkId`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 00000000..e5a788a7 --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "mysql" \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 00000000..e4babfb6 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,163 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "mysql" + url = env("DATABASE_URL") +} + +model Chat { + pkId Int @id @default(autoincrement()) + sessionId String @db.VarChar(128) + archived Boolean? + contactPrimaryIdentityKey Bytes? + conversationTimestamp BigInt? + createdAt BigInt? + createdBy String? @db.VarChar(128) + description String? @db.VarChar(255) + disappearingMode Json? + displayName String? @db.VarChar(128) + endOfHistoryTransfer Boolean? + endOfHistoryTransferType Int? + ephemeralExpiration Int? + ephemeralSettingTimestamp BigInt? + id String @db.VarChar(128) + isDefaultSubgroup Boolean? + isParentGroup Boolean? + lastMsgTimestamp BigInt? + lidJid String? @db.VarChar(128) + markedAsUnread Boolean? + mediaVisibility Int? + messages Json? + muteEndTime BigInt? + name String? @db.VarChar(128) + newJid String? @db.VarChar(128) + notSpam Boolean? + oldJid String? @db.VarChar(128) + pHash String? @db.VarChar(128) + parentGroupId String? @db.VarChar(128) + participant Json? + pinned Int? + pnJid String? @db.VarChar(128) + pnhDuplicateLidThread Boolean? + readOnly Boolean? + shareOwnPn Boolean? + support Boolean? + suspended Boolean? + tcToken Bytes? + tcTokenSenderTimestamp BigInt? + tcTokenTimestamp BigInt? + terminated Boolean? + unreadCount Int? + unreadMentionCount Int? + wallpaper Json? + // Taken from https://github.com/adiwajshing/Baileys/blob/30e2cb5c4c8ca84b1814574ed4ce74f8f8f89ecf/src/Types/Chat.ts#L39 + lastMessageRecvTimestamp Int? + + @@unique([sessionId, id], map: "unique_id_per_session_id") + @@index([sessionId]) +} + +model Contact { + pkId Int @id @default(autoincrement()) + sessionId String @db.VarChar(128) + id String @db.VarChar(128) + name String? @db.VarChar(128) + notify String? @db.VarChar(128) + verifiedName String? @db.VarChar(128) + imgUrl String? @db.VarChar(255) + status String? @db.VarChar(128) + + @@unique([sessionId, id], map: "unique_id_per_session_id") + @@index([sessionId]) +} + +model GroupMetadata { + pkId Int @id @default(autoincrement()) + sessionId String @db.VarChar(128) + id String @db.VarChar(128) + owner String? @db.VarChar(128) + subject String @db.VarChar(128) + subjectOwner String? @db.VarChar(128) + subjectTime Int? + creation Int? + desc String? @db.VarChar(255) + descOwner String? @db.VarChar(128) + descId String? @db.VarChar(128) + restrict Boolean? + announce Boolean? + size Int? + participants Json + ephemeralDuration Int? + inviteCode String? @db.VarChar(255) + + @@unique([sessionId, id], map: "unique_id_per_session_id") + @@index([sessionId]) +} + +model Message { + pkId Int @id @default(autoincrement()) + sessionId String @db.VarChar(128) + remoteJid String @db.VarChar(128) + id String @db.VarChar(128) + agentId String? @db.VarChar(128) + bizPrivacyStatus Int? + broadcast Boolean? + clearMedia Boolean? + duration Int? + ephemeralDuration Int? + ephemeralOffToOn Boolean? + ephemeralOutOfSync Boolean? + ephemeralStartTimestamp BigInt? + finalLiveLocation Json? + futureproofData Bytes? + ignore Boolean? + keepInChat Json? + key Json + labels Json? + mediaCiphertextSha256 Bytes? + mediaData Json? + message Json? + messageC2STimestamp BigInt? + messageSecret Bytes? + messageStubParameters Json? + messageStubType Int? + messageTimestamp BigInt? + multicast Boolean? + originalSelfAuthorUserJidString String? @db.VarChar(128) + participant String? @db.VarChar(128) + paymentInfo Json? + photoChange Json? + pollAdditionalMetadata Json? + pollUpdates Json? + pushName String? @db.VarChar(128) + quotedPaymentInfo Json? + quotedStickerData Json? + reactions Json? + revokeMessageTimestamp BigInt? + starred Boolean? + status Int? + statusAlreadyViewed Boolean? + statusPsa Json? + urlNumber Boolean? + urlText Boolean? + userReceipt Json? + verifiedBizName String? @db.VarChar(128) + + @@unique([sessionId, remoteJid, id], map: "unique_message_key_per_session_id") + @@index([sessionId]) +} + +model Session { + pkId Int @id @default(autoincrement()) + sessionId String @db.VarChar(128) + id String @db.VarChar(255) + data String @db.Text + + @@unique([sessionId, id], map: "unique_id_per_session_id") + @@index([sessionId]) +} diff --git a/response.js b/response.js deleted file mode 100644 index 65d20d96..00000000 --- a/response.js +++ /dev/null @@ -1,12 +0,0 @@ -const response = (res, statusCode = 200, success = false, message = '', data = {}) => { - res.status(statusCode) - res.json({ - success, - message, - data, - }) - - res.end() -} - -export default response diff --git a/routes.js b/routes.js deleted file mode 100644 index 48d7bba1..00000000 --- a/routes.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Router } from 'express' -import sessionsRoute from './routes/sessionsRoute.js' -import chatsRoute from './routes/chatsRoute.js' -import groupsRoute from './routes/groupsRoute.js' -import response from './response.js' - -const router = Router() - -router.use('/sessions', sessionsRoute) -router.use('/chats', chatsRoute) -router.use('/groups', groupsRoute) - -router.all('*', (req, res) => { - response(res, 404, false, 'The requested url cannot be found.') -}) - -export default router diff --git a/routes/chatsRoute.js b/routes/chatsRoute.js deleted file mode 100644 index ca8358c1..00000000 --- a/routes/chatsRoute.js +++ /dev/null @@ -1,26 +0,0 @@ -import { Router } from 'express' -import { body, query } from 'express-validator' -import requestValidator from './../middlewares/requestValidator.js' -import sessionValidator from './../middlewares/sessionValidator.js' -import * as controller from './../controllers/chatsController.js' -import getMessages from './../controllers/getMessages.js' - -const router = Router() - -router.get('/', query('id').notEmpty(), requestValidator, sessionValidator, controller.getList) - -router.get('/:jid', query('id').notEmpty(), requestValidator, sessionValidator, getMessages) - -router.post( - '/send', - query('id').notEmpty(), - body('receiver').notEmpty(), - body('message').notEmpty(), - requestValidator, - sessionValidator, - controller.send -) - -router.post('/send-bulk', query('id').notEmpty(), requestValidator, sessionValidator, controller.sendBulk) - -export default router diff --git a/routes/groupsRoute.js b/routes/groupsRoute.js deleted file mode 100644 index 3d9c00a0..00000000 --- a/routes/groupsRoute.js +++ /dev/null @@ -1,26 +0,0 @@ -import { Router } from 'express' -import { body, query } from 'express-validator' -import requestValidator from './../middlewares/requestValidator.js' -import sessionValidator from './../middlewares/sessionValidator.js' -import * as controller from './../controllers/groupsController.js' -import getMessages from './../controllers/getMessages.js' - -const router = Router() - -router.get('/', query('id').notEmpty(), requestValidator, sessionValidator, controller.getList) - -router.get('/:jid', query('id').notEmpty(), requestValidator, sessionValidator, getMessages) - -router.get('/meta/:jid', query('id').notEmpty(), requestValidator, sessionValidator, controller.getGroupMetaData) - -router.post( - '/send', - query('id').notEmpty(), - body('receiver').notEmpty(), - body('message').notEmpty(), - requestValidator, - sessionValidator, - controller.send -) - -export default router diff --git a/routes/sessionsRoute.js b/routes/sessionsRoute.js deleted file mode 100644 index cb97a4b7..00000000 --- a/routes/sessionsRoute.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Router } from 'express' -import { body } from 'express-validator' -import requestValidator from './../middlewares/requestValidator.js' -import sessionValidator from './../middlewares/sessionValidator.js' -import * as controller from './../controllers/sessionsController.js' - -const router = Router() - -router.get('/find/:id', sessionValidator, controller.find) - -router.get('/status/:id', sessionValidator, controller.status) - -router.post('/add', body('id').notEmpty(), body('isLegacy').notEmpty(), requestValidator, controller.add) - -router.delete('/delete/:id', sessionValidator, controller.del) - -export default router diff --git a/sessions/.gitignore b/sessions/.gitignore deleted file mode 100644 index d6b7ef32..00000000 --- a/sessions/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..e423a12a --- /dev/null +++ b/src/index.ts @@ -0,0 +1,15 @@ +import 'dotenv/config'; +import express from 'express'; +import cors from 'cors'; +import { init } from './wa'; + +const app = express(); +app.use(cors()); +app.use(express.json()); + +const host = process.env.HOST || '0.0.0.0'; +const port = process.env.PORT ? Number(process.env.PORT) : 3000; +const listener = () => console.log(`Server is listening on http://${host}${port}`); + +init(); +app.listen(port, host, listener); diff --git a/src/wa.ts b/src/wa.ts new file mode 100644 index 00000000..00e2556b --- /dev/null +++ b/src/wa.ts @@ -0,0 +1,98 @@ +import type { ConnectionState, proto, SocketConfig, WASocket } from '@adiwajshing/baileys'; +import type { Response } from 'express'; +import { DisconnectReason } from '@adiwajshing/baileys'; +import { Browsers } from '@adiwajshing/baileys'; +import makeWASocket from '@adiwajshing/baileys'; +import { PrismaClient } from '@prisma/client'; +import { useSession, Store, initStore } from 'baileys-store'; +import type { Boom } from '@hapi/boom'; +import pino from 'pino'; + +const sessions = new Map(); +const retries = new Map(); +const prisma = new PrismaClient(); +const logger = pino({ level: 'debug' }); + +const RECONNECT_INTERVAL = Number(process.env.RECONNECT_INTERVAL || 0); +const MAX_RECONNECT_RETRIES = Number(process.env.MAX_RECONNECT_RETRIES || 0); + +type WASessionOptions = { + sessionId: string; + res?: Response; + sse?: boolean; + socketConfig?: SocketConfig; +}; + +export class WASession { + private readonly sessionId: string; + private readonly socketConfig?: SocketConfig; + private res?: Response; + private sse?: boolean; + private connectionState: Partial = { connection: 'close' }; + + constructor({ sessionId, res, sse = false, socketConfig }: WASessionOptions) { + this.sessionId = sessionId; + this.socketConfig = socketConfig; + this.res = res; + this.sse = sse; + this.connect(); + } + + private async connect() { + const { state, saveCreds } = await useSession(this.sessionId); + const socket = makeWASocket({ + auth: state, + logger, + printQRInTerminal: true, + browser: Browsers.ubuntu('Chrome'), + ...this.socketConfig, + getMessage: async (key) => { + const data = await prisma.message.findFirst({ + where: { remoteJid: key.remoteJid!, id: key.id!, sessionId: this.sessionId }, + }); + return (data || undefined) as proto.IMessage | undefined; + }, + }); + + const store = new Store(this.sessionId, socket.ev); + sessions.set(this.sessionId, { ...socket, store }); + + socket.ev.on('creds.update', saveCreds); + socket.ev.on('connection.update', (update) => { + this.connectionState = update; + const { connection } = update; + + if (connection === 'open') retries.delete(this.sessionId); + if (connection === 'close') this.handleConnectionClose(); + }); + } + + private handleConnectionClose() { + const code = (this.connectionState.lastDisconnect?.error as Boom)?.output?.statusCode; + if (code === DisconnectReason.loggedOut || !shouldReconnect(this.sessionId)) { + return deleteSession(this.sessionId); + } + setTimeout(this.connect, code === DisconnectReason.restartRequired ? 0 : RECONNECT_INTERVAL); + } +} + +export function init() { + initStore({ prisma, logger }); +} + +function shouldReconnect(sessionId: string) { + let attempts = retries.get(sessionId) ?? 0; + + if (attempts < MAX_RECONNECT_RETRIES) { + attempts += 1; + logger.info({ attempts, sessionId }, 'Reconnecting...'); + retries.set(sessionId, attempts); + + return true; + } + return false; +} + +export function deleteSession(sessionId: string) { + sessions.delete(sessionId); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..9615b2e1 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES2017", + "module": "CommonJS", + "moduleResolution": "Node", + "strict": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "skipLibCheck": true, + "lib": ["ESNext"], + "outDir": "dist/" + }, + "include": ["src/**/*.ts"] +} diff --git a/whatsapp.js b/whatsapp.js deleted file mode 100644 index 6524be4c..00000000 --- a/whatsapp.js +++ /dev/null @@ -1,282 +0,0 @@ -import { rmSync, readdir } from 'fs' -import { join } from 'path' -import pino from 'pino' -import makeWASocket, { - makeWALegacySocket, - useMultiFileAuthState, - useSingleFileLegacyAuthState, - makeInMemoryStore, - Browsers, - DisconnectReason, - delay, -} from '@adiwajshing/baileys' -import { toDataURL } from 'qrcode' -import __dirname from './dirname.js' -import response from './response.js' - -const sessions = new Map() -const retries = new Map() - -const sessionsDir = (sessionId = '') => { - return join(__dirname, 'sessions', sessionId ? sessionId : '') -} - -const isSessionExists = (sessionId) => { - return sessions.has(sessionId) -} - -const shouldReconnect = (sessionId) => { - let maxRetries = parseInt(process.env.MAX_RETRIES ?? 0) - let attempts = retries.get(sessionId) ?? 0 - - maxRetries = maxRetries < 1 ? 1 : maxRetries - - if (attempts < maxRetries) { - ++attempts - - console.log('Reconnecting...', { attempts, sessionId }) - retries.set(sessionId, attempts) - - return true - } - - return false -} - -const createSession = async (sessionId, isLegacy = false, res = null) => { - const sessionFile = (isLegacy ? 'legacy_' : 'md_') + sessionId + (isLegacy ? '.json' : '') - - const logger = pino({ level: 'warn' }) - const store = makeInMemoryStore({ logger }) - - let state, saveState - - if (isLegacy) { - ;({ state, saveState } = useSingleFileLegacyAuthState(sessionsDir(sessionFile))) - } else { - ;({ state, saveCreds: saveState } = await useMultiFileAuthState(sessionsDir(sessionFile))) - } - - /** - * @type {import('@adiwajshing/baileys').CommonSocketConfig} - */ - const waConfig = { - auth: state, - printQRInTerminal: true, - logger, - browser: Browsers.ubuntu('Chrome'), - } - - /** - * @type {import('@adiwajshing/baileys').AnyWASocket} - */ - const wa = isLegacy ? makeWALegacySocket(waConfig) : makeWASocket.default(waConfig) - - if (!isLegacy) { - store.readFromFile(sessionsDir(`${sessionId}_store.json`)) - store.bind(wa.ev) - } - - sessions.set(sessionId, { ...wa, store, isLegacy }) - - wa.ev.on('creds.update', saveState) - - wa.ev.on('chats.set', ({ chats }) => { - if (isLegacy) { - store.chats.insertIfAbsent(...chats) - } - }) - - // Automatically read incoming messages, uncomment below codes to enable this behaviour - /* - wa.ev.on('messages.upsert', async (m) => { - const message = m.messages[0] - - if (!message.key.fromMe && m.type === 'notify') { - await delay(1000) - - if (isLegacy) { - await wa.chatRead(message.key, 1) - } else { - await wa.sendReadReceipt(message.key.remoteJid, message.key.participant, [message.key.id]) - } - } - }) - */ - - wa.ev.on('connection.update', async (update) => { - const { connection, lastDisconnect } = update - const statusCode = lastDisconnect?.error?.output?.statusCode - - if (connection === 'open') { - retries.delete(sessionId) - } - - if (connection === 'close') { - if (statusCode === DisconnectReason.loggedOut || !shouldReconnect(sessionId)) { - if (res && !res.headersSent) { - response(res, 500, false, 'Unable to create session.') - } - - return deleteSession(sessionId, isLegacy) - } - - setTimeout( - () => { - createSession(sessionId, isLegacy, res) - }, - statusCode === DisconnectReason.restartRequired ? 0 : parseInt(process.env.RECONNECT_INTERVAL ?? 0) - ) - } - - if (update.qr) { - if (res && !res.headersSent) { - try { - const qr = await toDataURL(update.qr) - - response(res, 200, true, 'QR code received, please scan the QR code.', { qr }) - - return - } catch { - response(res, 500, false, 'Unable to create QR code.') - } - } - - try { - await wa.logout() - } catch { - } finally { - deleteSession(sessionId, isLegacy) - } - } - }) -} - -/** - * @returns {(import('@adiwajshing/baileys').AnyWASocket|null)} - */ -const getSession = (sessionId) => { - return sessions.get(sessionId) ?? null -} - -const deleteSession = (sessionId, isLegacy = false) => { - const sessionFile = (isLegacy ? 'legacy_' : 'md_') + sessionId + (isLegacy ? '.json' : '') - const storeFile = `${sessionId}_store.json` - const rmOptions = { force: true, recursive: true } - - rmSync(sessionsDir(sessionFile), rmOptions) - rmSync(sessionsDir(storeFile), rmOptions) - - sessions.delete(sessionId) - retries.delete(sessionId) -} - -const getChatList = (sessionId, isGroup = false) => { - const filter = isGroup ? '@g.us' : '@s.whatsapp.net' - - return getSession(sessionId).store.chats.filter((chat) => { - return chat.id.endsWith(filter) - }) -} - -/** - * @param {import('@adiwajshing/baileys').AnyWASocket} session - */ -const isExists = async (session, jid, isGroup = false) => { - try { - let result - - if (isGroup) { - result = await session.groupMetadata(jid) - - return Boolean(result.id) - } - - if (session.isLegacy) { - result = await session.onWhatsApp(jid) - } else { - ;[result] = await session.onWhatsApp(jid) - } - - return result.exists - } catch { - return false - } -} - -/** - * @param {import('@adiwajshing/baileys').AnyWASocket} session - */ -const sendMessage = async (session, receiver, message, delayMs = 1000) => { - try { - await delay(parseInt(delayMs)) - - return session.sendMessage(receiver, message) - } catch { - return Promise.reject(null) // eslint-disable-line prefer-promise-reject-errors - } -} - -const formatPhone = (phone) => { - if (phone.endsWith('@s.whatsapp.net')) { - return phone - } - - let formatted = phone.replace(/\D/g, '') - - return (formatted += '@s.whatsapp.net') -} - -const formatGroup = (group) => { - if (group.endsWith('@g.us')) { - return group - } - - let formatted = group.replace(/[^\d-]/g, '') - - return (formatted += '@g.us') -} - -const cleanup = () => { - console.log('Running cleanup before exit.') - - sessions.forEach((session, sessionId) => { - if (!session.isLegacy) { - session.store.writeToFile(sessionsDir(`${sessionId}_store.json`)) - } - }) -} - -const init = () => { - readdir(sessionsDir(), (err, files) => { - if (err) { - throw err - } - - for (const file of files) { - if ((!file.startsWith('md_') && !file.startsWith('legacy_')) || file.endsWith('_store')) { - continue - } - - const filename = file.replace('.json', '') - const isLegacy = filename.split('_', 1)[0] !== 'md' - const sessionId = filename.substring(isLegacy ? 7 : 3) - - createSession(sessionId, isLegacy) - } - }) -} - -export { - isSessionExists, - createSession, - getSession, - deleteSession, - getChatList, - isExists, - sendMessage, - formatPhone, - formatGroup, - cleanup, - init, -} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..90519cc0 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,2589 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@adiwajshing/baileys@https://github.com/ookamiiixd/Baileys.git#build": + version "5.0.0" + resolved "https://github.com/ookamiiixd/Baileys.git#ebd001545203f1d3fd008f7406c44888acc19d64" + dependencies: + "@hapi/boom" "^9.1.3" + axios "^0.24.0" + futoin-hkdf "^1.5.1" + libsignal "git+https://github.com/adiwajshing/libsignal-node" + music-metadata "^7.12.3" + node-cache "^5.1.2" + pino "^7.0.0" + protobufjs "^6.11.3" + ws "^8.0.0" + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@eslint/eslintrc@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" + integrity sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.4.0" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@hapi/boom@^10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@hapi/boom/-/boom-10.0.0.tgz#3624831d0a26b3378423b246f50eacea16e04a08" + integrity sha512-1YVs9tLHhypBqqinKQRqh7FUERIolarQApO37OWkzD+z6y6USi871Sv746zBPKcIOBuI6g6y4FrwX87mmJ90Gg== + dependencies: + "@hapi/hoek" "10.x.x" + +"@hapi/boom@^9.1.3": + version "9.1.4" + resolved "https://registry.yarnpkg.com/@hapi/boom/-/boom-9.1.4.tgz#1f9dad367c6a7da9f8def24b4a986fc5a7bd9db6" + integrity sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw== + dependencies: + "@hapi/hoek" "9.x.x" + +"@hapi/hoek@10.x.x": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-10.0.1.tgz#ee9da297fabc557e1c040a0f44ee89c266ccc306" + integrity sha512-CvlW7jmOhWzuqOqiJQ3rQVLMcREh0eel4IBnxDx2FAcK8g7qoJRQK4L1CPBASoCY6y8e6zuCy3f2g+HWdkzcMw== + +"@hapi/hoek@9.x.x": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" + integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== + +"@humanwhocodes/config-array@^0.11.6": + version "0.11.7" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.7.tgz#38aec044c6c828f6ed51d5d7ae3d9b9faf6dbb0f" + integrity sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@prisma/client@^4.7.1": + version "4.7.1" + resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.7.1.tgz#66fe84aca25de17cb3d9141dec003f34714914b9" + integrity sha512-/GbnOwIPtjiveZNUzGXOdp7RxTEkHL4DZP3vBaFNadfr6Sf0RshU5EULFzVaSi9i9PIK9PYd+1Rn7z2B2npb9w== + dependencies: + "@prisma/engines-version" "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c" + +"@prisma/engines-version@4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c": + version "4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c" + resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.7.1-1.272861e07ab64f234d3ffc4094e32bd61775599c.tgz#43ff7d85478e64a1d790e4d53e78768a2acfacfe" + integrity sha512-Bd4LZ+WAnUHOq31e9X/ihi5zPlr4SzTRwUZZYxvWOxlerIZ7HJlVa9zXpuKTKLpI9O1l8Ec4OYCKsivWCs5a3Q== + +"@prisma/engines@4.7.1": + version "4.7.1" + resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-4.7.1.tgz#d657d4d05724158140022fa00614e143643090c2" + integrity sha512-zWabHosTdLpXXlMefHmnouhXMoTB1+SCbUU3t4FCmdrtIOZcarPKU3Alto7gm/pZ9vHlGOXHCfVZ1G7OIrSbog== + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + +"@tokenizer/token@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276" + integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A== + +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + +"@types/body-parser@*": + version "1.19.2" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" + integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.35" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" + integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + dependencies: + "@types/node" "*" + +"@types/cors@^2.8.13": + version "2.8.13" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94" + integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== + dependencies: + "@types/node" "*" + +"@types/express-serve-static-core@^4.17.18": + version "4.17.31" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz#a1139efeab4e7323834bb0226e62ac019f474b2f" + integrity sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + +"@types/express@^4.17.14": + version "4.17.14" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.14.tgz#143ea0557249bc1b3b54f15db4c81c3d4eb3569c" + integrity sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.18" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/json-schema@^7.0.9": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + +"@types/long@^4.0.0", "@types/long@^4.0.1": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" + integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== + +"@types/mime@*": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" + integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== + +"@types/node@*", "@types/node@>=13.7.0", "@types/node@^18.11.10": + version "18.11.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc" + integrity sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g== + +"@types/node@^10.1.0": + version "10.17.60" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" + integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== + +"@types/qs@*": + version "6.9.7" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/range-parser@*": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" + integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== + +"@types/semver@^7.3.12": + version "7.3.13" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" + integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== + +"@types/serve-static@*": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.0.tgz#c7930ff61afb334e121a9da780aac0d9b8f34155" + integrity sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg== + dependencies: + "@types/mime" "*" + "@types/node" "*" + +"@typescript-eslint/eslint-plugin@^5.45.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.46.0.tgz#9a96a713b9616c783501a3c1774c9e2b40217ad0" + integrity sha512-QrZqaIOzJAjv0sfjY4EjbXUi3ZOFpKfzntx22gPGr9pmFcTjcFw/1sS1LJhEubfAGwuLjNrPV0rH+D1/XZFy7Q== + dependencies: + "@typescript-eslint/scope-manager" "5.46.0" + "@typescript-eslint/type-utils" "5.46.0" + "@typescript-eslint/utils" "5.46.0" + debug "^4.3.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@^5.45.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.46.0.tgz#002d8e67122947922a62547acfed3347cbf2c0b6" + integrity sha512-joNO6zMGUZg+C73vwrKXCd8usnsmOYmgW/w5ZW0pG0RGvqeznjtGDk61EqqTpNrFLUYBW2RSBFrxdAZMqA4OZA== + dependencies: + "@typescript-eslint/scope-manager" "5.46.0" + "@typescript-eslint/types" "5.46.0" + "@typescript-eslint/typescript-estree" "5.46.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.46.0.tgz#60790b14d0c687dd633b22b8121374764f76ce0d" + integrity sha512-7wWBq9d/GbPiIM6SqPK9tfynNxVbfpihoY5cSFMer19OYUA3l4powA2uv0AV2eAZV6KoAh6lkzxv4PoxOLh1oA== + dependencies: + "@typescript-eslint/types" "5.46.0" + "@typescript-eslint/visitor-keys" "5.46.0" + +"@typescript-eslint/type-utils@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.46.0.tgz#3a4507b3b437e2fd9e95c3e5eea5ae16f79d64b3" + integrity sha512-dwv4nimVIAsVS2dTA0MekkWaRnoYNXY26dKz8AN5W3cBFYwYGFQEqm/cG+TOoooKlncJS4RTbFKgcFY/pOiBCg== + dependencies: + "@typescript-eslint/typescript-estree" "5.46.0" + "@typescript-eslint/utils" "5.46.0" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.46.0.tgz#f4d76622a996b88153bbd829ea9ccb9f7a5d28bc" + integrity sha512-wHWgQHFB+qh6bu0IAPAJCdeCdI0wwzZnnWThlmHNY01XJ9Z97oKqKOzWYpR2I83QmshhQJl6LDM9TqMiMwJBTw== + +"@typescript-eslint/typescript-estree@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.46.0.tgz#a6c2b84b9351f78209a1d1f2d99ca553f7fa29a5" + integrity sha512-kDLNn/tQP+Yp8Ro2dUpyyVV0Ksn2rmpPpB0/3MO874RNmXtypMwSeazjEN/Q6CTp8D7ExXAAekPEcCEB/vtJkw== + dependencies: + "@typescript-eslint/types" "5.46.0" + "@typescript-eslint/visitor-keys" "5.46.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.46.0.tgz#600cd873ba471b7d8b0b9f35de34cf852c6fcb31" + integrity sha512-4O+Ps1CRDw+D+R40JYh5GlKLQERXRKW5yIQoNDpmXPJ+C7kaPF9R7GWl+PxGgXjB3PQCqsaaZUpZ9dG4U6DO7g== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.46.0" + "@typescript-eslint/types" "5.46.0" + "@typescript-eslint/typescript-estree" "5.46.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + +"@typescript-eslint/visitor-keys@5.46.0": + version "5.46.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.46.0.tgz#36d87248ae20c61ef72404bcd61f14aa2563915f" + integrity sha512-E13gBoIXmaNhwjipuvQg1ByqSAu/GbEpP/qzFihugJ+MomtoJtFAJG/+2DRPByf57B863m0/q7Zt16V9ohhANw== + dependencies: + "@typescript-eslint/types" "5.46.0" + eslint-visitor-keys "^3.3.0" + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.4.1, acorn@^8.8.0: + version "8.8.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" + integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +atomic-sleep@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" + integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== + +axios@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" + integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== + dependencies: + follow-redirects "^1.14.4" + +"baileys-store@file:external/baileys-store-1.tgz": + version "1.0.0-beta.0" + resolved "file:external/baileys-store-1.tgz#5bfde28f4cda8f1de564ae61caf65edba9c1e7d2" + dependencies: + tiny-invariant "^1.3.1" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bl@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" + integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +cheerio-select@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" + integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== + dependencies: + boolbase "^1.0.0" + css-select "^5.1.0" + css-what "^6.1.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + +cheerio@1.0.0-rc.11: + version "1.0.0-rc.11" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.11.tgz#1be84be1a126958366bcc57a11648cd9b30a60c2" + integrity sha512-bQwNaDIBKID5ts/DsdhxrjqFXYfLw4ste+wMKqWA8DyKcS4qwsPP4Bk8ZNaTJjvpiX/qW3BT4sU7d6Bh5i+dag== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" + parse5-htmlparser2-tree-adapter "^7.0.0" + tslib "^2.4.0" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +clone@2.x: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" + integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a" + integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== + dependencies: + color-convert "^2.0.1" + color-string "^1.9.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@^1.0.4, content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + +cors@^2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-fetch@3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +css-select@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" + integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== + dependencies: + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +curve25519-js@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/curve25519-js/-/curve25519-js-0.0.4.tgz#e6ad967e8cd284590d657bbfc90d8b50e49ba060" + integrity sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== + +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-libc@^2.0.0, detect-libc@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" + integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +dijkstrajs@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.2.tgz#2e48c0d3b825462afe75ab4ad5e829c8ece36257" + integrity sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.0.1.tgz#696b3875238338cb186b6c0612bd4901c89a4f1c" + integrity sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.1" + +dotenv@^16.0.3: + version "16.0.3" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" + integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== + +duplexify@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" + integrity sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw== + dependencies: + end-of-stream "^1.4.1" + inherits "^2.0.3" + readable-stream "^3.1.1" + stream-shift "^1.0.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encode-utf8@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +end-of-stream@^1.1.0, end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +entities@^4.2.0, entities@^4.3.0, entities@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" + integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.29.0: + version "8.29.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.29.0.tgz#d74a88a20fb44d59c51851625bc4ee8d0ec43f87" + integrity sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg== + dependencies: + "@eslint/eslintrc" "^1.3.3" + "@humanwhocodes/config-array" "^0.11.6" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.4.0" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.15.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-sdsl "^4.1.4" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + +espree@^9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" + integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + +express-validator@^6.14.2: + version "6.14.2" + resolved "https://registry.yarnpkg.com/express-validator/-/express-validator-6.14.2.tgz#6147893f7bec0e14162c3a88b3653121afc4678f" + integrity sha512-8XfAUrQ6Y7dIIuy9KcUPCfG/uCbvREctrxf5EeeME+ulanJ4iiW71lWmm9r4YcKKYOCBMan0WpVg7FtHu4Z4Wg== + dependencies: + lodash "^4.17.21" + validator "^13.7.0" + +express@^4.18.2: + version "4.18.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" + integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.5.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.2.12" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fast-redact@^3.0.0, fast-redact@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.1.2.tgz#d58e69e9084ce9fa4c1a6fa98a3e1ecf5d7839aa" + integrity sha512-+0em+Iya9fKGfEQGcd62Yv6onjBmmhV1uh86XVfOU8VwAe6kaFdQCWI9s0/Nnugx5Vd9tdbZ7e6gE2tR9dzXdw== + +fastq@^1.6.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.14.0.tgz#107f69d7295b11e0fccc264e1fc6389f623731ce" + integrity sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +file-type@^16.5.4: + version "16.5.4" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-16.5.4.tgz#474fb4f704bee427681f98dd390058a172a6c2fd" + integrity sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw== + dependencies: + readable-web-to-node-stream "^3.0.0" + strtok3 "^6.2.4" + token-types "^4.1.1" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flatted@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + +follow-redirects@^1.14.4: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +futoin-hkdf@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/futoin-hkdf/-/futoin-hkdf-1.5.1.tgz#141f00427bc9950b38a42aa786b99c318b9b688d" + integrity sha512-g5d0Qp7ks55hYmYmfqn4Nz18XH49lcCR+vvIvHT92xXnsJaGZmY1EtWQWilJ6BQp57heCIXM/rRo+AFep8hGgg== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" + integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^13.15.0: + version "13.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.18.0.tgz#fb224daeeb2bb7d254cd2c640f003528b8d0c1dc" + integrity sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A== + dependencies: + type-fest "^0.20.2" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +htmlparser2@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.1.tgz#abaa985474fcefe269bc761a779b544d7196d010" + integrity sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + domutils "^3.0.1" + entities "^4.3.0" + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.13, ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.1.tgz#c2b1f76cb999ede1502f3a226a9310fdfe88d46c" + integrity sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +js-sdsl@^4.1.4: + version "4.2.0" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.2.0.tgz#278e98b7bea589b8baaf048c20aeb19eb7ad09d0" + integrity sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +"libsignal@git+https://github.com/adiwajshing/libsignal-node": + version "2.0.1" + resolved "git+https://github.com/adiwajshing/libsignal-node#11dbd962ea108187c79a7c46fe4d6f790e23da97" + dependencies: + curve25519-js "^0.0.4" + protobufjs "6.8.8" + +link-preview-js@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/link-preview-js/-/link-preview-js-3.0.4.tgz#1e053f80ee20ef50d03e6742dc30dc8487112653" + integrity sha512-xsuxMigAZd4xmj6BIwMNuQjjpJdh0DWeIo1NXQgaoWSi9Z/dzz/Kxy6vzzsUonFlMTPJ1i0EC8aeOg/xrOMidg== + dependencies: + abort-controller "^3.0.0" + cheerio "1.0.0-rc.11" + cross-fetch "3.1.5" + url "0.11.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +media-typer@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-1.1.0.tgz#6ab74b8f2d3320f2064b2a87a38e7931ff3a5561" + integrity sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw== + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + +minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.3: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +music-metadata@^7.12.3: + version "7.13.0" + resolved "https://registry.yarnpkg.com/music-metadata/-/music-metadata-7.13.0.tgz#796415621f274e17f5ec04d7224d5503f18157ef" + integrity sha512-EoDmAoK84Z9xarNEgjE7YQ4x7cIwHI9kOI3RdA2QlEHCsqBvBuBbIcP3vONGO/SBiPhXe5FF+IVAW+1T2owjEA== + dependencies: + "@tokenizer/token" "^0.3.0" + content-type "^1.0.4" + debug "^4.3.4" + file-type "^16.5.4" + media-typer "^1.1.0" + strtok3 "^6.3.0" + token-types "^4.2.1" + +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +node-abi@^3.3.0: + version "3.30.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.30.0.tgz#d84687ad5d24ca81cdfa912a36f2c5c19b137359" + integrity sha512-qWO5l3SCqbwQavymOmtTVuCWZE23++S+rxyoHjXqUmPyzRcaoI4lA2gO55/drddGnedAyjA7sk76SfQ5lfUMnw== + dependencies: + semver "^7.3.5" + +node-addon-api@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.0.0.tgz#7d7e6f9ef89043befdb20c1989c905ebde18c501" + integrity sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA== + +node-cache@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-cache/-/node-cache-5.1.2.tgz#f264dc2ccad0a780e76253a694e9fd0ed19c398d" + integrity sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg== + dependencies: + clone "2.x" + +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + +on-exit-leak-free@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" + integrity sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg== + +on-exit-leak-free@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz#5c703c968f7e7f851885f6459bf8a8a57edc9cc4" + integrity sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse5-htmlparser2-tree-adapter@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" + integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== + dependencies: + domhandler "^5.0.2" + parse5 "^7.0.0" + +parse5@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +peek-readable@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/peek-readable/-/peek-readable-4.1.0.tgz#4ece1111bf5c2ad8867c314c81356847e8a62e72" + integrity sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pino-abstract-transport@v0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz#4b54348d8f73713bfd14e3dc44228739aa13d9c0" + integrity sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ== + dependencies: + duplexify "^4.1.2" + split2 "^4.0.0" + +pino-abstract-transport@v1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz#cc0d6955fffcadb91b7b49ef220a6cc111d48bb3" + integrity sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA== + dependencies: + readable-stream "^4.0.0" + split2 "^4.0.0" + +pino-std-serializers@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz#1791ccd2539c091ae49ce9993205e2cd5dbba1e2" + integrity sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q== + +pino-std-serializers@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-6.0.0.tgz#4c20928a1bafca122fdc2a7a4a171ca1c5f9c526" + integrity sha512-mMMOwSKrmyl+Y12Ri2xhH1lbzQxwwpuru9VjyJpgFIH4asSj88F2csdMwN6+M5g1Ll4rmsYghHLQJw81tgZ7LQ== + +pino@^7.0.0: + version "7.11.0" + resolved "https://registry.yarnpkg.com/pino/-/pino-7.11.0.tgz#0f0ea5c4683dc91388081d44bff10c83125066f6" + integrity sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg== + dependencies: + atomic-sleep "^1.0.0" + fast-redact "^3.0.0" + on-exit-leak-free "^0.2.0" + pino-abstract-transport v0.5.0 + pino-std-serializers "^4.0.0" + process-warning "^1.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.1.0" + safe-stable-stringify "^2.1.0" + sonic-boom "^2.2.1" + thread-stream "^0.15.1" + +pino@^8.7.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/pino/-/pino-8.7.0.tgz#58621608a3d8540ae643cdd9194cdd94130c78d9" + integrity sha512-l9sA5uPxmZzwydhMWUcm1gI0YxNnYl8MfSr2h8cwLvOAzQLBLewzF247h/vqHe3/tt6fgtXeG9wdjjoetdI/vA== + dependencies: + atomic-sleep "^1.0.0" + fast-redact "^3.1.1" + on-exit-leak-free "^2.1.0" + pino-abstract-transport v1.0.0 + pino-std-serializers "^6.0.0" + process-warning "^2.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.2.0" + safe-stable-stringify "^2.3.1" + sonic-boom "^3.1.0" + thread-stream "^2.0.0" + +pngjs@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" + integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== + +prebuild-install@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== + dependencies: + detect-libc "^2.0.0" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^3.3.0" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^4.0.0" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" + integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== + +prisma@^4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/prisma/-/prisma-4.7.1.tgz#0a1beac26abdc4421e496b75eb50413f3ee3b0ba" + integrity sha512-CCQP+m+1qZOGIZlvnL6T3ZwaU0LAleIHYFPN9tFSzjs/KL6vH9rlYbGOkTuG9Q1s6Ki5D0LJlYlW18Z9EBUpGg== + dependencies: + "@prisma/engines" "4.7.1" + +process-warning@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" + integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== + +process-warning@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-2.1.0.tgz#1e60e3bfe8183033bbc1e702c2da74f099422d1a" + integrity sha512-9C20RLxrZU/rFnxWncDkuF6O999NdIf3E1ws4B0ZeY3sRVPzWBMsYDE2lxjxhiXxg464cQTgKUGm8/i6y2YGXg== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + +protobufjs@6.8.8: + version "6.8.8" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c" + integrity sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.0" + "@types/node" "^10.1.0" + long "^4.0.0" + +protobufjs@^6.11.3: + version "6.11.3" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" + integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.1" + "@types/node" ">=13.7.0" + long "^4.0.0" + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qrcode-terminal@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" + integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== + +qrcode@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.1.tgz#0103f97317409f7bc91772ef30793a54cd59f0cb" + integrity sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg== + dependencies: + dijkstrajs "^1.0.1" + encode-utf8 "^1.0.3" + pngjs "^5.0.0" + yargs "^15.3.1" + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +quick-format-unescaped@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" + integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.2.0.tgz#a7ef523d3b39e4962b0db1a1af22777b10eeca46" + integrity sha512-gJrBHsaI3lgBoGMW/jHZsQ/o/TIWiu5ENCJG1BB7fuCKzpFM8GaS2UoBVt9NO+oI+3FcrBNbUkl3ilDe09aY4A== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + +readable-web-to-node-stream@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz#5d52bb5df7b54861fd48d015e93a2cb87b3ee0bb" + integrity sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw== + dependencies: + readable-stream "^3.6.0" + +real-require@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.1.0.tgz#736ac214caa20632847b7ca8c1056a0767df9381" + integrity sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg== + +real-require@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78" + integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg== + +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-stable-stringify@^2.1.0, safe-stable-stringify@^2.3.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.1.tgz#34694bd8a30575b7f94792aa51527551bd733d61" + integrity sha512-dVHE6bMtS/bnL2mwualjc6IxEv1F+OCUpA46pKUj6F8uDbUM0jCCulPqRNPSnWwGNKx5etqMjZYdXtrm5KJZGA== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sharp@^0.31.2: + version "0.31.2" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.31.2.tgz#a8411c80512027f5a452b76d599268760c4e5dfa" + integrity sha512-DUdNVEXgS5A97cTagSLIIp8dUZ/lZtk78iNVZgHdHbx1qnQR7JAHY0BnXnwwH39Iw+VKhO08CTYhIg0p98vQ5Q== + dependencies: + color "^4.2.3" + detect-libc "^2.0.1" + node-addon-api "^5.0.0" + prebuild-install "^7.1.1" + semver "^7.3.8" + simple-get "^4.0.1" + tar-fs "^2.1.1" + tunnel-agent "^0.6.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^4.0.0, simple-get@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== + dependencies: + decompress-response "^6.0.0" + once "^1.3.1" + simple-concat "^1.0.0" + +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== + dependencies: + is-arrayish "^0.3.1" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +sonic-boom@^2.2.1: + version "2.8.0" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" + integrity sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg== + dependencies: + atomic-sleep "^1.0.0" + +sonic-boom@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-3.2.1.tgz#972ceab831b5840a08a002fa95a672008bda1c38" + integrity sha512-iITeTHxy3B9FGu8aVdiDXUVAcHMF9Ss0cCsAOo2HfCrmVGT3/DT5oYaeu0M/YKZDlKTvChEyPq0zI9Hf33EX6A== + dependencies: + atomic-sleep "^1.0.0" + +split2@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-4.1.0.tgz#101907a24370f85bb782f08adaabe4e281ecf809" + integrity sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ== + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +strtok3@^6.2.4, strtok3@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/strtok3/-/strtok3-6.3.0.tgz#358b80ffe6d5d5620e19a073aa78ce947a90f9a0" + integrity sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw== + dependencies: + "@tokenizer/token" "^0.3.0" + peek-readable "^4.1.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +tar-fs@^2.0.0, tar-fs@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-stream@^2.1.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +thread-stream@^0.15.1: + version "0.15.2" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-0.15.2.tgz#fb95ad87d2f1e28f07116eb23d85aba3bc0425f4" + integrity sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA== + dependencies: + real-require "^0.1.0" + +thread-stream@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-2.2.0.tgz#310c03a253f729094ce5d4638ef5186dfa80a9e8" + integrity sha512-rUkv4/fnb4rqy/gGy7VuqK6wE1+1DOCOWy4RMeaV69ZHMP11tQKZvZSip1yTgrKCMZzEMcCL/bKfHvSfDHx+iQ== + dependencies: + real-require "^0.2.0" + +tiny-invariant@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" + integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +token-types@^4.1.1, token-types@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/token-types/-/token-types-4.2.1.tgz#0f897f03665846982806e138977dbe72d44df753" + integrity sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ== + dependencies: + "@tokenizer/token" "^0.3.0" + ieee754 "^1.2.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-node@^10.9.1: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typescript@^4.9.3: + version "4.9.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" + integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +url@0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ== + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +validator@^13.7.0: + version "13.7.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857" + integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@^8.0.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^15.3.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 4679003f015662050df45c493e738f41e9c942aa Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sat, 10 Dec 2022 01:55:31 +0700 Subject: [PATCH 02/12] delete .env --- .env | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index d99f4aff..00000000 --- a/.env +++ /dev/null @@ -1,3 +0,0 @@ -HOST="localhost" -PORT="3000" -DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api" \ No newline at end of file From 982399f9311765586cb81064383adb151c5342fa Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sat, 10 Dec 2022 06:58:17 +0700 Subject: [PATCH 03/12] add sessions route --- .env.example | 5 +- examples/sse.html | 24 ++++ package.json | 6 +- src/controllers/session.ts | 58 ++++++++ src/index.ts | 12 +- src/middlewares/request-validator.ts | 10 ++ src/middlewares/session-validator.ts | 10 ++ src/routes/index.ts | 8 ++ src/routes/sessions.ts | 14 ++ src/shared.ts | 5 + src/wa.ts | 196 +++++++++++++++++---------- tsconfig.json | 2 +- yarn.lock | 14 ++ 13 files changed, 285 insertions(+), 79 deletions(-) create mode 100644 examples/sse.html create mode 100644 src/controllers/session.ts create mode 100644 src/middlewares/request-validator.ts create mode 100644 src/middlewares/session-validator.ts create mode 100644 src/routes/index.ts create mode 100644 src/routes/sessions.ts create mode 100644 src/shared.ts diff --git a/.env.example b/.env.example index d99f4aff..ac496ff8 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,6 @@ HOST="localhost" PORT="3000" -DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api" \ No newline at end of file +DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api" +RECONNECT_INTERVAL="5000" +MAX_RECONNECT_RETRIES="5" +SSE_MAX_QR_GENERATION="10" \ No newline at end of file diff --git a/examples/sse.html b/examples/sse.html new file mode 100644 index 00000000..80172ab1 --- /dev/null +++ b/examples/sse.html @@ -0,0 +1,24 @@ + + + + + + + SSE Example + + + qr +
Connection state:
+
+ + + diff --git a/package.json b/package.json index 9026dc91..87f0138c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Simple RESTful WhatsApp API", "version": "1.0.0-beta.0", "private": true, - "main": "index.js", + "main": "dist/index.js", "repository": { "type": "git", "url": "git+https://github.com/ookamiiixd/baileys-api.git" @@ -14,8 +14,8 @@ }, "homepage": "https://github.com/ookamiiixd/baileys-api#readme", "scripts": { + "start": "node .", "build": "tsc", - "typecheck": "tsc --noEmit", "lint": "eslint .", "format": "prettier . --write" }, @@ -38,6 +38,8 @@ "@types/cors": "^2.8.13", "@types/express": "^4.17.14", "@types/node": "^18.11.10", + "@types/qrcode": "^1.5.0", + "@types/ws": "^8.5.3", "@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/parser": "^5.45.0", "eslint": "^8.29.0", diff --git a/src/controllers/session.ts b/src/controllers/session.ts new file mode 100644 index 00000000..b06f8a67 --- /dev/null +++ b/src/controllers/session.ts @@ -0,0 +1,58 @@ +import type { RequestHandler } from 'express'; +import type { WebSocket } from 'ws'; +import { logger } from '../shared'; +import { createSession, getSession, sessionExists } from '../wa'; + +export const find: RequestHandler = (req, res) => + res.status(200).json({ message: 'Session found' }); + +export const status: RequestHandler = (req, res) => { + const state = ['CONNECTING', 'CONNECTED', 'DISCONNECTING', 'DISCONNECTED']; + const session = getSession(req.params.sessionId)!; + let status = state[(session.ws as WebSocket).readyState]; + status = session.user ? 'AUTHENTICATED' : status; + res.status(200).json({ status }); +}; + +export const add: RequestHandler = async (req, res) => { + const { sessionId, ...options } = req.body; + if (sessionExists(sessionId)) return res.status(400).json({ error: 'Session already exists' }); + + try { + await createSession({ sessionId, res, socketConfig: options }); + } catch (e) { + const message = 'An error occured during session create'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const addSSE: RequestHandler = async (req, res) => { + const { sessionId } = req.params; + res.writeHead(200, { + 'Content-Type': 'text/event-stream', + 'Cache-Control': 'no-cache', + Connection: 'keep-alive', + }); + + if (sessionExists(sessionId)) { + res.write(`data: ${JSON.stringify({ error: 'Session already exists' })}\n\n`); + res.end(); + return; + } + + try { + await createSession({ sessionId, res, SSE: true }); + } catch (e) { + const message = 'An error occured during session create'; + logger.error(e, message); + res.write(`data: ${JSON.stringify({ error: message })}\n\n`); + res.end(); + } +}; + +export const del: RequestHandler = async (req, res) => { + const session = getSession(req.params.sessionId); + await session?.destroy(); + res.status(200).json({ message: 'Session deleted' }); +}; diff --git a/src/index.ts b/src/index.ts index e423a12a..f796525a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,14 +2,18 @@ import 'dotenv/config'; import express from 'express'; import cors from 'cors'; import { init } from './wa'; +import routes from './routes'; const app = express(); app.use(cors()); app.use(express.json()); +app.use('/', routes); const host = process.env.HOST || '0.0.0.0'; -const port = process.env.PORT ? Number(process.env.PORT) : 3000; -const listener = () => console.log(`Server is listening on http://${host}${port}`); +const port = Number(process.env.PORT || 3000); +const listener = () => console.log(`Server is listening on http://${host}:${port}`); -init(); -app.listen(port, host, listener); +(async () => { + await init(); + app.listen(port, host, listener); +})(); diff --git a/src/middlewares/request-validator.ts b/src/middlewares/request-validator.ts new file mode 100644 index 00000000..cb796163 --- /dev/null +++ b/src/middlewares/request-validator.ts @@ -0,0 +1,10 @@ +import type { RequestHandler } from 'express'; +import { validationResult } from 'express-validator'; + +const validate: RequestHandler = (req, res, next) => { + const errors = validationResult(req); + if (!errors.isEmpty()) res.status(400).json({ errors: errors.array() }); + next(); +}; + +export default validate; diff --git a/src/middlewares/session-validator.ts b/src/middlewares/session-validator.ts new file mode 100644 index 00000000..e13707b6 --- /dev/null +++ b/src/middlewares/session-validator.ts @@ -0,0 +1,10 @@ +import type { RequestHandler } from 'express'; +import { sessionExists } from '../wa'; + +const validate: RequestHandler = (req, res, next) => { + if (!sessionExists(req.params.sessionId)) + return res.status(404).json({ error: 'Session not found' }); + next(); +}; + +export default validate; diff --git a/src/routes/index.ts b/src/routes/index.ts new file mode 100644 index 00000000..7a54857b --- /dev/null +++ b/src/routes/index.ts @@ -0,0 +1,8 @@ +import { Router } from 'express'; +import sessionRoutes from './sessions'; + +const router = Router(); +router.use('/sessions', sessionRoutes); +router.all('*', (req, res) => res.status(404).json({ error: 'URL not found' })); + +export default router; diff --git a/src/routes/sessions.ts b/src/routes/sessions.ts new file mode 100644 index 00000000..da0d3436 --- /dev/null +++ b/src/routes/sessions.ts @@ -0,0 +1,14 @@ +import { Router } from 'express'; +import { body } from 'express-validator'; +import * as controller from '../controllers/session'; +import requestValidator from '../middlewares/request-validator'; +import sessionValidator from '../middlewares/session-validator'; + +const router = Router(); +router.get('/:sessionId', sessionValidator, controller.find); +router.get('/:sessionId/status', sessionValidator, controller.status); +router.post('/add', body('sessionId').notEmpty(), requestValidator, controller.add); +router.get('/:sessionId/add-sse', controller.addSSE); +router.delete('/:sessionId', sessionValidator, controller.del); + +export default router; diff --git a/src/shared.ts b/src/shared.ts new file mode 100644 index 00000000..9e572afb --- /dev/null +++ b/src/shared.ts @@ -0,0 +1,5 @@ +import { PrismaClient } from '@prisma/client'; +import pino from 'pino'; + +export const prisma = new PrismaClient(); +export const logger = pino({ level: 'debug' }); diff --git a/src/wa.ts b/src/wa.ts index 00e2556b..ea71164e 100644 --- a/src/wa.ts +++ b/src/wa.ts @@ -1,98 +1,152 @@ import type { ConnectionState, proto, SocketConfig, WASocket } from '@adiwajshing/baileys'; +import makeWASocket, { DisconnectReason, Browsers } from '@adiwajshing/baileys'; import type { Response } from 'express'; -import { DisconnectReason } from '@adiwajshing/baileys'; -import { Browsers } from '@adiwajshing/baileys'; -import makeWASocket from '@adiwajshing/baileys'; -import { PrismaClient } from '@prisma/client'; import { useSession, Store, initStore } from 'baileys-store'; import type { Boom } from '@hapi/boom'; -import pino from 'pino'; +import { toDataURL } from 'qrcode'; +import { prisma, logger } from './shared'; -const sessions = new Map(); +const sessions = new Map Promise; store: Store }>(); const retries = new Map(); -const prisma = new PrismaClient(); -const logger = pino({ level: 'debug' }); +const SSEQRGenerations = new Map(); const RECONNECT_INTERVAL = Number(process.env.RECONNECT_INTERVAL || 0); const MAX_RECONNECT_RETRIES = Number(process.env.MAX_RECONNECT_RETRIES || 0); +const SSE_MAX_QR_GENERATION = Number(process.env.SSE_MAX_QR_GENERATION || 1); +const SESSION_CONFIG_ID = 'session-config'; -type WASessionOptions = { - sessionId: string; - res?: Response; - sse?: boolean; - socketConfig?: SocketConfig; -}; - -export class WASession { - private readonly sessionId: string; - private readonly socketConfig?: SocketConfig; - private res?: Response; - private sse?: boolean; - private connectionState: Partial = { connection: 'close' }; - - constructor({ sessionId, res, sse = false, socketConfig }: WASessionOptions) { - this.sessionId = sessionId; - this.socketConfig = socketConfig; - this.res = res; - this.sse = sse; - this.connect(); - } - - private async connect() { - const { state, saveCreds } = await useSession(this.sessionId); - const socket = makeWASocket({ - auth: state, - logger, - printQRInTerminal: true, - browser: Browsers.ubuntu('Chrome'), - ...this.socketConfig, - getMessage: async (key) => { - const data = await prisma.message.findFirst({ - where: { remoteJid: key.remoteJid!, id: key.id!, sessionId: this.sessionId }, - }); - return (data || undefined) as proto.IMessage | undefined; - }, - }); - - const store = new Store(this.sessionId, socket.ev); - sessions.set(this.sessionId, { ...socket, store }); - - socket.ev.on('creds.update', saveCreds); - socket.ev.on('connection.update', (update) => { - this.connectionState = update; - const { connection } = update; - - if (connection === 'open') retries.delete(this.sessionId); - if (connection === 'close') this.handleConnectionClose(); - }); - } +export async function init() { + initStore({ prisma, logger }); + const sessions = await prisma.session.findMany({ + select: { sessionId: true, data: true }, + where: { id: { contains: SESSION_CONFIG_ID } }, + }); - private handleConnectionClose() { - const code = (this.connectionState.lastDisconnect?.error as Boom)?.output?.statusCode; - if (code === DisconnectReason.loggedOut || !shouldReconnect(this.sessionId)) { - return deleteSession(this.sessionId); + for (const { sessionId, data } of sessions) { + try { + await createSession({ sessionId, socketConfig: JSON.parse(data) }); + } catch (e) { + logger.error(e, 'An error occured during session create from init'); } - setTimeout(this.connect, code === DisconnectReason.restartRequired ? 0 : RECONNECT_INTERVAL); } } -export function init() { - initStore({ prisma, logger }); -} - function shouldReconnect(sessionId: string) { let attempts = retries.get(sessionId) ?? 0; if (attempts < MAX_RECONNECT_RETRIES) { attempts += 1; - logger.info({ attempts, sessionId }, 'Reconnecting...'); retries.set(sessionId, attempts); - return true; } return false; } -export function deleteSession(sessionId: string) { - sessions.delete(sessionId); +type WASessionOptions = { + sessionId: string; + res?: Response; + SSE?: boolean; + socketConfig?: SocketConfig; +}; + +export async function createSession(options: WASessionOptions) { + const { sessionId, res, SSE, socketConfig } = options; + let connectionState: Partial = { connection: 'close' }; + + const destroy = async () => { + try { + await socket.logout(); + } catch (e) { + logger.error(e, 'An error occured during session destroy'); + } finally { + sessions.delete(sessionId); + } + }; + + const handleConnectionClose = () => { + const code = (connectionState.lastDisconnect?.error as Boom)?.output?.statusCode; + const restartRequired = code === DisconnectReason.restartRequired; + const shouldLogout = !shouldReconnect(sessionId); + + if (code === DisconnectReason.loggedOut || shouldLogout) { + res && res.end(); + shouldLogout && destroy(); + sessions.delete(sessionId); + return; + } + !restartRequired && + logger.info({ attempts: retries.get(sessionId) ?? 1, sessionId }, 'Reconnecting...'); + setTimeout(() => createSession(options), restartRequired ? 0 : RECONNECT_INTERVAL); + }; + + const handleConnectionUpdate = async () => { + if (!res) return; + const qr = connectionState.qr ? await toDataURL(connectionState.qr) : undefined; + const data = { ...connectionState, qr }; + const currentGenerations = SSEQRGenerations.get(sessionId) ?? 0; + + if (SSE && qr && currentGenerations >= SSE_MAX_QR_GENERATION) { + res.end(); + destroy(); + return; + } + if (SSE) { + if (qr) SSEQRGenerations.set(sessionId, currentGenerations + 1); + res.write(`data: ${JSON.stringify(data)}\n\n`); + return; + } + if (res.headersSent) return destroy(); + if (connectionState.qr) res.status(200).json(data); + }; + + const { state, saveCreds } = await useSession(sessionId); + const socket = makeWASocket({ + auth: state, + logger, + printQRInTerminal: true, + browser: Browsers.ubuntu('Chrome'), + ...socketConfig, + getMessage: async (key) => { + const data = await prisma.message.findFirst({ + where: { remoteJid: key.remoteJid!, id: key.id!, sessionId }, + }); + return (data || undefined) as proto.IMessage | undefined; + }, + }); + + const store = new Store(sessionId, socket.ev); + sessions.set(sessionId, { ...socket, destroy, store }); + + res?.on('close', () => res.end()); + socket.ev.on('creds.update', saveCreds); + socket.ev.on('connection.update', (update) => { + connectionState = update; + const { connection } = update; + + if (connection === 'open') { + retries.delete(sessionId); + SSEQRGenerations.delete(sessionId); + } + if (connection === 'close') handleConnectionClose(); + handleConnectionUpdate(); + }); + + const configID = `${SESSION_CONFIG_ID}-${sessionId}`; + await prisma.session.upsert({ + create: { id: configID, sessionId, data: JSON.stringify(socketConfig || {}) }, + update: {}, + where: { sessionId_id: { id: configID, sessionId } }, + }); +} + +export function getSession(sessionId: string) { + return sessions.get(sessionId); +} + +export async function deleteSession(sessionId: string) { + return sessions.get(sessionId)?.destroy(); +} + +export function sessionExists(sessionId: string) { + return sessions.has(sessionId); } diff --git a/tsconfig.json b/tsconfig.json index 9615b2e1..fc5f0785 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "strict": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, - "declaration": true, + "declaration": false, "skipLibCheck": true, "lib": ["ESNext"], "outDir": "dist/" diff --git a/yarn.lock b/yarn.lock index 90519cc0..b0560943 100644 --- a/yarn.lock +++ b/yarn.lock @@ -281,6 +281,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== +"@types/qrcode@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@types/qrcode/-/qrcode-1.5.0.tgz#6a98fe9a9a7b2a9a3167b6dde17eff999eabe40b" + integrity sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA== + dependencies: + "@types/node" "*" + "@types/qs@*": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" @@ -304,6 +311,13 @@ "@types/mime" "*" "@types/node" "*" +"@types/ws@^8.5.3": + version "8.5.3" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" + integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== + dependencies: + "@types/node" "*" + "@typescript-eslint/eslint-plugin@^5.45.0": version "5.46.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.46.0.tgz#9a96a713b9616c783501a3c1774c9e2b40217ad0" From 3fb430b7a49316dd5aae4cdc49a886ab01780a45 Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sat, 10 Dec 2022 07:02:35 +0700 Subject: [PATCH 04/12] missing return --- src/middlewares/request-validator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middlewares/request-validator.ts b/src/middlewares/request-validator.ts index cb796163..f362ffff 100644 --- a/src/middlewares/request-validator.ts +++ b/src/middlewares/request-validator.ts @@ -3,7 +3,7 @@ import { validationResult } from 'express-validator'; const validate: RequestHandler = (req, res, next) => { const errors = validationResult(req); - if (!errors.isEmpty()) res.status(400).json({ errors: errors.array() }); + if (!errors.isEmpty()) return res.status(400).json({ errors: errors.array() }); next(); }; From 03eff28885edccf3e0629b003595117d446f90b6 Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sun, 11 Dec 2022 14:41:37 +0700 Subject: [PATCH 05/12] add more routes --- src/controllers/chat.ts | 20 ++++++++ src/controllers/group.ts | 22 +++++++++ src/controllers/message.ts | 98 ++++++++++++++++++++++++++++++++++++++ src/controllers/misc.ts | 17 +++++++ src/index.ts | 1 + src/routes/chats.ts | 26 ++++++++++ src/routes/groups.ts | 26 ++++++++++ src/routes/index.ts | 9 +++- src/routes/messages.ts | 34 +++++++++++++ src/routes/misc.ts | 16 +++++++ src/routes/sessions.ts | 2 +- src/wa.ts | 39 +++++++++++---- 12 files changed, 300 insertions(+), 10 deletions(-) create mode 100644 src/controllers/chat.ts create mode 100644 src/controllers/group.ts create mode 100644 src/controllers/message.ts create mode 100644 src/controllers/misc.ts create mode 100644 src/routes/chats.ts create mode 100644 src/routes/groups.ts create mode 100644 src/routes/messages.ts create mode 100644 src/routes/misc.ts diff --git a/src/controllers/chat.ts b/src/controllers/chat.ts new file mode 100644 index 00000000..d31e3d9c --- /dev/null +++ b/src/controllers/chat.ts @@ -0,0 +1,20 @@ +import type { RequestHandler } from 'express'; +import { logger, prisma } from '../shared'; + +export const list: RequestHandler = async (req, res) => { + try { + const { sessionId } = req.params; + const { cursor = undefined, limit = 25 } = req.query; + const chats = await prisma.chat.findMany({ + cursor: cursor ? { sessionId_id: { id: cursor as string, sessionId } } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + }); + + res.status(200).json({ data: chats, cursor: chats.length ? chats[chats.length - 1].id : null }); + } catch (e) { + const message = 'An error occured during chat list'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; diff --git a/src/controllers/group.ts b/src/controllers/group.ts new file mode 100644 index 00000000..f141255a --- /dev/null +++ b/src/controllers/group.ts @@ -0,0 +1,22 @@ +import type { RequestHandler } from 'express'; +import { logger, prisma } from '../shared'; + +export const list: RequestHandler = async (req, res) => { + try { + const { sessionId } = req.params; + const { cursor = undefined, limit = 25 } = req.query; + const groups = await prisma.groupMetadata.findMany({ + cursor: cursor ? { sessionId_id: { id: cursor as string, sessionId } } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + }); + + res + .status(200) + .json({ data: groups, cursor: groups.length ? groups[groups.length - 1].id : null }); + } catch (e) { + const message = 'An error occured during group list'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; diff --git a/src/controllers/message.ts b/src/controllers/message.ts new file mode 100644 index 00000000..417f080f --- /dev/null +++ b/src/controllers/message.ts @@ -0,0 +1,98 @@ +import type { RequestHandler } from 'express'; +import { delay as delayMs } from '@adiwajshing/baileys'; +import { logger, prisma } from '../shared'; +import { getSession, jidExists } from '../wa'; + +export const send: RequestHandler = async (req, res) => { + try { + const { sessionId } = req.params; + const { jid, type = 'number', message, options } = req.body; + const session = getSession(sessionId)!; + + const exists = await jidExists(session, jid, type); + if (!exists) return res.status(400).json({ error: 'JID does not exist' }); + + const result = await session.sendMessage(jid, message, options); + res.status(200).json(result); + } catch (e) { + const message = 'An error occured during message send'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const sendBulk: RequestHandler = async (req, res) => { + const { sessionId } = req.params; + const session = getSession(sessionId)!; + const results: { index: number; result: any }[] = []; + const errors: { index: number; error: string }[] = []; + + for (const [ + index, + { jid, type = 'number', delay = 2500, message, options }, + ] of req.body.entries()) { + try { + const exists = await jidExists(session, jid, type); + if (!exists) { + errors.push({ index, error: 'JID does not exist' }); + continue; + } + + if (index > 0) await delayMs(delay); + const result = await session.sendMessage(jid, message, options); + results.push({ index, result }); + } catch (e) { + const message = 'An error occured during message send'; + logger.error(e, message); + errors.push({ index, error: message }); + } + } + + res + .status(req.body.length !== 0 && errors.length === req.body.length ? 500 : 200) + .json({ results, errors }); +}; + +export const list: RequestHandler = async (req, res) => { + try { + const { sessionId } = req.params; + const { cursor = undefined, limit = 25 } = req.query; + const messages = await prisma.message.findMany({ + cursor: cursor ? { pkId: Number(cursor) } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { sessionId }, + }); + + res + .status(200) + .json({ data: messages, cursor: messages.length ? messages[messages.length - 1].id : null }); + } catch (e) { + const message = 'An error occured during message list'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const find: RequestHandler = async (req, res) => { + try { + const { sessionId, jid } = req.params; + const { cursor = undefined, limit = 25 } = req.query; + const messages = await prisma.message.findMany({ + cursor: cursor + ? { sessionId_remoteJid_id: { id: cursor as string, remoteJid: jid, sessionId } } + : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + orderBy: { messageTimestamp: 'desc' }, + }); + + res + .status(200) + .json({ data: messages, cursor: messages.length ? messages[messages.length - 1].id : null }); + } catch (e) { + const message = 'An error occured during message find'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; diff --git a/src/controllers/misc.ts b/src/controllers/misc.ts new file mode 100644 index 00000000..6f64b1ce --- /dev/null +++ b/src/controllers/misc.ts @@ -0,0 +1,17 @@ +import type { RequestHandler } from 'express'; +import { logger } from '../shared'; +import { getSession, jidExists } from '../wa'; + +export const checkJid: RequestHandler = async (req, res) => { + try { + const { sessionId, jid } = req.params; + const { type = 'number' } = req.query; + const session = getSession(sessionId)!; + const exists = await jidExists(session, jid, type as any); + res.status(200).json({ exists }); + } catch (e) { + const message = 'An error occured during jid check'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; diff --git a/src/index.ts b/src/index.ts index f796525a..fae6e753 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,7 @@ const app = express(); app.use(cors()); app.use(express.json()); app.use('/', routes); +app.all('*', (req, res) => res.status(404).json({ error: 'URL not found' })); const host = process.env.HOST || '0.0.0.0'; const port = Number(process.env.PORT || 3000); diff --git a/src/routes/chats.ts b/src/routes/chats.ts new file mode 100644 index 00000000..9bd25530 --- /dev/null +++ b/src/routes/chats.ts @@ -0,0 +1,26 @@ +import { Router } from 'express'; +import { list } from '../controllers/chat'; +import { find } from '../controllers/message'; +import sessionValidator from '../middlewares/session-validator'; +import requestValidator from '../middlewares/request-validator'; +import { query } from 'express-validator'; + +const router = Router(); +router.get( + '/', + sessionValidator, + query('cursor').isString(), + query('limit').isNumeric(), + requestValidator, + list +); +router.get( + '/:jid', + sessionValidator, + query('cursor').isString(), + query('limit').isNumeric(), + requestValidator, + find +); + +export default router; diff --git a/src/routes/groups.ts b/src/routes/groups.ts new file mode 100644 index 00000000..67474d2f --- /dev/null +++ b/src/routes/groups.ts @@ -0,0 +1,26 @@ +import { Router } from 'express'; +import { list } from '../controllers/group'; +import { find } from '../controllers/message'; +import sessionValidator from '../middlewares/session-validator'; +import requestValidator from '../middlewares/request-validator'; +import { query } from 'express-validator'; + +const router = Router(); +router.get( + '/', + sessionValidator, + query('cursor').isString(), + query('limit').isNumeric(), + requestValidator, + list +); +router.get( + '/:jid', + sessionValidator, + query('cursor').isString(), + query('limit').isNumeric(), + requestValidator, + find +); + +export default router; diff --git a/src/routes/index.ts b/src/routes/index.ts index 7a54857b..8becfc63 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -1,8 +1,15 @@ import { Router } from 'express'; import sessionRoutes from './sessions'; +import chatRoutes from './chats'; +import groupRoutes from './groups'; +import messageRoutes from './messages'; +import miscRoutes from './misc'; const router = Router(); router.use('/sessions', sessionRoutes); -router.all('*', (req, res) => res.status(404).json({ error: 'URL not found' })); +router.use('/:sessionId/chats', chatRoutes); +router.use('/:sessionId/groups', groupRoutes); +router.use('/:sessionId/messages', messageRoutes); +router.use('/:sessionId/misc', miscRoutes); export default router; diff --git a/src/routes/messages.ts b/src/routes/messages.ts new file mode 100644 index 00000000..c8e8606e --- /dev/null +++ b/src/routes/messages.ts @@ -0,0 +1,34 @@ +import { Router } from 'express'; +import { body, query } from 'express-validator'; +import * as controller from '../controllers/message'; +import requestValidator from '../middlewares/request-validator'; +import sessionValidator from '../middlewares/session-validator'; + +const router = Router(); +router.get( + '/', + sessionValidator, + query('cursor').isString(), + query('limit').isNumeric(), + requestValidator, + controller.list +); +router.post( + '/send', + sessionValidator, + body('jid').isString().notEmpty(), + body('type').isString().isIn(['group', 'number']), + body('message').isObject().notEmpty(), + body('options').isObject(), + requestValidator, + controller.send +); +router.post( + '/send-bulk', + sessionValidator, + body().isArray().notEmpty(), + requestValidator, + controller.sendBulk +); + +export default router; diff --git a/src/routes/misc.ts b/src/routes/misc.ts new file mode 100644 index 00000000..765c57f6 --- /dev/null +++ b/src/routes/misc.ts @@ -0,0 +1,16 @@ +import { Router } from 'express'; +import * as controller from '../controllers/misc'; +import sessionValidator from '../middlewares/session-validator'; +import requestValidator from '../middlewares/request-validator'; +import { query } from 'express-validator'; + +const router = Router(); +router.get( + '/check-jid/:jid', + sessionValidator, + query('type').isString().isIn(['group', 'number']), + requestValidator, + controller.checkJid +); + +export default router; diff --git a/src/routes/sessions.ts b/src/routes/sessions.ts index da0d3436..451f37d4 100644 --- a/src/routes/sessions.ts +++ b/src/routes/sessions.ts @@ -7,7 +7,7 @@ import sessionValidator from '../middlewares/session-validator'; const router = Router(); router.get('/:sessionId', sessionValidator, controller.find); router.get('/:sessionId/status', sessionValidator, controller.status); -router.post('/add', body('sessionId').notEmpty(), requestValidator, controller.add); +router.post('/add', body('sessionId').isString().notEmpty(), requestValidator, controller.add); router.get('/:sessionId/add-sse', controller.addSSE); router.delete('/:sessionId', sessionValidator, controller.del); diff --git a/src/wa.ts b/src/wa.ts index ea71164e..ee199c73 100644 --- a/src/wa.ts +++ b/src/wa.ts @@ -1,4 +1,4 @@ -import type { ConnectionState, proto, SocketConfig, WASocket } from '@adiwajshing/baileys'; +import type { ConnectionState, SocketConfig, WASocket } from '@adiwajshing/baileys'; import makeWASocket, { DisconnectReason, Browsers } from '@adiwajshing/baileys'; import type { Response } from 'express'; import { useSession, Store, initStore } from 'baileys-store'; @@ -6,7 +6,12 @@ import type { Boom } from '@hapi/boom'; import { toDataURL } from 'qrcode'; import { prisma, logger } from './shared'; -const sessions = new Map Promise; store: Store }>(); +type Session = WASocket & { + destroy: () => Promise; + store: Store; +}; + +const sessions = new Map(); const retries = new Map(); const SSEQRGenerations = new Map(); @@ -19,7 +24,7 @@ export async function init() { initStore({ prisma, logger }); const sessions = await prisma.session.findMany({ select: { sessionId: true, data: true }, - where: { id: { contains: SESSION_CONFIG_ID } }, + where: { id: { startsWith: SESSION_CONFIG_ID } }, }); for (const { sessionId, data } of sessions) { @@ -42,14 +47,14 @@ function shouldReconnect(sessionId: string) { return false; } -type WASessionOptions = { +type createSessionOptions = { sessionId: string; res?: Response; SSE?: boolean; socketConfig?: SocketConfig; }; -export async function createSession(options: WASessionOptions) { +export async function createSession(options: createSessionOptions) { const { sessionId, res, SSE, socketConfig } = options; let connectionState: Partial = { connection: 'close' }; @@ -101,16 +106,16 @@ export async function createSession(options: WASessionOptions) { const { state, saveCreds } = await useSession(sessionId); const socket = makeWASocket({ - auth: state, - logger, printQRInTerminal: true, browser: Browsers.ubuntu('Chrome'), ...socketConfig, + auth: state, + logger, getMessage: async (key) => { const data = await prisma.message.findFirst({ where: { remoteJid: key.remoteJid!, id: key.id!, sessionId }, }); - return (data || undefined) as proto.IMessage | undefined; + return (data || undefined) as any; }, }); @@ -150,3 +155,21 @@ export async function deleteSession(sessionId: string) { export function sessionExists(sessionId: string) { return sessions.has(sessionId); } + +export async function jidExists( + session: Session, + jid: string, + type: 'group' | 'number' = 'number' +) { + try { + if (type === 'number') { + const [result] = await session.onWhatsApp(jid); + return result.exists; + } + + const groupMeta = await session.groupMetadata(jid); + return !!groupMeta.id; + } catch (e) { + return Promise.reject(e); + } +} From 123b6ac0268b73c282bcc064d7463e29e04bd6c8 Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sun, 11 Dec 2022 14:49:11 +0700 Subject: [PATCH 06/12] fix invalid cursor --- src/controllers/message.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/message.ts b/src/controllers/message.ts index 417f080f..4f5d6ccb 100644 --- a/src/controllers/message.ts +++ b/src/controllers/message.ts @@ -66,7 +66,10 @@ export const list: RequestHandler = async (req, res) => { res .status(200) - .json({ data: messages, cursor: messages.length ? messages[messages.length - 1].id : null }); + .json({ + data: messages, + cursor: messages.length ? messages[messages.length - 1].pkId : null, + }); } catch (e) { const message = 'An error occured during message list'; logger.error(e, message); From d3eb9e6af010a0be5ba882b9bad00e4b0c69e870 Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sun, 11 Dec 2022 14:53:17 +0700 Subject: [PATCH 07/12] sync baileys edge build --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index b0560943..4606aab9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,7 +4,7 @@ "@adiwajshing/baileys@https://github.com/ookamiiixd/Baileys.git#build": version "5.0.0" - resolved "https://github.com/ookamiiixd/Baileys.git#ebd001545203f1d3fd008f7406c44888acc19d64" + resolved "https://github.com/ookamiiixd/Baileys.git#edd03183e389a2ec9fc28323ebdf95fd0daf9f85" dependencies: "@hapi/boom" "^9.1.3" axios "^0.24.0" From 490263dd8aa40cada1b70080b10211f7afc330ed Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sun, 11 Dec 2022 15:09:09 +0700 Subject: [PATCH 08/12] sync baileys-store build --- external/baileys-store-1.tgz | Bin 9739 -> 0 bytes external/baileys-store-2.tgz | Bin 0 -> 9811 bytes package.json | 2 +- yarn.lock | 4 ++-- 4 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 external/baileys-store-1.tgz create mode 100644 external/baileys-store-2.tgz diff --git a/external/baileys-store-1.tgz b/external/baileys-store-1.tgz deleted file mode 100644 index e9fa52749d1b4fac756222e0cf024cc7c34d26b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9739 zcmV+mCiK}KiwFP!000003hg~>ciT3y_p{E~|A07q)>5uaOY$pqnxu~HG}`)gEvLOb zzS)EpA)7Tta!JaLHtYX>XYe3F5+o%@mXof~hizg23i8Kl$GXPY+ww`R~zLVth@n1El zdt=bg=FoR$&J0!KzqQ$B3~29v4w~d}%znWC?1-|T(4pXl29V{sm)_nRV!9UD_4?O=XZEl5-jw$l z$i;H<2zWmJ73wIF0IzW1uvXjKIoo-&)7$^}{`BDG(r_I9(}6O9=SAD?&f5CMPmTv; za|K=5UR!Hzu3i9@={WotMnLtY%=pXsf6(3CKkDs22#;0F|4wUtlh6OHwau-KHJJbH z&5hP#{?8*FcF)Lx-KTCyYqed^9|!j3RYdCj2I;gq9dhc8uS~aAJE6hQhFJ()3&P-v z2J~V~E(6nzsMREc0NCCekp7h!T*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F=j;k58(hsRw9AS7g$g Z*^5Iwi?m3Kv`7z~{vTDCaMS<<0RRRoKIs4e diff --git a/external/baileys-store-2.tgz b/external/baileys-store-2.tgz new file mode 100644 index 0000000000000000000000000000000000000000..3c629e7b72047139d165161a765dae512de00868 GIT binary patch literal 9811 zcmV-ZCal>XiwFP!000003hg~>ciT3y_p{E~|A07q)>5uaJ^V=OG)W!XX|(n0T26a= ze6tBHLN;rPX z+S(%c6H@jk|D&_9zOlL9e!jJ_LE4@6=H@#2ugyorN~CcZnE{~k(0a0+`-3E(kAKUc z?u|jem?PhrJ2O;`|MRU58~^UsR=d02hVfr-Z+0Pn-iYYZfB5)6CHwA;9eD1Dx)HfC z1KYfCXhMFSk;o$_fgO%a zqxO{aDSWu1#PSAXtR4z^E*W|O8F^5VMI$J-O|GKI54T$_9|{`Iq-C++M&?>LxS}KT zsW}+XFtpvvHJYHh7Nfd047|}Av?Jha&@#t?gk#_Lf+%EIxX}C!B?HfO>40GpMgi1{ z2tj`sUMF4{T?VxOKL<^6IAK5Fe|ALKPv}r^Lj%b2+)HooEiqk-?0SRiz%vI|dvDA8 z4CG=tc?3Kk{|a@KNPyQka9FGD?VRnr-RbXt`fz&iYGpJD|LH)P!1JQ*P8X!;4~_?8 za|K=5USDr-wJw0lbP|3FBcS?9X8h&+Kj`i5ANBVig~ux9f49A{#pnO?^{wY1_}iV% z)@FM-{}+)CduQap9#A)=wc4)dPXhb$DkAkkgLK>7E;;okSEgI5ozP%p!z=`@1z~VS z19~wbmx1X<)M}Dp0Br9K$>7QiE@85O7%<%l@o5l30q+7Px{I7{0{8oq8bC6c5_-ev zmdO;DNM;y%1KWi9vXjR~fmFx2v(gtORvN4ki<(Z2NhnHW7P+;fD{mZ;fZ~*4lcxz{ zY~YM7#6e~|_Q)13U~$&(um+WmL+AnG*#tRd*+cwES-1T0g=2?TO=8(t^~D$kLx>+4 z0h`#57EJY!I!+C0umNw@*91ETgQ)vR&`6Ld#4op3-YDG@JFE@IfeTGiR>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h>oVT2UlTsuHpm6yv)6fLWS;Fi=okFG(sX5<)tI7qNTH{ zVMxRC_QzycGvyz4^POygTcFpBgxB(3<*fQx76|>wM%>i5<#A?`52wtu46{e?15xt+ z>#)T5{@1T2FTc!k{p#Z_-LYe0s+HTK7vszP(k%%)rzIRcNa_>zj;))B2mPY>EFpM+;JP10A!V?V&G1F#m zJ1HO?#en*1ta$LgsCvp#`F7`tGSfz-ZslFDWy^h$X+4h_$A~!ZQ%f^T*7U@@=aHXN zDo-Csi5ou#HjT^`g_+P*3NBRa#_j&8gs!0MTn#6aZLRe7FveTiYl(*(HHtEsD_@CI zWOnkAOYB$x28?~u&9M5JD3q8Ki(!EgzR_5C0#7t81)ewtRcPgX8}X*FXF{x{XsZxy zDfa&Z-Xs%mpiFi9vI0HDS(q5Q=!W4O=vu6Lr0YM;D+!urA`PbS=&dgOdTD t<|xm!!=u2?K0c|2W*(q99TZA$W-o(ymT8%mX_+27{Xa|#KXCvG0RT|`ixU6< literal 0 HcmV?d00001 diff --git a/package.json b/package.json index 87f0138c..f28e1e12 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ }, "dependencies": { "@adiwajshing/baileys": "https://github.com/ookamiiixd/Baileys.git#build", + "baileys-store": "file:external/baileys-store-2.tgz", "@hapi/boom": "^10.0.0", "@prisma/client": "^4.7.1", - "baileys-store": "file:external/baileys-store-1.tgz", "cors": "^2.8.5", "dotenv": "^16.0.3", "express": "^4.18.2", diff --git a/yarn.lock b/yarn.lock index 4606aab9..d107f4ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -485,9 +485,9 @@ axios@^0.24.0: dependencies: follow-redirects "^1.14.4" -"baileys-store@file:external/baileys-store-1.tgz": +"baileys-store@file:external/baileys-store-2.tgz": version "1.0.0-beta.0" - resolved "file:external/baileys-store-1.tgz#5bfde28f4cda8f1de564ae61caf65edba9c1e7d2" + resolved "file:external/baileys-store-2.tgz#e95444754b317306639353b847aff5e1386fe81a" dependencies: tiny-invariant "^1.3.1" From b3b038251a4b75f2fe304035d30ecdf3ef2e8349 Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sun, 11 Dec 2022 15:11:07 +0700 Subject: [PATCH 09/12] format --- src/controllers/message.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/controllers/message.ts b/src/controllers/message.ts index 4f5d6ccb..f4d46566 100644 --- a/src/controllers/message.ts +++ b/src/controllers/message.ts @@ -64,12 +64,10 @@ export const list: RequestHandler = async (req, res) => { where: { sessionId }, }); - res - .status(200) - .json({ - data: messages, - cursor: messages.length ? messages[messages.length - 1].pkId : null, - }); + res.status(200).json({ + data: messages, + cursor: messages.length ? messages[messages.length - 1].pkId : null, + }); } catch (e) { const message = 'An error occured during message list'; logger.error(e, message); From 374f14d276512c469f89b460797ca424f7d8daa8 Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sun, 11 Dec 2022 19:39:22 +0700 Subject: [PATCH 10/12] fix routes --- .gitignore | 1 + external/baileys-store-2.tgz | Bin 9811 -> 0 bytes external/baileys-store-4.tgz | Bin 0 -> 9991 bytes package.json | 2 +- src/controllers/chat.ts | 14 ++++-- src/controllers/group.ts | 14 ++++-- src/controllers/message.ts | 34 +++++++------ src/controllers/session.ts | 20 +------- src/routes/chats.ts | 13 ++--- src/routes/groups.ts | 13 ++--- src/routes/index.ts | 9 ++-- src/routes/messages.ts | 21 +++----- src/routes/misc.ts | 6 +-- src/wa.ts | 90 +++++++++++++++++++++++++---------- yarn.lock | 4 +- 15 files changed, 132 insertions(+), 109 deletions(-) delete mode 100644 external/baileys-store-2.tgz create mode 100644 external/baileys-store-4.tgz diff --git a/.gitignore b/.gitignore index f94630c5..9f43f786 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ dist/ +debug/ .env \ No newline at end of file diff --git a/external/baileys-store-2.tgz b/external/baileys-store-2.tgz deleted file mode 100644 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>i5<#A?`52wtu46{e?15xt+ z>#)T5{@1T2FTc!k{p#Z_-LYe0s+HTK7vszP(k%%)rzIRcNa_>zj;))B2mPY>EFpM+;JP10A!V?V&G1F#m zJ1HO?#en*1ta$LgsCvp#`F7`tGSfz-ZslFDWy^h$X+4h_$A~!ZQ%f^T*7U@@=aHXN zDo-Csi5ou#HjT^`g_+P*3NBRa#_j&8gs!0MTn#6aZLRe7FveTiYl(*(HHtEsD_@CI zWOnkAOYB$x28?~u&9M5JD3q8Ki(!EgzR_5C0#7t81)ewtRcPgX8}X*FXF{x{XsZxy zDfa&Z-Xs%mpiFi9vI0HDS(q5Q=!W4O=vu6Lr0YM;D+!urA`PbS=&dgOdTD t<|xm!!=u2?K0c|2W*(q99TZA$W-o(ymT8%mX_+27{Xa|#KXCvG0RT|`ixU6< diff --git a/external/baileys-store-4.tgz b/external/baileys-store-4.tgz new file mode 100644 index 0000000000000000000000000000000000000000..66863d581bbc1e8c36b64eb937c4cf67bdabc9eb GIT binary patch literal 9991 zcmV+iC-~SOiwFP!000003hjOSTidwO@b`0`=ll;UeV>!0Uoc6yb?LTU3Utd^ZZDy` z-#&bOTN5kbC9!>cf#&q^zrQoO*s?9#353wy6YT}CM$%|B8qJJGl4tg>%}e@!9y7Ju z?Tw8Mf z`qdnH!0D=QupG=}39i~Tk-mxKNl9huL~ zexC+`?OZO?1l8pj)#ZWjj+UVv0bhfbISwR|gD^EAKOq zi{<1Ia6SAh&`}}*Ugp3-t+u;;w*79qxA*zu>A~xz(Kz_$5X$(j8*X*FAVq%~x-d3Z z(3P##)%M291yGregU>+-RA0)BznuRE`#XC_y}d`_v5NWMZG*69^M7-7V{?5K=6`2n zy}g+K^GJvLXXL={QzxLc+K%guef#n%B#nNPblcr7Id#WZrcNrv+lH zKa4EIL1qu_ku6%l;;i364JwTS=mFx{0y$;b1N=!@x4h_LXa`prMTCMOz>kc8 zE$qh%O!a^chc&3d2E18c6YLlaqV6FbM}cIl0*Yc*&@Wtl$de)CCm;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;OiD6mNoDEX*|K9&GEEhp6yrSY z87pNf{V~bJsc2t@dla=;URtv&9OEbUho{81lwjIRn_^1F3&tKso+zgW+0{SnM!D>n ztUq$C!$S9l`O=D-k&ms4SAO{fLhs_Ur0L4w3BFrO!Pv;%+@U#vmQ59v$C!!^P6n-g z&~K~o31T^f*^Bn8I7X(_wNRZ23RO*{T>Mk2@KkXor4e~DO}hl>Zf>i@zd$pTH?@_LIlUt4Vx#6u!`p1at zLN8>R=rk)PRn;t8)TUn00(uoSGXjrI{QqA zWwIOlN);xi3^4rz$;o2IG}AQxuAi$#9oJ^$De@ccmQ~qH$-^muZ1$xa$crEW$&Z>`P zfzXd^#7%r#9%m-`aLQE6Fwg<}%uC*X9hMm1|N7PB<(Fx$Uwyo#J9bP=v~pYYBD%~k z-IA~~TEfwTq&|@Y28UFO)z8}K{A8>UDUZEK{#vb#jaH+2*gP^l0Jky{MGi~;^lLFFF45+WhiU;qDswW(kr#nxSnKmkQEAN6W zTkeZY>sib=M#Nd4TAEt2rYGh-kNlicdHO&~-1srDNo1}l%!IB|aIRuEZuc)GbOmK+ zYB-r}Yh`~IW4x8UmUzffqbQTP@|8G6W+xxH#Eu1^&)6s346C1sLWxPS7#0}e8;yl0 z@I=#6;E7{Ug;w6vh&P2j6JjkyTZL##vHzd&CYg8xWun`c73c}h!o<);Hw@=Mmt)l< zUH@rbNzgPSM?)!=pK5=mYjLI+oDBFRM|mb49tC##@kuo_^#IN2pip` { try { const { sessionId } = req.params; const { cursor = undefined, limit = 25 } = req.query; - const chats = await prisma.chat.findMany({ - cursor: cursor ? { sessionId_id: { id: cursor as string, sessionId } } : undefined, - take: Number(limit), - skip: cursor ? 1 : 0, - }); + const chats = ( + await prisma.chat.findMany({ + cursor: cursor ? { sessionId_id: { id: cursor as string, sessionId } } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { sessionId }, + }) + ).map((c) => serializePrisma(c)); res.status(200).json({ data: chats, cursor: chats.length ? chats[chats.length - 1].id : null }); } catch (e) { diff --git a/src/controllers/group.ts b/src/controllers/group.ts index f141255a..279545a2 100644 --- a/src/controllers/group.ts +++ b/src/controllers/group.ts @@ -1,3 +1,4 @@ +import { serializePrisma } from 'baileys-store'; import type { RequestHandler } from 'express'; import { logger, prisma } from '../shared'; @@ -5,11 +6,14 @@ export const list: RequestHandler = async (req, res) => { try { const { sessionId } = req.params; const { cursor = undefined, limit = 25 } = req.query; - const groups = await prisma.groupMetadata.findMany({ - cursor: cursor ? { sessionId_id: { id: cursor as string, sessionId } } : undefined, - take: Number(limit), - skip: cursor ? 1 : 0, - }); + const groups = ( + await prisma.groupMetadata.findMany({ + cursor: cursor ? { sessionId_id: { id: cursor as string, sessionId } } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { sessionId }, + }) + ).map((c) => serializePrisma(c)); res .status(200) diff --git a/src/controllers/message.ts b/src/controllers/message.ts index f4d46566..b0944537 100644 --- a/src/controllers/message.ts +++ b/src/controllers/message.ts @@ -2,6 +2,7 @@ import type { RequestHandler } from 'express'; import { delay as delayMs } from '@adiwajshing/baileys'; import { logger, prisma } from '../shared'; import { getSession, jidExists } from '../wa'; +import { serializePrisma } from 'baileys-store'; export const send: RequestHandler = async (req, res) => { try { @@ -57,12 +58,14 @@ export const list: RequestHandler = async (req, res) => { try { const { sessionId } = req.params; const { cursor = undefined, limit = 25 } = req.query; - const messages = await prisma.message.findMany({ - cursor: cursor ? { pkId: Number(cursor) } : undefined, - take: Number(limit), - skip: cursor ? 1 : 0, - where: { sessionId }, - }); + const messages = ( + await prisma.message.findMany({ + cursor: cursor ? { pkId: Number(cursor) } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { sessionId }, + }) + ).map((m) => serializePrisma(m)); res.status(200).json({ data: messages, @@ -79,14 +82,17 @@ export const find: RequestHandler = async (req, res) => { try { const { sessionId, jid } = req.params; const { cursor = undefined, limit = 25 } = req.query; - const messages = await prisma.message.findMany({ - cursor: cursor - ? { sessionId_remoteJid_id: { id: cursor as string, remoteJid: jid, sessionId } } - : undefined, - take: Number(limit), - skip: cursor ? 1 : 0, - orderBy: { messageTimestamp: 'desc' }, - }); + const messages = ( + await prisma.message.findMany({ + cursor: cursor + ? { sessionId_remoteJid_id: { id: cursor as string, remoteJid: jid, sessionId } } + : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { sessionId }, + orderBy: { messageTimestamp: 'desc' }, + }) + ).map((m) => serializePrisma(m)); res .status(200) diff --git a/src/controllers/session.ts b/src/controllers/session.ts index b06f8a67..26999375 100644 --- a/src/controllers/session.ts +++ b/src/controllers/session.ts @@ -1,6 +1,5 @@ import type { RequestHandler } from 'express'; import type { WebSocket } from 'ws'; -import { logger } from '../shared'; import { createSession, getSession, sessionExists } from '../wa'; export const find: RequestHandler = (req, res) => @@ -17,14 +16,7 @@ export const status: RequestHandler = (req, res) => { export const add: RequestHandler = async (req, res) => { const { sessionId, ...options } = req.body; if (sessionExists(sessionId)) return res.status(400).json({ error: 'Session already exists' }); - - try { - await createSession({ sessionId, res, socketConfig: options }); - } catch (e) { - const message = 'An error occured during session create'; - logger.error(e, message); - res.status(500).json({ error: message }); - } + createSession({ sessionId, res, socketConfig: options }); }; export const addSSE: RequestHandler = async (req, res) => { @@ -40,15 +32,7 @@ export const addSSE: RequestHandler = async (req, res) => { res.end(); return; } - - try { - await createSession({ sessionId, res, SSE: true }); - } catch (e) { - const message = 'An error occured during session create'; - logger.error(e, message); - res.write(`data: ${JSON.stringify({ error: message })}\n\n`); - res.end(); - } + createSession({ sessionId, res, SSE: true }); }; export const del: RequestHandler = async (req, res) => { diff --git a/src/routes/chats.ts b/src/routes/chats.ts index 9bd25530..88a272be 100644 --- a/src/routes/chats.ts +++ b/src/routes/chats.ts @@ -1,24 +1,21 @@ import { Router } from 'express'; import { list } from '../controllers/chat'; import { find } from '../controllers/message'; -import sessionValidator from '../middlewares/session-validator'; import requestValidator from '../middlewares/request-validator'; import { query } from 'express-validator'; -const router = Router(); +const router = Router({ mergeParams: true }); router.get( '/', - sessionValidator, - query('cursor').isString(), - query('limit').isNumeric(), + query('cursor').isString().optional(), + query('limit').isNumeric().optional(), requestValidator, list ); router.get( '/:jid', - sessionValidator, - query('cursor').isString(), - query('limit').isNumeric(), + query('cursor').isString().optional(), + query('limit').isNumeric().optional(), requestValidator, find ); diff --git a/src/routes/groups.ts b/src/routes/groups.ts index 67474d2f..6e3e5775 100644 --- a/src/routes/groups.ts +++ b/src/routes/groups.ts @@ -1,24 +1,21 @@ import { Router } from 'express'; import { list } from '../controllers/group'; import { find } from '../controllers/message'; -import sessionValidator from '../middlewares/session-validator'; import requestValidator from '../middlewares/request-validator'; import { query } from 'express-validator'; -const router = Router(); +const router = Router({ mergeParams: true }); router.get( '/', - sessionValidator, - query('cursor').isString(), - query('limit').isNumeric(), + query('cursor').isString().optional(), + query('limit').isNumeric().optional(), requestValidator, list ); router.get( '/:jid', - sessionValidator, - query('cursor').isString(), - query('limit').isNumeric(), + query('cursor').isString().optional(), + query('limit').isNumeric().optional(), requestValidator, find ); diff --git a/src/routes/index.ts b/src/routes/index.ts index 8becfc63..50d34294 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -1,4 +1,5 @@ import { Router } from 'express'; +import sessionValidator from '../middlewares/session-validator'; import sessionRoutes from './sessions'; import chatRoutes from './chats'; import groupRoutes from './groups'; @@ -7,9 +8,9 @@ import miscRoutes from './misc'; const router = Router(); router.use('/sessions', sessionRoutes); -router.use('/:sessionId/chats', chatRoutes); -router.use('/:sessionId/groups', groupRoutes); -router.use('/:sessionId/messages', messageRoutes); -router.use('/:sessionId/misc', miscRoutes); +router.use('/:sessionId/chats', sessionValidator, chatRoutes); +router.use('/:sessionId/groups', sessionValidator, groupRoutes); +router.use('/:sessionId/messages', sessionValidator, messageRoutes); +router.use('/:sessionId/misc', sessionValidator, miscRoutes); export default router; diff --git a/src/routes/messages.ts b/src/routes/messages.ts index c8e8606e..2083a559 100644 --- a/src/routes/messages.ts +++ b/src/routes/messages.ts @@ -2,33 +2,24 @@ import { Router } from 'express'; import { body, query } from 'express-validator'; import * as controller from '../controllers/message'; import requestValidator from '../middlewares/request-validator'; -import sessionValidator from '../middlewares/session-validator'; -const router = Router(); +const router = Router({ mergeParams: true }); router.get( '/', - sessionValidator, - query('cursor').isString(), - query('limit').isNumeric(), + query('cursor').isString().optional(), + query('limit').isNumeric().optional(), requestValidator, controller.list ); router.post( '/send', - sessionValidator, body('jid').isString().notEmpty(), - body('type').isString().isIn(['group', 'number']), + body('type').isString().isIn(['group', 'number']).optional(), body('message').isObject().notEmpty(), - body('options').isObject(), + body('options').isObject().optional(), requestValidator, controller.send ); -router.post( - '/send-bulk', - sessionValidator, - body().isArray().notEmpty(), - requestValidator, - controller.sendBulk -); +router.post('/send-bulk', body().isArray().notEmpty(), requestValidator, controller.sendBulk); export default router; diff --git a/src/routes/misc.ts b/src/routes/misc.ts index 765c57f6..38fb0992 100644 --- a/src/routes/misc.ts +++ b/src/routes/misc.ts @@ -1,14 +1,12 @@ import { Router } from 'express'; import * as controller from '../controllers/misc'; -import sessionValidator from '../middlewares/session-validator'; import requestValidator from '../middlewares/request-validator'; import { query } from 'express-validator'; -const router = Router(); +const router = Router({ mergeParams: true }); router.get( '/check-jid/:jid', - sessionValidator, - query('type').isString().isIn(['group', 'number']), + query('type').isString().isIn(['group', 'number']).optional(), requestValidator, controller.checkJid ); diff --git a/src/wa.ts b/src/wa.ts index ee199c73..d447e043 100644 --- a/src/wa.ts +++ b/src/wa.ts @@ -1,3 +1,5 @@ +// import { join } from 'path'; +// import { writeFile } from 'fs/promises'; import type { ConnectionState, SocketConfig, WASocket } from '@adiwajshing/baileys'; import makeWASocket, { DisconnectReason, Browsers } from '@adiwajshing/baileys'; import type { Response } from 'express'; @@ -16,8 +18,8 @@ const retries = new Map(); const SSEQRGenerations = new Map(); const RECONNECT_INTERVAL = Number(process.env.RECONNECT_INTERVAL || 0); -const MAX_RECONNECT_RETRIES = Number(process.env.MAX_RECONNECT_RETRIES || 0); -const SSE_MAX_QR_GENERATION = Number(process.env.SSE_MAX_QR_GENERATION || 1); +const MAX_RECONNECT_RETRIES = Number(process.env.MAX_RECONNECT_RETRIES || 5); +const SSE_MAX_QR_GENERATION = Number(process.env.SSE_MAX_QR_GENERATION || 5); const SESSION_CONFIG_ID = 'session-config'; export async function init() { @@ -55,12 +57,20 @@ type createSessionOptions = { }; export async function createSession(options: createSessionOptions) { - const { sessionId, res, SSE, socketConfig } = options; + const { sessionId, res, SSE = false, socketConfig } = options; + const configID = `${SESSION_CONFIG_ID}-${sessionId}`; let connectionState: Partial = { connection: 'close' }; const destroy = async () => { try { - await socket.logout(); + await Promise.all([ + socket.logout(), + prisma.chat.deleteMany({ where: { sessionId } }), + prisma.contact.deleteMany({ where: { sessionId } }), + prisma.message.deleteMany({ where: { sessionId } }), + prisma.groupMetadata.deleteMany({ where: { sessionId } }), + prisma.session.deleteMany({ where: { sessionId } }), + ]); } catch (e) { logger.error(e, 'An error occured during session destroy'); } finally { @@ -71,11 +81,14 @@ export async function createSession(options: createSessionOptions) { const handleConnectionClose = () => { const code = (connectionState.lastDisconnect?.error as Boom)?.output?.statusCode; const restartRequired = code === DisconnectReason.restartRequired; - const shouldLogout = !shouldReconnect(sessionId); - - if (code === DisconnectReason.loggedOut || shouldLogout) { - res && res.end(); - shouldLogout && destroy(); + const doNotReconnect = !shouldReconnect(sessionId); + + if (code === DisconnectReason.loggedOut || doNotReconnect) { + if (res) { + !SSE && res.status(500).json({ error: 'Unable to create session' }); + res.end(); + } + doNotReconnect && destroy(); sessions.delete(sessionId); return; } @@ -84,26 +97,44 @@ export async function createSession(options: createSessionOptions) { setTimeout(() => createSession(options), restartRequired ? 0 : RECONNECT_INTERVAL); }; - const handleConnectionUpdate = async () => { - if (!res) return; - const qr = connectionState.qr ? await toDataURL(connectionState.qr) : undefined; - const data = { ...connectionState, qr }; - const currentGenerations = SSEQRGenerations.get(sessionId) ?? 0; - - if (SSE && qr && currentGenerations >= SSE_MAX_QR_GENERATION) { - res.end(); + const handleNormalConnectionUpdate = async () => { + if (connectionState.qr?.length) { + if (res && !res.headersSent) { + try { + const qr = await toDataURL(connectionState.qr); + return res.status(200).json({ qr }); + } catch (e) { + logger.error(e, 'An error occured during QR generation'); + res.status(500).json({ error: 'Unable to generate QR' }); + } + } destroy(); - return; } - if (SSE) { - if (qr) SSEQRGenerations.set(sessionId, currentGenerations + 1); - res.write(`data: ${JSON.stringify(data)}\n\n`); + }; + + const handleSSEConnectionUpdate = async () => { + let qr: string | undefined = undefined; + if (connectionState.qr) { + try { + qr = await toDataURL(connectionState.qr); + } catch (e) { + logger.error(e, 'An error occured during QR generation'); + } + } + + const currentGenerations = SSEQRGenerations.get(sessionId) ?? 0; + if (!res || (qr && currentGenerations >= SSE_MAX_QR_GENERATION)) { + res && res.end(); + destroy(); return; } - if (res.headersSent) return destroy(); - if (connectionState.qr) res.status(200).json(data); + + const data = { ...connectionState, qr }; + if (qr) SSEQRGenerations.set(sessionId, currentGenerations + 1); + res.write(`data: ${JSON.stringify(data)}\n\n`); }; + const handleConnectionUpdate = SSE ? handleSSEConnectionUpdate : handleNormalConnectionUpdate; const { state, saveCreds } = await useSession(sessionId); const socket = makeWASocket({ printQRInTerminal: true, @@ -122,7 +153,7 @@ export async function createSession(options: createSessionOptions) { const store = new Store(sessionId, socket.ev); sessions.set(sessionId, { ...socket, destroy, store }); - res?.on('close', () => res.end()); + SSE && res?.on('close', () => res.end()); socket.ev.on('creds.update', saveCreds); socket.ev.on('connection.update', (update) => { connectionState = update; @@ -136,7 +167,11 @@ export async function createSession(options: createSessionOptions) { handleConnectionUpdate(); }); - const configID = `${SESSION_CONFIG_ID}-${sessionId}`; + // socket.ev.on('messaging-history.set', (data) => dump('messaging-history.set', data)); + // socket.ev.on('chats.upsert', (data) => dump('chats.upsert', data)); + // socket.ev.on('contacts.update', (data) => dump('contacts.update', data)); + // socket.ev.on('groups.upsert', (data) => dump('groups.upsert', data)); + await prisma.session.upsert({ create: { id: configID, sessionId, data: JSON.stringify(socketConfig || {}) }, update: {}, @@ -173,3 +208,8 @@ export async function jidExists( return Promise.reject(e); } } + +// export async function dump(fileName: string, data: any) { +// const path = join(__dirname, '..', 'debug', `${fileName}.json`); +// await writeFile(path, JSON.stringify(data, null, 2)); +// } diff --git a/yarn.lock b/yarn.lock index d107f4ae..a3a2c9af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -485,9 +485,9 @@ axios@^0.24.0: dependencies: follow-redirects "^1.14.4" -"baileys-store@file:external/baileys-store-2.tgz": +"baileys-store@file:external/baileys-store-4.tgz": version "1.0.0-beta.0" - resolved "file:external/baileys-store-2.tgz#e95444754b317306639353b847aff5e1386fe81a" + resolved "file:external/baileys-store-4.tgz#609c4605e90d3d91226ad95c8d62271687ebba3c" dependencies: tiny-invariant "^1.3.1" From 5fbdf131e64ee01c0bae9159d135e1d8c4ccf039 Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Tue, 3 Jan 2023 11:46:11 +0700 Subject: [PATCH 11/12] delete migrations --- .../20221208155846_init/migration.sql | 160 ------------------ prisma/migrations/migration_lock.toml | 3 - 2 files changed, 163 deletions(-) delete mode 100644 prisma/migrations/20221208155846_init/migration.sql delete mode 100644 prisma/migrations/migration_lock.toml diff --git a/prisma/migrations/20221208155846_init/migration.sql b/prisma/migrations/20221208155846_init/migration.sql deleted file mode 100644 index f90d5c4c..00000000 --- a/prisma/migrations/20221208155846_init/migration.sql +++ /dev/null @@ -1,160 +0,0 @@ --- CreateTable -CREATE TABLE `Chat` ( - `pkId` INTEGER NOT NULL AUTO_INCREMENT, - `sessionId` VARCHAR(128) NOT NULL, - `archived` BOOLEAN NULL, - `contactPrimaryIdentityKey` LONGBLOB NULL, - `conversationTimestamp` BIGINT NULL, - `createdAt` BIGINT NULL, - `createdBy` VARCHAR(128) NULL, - `description` VARCHAR(255) NULL, - `disappearingMode` JSON NULL, - `displayName` VARCHAR(128) NULL, - `endOfHistoryTransfer` BOOLEAN NULL, - `endOfHistoryTransferType` INTEGER NULL, - `ephemeralExpiration` INTEGER NULL, - `ephemeralSettingTimestamp` BIGINT NULL, - `id` VARCHAR(128) NOT NULL, - `isDefaultSubgroup` BOOLEAN NULL, - `isParentGroup` BOOLEAN NULL, - `lastMsgTimestamp` BIGINT NULL, - `lidJid` VARCHAR(128) NULL, - `markedAsUnread` BOOLEAN NULL, - `mediaVisibility` INTEGER NULL, - `messages` JSON NULL, - `muteEndTime` BIGINT NULL, - `name` VARCHAR(128) NULL, - `newJid` VARCHAR(128) NULL, - `notSpam` BOOLEAN NULL, - `oldJid` VARCHAR(128) NULL, - `pHash` VARCHAR(128) NULL, - `parentGroupId` VARCHAR(128) NULL, - `participant` JSON NULL, - `pinned` INTEGER NULL, - `pnJid` VARCHAR(128) NULL, - `pnhDuplicateLidThread` BOOLEAN NULL, - `readOnly` BOOLEAN NULL, - `shareOwnPn` BOOLEAN NULL, - `support` BOOLEAN NULL, - `suspended` BOOLEAN NULL, - `tcToken` LONGBLOB NULL, - `tcTokenSenderTimestamp` BIGINT NULL, - `tcTokenTimestamp` BIGINT NULL, - `terminated` BOOLEAN NULL, - `unreadCount` INTEGER NULL, - `unreadMentionCount` INTEGER NULL, - `wallpaper` JSON NULL, - `lastMessageRecvTimestamp` INTEGER NULL, - - INDEX `Chat_sessionId_idx`(`sessionId`), - UNIQUE INDEX `unique_id_per_session_id`(`sessionId`, `id`), - PRIMARY KEY (`pkId`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Contact` ( - `pkId` INTEGER NOT NULL AUTO_INCREMENT, - `sessionId` VARCHAR(128) NOT NULL, - `id` VARCHAR(128) NOT NULL, - `name` VARCHAR(128) NULL, - `notify` VARCHAR(128) NULL, - `verifiedName` VARCHAR(128) NULL, - `imgUrl` VARCHAR(255) NULL, - `status` VARCHAR(128) NULL, - - INDEX `Contact_sessionId_idx`(`sessionId`), - UNIQUE INDEX `unique_id_per_session_id`(`sessionId`, `id`), - PRIMARY KEY (`pkId`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `GroupMetadata` ( - `pkId` INTEGER NOT NULL AUTO_INCREMENT, - `sessionId` VARCHAR(128) NOT NULL, - `id` VARCHAR(128) NOT NULL, - `owner` VARCHAR(128) NULL, - `subject` VARCHAR(128) NOT NULL, - `subjectOwner` VARCHAR(128) NULL, - `subjectTime` INTEGER NULL, - `creation` INTEGER NULL, - `desc` VARCHAR(255) NULL, - `descOwner` VARCHAR(128) NULL, - `descId` VARCHAR(128) NULL, - `restrict` BOOLEAN NULL, - `announce` BOOLEAN NULL, - `size` INTEGER NULL, - `participants` JSON NOT NULL, - `ephemeralDuration` INTEGER NULL, - `inviteCode` VARCHAR(255) NULL, - - INDEX `GroupMetadata_sessionId_idx`(`sessionId`), - UNIQUE INDEX `unique_id_per_session_id`(`sessionId`, `id`), - PRIMARY KEY (`pkId`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Message` ( - `pkId` INTEGER NOT NULL AUTO_INCREMENT, - `sessionId` VARCHAR(128) NOT NULL, - `remoteJid` VARCHAR(128) NOT NULL, - `id` VARCHAR(128) NOT NULL, - `agentId` VARCHAR(128) NULL, - `bizPrivacyStatus` INTEGER NULL, - `broadcast` BOOLEAN NULL, - `clearMedia` BOOLEAN NULL, - `duration` INTEGER NULL, - `ephemeralDuration` INTEGER NULL, - `ephemeralOffToOn` BOOLEAN NULL, - `ephemeralOutOfSync` BOOLEAN NULL, - `ephemeralStartTimestamp` BIGINT NULL, - `finalLiveLocation` JSON NULL, - `futureproofData` LONGBLOB NULL, - `ignore` BOOLEAN NULL, - `keepInChat` JSON NULL, - `key` JSON NOT NULL, - `labels` JSON NULL, - `mediaCiphertextSha256` LONGBLOB NULL, - `mediaData` JSON NULL, - `message` JSON NULL, - `messageC2STimestamp` BIGINT NULL, - `messageSecret` LONGBLOB NULL, - `messageStubParameters` JSON NULL, - `messageStubType` INTEGER NULL, - `messageTimestamp` BIGINT NULL, - `multicast` BOOLEAN NULL, - `originalSelfAuthorUserJidString` VARCHAR(128) NULL, - `participant` VARCHAR(128) NULL, - `paymentInfo` JSON NULL, - `photoChange` JSON NULL, - `pollAdditionalMetadata` JSON NULL, - `pollUpdates` JSON NULL, - `pushName` VARCHAR(128) NULL, - `quotedPaymentInfo` JSON NULL, - `quotedStickerData` JSON NULL, - `reactions` JSON NULL, - `revokeMessageTimestamp` BIGINT NULL, - `starred` BOOLEAN NULL, - `status` INTEGER NULL, - `statusAlreadyViewed` BOOLEAN NULL, - `statusPsa` JSON NULL, - `urlNumber` BOOLEAN NULL, - `urlText` BOOLEAN NULL, - `userReceipt` JSON NULL, - `verifiedBizName` VARCHAR(128) NULL, - - INDEX `Message_sessionId_idx`(`sessionId`), - UNIQUE INDEX `unique_message_key_per_session_id`(`sessionId`, `remoteJid`, `id`), - PRIMARY KEY (`pkId`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Session` ( - `pkId` INTEGER NOT NULL AUTO_INCREMENT, - `sessionId` VARCHAR(128) NOT NULL, - `id` VARCHAR(255) NOT NULL, - `data` TEXT NOT NULL, - - INDEX `Session_sessionId_idx`(`sessionId`), - UNIQUE INDEX `unique_id_per_session_id`(`sessionId`, `id`), - PRIMARY KEY (`pkId`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml deleted file mode 100644 index e5a788a7..00000000 --- a/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "mysql" \ No newline at end of file From 6ede4e685fdc6737c0cebe7a513e476f3d7c16df Mon Sep 17 00:00:00 2001 From: Royhan <60024250+ookamiiixd@users.noreply.github.com> Date: Sat, 7 Jan 2023 01:04:24 +0700 Subject: [PATCH 12/12] complete routes --- .env.example | 3 +- .eslintrc.js | 1 - .github/FUNDING.yml | 1 + .gitignore | 4 +- .prettierignore | 1 + LICENSE | 21 + README.md | 62 + external/baileys-store-4.tgz | Bin 9991 -> 0 bytes package.json | 20 +- postman_collection.json | 2960 ++++++++++++++++++++++++++++++++++ prisma/schema.prisma | 1 - src/controllers/chat.ts | 38 +- src/controllers/contact.ts | 74 + src/controllers/group.ts | 42 +- src/controllers/message.ts | 96 +- src/controllers/misc.ts | 31 +- src/controllers/session.ts | 7 +- src/index.ts | 4 +- src/routes/chats.ts | 13 +- src/routes/contacts.ts | 27 + src/routes/groups.ts | 19 +- src/routes/index.ts | 13 +- src/routes/messages.ts | 12 +- src/routes/misc.ts | 14 - src/shared.ts | 2 +- src/utils.ts | 3 + src/wa.ts | 63 +- yarn.lock | 23 +- 28 files changed, 3372 insertions(+), 183 deletions(-) create mode 100644 .github/FUNDING.yml create mode 100644 LICENSE create mode 100644 README.md delete mode 100644 external/baileys-store-4.tgz create mode 100644 postman_collection.json create mode 100644 src/controllers/contact.ts create mode 100644 src/routes/contacts.ts delete mode 100644 src/routes/misc.ts create mode 100644 src/utils.ts diff --git a/.env.example b/.env.example index ac496ff8..8a9b1f05 100644 --- a/.env.example +++ b/.env.example @@ -3,4 +3,5 @@ PORT="3000" DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api" RECONNECT_INTERVAL="5000" MAX_RECONNECT_RETRIES="5" -SSE_MAX_QR_GENERATION="10" \ No newline at end of file +SSE_MAX_QR_GENERATION="10" +LOG_LEVEL="warn" \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 00663462..6c7e090d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,7 +9,6 @@ module.exports = { rules: { '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/no-unused-vars': 'error', - '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', }, }; diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..acca0fc4 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: ['https://paypal.me/ookamiiixd', 'https://trakteer.id/ookamiiixd'] diff --git a/.gitignore b/.gitignore index 9f43f786..64a35588 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ node_modules/ dist/ debug/ -.env \ No newline at end of file +prisma/migrations/ +.env +*.tgz \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index b9470778..ecc79b0a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ node_modules/ dist/ +debug/ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..60b9129c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Royhan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..14037b39 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# Baileys API + +An implementation of [@adiwajshing/Baileys](https://github.com/adiwajshing/Baileys) as a simple REST API with multiple device support + +## Requirements + +- **NodeJS** version **14.5.0** or higher + +## Installation + +1. Download or clone this repo. If you want to skip the build step, you can download the prebuilt one from the release page +1. Enter to the project directory +1. Install the dependencies +1. Build the project using the `build` script. You can skip this part if you're using the prebuilt one from the release page + +## Setup + +1. Copy the `.env.example` file and rename it into `.env`, then update your [connection url](https://www.prisma.io/docs/reference/database-reference/connection-urls) in the `DATABASE_URL` field +1. Run your [migration](https://www.prisma.io/docs/reference/api-reference/command-reference#prisma-migrate). Don't forget to always re-run your migration whenever there's a change on the `prisma/` directory + +## `.env` Configurations + +```env +# Listening Host +HOST="localhost" + +# Listening Port +PORT="3000" + +# Database Connection URL +DATABASE_URL="mysql://root:12345@localhost:3306/baileys_api" + +# Reconnect Interval (in Milliseconds) +RECONNECT_INTERVAL="5000" + +# Maximum Reconnect Attempts +MAX_RECONNECT_RETRIES="5" + +# Maximum SSE QR Generation Attempts +SSE_MAX_QR_GENERATION="10" + +# Pino Logger Level +LOG_LEVEL="warn" +``` + +## Usage + +1. Make sure to build the project first using the `build` script +1. You can then start the app using the `start` script +1. Now the endpoint should be available according to your environment variables configuration. Default is at `http://localhost:3000` + +## API Docs + +The API documentation is available online [here](https://documenter.getpostman.com/view/18988925/2s8Z73zWbg). You can also import the **Postman Collection File** `(postman_collection.json)` into your Postman App alternatively + +## Notes + +- There's no authentication, you may want to implement your own. I don't want to force anyone to use a specific authentication method, choose whatever you love + +## Notice + +This project is intended for learning purpose only, don't use it for spamming or any activities that's prohibited by **WhatsApp** diff --git a/external/baileys-store-4.tgz b/external/baileys-store-4.tgz deleted file mode 100644 index 66863d581bbc1e8c36b64eb937c4cf67bdabc9eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9991 zcmV+iC-~SOiwFP!000003hjOSTidwO@b`0`=ll;UeV>!0Uoc6yb?LTU3Utd^ZZDy` z-#&bOTN5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|8G6W+xxH#Eu1^&)6s346C1sLWxPS7#0}e8;yl0 z@I=#6;E7{Ug;w6vh&P2j6JjkyTZL##vHzd&CYg8xWun`c73c}h!o<);Hw@=Mmt)l< zUH@rbNzgPSM?)!=pK5=mYjLI+oDBFRM|mb49tC##@kuo_^#IN2pip`", + "repository": "github:ookamiiixd/baileys-api", + "author": "Royhan (https://github.com/ookamiiixd)", "bugs": { "url": "https://github.com/ookamiiixd/baileys-api/issues" }, "homepage": "https://github.com/ookamiiixd/baileys-api#readme", + "license": "MIT", "scripts": { "start": "node .", "build": "tsc", @@ -20,9 +18,9 @@ "format": "prettier . --write" }, "dependencies": { - "@adiwajshing/baileys": "https://github.com/ookamiiixd/Baileys.git#build", - "baileys-store": "file:external/baileys-store-4.tgz", + "@adiwajshing/baileys": "^5.0.0", "@hapi/boom": "^10.0.0", + "@ookamiiixd/baileys-store": "^1.0.0-beta.0", "@prisma/client": "^4.7.1", "cors": "^2.8.5", "dotenv": "^16.0.3", @@ -45,11 +43,17 @@ "eslint": "^8.29.0", "eslint-config-prettier": "^8.5.0", "prettier": "^2.8.0", + "prettier-plugin-organize-imports": "^3.2.1", "prisma": "^4.7.1", "ts-node": "^10.9.1", "typescript": "^4.9.3" }, "engines": { "node": ">=14.5.0" - } + }, + "files": [ + "dist/", + "prisma/schema.prisma", + ".env.example" + ] } diff --git a/postman_collection.json b/postman_collection.json new file mode 100644 index 00000000..1b5f8d3f --- /dev/null +++ b/postman_collection.json @@ -0,0 +1,2960 @@ +{ + "info": { + "_postman_id": "df663a45-5b31-42f6-9960-a8aab090b558", + "name": "Baileys API v1.0.0-beta.0", + "description": "API documentation for [https://github.com/ookamiiixd/baileys-api](https://github.com/ookamiiixd/baileys-api)\n\nNote that all the `POST` route expect a JSON body, so make sure to include the header", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "18988925" + }, + "item": [ + { + "name": "Sessions", + "item": [ + { + "name": "Find Session", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/sessions/:sessionId", + "host": ["{{BASE_URL}}"], + "path": ["sessions", ":sessionId"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Simply check if the session exists or not. If you want to check if the session has been authenticated, use the `Session Status` route instead" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/sessions/:sessionId", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": ["sessions", ":sessionId"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "27" + }, + { + "key": "ETag", + "value": "W/\"1b-z0/lHZFWOZczBvlOo3juN03ybgA\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 09:35:03 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Session found\"\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/sessions/:sessionId", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": ["sessions", ":sessionId"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "29" + }, + { + "key": "ETag", + "value": "W/\"1d-SFg1yB5C4mPMRmz91HR7SP18WdM\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 08:13:09 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"Session not found\"\n}" + } + ] + }, + { + "name": "Session Status", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/sessions/:sessionId/status", + "host": ["{{BASE_URL}}"], + "path": ["sessions", ":sessionId", "status"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Determine a session status. The value is based from the websocket connection status, except that if the session has been successfully authenticated, it will return `AUTHENTHICATED`. Possible value is `AUTHENTICATED, CONNECTED, CONNECTING, DISCONNECTED, DISCONNECTING`" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/sessions/:sessionId/status", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": ["sessions", ":sessionId", "status"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "26" + }, + { + "key": "ETag", + "value": "W/\"1a-2rL+0idpkPObmbCfxXLGOUTLnRY\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 10:02:02 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"status\": \"AUTHENTICATED\"\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/sessions/:sessionId/status", + "host": ["{{BASE_URL}}"], + "path": ["sessions", ":sessionId", "status"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "29" + }, + { + "key": "ETag", + "value": "W/\"1d-SFg1yB5C4mPMRmz91HR7SP18WdM\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 08:14:37 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"Session not found\"\n}" + } + ] + }, + { + "name": "Add Session", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"sessionId\": \"john\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BASE_URL}}/sessions/add", + "host": ["{{BASE_URL}}"], + "path": ["sessions", "add"] + }, + "description": "Create new a session. Expect an object with `sessionId` props. You can also pass additional [baileys socket options](https://github.com/adiwajshing/Baileys#configuring-the-connection) there. Keep in mind that you can only pass JSON-parsable options\n\nExample:\n\n``` json\n{\n \"sessionId\": \"john\",\n \"syncFullHistory: true // Emulate WA desktop app to receive more messages\n}\n\n```" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"sessionId\": \"john\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:3000/sessions/add", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": ["sessions", "add"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "6475" + }, + { + "key": "ETag", + "value": "W/\"194b-wbqlPQCvDljDULDnnrNnHMP0sy4\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 08:18:33 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"qr\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAEUCAYAAADqcMl5AAAAAklEQVR4AewaftIAABKZSURBVO3BQY4gx7LgQDJR978yp3ffVwEkMqqlp3Ez+4O11rrgYa21LnlYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21LnlYa61LHtZa65IfPlL5myreUDmpmFSmikllqjhR+aLiRGWqeEPlpGJSmSomlaliUpkqJpWpYlKZKk5UpoqbVKaKE5WTiknlb6r44mGttS55WGutSx7WWuuSHy6ruEnli4pJ5aTipGJSOak4Ufmi4kTljYqTipOKSWWqOKl4Q+WkYlI5qZhUpoqpYlKZKm6quEnlpoe11rrkYa21LnlYa61LfvhlKm9UvKFyUjFVTCpTxYnKVPGGyhsqJxUnFScqk8obFV+ovFExqfxNKicVk8pvUnmj4jc9rLXWJQ9rrXXJw1prXfLDf0zFpPKFyonKScVU8YXKicpUMalMFScqU8WJyonKScWkclLxRcWk8oXKScWk8l/ysNZalzystdYlD2utdckP/3EVk8obFZPKVHGiMlVMKjdVTCpTxaTyhspJxaQyVZyonKhMFZPKVDFVnFRMKicVJyqTylTxX/Kw1lqXPKy11iUPa611yQ+/rOJ/icoXKicqU8WkMlVMKm9UTConFW+oTCpTxYnKVPGGylQxqUwVk8pJxYnKGxU3VfybPKy11iUPa611ycNaa13yw2Uq/yYqU8WkMlVMKlPFpDJVTCpTxaQyVUwqU8WkMlVMKlPFpHKiMlWcVEwqU8UbKlPFb6qYVKaKk4pJ5URlqjhR+Td7WGutSx7WWuuSh7XWusT+4H+YylQxqUwVJypTxaRyUv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hD5aRiUpkqTlROKiaVLyomlaliUnmj4ouHtda65GGttS55WGutS+wPPlB5o2JSmSpOVKaKSeWkYlKZKiaVNyomlaniROWkYlKZKk5UpopJZap4Q+WmihOVNyomlS8qJpWp4guVqeImlanii4e11rrkYa21LnlYa61L7A8+UPmi4kTlN1VMKm9UTConFScqJxVfqPymihOVLypOVN6omFSmihOVqeJE5d+s4ouHtda65GGttS55WGutS+wP/oepnFScqNxUMalMFZPKVDGp3FQxqUwVb6hMFScqU8UbKlPFpHJS8ZtUpooTlaniDZWp4g2VqeKLh7XWuuRhrbUueVhrrUt++Ejlb6qYKiaVSeWk4guVk4pJ5Y2KN1Smii9UpooTlS9UTiomlaniROWLiknlROULlaniC5Xf9LDWWpc8rLXWJQ9rrXXJD5dV3KRyojJVvKFyk8pJxaQyqXxRcaLyRsVvUpkqJpWTikllqjipmFROVKaKE5UvKn5TxU0Pa611ycNaa13ysNZal/zwy1TeqLhJZaqYKr5QmSpOVKaKE5WTikllqnhD5YuKN1QmlaliUpkqpopJZar4omJSmSqmiknlROU3VUwqU8UXD2utdcnDWmtd8rDWWpf88P8ZlaliUpkqTiomlZOKm1ROVKaKSeWLijdUvqg4UTlRmSqmihOVLyomlaniDZVJ5aTiNz2stdYlD2utdcnDWmtd8sN/XMWJylQxqdyk8kXFFypTxd9UMalMFZPKScVUMalMFW+ovKFyUjFVnKicVEwq/6SHtda65GGttS55WGutS374ZRW/qWJSmSpOKr6omFROKk5UTlTeqJgqJpWp4kTlN6lMFX+TyknFicpUcaLyhcpU8U96WGutSx7WWuuSh7XWuuSHy1T+JpWp4r+kYlI5qXijYlKZKqaKE5WpYlI5qZhUpoovVKaKk4pJ5aTijYpJZao4UZlUpopJ5Tc9rLXWJQ9rrXXJw1prXWJ/sNZaFzystdYlD2utdcnDWmtd8rDWWpc8rLXWJQ9rrXXJw1prXfKw1lqXPKy11iUPa611ycNaa13ysNZalzystdYlD2utdcnDWmtd8v8ACXrxXBZ5duEAAAAASUVORK5CYII=\"\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"sessionId\": \"john\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BASE_URL}}/sessions/add", + "host": ["{{BASE_URL}}"], + "path": ["sessions", "add"] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "34" + }, + { + "key": "ETag", + "value": "W/\"22-nNvILmiaE5rveSF0RfEVnyXUlF4\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 09:31:38 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"Session already exists\"\n}" + } + ] + }, + { + "name": "Add Session (SSE)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/sessions/:sessionId/add-sse", + "host": ["{{BASE_URL}}"], + "path": ["sessions", ":sessionId", "add-sse"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Create a session and listen to the connection update in realtime. For the usage example, please see [here](https://github.com/ookamiiixd/baileys-api/blob/dev/examples/sse.html)\n\nNotes:\n\n- Unlike `Add Session` route, you can't add additional socket options in this route\n- If you exceed the maximum QR generation attempts, the connection will be closed\n- If you try to access this route using a session id that already in use, the route will simply emit an error message and close the connection. This also mean that if you lost a connection after successfully authenticated, you lost the access to subscribe the realtime data" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/sessions/:sessionId/add-sse", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": ["sessions", ":sessionId", "add-sse"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "plain", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "text/event-stream" + }, + { + "key": "Cache-Control", + "value": "no-cache" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:27:27 GMT" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" + } + ], + "cookie": [], + "body": "data: {\"qr\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAEUCAYAAADqcMl5AAAAAklEQVR4AewaftIAABIqSURBVO3BQY4YybLgQDJR978yR0tfBZDIKKn/GzezP1hrrQse1lrrkoe11rrkYa21LnlYa61LHtZa65KHtda65GGttS55WGutSx7WWuuSh7XWuuRhrbUueVhrrUse1lrrkoe11rrkYa21LvnhI5W/qeJEZao4UZkqTlRuqphUvqh4Q+WLijdU3qg4UZkqJpWp4guVk4oTlZOKSeVvqvjiYa21LnlYa61LHtZa65IfLqu4SeWNikllqpgqTlTeqJhUpopJZap4Q2VS+aJiUpkqTlSmijcqJpWpYqqYVKaKSeWNijdUpoqbKm5SuelhrbUueVhrrUse1lrrkh9+mcobFW+onFRMKm9UnKicVJxUTConFV9UTCpvqEwVU8WkclIxqZyo/KaKSWWqmFSmiknlN6m8UfGbHtZa65KHtda65GGttS754X9MxUnFpPKGyonKFxWTyhcVk8qJylTxhspJxaQyVUwqU8UXFScqJyonKicVk8r/koe11rrkYa21LnlYa61LfvgfozJVnFRMKpPKVDGpTBWTyhsqU8Wk8obKVDGpnKi8UTGpTCpTxaRyojJVTCpTxaRyUjGpvFExqUwqU8X/koe11rrkYa21LnlYa61LfvhlFf9lKlPFicpUcVJxojJVTCpTxRcqJxVvqEwqU8WJylTxhspUMalMFScqU8WJyhsVN1X8lzystdYlD2utdcnDWmtd8sNlKv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dYlD2utdckPH6m8UTGpTBW/qWJSeUNlqpgqTlSmiknlpGJSmSreUHmj4r9E5Q2VqWJSuanijYo3Kr5QuelhrbUueVhrrUse1lrrEvuDD1S+qDhROal4Q+WNikllqphUvqiYVE4qJpWp4kTlpoo3VE4qvlA5qThRmSomlaniROW/pOKmh7XWuuRhrbUueVhrrUvsD/4PU5kq3lCZKt5QmSpOVKaKE5W/qeINlaniROWk4guVk4rfpDJVTConFW+oTBUnKlPFTQ9rrXXJw1prXfKw1lqX/PCRyt9UMVVMKl+onFR8UXGiMlVMKicVb6icqEwVX1RMKpPKFxUnKlPFpHJSMamcqEwVk8qJylRxonJSMalMFV88rLXWJQ9rrXXJw1prXfLDZRU3qZyoTBVvqJxUTCpTxRcqJypTxaQyqUwVX1TcpPJFxYnKFxUnKicVN1V8UfE3Pay11iUPa611ycNaa13ywy9TeaPiN6lMFZPKScWkclIxqfxLKicqX6icVEwqJxWTylRxUvGFyhcqb6h8UTGpTBVTxU0Pa611ycNaa13ysNZal/zwP0blDZWbKiaVNyomlUnlpGJS+U0Vb6h8UfGGyknFScUbKlPFpDJVTConFZPKFypTxRcPa611ycNaa13ysNZal/zw/5mKSWWqmFROKiaVk4pJZVK5qeILlaniRGWqmComlROVk4qpYlKZKk5UTipOKk4q3qiYVKaK/5KHtda65GGttS55WGutS374ZRW/qeJE5aRiUpkqTlSmihOVk4o3VCaVqeJE5QuVqeJEZaqYVG6qeKNiUplUpopJZaqYVN5Q+aLib3pYa61LHtZa65KHtda6xP7gA5W/qWJSOak4UXmjYlI5qZhUflPFFypTxaQyVZyovFExqUwVJypTxaQyVUwqU8WkclJxk8pU8YXKScUXD2utdcnDWmtd8rDWWpfYH6y11gUPa611ycNaa13ysNZalzystdYlD2utdcnDWmtd8rDWWpc8rLXWJQ9rrXXJw1prXfKw1lqXPKy11iUPa611ycNaa13ysNZal/w/1ZV2j2OtGMUAAAAASUVORK5CYII=\"}" + } + ] + }, + { + "name": "Delete Session", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{BASE_URL}}/sessions/:sessionId", + "host": ["{{BASE_URL}}"], + "path": ["sessions", ":sessionId"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Delete a session" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "http://localhost:3000/sessions/:sessionId", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": ["sessions", ":sessionId"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "29" + }, + { + "key": "ETag", + "value": "W/\"1d-ILxigtiSa6WDHWPzEHKKbgV7iDQ\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 12:13:53 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Session deleted\"\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{BASE_URL}}/sessions/:sessionId", + "host": ["{{BASE_URL}}"], + "path": ["sessions", ":sessionId"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "29" + }, + { + "key": "ETag", + "value": "W/\"1d-SFg1yB5C4mPMRmz91HR7SP18WdM\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 08:18:08 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"Session not found\"\n}" + } + ] + } + ] + }, + { + "name": "Chats", + "item": [ + { + "name": "Chat List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/chats", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "chats"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Get list of chats" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/chats", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "chats"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "8081" + }, + { + "key": "ETag", + "value": "W/\"1f91-zrmZzjUJ24Wi50rIH4/QJp1uUAY\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 11:47:06 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"pkId\": 268,\n \"sessionId\": \"john\",\n \"conversationTimestamp\": \"1670751010\",\n \"id\": \"628231xxxxx@s.whatsapp.net\",\n \"unreadCount\": 1\n },\n {\n \"pkId\": 270,\n \"sessionId\": \"john\",\n \"id\": \"628121xxxxx@s.whatsapp.net\",\n \"messages\": [\n {\n \"message\": {\n \"key\": {\n \"id\": \"496547XXXXXXXXXXXXXX\",\n \"fromMe\": true,\n \"remoteJid\": \"628121xxxxx@s.whatsapp.net\"\n },\n \"messageStubType\": \"E2E_ENCRYPTED\",\n \"messageTimestamp\": \"1670745789\"\n }\n }\n ],\n \"participant\": []\n },\n ...\n ],\n \"cursor\": 294\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/chats", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "chats"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "45" + }, + { + "key": "ETag", + "value": "W/\"2d-NELHGnJkSmArgNUV9e6szPSxHrw\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 10:48:09 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during chat list\"\n}" + } + ] + }, + { + "name": "Load Conversation", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/chats/:jid", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "chats", ":jid"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "62813xxxxx@s.whatsapp.net", + "description": "Chat jid" + } + ] + }, + "description": "Load a conversation with someone or a group" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/chats/:jid", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "chats", ":jid"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "62813xxxxx@s.whatsapp.net", + "description": "Chat jid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "14973" + }, + { + "key": "ETag", + "value": "W/\"3a7d-4+d0S7xZ+Nb5CDSbAQo2ye6mcPE\"" + }, + { + "key": "Date", + "value": "Thu, 05 Jan 2023 04:07:24 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"pkId\": 343,\n \"sessionId\": \"john\",\n \"remoteJid\": \"628132xxxxx@s.whatsapp.net\",\n \"id\": \"B61CE995AXXXXXXXXXXXXXX\",\n \"ephemeralOutOfSync\": false,\n \"key\": {\n \"id\": \"B61CE995AXXXXXXXXXXXXXXX\",\n \"fromMe\": false,\n \"remoteJid\": \"628132xxxxx@s.whatsapp.net\"\n },\n \"labels\": [],\n \"message\": {\n \"conversation\": \"Isn't looks good?\"\n },\n \"messageStubParameters\": [],\n \"messageTimestamp\": \"1669206859\",\n \"pollUpdates\": [],\n \"reactions\": [],\n \"userReceipt\": []\n },\n {\n \"pkId\": 466,\n \"sessionId\": \"john\",\n \"remoteJid\": \"628132xxxxx@s.whatsapp.net\",\n \"id\": \"5EB77606567BB6XXXXXXXXXXX\",\n \"ephemeralOutOfSync\": false,\n \"key\": {\n \"id\": \"5EB77606567BB6XXXXXXXXXXX\",\n \"fromMe\": false,\n \"remoteJid\": \"628132xxxxx@s.whatsapp.net\"\n },\n \"labels\": [],\n \"message\": {\n \"conversation\": \"Awesome!\"\n },\n \"messageStubParameters\": [],\n \"messageTimestamp\": \"1669205548\",\n \"pollUpdates\": [],\n \"reactions\": [],\n \"userReceipt\": []\n },\n ...\n ],\n \"cursor\": 489\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/chats/:jid", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "chats", ":jid"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "62813xxxxx@s.whatsapp.net", + "description": "Chat jid" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "45" + }, + { + "key": "ETag", + "value": "W/\"2d-NELHGnJkSmArgNUV9e6szPSxHrw\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 10:48:09 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during chat find\"\n}" + } + ] + } + ] + }, + { + "name": "Contacts", + "item": [ + { + "name": "Contact List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Get list of contacts" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/contacts", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "contacts"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "1676" + }, + { + "key": "ETag", + "value": "W/\"68c-sevpQPy0ZDLpGm1wr8iRTiNo3o4\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:50:15 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"pkId\": 467,\n \"sessionId\": \"john\",\n \"id\": \"628138xxxxx@s.whatsapp.net\",\n \"name\": \"Bob William\",\n \"notify\": null,\n \"verifiedName\": null,\n \"imgUrl\": null,\n \"status\": null\n },\n ...\n ],\n \"cursor\": 493\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "45" + }, + { + "key": "ETag", + "value": "W/\"2d-NELHGnJkSmArgNUV9e6szPSxHrw\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 10:48:09 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during chat list\"\n}" + } + ] + }, + { + "name": "Check Number", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts/:jid", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts", ":jid"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628138xxxxx@s.whatsapp.net", + "description": "Number jid" + } + ] + }, + "description": "Check if number exists on WhatsApp or not" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/contacts/:jid", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "contacts", ":jid"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628138xxxxx@s.whatsapp.net", + "description": "Number jid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "15" + }, + { + "key": "ETag", + "value": "W/\"f-lWSD52foMX4qLT82tweJE091S9Q\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:53:34 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"exists\": true\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts/:jid", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts", ":jid"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628138xxxxx@s.whatsapp.net", + "description": "Number jid" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "45" + }, + { + "key": "ETag", + "value": "W/\"2d-yQtTZSgB5CH3vcY7RJljHmEWYjk\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:54:15 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during jid check\"\n}" + } + ] + }, + { + "name": "Profile Picture", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts/:jid/photo", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts", ":jid", "photo"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628138xxxxx@s.whatsapp.net", + "description": "Number jid" + } + ] + }, + "description": "Get someone's profile picture" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/contacts/:jid/photo", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "contacts", ":jid", "photo"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628138xxxxx@s.whatsapp.net", + "description": "Number jid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "176" + }, + { + "key": "ETag", + "value": "W/\"b0-bQBN29wReWTYvevkkCAxBHytQ8w\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:56:58 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"url\": \"https://pps.whatsapp.net/v/t61.xxxx-2x/xxxxx4973_1xxxx97530430_228xxxxxx555_n.jpg?ccb=11-4&oh=01_AdT0SebmPzpFyNKCvvPw0rYSmhIbVlkVcYQ-FJ0VohYNiw&oe=63C534EE\"\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts/:jid/photo", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts", ":jid", "photo"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628138xxxxx@s.whatsapp.net", + "description": "Number jid" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "47" + }, + { + "key": "ETag", + "value": "W/\"2f-k2MDpOqngNXXgbQSBm4xw7+N0a4\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:57:45 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during photo fetch\"\n}" + } + ] + }, + { + "name": "Blocked Number List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts/blocklist", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts", "blocklist"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Get list of blocked numbers" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/contacts/blocklist", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "contacts", "blocklist"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "63" + }, + { + "key": "ETag", + "value": "W/\"3f-SDcFKUGiPldqMqNVIw8IaUV5jZA\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:01:25 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "[\n \"628122xxxxx@s.whatsapp.net\",\n \"628199xxxxx@s.whatsapp.net\"\n]" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts/blocklist", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts", "blocklist"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "47" + }, + { + "key": "ETag", + "value": "W/\"2f-k2MDpOqngNXXgbQSBm4xw7+N0a4\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:57:45 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during blocklist fetch\"\n}" + } + ] + }, + { + "name": "Block / Unblock Number", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"jid\": \"628122xxxxx@s.whatsapp.net\",\r\n \"action\": \"block\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts/blocklist/update", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts", "blocklist", "update"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Block / unblock number. Expect the below JSON object shape:\n\n``` json\n{\n \"jid\": \"62xxxxx@s.whatsapp.net\", // The target number jid\n \"action\": \"block\" // The action, can be either \"block\" or \"unblock\"\n}\n```" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"jid\": \"628122xxxxx@s.whatsapp.net\",\r\n \"action\": \"block\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:3000/:sessionId/contacts/blocklist/update", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "contacts", "blocklist", "update"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "31" + }, + { + "key": "ETag", + "value": "W/\"1f-rwg7CjZZTkTi13guWwUuOdH04is\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:06:44 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"message\": \"Contact blocked\"\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"jid\": \"628122xxxxx@s.whatsapp.net\",\r\n \"action\": \"block\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BASE_URL}}/:sessionId/contacts/blocklist/update", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "contacts", "blocklist", "update"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "31" + }, + { + "key": "ETag", + "value": "W/\"1f-rwg7CjZZTkTi13guWwUuOdH04is\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:06:44 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during blocklist update\"\n}" + } + ] + } + ] + }, + { + "name": "Groups", + "item": [ + { + "name": "Group List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/groups", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "groups"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Get list of groups" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/groups", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "groups"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "175" + }, + { + "key": "ETag", + "value": "W/\"af-m4MZKLonIfvSvDMexvCNrV3p1Ds\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:30:42 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"pkId\": 609,\n \"sessionId\": \"john\",\n \"id\": \"628950xxxxx-1631xxxx@g.us\",\n \"name\": \"The Raven\",\n \"notify\": null,\n \"verifiedName\": null,\n \"imgUrl\": null,\n \"status\": null\n },\n ...\n ],\n \"cursor\": 634\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/groups", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "groups"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "45" + }, + { + "key": "ETag", + "value": "W/\"2d-NELHGnJkSmArgNUV9e6szPSxHrw\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 10:48:09 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during group list\"\n}" + } + ] + }, + { + "name": "Group Metadata", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/groups/:jid", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "groups", ":jid"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628950xxxxx-1631xxxxx@g.us", + "description": "Group jid" + } + ] + }, + "description": "Get group metadata" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/groups/:jid", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "groups", ":jid"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628950xxxxx-1631xxxxx@g.us", + "description": "Group jid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "465" + }, + { + "key": "ETag", + "value": "W/\"1d1-LWhmW4VM2/FA409+GSYnSeYQYso\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:36:35 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"id\": \"628950xxxxx-1631xxxxx@g.us\",\n \"subject\": \"The Raven\",\n \"subjectOwner\": \"628950xxxxx@s.whatsapp.net\",\n \"subjectTime\": 1631090896,\n \"size\": 4,\n \"creation\": 1631090896,\n \"owner\": \"628950xxxxx@s.whatsapp.net\",\n \"restrict\": false,\n \"announce\": false,\n \"participants\": [\n {\n \"id\": \"628132xxxxx@s.whatsapp.net\",\n \"admin\": null\n },\n {\n \"id\": \"628950xxxxx@s.whatsapp.net\",\n \"admin\": \"superadmin\"\n }\n ]\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/groups/:jid", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "groups", ":jid"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628950xxxxx-1631xxxxx@g.us", + "description": "Group jid" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "45" + }, + { + "key": "ETag", + "value": "W/\"2d-NELHGnJkSmArgNUV9e6szPSxHrw\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 10:48:09 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during group metadata fetch\"\n}" + } + ] + }, + { + "name": "Profile Picture", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/groups/:jid/photo", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "groups", ":jid", "photo"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628950xxxxx-1631xxxxx@g.us", + "description": "Group jid" + } + ] + }, + "description": "Get group's profile picture" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/groups/:jid/photo", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "groups", ":jid", "photo"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628950xxxxx-1631xxxxx@g.us", + "description": "Group jid" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "176" + }, + { + "key": "ETag", + "value": "W/\"b0-LqeipByKETY9sPcRFBhxO8EjNqU\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 14:43:14 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"url\": \"https://pps.whatsapp.net/v/t61.2xxxx-2x/3xxxx8882_648xxxxxxx963_460xxxxxxx50_n.jpg?ccb=11-4&oh=01_AdRPjAc_RsvEnqNXP-_kQ-JAbe1b8PTaJMCMXvyeLewouw&oe=63C542AE\"\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/groups/:jid/photo", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "groups", ":jid", "photo"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + }, + { + "key": "jid", + "value": "628950xxxxx-1631xxxxx@g.us", + "description": "Group jid" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "45" + }, + { + "key": "ETag", + "value": "W/\"2d-NELHGnJkSmArgNUV9e6szPSxHrw\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 10:48:09 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during photo fetch\"\n}" + } + ] + } + ] + }, + { + "name": "Messages", + "item": [ + { + "name": "Message List", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/messages", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "messages"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Get list of messages. Note that this route returns all messages from the store without filtering the jid. You may want to use the `Chats Load Conversation` route if you only want load messages with specific person or group" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:3000/:sessionId/messages", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "messages"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "14459" + }, + { + "key": "ETag", + "value": "W/\"387b-5TaGieZbj9/7YkdllELdvzMgf0g\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:12:49 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"data\": [\n {\n \"pkId\": 1458,\n \"sessionId\": \"john\",\n \"remoteJid\": \"628132xxxxx@s.whatsapp.net\",\n \"id\": \"BF7DB5EE494FXXXXXXXXXXXXXXXX\",\n \"key\": {\n \"id\": \"BF7DB5EE494FXXXXXXXXXXXXXXXX\",\n \"fromMe\": true,\n \"remoteJid\": \"6281320761832@s.whatsapp.net\"\n },\n \"message\": {\n \"protocolMessage\": {\n \"type\": \"INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC\",\n \"initialSecurityNotificationSettingSync\": {\n \"securityNotificationEnabled\": false\n }\n }\n },\n \"messageTimestamp\": \"1673015208\",\n \"pushName\": \"Nothing\",\n \"status\": 2\n },\n ...\n ],\n \"cursor\": 1482\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{BASE_URL}}/:sessionId/messages", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "messages"], + "query": [ + { + "key": "limit", + "value": "25", + "description": "Limit data length per request (Optional, default to 25)", + "disabled": true + }, + { + "key": "cursor", + "value": "25", + "description": "Cursor for the next page (Optional)", + "disabled": true + } + ], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "45" + }, + { + "key": "ETag", + "value": "W/\"2d-NELHGnJkSmArgNUV9e6szPSxHrw\"" + }, + { + "key": "Date", + "value": "Sun, 11 Dec 2022 10:48:09 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during message list\"\n}" + } + ] + }, + { + "name": "Send Message", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"jid\": \"628950xxxxx-1631xxxx@g.us\",\r\n \"type\": \"group\",\r\n \"message\": {\r\n \"text\": \"What's that @62823xxxx?\",\r\n \"mentions\": [\"62823xxxx@s.whatsapp.net\"]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BASE_URL}}/:sessionId/messages/send", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "messages", "send"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Send a message to someone or group. Expect the below JSON object shape:\n\n``` json\n{\n \"jid\": \"62xxxx@s.whatsapp.net\", // Target jid\n \"type\": \"number\", // Use \"number\" for number jid, or \"group\" for group jid\n \"message\": {\n \"text\": \"Hello!\"\n }, // `AnyMessageContent`\n \"options\": {} // Optional `MiscMessageGenerationOptions`, eg: to quote message, etc\n}\n\n```\n\nPlease see [this section](https://github.com/adiwajshing/Baileys#sending-messages) to learn how to send any kind of message in baileys" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"jid\": \"628950xxxxx-1631xxxx@g.us\",\r\n \"type\": \"group\",\r\n \"message\": {\r\n \"text\": \"What's that @62823xxxx?\",\r\n \"mentions\": [\"62823xxxx@s.whatsapp.net\"]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:3000/:sessionId/messages/send", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "messages", "send"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "327" + }, + { + "key": "ETag", + "value": "W/\"147-uzjVxFQmRFBfTvxqegxOJwD/Mao\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:27:17 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"key\": {\n \"remoteJid\": \"628950xxxxx-1631xxxx@g.us\",\n \"fromMe\": true,\n \"id\": \"BAE58AXXXXXXXX\"\n },\n \"message\": {\n \"extendedTextMessage\": {\n \"text\": \"What's that @62823xxxxx?\",\n \"contextInfo\": {\n \"mentionedJid\": [\n \"62823xxxxx@s.whatsapp.net\"\n ]\n }\n }\n },\n \"messageTimestamp\": \"1673018835\",\n \"status\": \"PENDING\",\n \"participant\": \"628132xxxxx:78@s.whatsapp.net\"\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"jid\": \"628950xxxxx-1631xxxx@g.us\",\r\n \"type\": \"group\",\r\n \"message\": {\r\n \"text\": \"What's that @62823xxxx?\",\r\n \"mentions\": [\"62823xxxx@s.whatsapp.net\"]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BASE_URL}}/:sessionId/messages/send", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "messages", "send"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "327" + }, + { + "key": "ETag", + "value": "W/\"147-uzjVxFQmRFBfTvxqegxOJwD/Mao\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:27:17 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"error\": \"An error occured during message send\"\n}" + } + ] + }, + { + "name": "Send Bulk Message", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "[\r\n {\r\n \"jid\": \"62895xxxxx-1631xxxxx@g.us\",\r\n \"type\": \"group\",\r\n \"message\": {\r\n \"text\": \"Okay then!\"\r\n }\r\n },\r\n {\r\n \"jid\": \"628231xxxxx@s.whatsapp.net\",\r\n \"type\": \"number\",\r\n \"delay\": 5000,\r\n \"message\": {\r\n \"text\": \"Hello!\"\r\n }\r\n }\r\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BASE_URL}}/:sessionId/messages/send/bulk", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "messages", "send", "bulk"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + }, + "description": "Send a multiple messages. Accept an array of JSON object that has the same shape as the `Send Message` route. But it also accept an additional `delay` properties to add a delay for the specific message to send (in `milliseconds`), default to `1000`. Keep in mind that it won't be used for the message in first position" + }, + "response": [ + { + "name": "Response Success", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "[\r\n {\r\n \"jid\": \"62895xxxxx-1631xxxxx@g.us\",\r\n \"type\": \"group\",\r\n \"message\": {\r\n \"text\": \"Okay then!\"\r\n }\r\n },\r\n {\r\n \"jid\": \"628231xxxxx@s.whatsapp.net\",\r\n \"type\": \"number\",\r\n \"delay\": 5000,\r\n \"message\": {\r\n \"text\": \"Hello!\"\r\n }\r\n }\r\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:3000/:sessionId/messages/send/bulk", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "messages", "send", "bulk"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "511" + }, + { + "key": "ETag", + "value": "W/\"1ff-UenwtSTBf9lIrco534dkKJ/ay1E\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:43:12 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"results\": [\n {\n \"index\": 0,\n \"result\": {\n \"key\": {\n \"remoteJid\": \"62895xxxxx-1631xxxxx@g.us\",\n \"fromMe\": true,\n \"id\": \"BAE5DAXXXXXXX\"\n },\n \"message\": {\n \"extendedTextMessage\": {\n \"text\": \"Okay then!\"\n }\n },\n \"messageTimestamp\": \"1673019785\",\n \"status\": \"PENDING\",\n \"participant\": \"628132xxxxx:78@s.whatsapp.net\"\n }\n },\n {\n \"index\": 1,\n \"result\": {\n \"key\": {\n \"remoteJid\": \"628231xxxxx@s.whatsapp.net\",\n \"fromMe\": true,\n \"id\": \"BAE51CFXXXXXX\"\n },\n \"message\": {\n \"extendedTextMessage\": {\n \"text\": \"Hello!\"\n }\n },\n \"messageTimestamp\": \"1673019792\",\n \"status\": \"PENDING\"\n }\n }\n ],\n \"errors\": []\n}" + }, + { + "name": "Partial Success", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "[\r\n {\r\n \"jid\": \"62895xxxxx-1631xxxxx@g.us\",\r\n \"type\": \"group\",\r\n \"message\": {\r\n \"text\": \"Okay then!\"\r\n }\r\n },\r\n {\r\n \"jid\": \"628231xxxxx@s.whatsapp.net\",\r\n \"type\": \"number\",\r\n \"delay\": 5000,\r\n \"message\": {\r\n \"text\": \"Hello!\"\r\n }\r\n }\r\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:3000/:sessionId/messages/send/bulk", + "protocol": "http", + "host": ["localhost"], + "port": "3000", + "path": [":sessionId", "messages", "send", "bulk"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "511" + }, + { + "key": "ETag", + "value": "W/\"1ff-UenwtSTBf9lIrco534dkKJ/ay1E\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:43:12 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"results\": [\n {\n \"index\": 0,\n \"result\": {\n \"key\": {\n \"remoteJid\": \"62895xxxxx-1631xxxxx@g.us\",\n \"fromMe\": true,\n \"id\": \"BAE5DAXXXXXXX\"\n },\n \"message\": {\n \"extendedTextMessage\": {\n \"text\": \"Okay then!\"\n }\n },\n \"messageTimestamp\": \"1673019785\",\n \"status\": \"PENDING\",\n \"participant\": \"628132xxxxx:78@s.whatsapp.net\"\n }\n }\n ],\n \"errors\": [\n {\n \"index\": 1,\n \"error\": \"An error occured during message send\"\n }\n ]\n}" + }, + { + "name": "Response Failed", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "[\r\n {\r\n \"jid\": \"62895xxxxx-1631xxxxx@g.us\",\r\n \"type\": \"group\",\r\n \"message\": {\r\n \"text\": \"Okay then!\"\r\n }\r\n },\r\n {\r\n \"jid\": \"628231xxxxx@s.whatsapp.net\",\r\n \"type\": \"number\",\r\n \"delay\": 5000,\r\n \"message\": {\r\n \"text\": \"Hello!\"\r\n }\r\n }\r\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BASE_URL}}/:sessionId/messages/send/bulk", + "host": ["{{BASE_URL}}"], + "path": [":sessionId", "messages", "send", "bulk"], + "variable": [ + { + "key": "sessionId", + "value": "john", + "description": "Session id" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "126" + }, + { + "key": "ETag", + "value": "W/\"7e-vwijcK5514jDJ9ozSQ9hfiFT+Jc\"" + }, + { + "key": "Date", + "value": "Fri, 06 Jan 2023 15:41:18 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"results\": [],\n \"errors\": [\n {\n \"index\": 0,\n \"error\": \"An error occured during message send\"\n },\n {\n \"index\": 1,\n \"error\": \"An error occured during message send\"\n }\n ]\n}" + } + ] + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [""] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [""] + } + } + ], + "variable": [ + { + "key": "BASE_URL", + "value": "http://localhost:3000", + "type": "string" + } + ] +} diff --git a/prisma/schema.prisma b/prisma/schema.prisma index e4babfb6..94fd6e25 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -55,7 +55,6 @@ model Chat { unreadCount Int? unreadMentionCount Int? wallpaper Json? - // Taken from https://github.com/adiwajshing/Baileys/blob/30e2cb5c4c8ca84b1814574ed4ce74f8f8f89ecf/src/Types/Chat.ts#L39 lastMessageRecvTimestamp Int? @@unique([sessionId, id], map: "unique_id_per_session_id") diff --git a/src/controllers/chat.ts b/src/controllers/chat.ts index 7b47ac02..febbdf3b 100644 --- a/src/controllers/chat.ts +++ b/src/controllers/chat.ts @@ -1,4 +1,4 @@ -import { serializePrisma } from 'baileys-store'; +import { serializePrisma } from '@ookamiiixd/baileys-store'; import type { RequestHandler } from 'express'; import { logger, prisma } from '../shared'; @@ -8,17 +8,49 @@ export const list: RequestHandler = async (req, res) => { const { cursor = undefined, limit = 25 } = req.query; const chats = ( await prisma.chat.findMany({ - cursor: cursor ? { sessionId_id: { id: cursor as string, sessionId } } : undefined, + cursor: cursor ? { pkId: Number(cursor) } : undefined, take: Number(limit), skip: cursor ? 1 : 0, where: { sessionId }, }) ).map((c) => serializePrisma(c)); - res.status(200).json({ data: chats, cursor: chats.length ? chats[chats.length - 1].id : null }); + res.status(200).json({ + data: chats, + cursor: + chats.length !== 0 && chats.length === Number(limit) ? chats[chats.length - 1].pkId : null, + }); } catch (e) { const message = 'An error occured during chat list'; logger.error(e, message); res.status(500).json({ error: message }); } }; + +export const find: RequestHandler = async (req, res) => { + try { + const { sessionId, jid } = req.params; + const { cursor = undefined, limit = 25 } = req.query; + const messages = ( + await prisma.message.findMany({ + cursor: cursor ? { pkId: Number(cursor) } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { sessionId, remoteJid: jid }, + orderBy: { messageTimestamp: 'desc' }, + }) + ).map((m) => serializePrisma(m)); + + res.status(200).json({ + data: messages, + cursor: + messages.length !== 0 && messages.length === Number(limit) + ? messages[messages.length - 1].pkId + : null, + }); + } catch (e) { + const message = 'An error occured during chat find'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; diff --git a/src/controllers/contact.ts b/src/controllers/contact.ts new file mode 100644 index 00000000..0fe2dfe4 --- /dev/null +++ b/src/controllers/contact.ts @@ -0,0 +1,74 @@ +import type { RequestHandler } from 'express'; +import { logger, prisma } from '../shared'; +import { getSession, jidExists } from '../wa'; +import { makePhotoURLHandler } from './misc'; + +export const list: RequestHandler = async (req, res) => { + try { + const { sessionId } = req.params; + const { cursor = undefined, limit = 25 } = req.query; + const contacts = await prisma.contact.findMany({ + cursor: cursor ? { pkId: Number(cursor) } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { id: { endsWith: 's.whatsapp.net' }, sessionId }, + }); + + res.status(200).json({ + data: contacts, + cursor: + contacts.length !== 0 && contacts.length === Number(limit) + ? contacts[contacts.length - 1].pkId + : null, + }); + } catch (e) { + const message = 'An error occured during contact list'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const listBlocked: RequestHandler = async (req, res) => { + try { + const session = getSession(req.params.sessionId)!; + const data = await session.fetchBlocklist(); + res.status(200).json(data); + } catch (e) { + const message = 'An error occured during blocklist fetch'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const updateBlock: RequestHandler = async (req, res) => { + try { + const session = getSession(req.params.sessionId)!; + const { jid, action = 'block' } = req.body; + + const exists = await jidExists(session, jid); + if (!exists) return res.status(400).json({ error: 'Jid does not exists' }); + + await session.updateBlockStatus(jid, action); + res.status(200).json({ message: `Contact ${action}ed` }); + } catch (e) { + const message = 'An error occured during blocklist update'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const check: RequestHandler = async (req, res) => { + try { + const { sessionId, jid } = req.params; + const session = getSession(sessionId)!; + + const exists = await jidExists(session, jid); + res.status(200).json({ exists }); + } catch (e) { + const message = 'An error occured during jid check'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const photo = makePhotoURLHandler(); diff --git a/src/controllers/group.ts b/src/controllers/group.ts index 279545a2..63d35930 100644 --- a/src/controllers/group.ts +++ b/src/controllers/group.ts @@ -1,26 +1,44 @@ -import { serializePrisma } from 'baileys-store'; import type { RequestHandler } from 'express'; import { logger, prisma } from '../shared'; +import { getSession } from '../wa'; +import { makePhotoURLHandler } from './misc'; export const list: RequestHandler = async (req, res) => { try { const { sessionId } = req.params; const { cursor = undefined, limit = 25 } = req.query; - const groups = ( - await prisma.groupMetadata.findMany({ - cursor: cursor ? { sessionId_id: { id: cursor as string, sessionId } } : undefined, - take: Number(limit), - skip: cursor ? 1 : 0, - where: { sessionId }, - }) - ).map((c) => serializePrisma(c)); + const groups = await prisma.contact.findMany({ + cursor: cursor ? { pkId: Number(cursor) } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { id: { endsWith: 'g.us' }, sessionId }, + }); - res - .status(200) - .json({ data: groups, cursor: groups.length ? groups[groups.length - 1].id : null }); + res.status(200).json({ + data: groups, + cursor: + groups.length !== 0 && groups.length === Number(limit) + ? groups[groups.length - 1].pkId + : null, + }); } catch (e) { const message = 'An error occured during group list'; logger.error(e, message); res.status(500).json({ error: message }); } }; + +export const find: RequestHandler = async (req, res) => { + try { + const { sessionId, jid } = req.params; + const session = getSession(sessionId)!; + const data = await session.groupMetadata(jid); + res.status(200).json(data); + } catch (e) { + const message = 'An error occured during group metadata fetch'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const photo = makePhotoURLHandler('group'); diff --git a/src/controllers/message.ts b/src/controllers/message.ts index b0944537..16eca920 100644 --- a/src/controllers/message.ts +++ b/src/controllers/message.ts @@ -1,17 +1,44 @@ +import type { proto } from '@adiwajshing/baileys'; +import { serializePrisma } from '@ookamiiixd/baileys-store'; import type { RequestHandler } from 'express'; -import { delay as delayMs } from '@adiwajshing/baileys'; import { logger, prisma } from '../shared'; +import { delay as delayMs } from '../utils'; import { getSession, jidExists } from '../wa'; -import { serializePrisma } from 'baileys-store'; -export const send: RequestHandler = async (req, res) => { +export const list: RequestHandler = async (req, res) => { try { const { sessionId } = req.params; + const { cursor = undefined, limit = 25 } = req.query; + const messages = ( + await prisma.message.findMany({ + cursor: cursor ? { pkId: Number(cursor) } : undefined, + take: Number(limit), + skip: cursor ? 1 : 0, + where: { sessionId }, + }) + ).map((m) => serializePrisma(m)); + + res.status(200).json({ + data: messages, + cursor: + messages.length !== 0 && messages.length === Number(limit) + ? messages[messages.length - 1].pkId + : null, + }); + } catch (e) { + const message = 'An error occured during message list'; + logger.error(e, message); + res.status(500).json({ error: message }); + } +}; + +export const send: RequestHandler = async (req, res) => { + try { const { jid, type = 'number', message, options } = req.body; - const session = getSession(sessionId)!; + const session = getSession(req.params.sessionId)!; const exists = await jidExists(session, jid, type); - if (!exists) return res.status(400).json({ error: 'JID does not exist' }); + if (!exists) return res.status(400).json({ error: 'JID does not exists' }); const result = await session.sendMessage(jid, message, options); res.status(200).json(result); @@ -23,19 +50,18 @@ export const send: RequestHandler = async (req, res) => { }; export const sendBulk: RequestHandler = async (req, res) => { - const { sessionId } = req.params; - const session = getSession(sessionId)!; - const results: { index: number; result: any }[] = []; + const session = getSession(req.params.sessionId)!; + const results: { index: number; result: proto.WebMessageInfo | undefined }[] = []; const errors: { index: number; error: string }[] = []; for (const [ index, - { jid, type = 'number', delay = 2500, message, options }, + { jid, type = 'number', delay = 1000, message, options }, ] of req.body.entries()) { try { const exists = await jidExists(session, jid, type); if (!exists) { - errors.push({ index, error: 'JID does not exist' }); + errors.push({ index, error: 'JID does not exists' }); continue; } @@ -53,53 +79,3 @@ export const sendBulk: RequestHandler = async (req, res) => { .status(req.body.length !== 0 && errors.length === req.body.length ? 500 : 200) .json({ results, errors }); }; - -export const list: RequestHandler = async (req, res) => { - try { - const { sessionId } = req.params; - const { cursor = undefined, limit = 25 } = req.query; - const messages = ( - await prisma.message.findMany({ - cursor: cursor ? { pkId: Number(cursor) } : undefined, - take: Number(limit), - skip: cursor ? 1 : 0, - where: { sessionId }, - }) - ).map((m) => serializePrisma(m)); - - res.status(200).json({ - data: messages, - cursor: messages.length ? messages[messages.length - 1].pkId : null, - }); - } catch (e) { - const message = 'An error occured during message list'; - logger.error(e, message); - res.status(500).json({ error: message }); - } -}; - -export const find: RequestHandler = async (req, res) => { - try { - const { sessionId, jid } = req.params; - const { cursor = undefined, limit = 25 } = req.query; - const messages = ( - await prisma.message.findMany({ - cursor: cursor - ? { sessionId_remoteJid_id: { id: cursor as string, remoteJid: jid, sessionId } } - : undefined, - take: Number(limit), - skip: cursor ? 1 : 0, - where: { sessionId }, - orderBy: { messageTimestamp: 'desc' }, - }) - ).map((m) => serializePrisma(m)); - - res - .status(200) - .json({ data: messages, cursor: messages.length ? messages[messages.length - 1].id : null }); - } catch (e) { - const message = 'An error occured during message find'; - logger.error(e, message); - res.status(500).json({ error: message }); - } -}; diff --git a/src/controllers/misc.ts b/src/controllers/misc.ts index 6f64b1ce..d77fdc9b 100644 --- a/src/controllers/misc.ts +++ b/src/controllers/misc.ts @@ -2,16 +2,21 @@ import type { RequestHandler } from 'express'; import { logger } from '../shared'; import { getSession, jidExists } from '../wa'; -export const checkJid: RequestHandler = async (req, res) => { - try { - const { sessionId, jid } = req.params; - const { type = 'number' } = req.query; - const session = getSession(sessionId)!; - const exists = await jidExists(session, jid, type as any); - res.status(200).json({ exists }); - } catch (e) { - const message = 'An error occured during jid check'; - logger.error(e, message); - res.status(500).json({ error: message }); - } -}; +export const makePhotoURLHandler = + (type: 'number' | 'group' = 'number'): RequestHandler => + async (req, res) => { + try { + const { sessionId, jid } = req.params; + const session = getSession(sessionId)!; + + const exists = await jidExists(session, jid, type); + if (!exists) return res.status(400).json({ error: 'Jid does not exists' }); + + const url = await session.profilePictureUrl(jid, 'image'); + res.status(200).json({ url }); + } catch (e) { + const message = 'An error occured during photo fetch'; + logger.error(e, message); + res.status(500).json({ error: message }); + } + }; diff --git a/src/controllers/session.ts b/src/controllers/session.ts index 26999375..be194e87 100644 --- a/src/controllers/session.ts +++ b/src/controllers/session.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from 'express'; import type { WebSocket } from 'ws'; -import { createSession, getSession, sessionExists } from '../wa'; +import { createSession, deleteSession, getSession, sessionExists } from '../wa'; export const find: RequestHandler = (req, res) => res.status(200).json({ message: 'Session found' }); @@ -8,6 +8,7 @@ export const find: RequestHandler = (req, res) => export const status: RequestHandler = (req, res) => { const state = ['CONNECTING', 'CONNECTED', 'DISCONNECTING', 'DISCONNECTED']; const session = getSession(req.params.sessionId)!; + let status = state[(session.ws as WebSocket).readyState]; status = session.user ? 'AUTHENTICATED' : status; res.status(200).json({ status }); @@ -15,6 +16,7 @@ export const status: RequestHandler = (req, res) => { export const add: RequestHandler = async (req, res) => { const { sessionId, ...options } = req.body; + if (sessionExists(sessionId)) return res.status(400).json({ error: 'Session already exists' }); createSession({ sessionId, res, socketConfig: options }); }; @@ -36,7 +38,6 @@ export const addSSE: RequestHandler = async (req, res) => { }; export const del: RequestHandler = async (req, res) => { - const session = getSession(req.params.sessionId); - await session?.destroy(); + await deleteSession(req.params.sessionId); res.status(200).json({ message: 'Session deleted' }); }; diff --git a/src/index.ts b/src/index.ts index fae6e753..3367179e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,8 @@ +import cors from 'cors'; import 'dotenv/config'; import express from 'express'; -import cors from 'cors'; -import { init } from './wa'; import routes from './routes'; +import { init } from './wa'; const app = express(); app.use(cors()); diff --git a/src/routes/chats.ts b/src/routes/chats.ts index 88a272be..e41c0a47 100644 --- a/src/routes/chats.ts +++ b/src/routes/chats.ts @@ -1,23 +1,22 @@ import { Router } from 'express'; -import { list } from '../controllers/chat'; -import { find } from '../controllers/message'; -import requestValidator from '../middlewares/request-validator'; import { query } from 'express-validator'; +import * as controller from '../controllers/chat'; +import requestValidator from '../middlewares/request-validator'; const router = Router({ mergeParams: true }); router.get( '/', - query('cursor').isString().optional(), + query('cursor').isNumeric().optional(), query('limit').isNumeric().optional(), requestValidator, - list + controller.list ); router.get( '/:jid', - query('cursor').isString().optional(), + query('cursor').isNumeric().optional(), query('limit').isNumeric().optional(), requestValidator, - find + controller.find ); export default router; diff --git a/src/routes/contacts.ts b/src/routes/contacts.ts new file mode 100644 index 00000000..cf01dd3a --- /dev/null +++ b/src/routes/contacts.ts @@ -0,0 +1,27 @@ +import { Router } from 'express'; +import { body, query } from 'express-validator'; +import * as controller from '../controllers/contact'; +import requestValidator from '../middlewares/request-validator'; +import sessionValidator from '../middlewares/session-validator'; + +const router = Router({ mergeParams: true }); +router.get( + '/', + query('cursor').isNumeric().optional(), + query('limit').isNumeric().optional(), + requestValidator, + controller.list +); +router.get('/blocklist', sessionValidator, controller.listBlocked); +router.post( + '/blocklist/update', + body('jid').isString().notEmpty(), + body('action').isString().isIn(['block', 'unblock']).optional(), + requestValidator, + sessionValidator, + controller.updateBlock +); +router.get('/:jid', sessionValidator, controller.check); +router.get('/:jid/photo', sessionValidator, controller.photo); + +export default router; diff --git a/src/routes/groups.ts b/src/routes/groups.ts index 6e3e5775..8c0f037d 100644 --- a/src/routes/groups.ts +++ b/src/routes/groups.ts @@ -1,23 +1,18 @@ import { Router } from 'express'; -import { list } from '../controllers/group'; -import { find } from '../controllers/message'; -import requestValidator from '../middlewares/request-validator'; import { query } from 'express-validator'; +import * as controller from '../controllers/group'; +import requestValidator from '../middlewares/request-validator'; +import sessionValidator from '../middlewares/session-validator'; const router = Router({ mergeParams: true }); router.get( '/', - query('cursor').isString().optional(), - query('limit').isNumeric().optional(), - requestValidator, - list -); -router.get( - '/:jid', - query('cursor').isString().optional(), + query('cursor').isNumeric().optional(), query('limit').isNumeric().optional(), requestValidator, - find + controller.list ); +router.get('/:jid', sessionValidator, controller.find); +router.get('/:jid/photo', sessionValidator, controller.photo); export default router; diff --git a/src/routes/index.ts b/src/routes/index.ts index 50d34294..08b845fb 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -1,16 +1,15 @@ import { Router } from 'express'; -import sessionValidator from '../middlewares/session-validator'; -import sessionRoutes from './sessions'; import chatRoutes from './chats'; +import contactRoutes from './contacts'; import groupRoutes from './groups'; import messageRoutes from './messages'; -import miscRoutes from './misc'; +import sessionRoutes from './sessions'; const router = Router(); router.use('/sessions', sessionRoutes); -router.use('/:sessionId/chats', sessionValidator, chatRoutes); -router.use('/:sessionId/groups', sessionValidator, groupRoutes); -router.use('/:sessionId/messages', sessionValidator, messageRoutes); -router.use('/:sessionId/misc', sessionValidator, miscRoutes); +router.use('/:sessionId/chats', chatRoutes); +router.use('/:sessionId/contacts', contactRoutes); +router.use('/:sessionId/groups', groupRoutes); +router.use('/:sessionId/messages', messageRoutes); export default router; diff --git a/src/routes/messages.ts b/src/routes/messages.ts index 2083a559..e0565990 100644 --- a/src/routes/messages.ts +++ b/src/routes/messages.ts @@ -2,11 +2,12 @@ import { Router } from 'express'; import { body, query } from 'express-validator'; import * as controller from '../controllers/message'; import requestValidator from '../middlewares/request-validator'; +import sessionValidator from '../middlewares/session-validator'; const router = Router({ mergeParams: true }); router.get( '/', - query('cursor').isString().optional(), + query('cursor').isNumeric().optional(), query('limit').isNumeric().optional(), requestValidator, controller.list @@ -18,8 +19,15 @@ router.post( body('message').isObject().notEmpty(), body('options').isObject().optional(), requestValidator, + sessionValidator, controller.send ); -router.post('/send-bulk', body().isArray().notEmpty(), requestValidator, controller.sendBulk); +router.post( + '/send/bulk', + body().isArray().notEmpty(), + requestValidator, + sessionValidator, + controller.sendBulk +); export default router; diff --git a/src/routes/misc.ts b/src/routes/misc.ts deleted file mode 100644 index 38fb0992..00000000 --- a/src/routes/misc.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Router } from 'express'; -import * as controller from '../controllers/misc'; -import requestValidator from '../middlewares/request-validator'; -import { query } from 'express-validator'; - -const router = Router({ mergeParams: true }); -router.get( - '/check-jid/:jid', - query('type').isString().isIn(['group', 'number']).optional(), - requestValidator, - controller.checkJid -); - -export default router; diff --git a/src/shared.ts b/src/shared.ts index 9e572afb..a5bd2759 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -2,4 +2,4 @@ import { PrismaClient } from '@prisma/client'; import pino from 'pino'; export const prisma = new PrismaClient(); -export const logger = pino({ level: 'debug' }); +export const logger = pino({ level: process.env.LOG_LEVEL || 'debug' }); diff --git a/src/utils.ts b/src/utils.ts new file mode 100644 index 00000000..98eaa4f5 --- /dev/null +++ b/src/utils.ts @@ -0,0 +1,3 @@ +export function delay(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} diff --git a/src/wa.ts b/src/wa.ts index d447e043..f014cfb2 100644 --- a/src/wa.ts +++ b/src/wa.ts @@ -1,12 +1,17 @@ -// import { join } from 'path'; -// import { writeFile } from 'fs/promises'; -import type { ConnectionState, SocketConfig, WASocket } from '@adiwajshing/baileys'; -import makeWASocket, { DisconnectReason, Browsers } from '@adiwajshing/baileys'; -import type { Response } from 'express'; -import { useSession, Store, initStore } from 'baileys-store'; +import type { ConnectionState, proto, SocketConfig, WASocket } from '@adiwajshing/baileys'; +import makeWASocket, { + Browsers, + DisconnectReason, + isJidBroadcast, + makeCacheableSignalKeyStore, +} from '@adiwajshing/baileys'; import type { Boom } from '@hapi/boom'; +import { initStore, Store, useSession } from '@ookamiiixd/baileys-store'; +import type { Response } from 'express'; +// import { writeFile } from 'fs/promises'; +// import { join } from 'path'; import { toDataURL } from 'qrcode'; -import { prisma, logger } from './shared'; +import { logger, prisma } from './shared'; type Session = WASocket & { destroy: () => Promise; @@ -30,11 +35,7 @@ export async function init() { }); for (const { sessionId, data } of sessions) { - try { - await createSession({ sessionId, socketConfig: JSON.parse(data) }); - } catch (e) { - logger.error(e, 'An error occured during session create from init'); - } + createSession({ sessionId, socketConfig: JSON.parse(data) }); } } @@ -61,10 +62,10 @@ export async function createSession(options: createSessionOptions) { const configID = `${SESSION_CONFIG_ID}-${sessionId}`; let connectionState: Partial = { connection: 'close' }; - const destroy = async () => { + const destroy = async (logout = true) => { try { await Promise.all([ - socket.logout(), + logout && socket.logout(), prisma.chat.deleteMany({ where: { sessionId } }), prisma.contact.deleteMany({ where: { sessionId } }), prisma.message.deleteMany({ where: { sessionId } }), @@ -85,15 +86,16 @@ export async function createSession(options: createSessionOptions) { if (code === DisconnectReason.loggedOut || doNotReconnect) { if (res) { - !SSE && res.status(500).json({ error: 'Unable to create session' }); + !SSE && !res.headersSent && res.status(500).json({ error: 'Unable to create session' }); res.end(); } - doNotReconnect && destroy(); - sessions.delete(sessionId); + destroy(doNotReconnect); return; } - !restartRequired && + + if (!restartRequired) { logger.info({ attempts: retries.get(sessionId) ?? 1, sessionId }, 'Reconnecting...'); + } setTimeout(() => createSession(options), restartRequired ? 0 : RECONNECT_INTERVAL); }; @@ -102,7 +104,8 @@ export async function createSession(options: createSessionOptions) { if (res && !res.headersSent) { try { const qr = await toDataURL(connectionState.qr); - return res.status(200).json({ qr }); + res.status(200).json({ qr }); + return; } catch (e) { logger.error(e, 'An error occured during QR generation'); res.status(500).json({ error: 'Unable to generate QR' }); @@ -114,7 +117,7 @@ export async function createSession(options: createSessionOptions) { const handleSSEConnectionUpdate = async () => { let qr: string | undefined = undefined; - if (connectionState.qr) { + if (connectionState.qr?.length) { try { qr = await toDataURL(connectionState.qr); } catch (e) { @@ -123,8 +126,8 @@ export async function createSession(options: createSessionOptions) { } const currentGenerations = SSEQRGenerations.get(sessionId) ?? 0; - if (!res || (qr && currentGenerations >= SSE_MAX_QR_GENERATION)) { - res && res.end(); + if (!res || res.writableEnded || (qr && currentGenerations >= SSE_MAX_QR_GENERATION)) { + res && !res.writableEnded && res.end(); destroy(); return; } @@ -139,21 +142,25 @@ export async function createSession(options: createSessionOptions) { const socket = makeWASocket({ printQRInTerminal: true, browser: Browsers.ubuntu('Chrome'), + generateHighQualityLinkPreview: true, ...socketConfig, - auth: state, + auth: { + creds: state.creds, + keys: makeCacheableSignalKeyStore(state.keys, logger), + }, logger, + shouldIgnoreJid: (jid) => isJidBroadcast(jid), getMessage: async (key) => { const data = await prisma.message.findFirst({ where: { remoteJid: key.remoteJid!, id: key.id!, sessionId }, }); - return (data || undefined) as any; + return (data?.message || undefined) as proto.IMessage | undefined; }, }); const store = new Store(sessionId, socket.ev); sessions.set(sessionId, { ...socket, destroy, store }); - SSE && res?.on('close', () => res.end()); socket.ev.on('creds.update', saveCreds); socket.ev.on('connection.update', (update) => { connectionState = update; @@ -167,6 +174,7 @@ export async function createSession(options: createSessionOptions) { handleConnectionUpdate(); }); + // Debug events // socket.ev.on('messaging-history.set', (data) => dump('messaging-history.set', data)); // socket.ev.on('chats.upsert', (data) => dump('chats.upsert', data)); // socket.ev.on('contacts.update', (data) => dump('contacts.update', data)); @@ -184,7 +192,7 @@ export function getSession(sessionId: string) { } export async function deleteSession(sessionId: string) { - return sessions.get(sessionId)?.destroy(); + sessions.get(sessionId)?.destroy(); } export function sessionExists(sessionId: string) { @@ -199,7 +207,7 @@ export async function jidExists( try { if (type === 'number') { const [result] = await session.onWhatsApp(jid); - return result.exists; + return !!result?.exists; } const groupMeta = await session.groupMetadata(jid); @@ -209,6 +217,7 @@ export async function jidExists( } } +// eslint-disable-next-line @typescript-eslint/no-explicit-any // export async function dump(fileName: string, data: any) { // const path = join(__dirname, '..', 'debug', `${fileName}.json`); // await writeFile(path, JSON.stringify(data, null, 2)); diff --git a/yarn.lock b/yarn.lock index a3a2c9af..87ac099b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,10 @@ # yarn lockfile v1 -"@adiwajshing/baileys@https://github.com/ookamiiixd/Baileys.git#build": +"@adiwajshing/baileys@^5.0.0": version "5.0.0" - resolved "https://github.com/ookamiiixd/Baileys.git#edd03183e389a2ec9fc28323ebdf95fd0daf9f85" + resolved "https://registry.yarnpkg.com/@adiwajshing/baileys/-/baileys-5.0.0.tgz#17a3e48dd67d0f684d09d55fb8fb931345803bb6" + integrity sha512-AeNyYLfw1nhCwc7hDlMajU9Zr5DK4zmEO8rdrmxUR1qUbmhSKOL6IzwZpyvPjsXyHvl+oPMbp5k8+PX2p6RlJg== dependencies: "@hapi/boom" "^9.1.3" axios "^0.24.0" @@ -120,6 +121,13 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@ookamiiixd/baileys-store@^1.0.0-beta.0": + version "1.0.0-beta.0" + resolved "https://registry.yarnpkg.com/@ookamiiixd/baileys-store/-/baileys-store-1.0.0-beta.0.tgz#1a2a5b2e0edd75c00d68a60c72bdf856dbc881e1" + integrity sha512-djOZUZLRtjEcoy8qt/wjuT7WNLh54CfZ0v1/f1g298kRvnDKLxSKuu1I/6hdTntPMyCoir95xQA/HTBbyCXheA== + dependencies: + tiny-invariant "^1.3.1" + "@prisma/client@^4.7.1": version "4.7.1" resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.7.1.tgz#66fe84aca25de17cb3d9141dec003f34714914b9" @@ -485,12 +493,6 @@ axios@^0.24.0: dependencies: follow-redirects "^1.14.4" -"baileys-store@file:external/baileys-store-4.tgz": - version "1.0.0-beta.0" - resolved "file:external/baileys-store-4.tgz#609c4605e90d3d91226ad95c8d62271687ebba3c" - dependencies: - tiny-invariant "^1.3.1" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1898,6 +1900,11 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier-plugin-organize-imports@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.1.tgz#7e0e0a18457e0166e740daaff1aed1c08069fcb9" + integrity sha512-bty7C2Ecard5EOXirtzeCAqj4FU4epeuWrQt/Z+sh8UVEpBlBZ3m3KNPz2kFu7KgRTQx/C9o4/TdquPD1jOqjQ== + prettier@^2.8.0: version "2.8.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc"