Compare commits

...
895 Commits
Author SHA1 Message Date
devlikepro 7eeafd03b3 [core] fix mongodb
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-09-06 09:32:18 +07:00
devlikepro f88480d271 [core] 2024.9.4 2024-09-06 09:24:10 +07:00
devlikepro 9b8cce85bd [core] Fix operations for empty config sessions - local files 2024-09-06 09:23:45 +07:00
devlikepro aa364b57e8 [core] up NOWEB
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-09-04 10:53:01 +07:00
devlikepro ea973d0de4 [core] up NOWEB 2024-09-04 10:36:14 +07:00
devlikepro 1a1b64cbb2 [core] 2024.9.3 2024-09-04 10:14:24 +07:00
devlikepro 09c7e11dbc [core] up NOWEB - end() issues 2024-09-04 10:14:12 +07:00
devlikepro 3450a56756 [core] swagger participants 2024-09-03 19:30:01 +07:00
devlikepro f37f4466ae [core] swagger noweb store 2024-09-03 19:23:37 +07:00
devlikepro 451834b219 [core] swagger caption not required 2024-09-03 19:13:27 +07:00
devlikepro 91924353e2 [core] swagger caption not required 2024-09-03 19:13:21 +07:00
devlikepro 67cf94fc95 [core] swagger version 2024-09-03 18:44:38 +07:00
devlikepro 36a343c09f [core] swagger status 2024-09-03 18:43:52 +07:00
devlikepro 4a37aebbf1 [core] swagger server 2024-09-03 18:41:25 +07:00
devlikepro d5fa9f8d72 [core] swagger presence 2024-09-03 18:40:48 +07:00
devlikepro 08c244334b [core] swagger ping 2024-09-03 18:38:17 +07:00
devlikepro 23dd1c2726 [core] swagger labels 2024-09-03 18:37:59 +07:00
devlikepro 23a309d394 [core] swagger health 2024-09-03 18:37:05 +07:00
devlikepro 3c1bb4e145 [core] swagger groups 2024-09-03 18:36:47 +07:00
devlikepro 87b320a3e3 [core] swagger contacts 2024-09-03 18:29:03 +07:00
devlikepro e4fb9615c7 [core] swagger chatting 2024-09-03 18:26:50 +07:00
devlikepro efad4de0af [core] swagger chats 2024-09-03 18:20:33 +07:00
devlikepro 04f62700a2 [core] swagger auth channels fixes 2024-09-03 18:16:52 +07:00
devlikepro 08415f7931 [core] no code 2024-09-03 18:12:42 +07:00
devlikepro 8bc86af3c8 [core] fix swagger 2024-09-01 19:46:18 +07:00
devlikepro fa2c5e42dc [core] fix swagger 2024-09-01 19:43:23 +07:00
devlikepro e3d3952b81 [core] fix participant cus in reply 2024-08-30 21:32:27 +07:00
devlikepro a9171addde [core] 2024.9.2
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-08-29 09:14:16 +07:00
devlikepro 440ac087ad [core] Cannot read properties of null (reading 'conversation')
fix #521
2024-08-29 09:14:16 +07:00
devlikepro 9dd5eb4eeb [core] dashboard
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-08-27 17:20:57 +07:00
devlikepro 26c2c9abc9 [core] Fix default session 2024-08-27 16:54:25 +07:00
devlikepro 663b07c07e [core] 2024.9.1 2024-08-27 16:44:36 +07:00
devlikepro 5add6a0e73 [core] up dashboard 2024-08-27 16:44:36 +07:00
devlikepro 5c4912feb4 [core] accept localhost url 2024-08-27 16:44:25 +07:00
devlikepro 75e115f390 [core] NOWEB - Handle both format for reply_to - full and only message id 2024-08-27 16:44:24 +07:00
devlikepro 8e443d23f4 [core] Add reply_to for incoming messages
Fixes #506
2024-08-27 16:44:24 +07:00
devlikepro c43c9c319b [core] Comment this 2024-08-27 16:44:24 +07:00
devlikepro e32b128b0f [core] Add reply to for all messages
fixes #503
2024-08-27 16:44:23 +07:00
devlikepro 5287421cea [core] Add location example 2024-08-27 16:43:39 +07:00
devlikepro 9bc95ef350 [core] fix delete message 2024-08-27 16:43:38 +07:00
devlikepro 028de6addb [core] cached eslint 2024-08-27 16:43:36 +07:00
devlikepro a107605937 [core] media error 2024-08-27 16:43:36 +07:00
devlikepro cec5d0147b [core] Move media dto 2024-08-27 16:43:35 +07:00
devlikepro e46b879fc4 [core] Add WHATSAPP_API_SCHEMA 2024-08-27 16:43:34 +07:00
devlikepro b6764fbb29 [core] Add WHATSAPP_API_SCHEMA 2024-08-27 16:43:33 +07:00
devlikepro e8899cc314 [core] Do not validate body on deprecated endpoints 2024-08-27 16:43:32 +07:00
devlikepro 2b2054dd6b [core] WEJBS add more optimization 2024-08-27 16:43:32 +07:00
devlikepro 92705b0ae2 [core] sort args 2024-08-27 16:43:32 +07:00
devlikepro 2ae8a36b7f [core] Up NOWEB 2024-08-27 16:43:32 +07:00
devlikepro 899139dda1 [core] ignore all files requests in http access logs 2024-08-27 16:43:32 +07:00
devlikepro b6b571e84b [core] proxy s3 files 2024-08-27 16:43:29 +07:00
devlikepro 9e098fa997 [core] move "schema" to main config.service.ts 2024-08-27 16:43:28 +07:00
devlikepro 13d00f954f [core] add Storage tag 2024-08-27 16:43:27 +07:00
devlikepro fee75d0c8a [core] WEBJS - optimize media 2024-08-27 16:43:26 +07:00
devlikepro abae3f14cd [core] NOWEB - optimize media 2024-08-27 16:43:25 +07:00
devlikepro b8a98e2c6e [core] WAHA_S3_FORCE_PATH_STYLE to docker-compose.yaml 2024-08-27 16:43:25 +07:00
devlikepro d990572b5b [core] Move files config 2024-08-27 16:43:24 +07:00
devlikepro 2d37d392bc [core] add pre-commit 2024-08-27 16:43:22 +07:00
devlikepro 59015fc3bb [core] Remove ConsoleLogger 2024-08-27 16:43:21 +07:00
devlikepro c3be68f988 [core] init for MediaStorage 2024-08-27 16:43:21 +07:00
devlikepro 8610784958 [core] add minio to docker-compose.yaml 2024-08-27 16:43:19 +07:00
devlikepro f01d71c34a [core] fix mongo service 2024-08-27 16:43:18 +07:00
devlikepro a06501e4b1 [core] Add filename 2024-08-27 16:43:16 +07:00
devlikepro 7c2c30fa1b [core] Add session to media 2024-08-27 16:43:16 +07:00
devlikepro 903dc714f2 [core] add s3 data to media 2024-08-27 16:43:16 +07:00
devlikepro b1bd2c8805 [core] Move GET /sendText down 2024-08-27 16:43:16 +07:00
devlikepro 0e4b4f6d8c [core] Stop process if bootstrap failed 2024-08-27 16:43:13 +07:00
devlikepro d8d0eaf247 [core] use modules for media storages 2024-08-27 16:43:13 +07:00
devlikepro 90096faef3 [core] Refactoring media manager 2024-08-27 16:43:13 +07:00
devlikepro f794f75394 [core] Move media files, rename classes 2024-08-27 16:43:09 +07:00
devlikepro 8de63e486c [core] install s3 2024-08-27 16:43:09 +07:00
devlikepro 4308efca47 [core] ignore .media 2024-08-27 16:43:08 +07:00
devlikepro 877fa292d6 [core] ignore .minio 2024-08-27 16:43:07 +07:00
devlikepro df6ea6f497 [core] add types for withLock 2024-08-27 16:43:06 +07:00
devlikepro 5e9be391e1 [core] Add UV_THREADPOOL_SIZE in docker 2024-08-27 16:43:04 +07:00
devlikepro 49960b8234 [core] update NOWEB 2024-08-27 16:43:03 +07:00
devlikepro d669dbe54b [core] Use new API to create a session 2024-08-27 16:43:03 +07:00
devlikepro 2d1859ac0c [core] Check session "name" length 2024-08-27 16:43:01 +07:00
devlikepro dc864055a3 [core] NOWEB - new newsletter actions 2024-08-27 16:43:00 +07:00
devlikepro bad9537aba [core] NOWEB - use fork-master-channels-2 branch 2024-08-27 16:43:00 +07:00
devlikepro 303b1adc0a [core] add emojies to tags 2024-08-27 16:42:58 +07:00
devlikepro c582904d41 [core] Add doc for /api/server/stop 2024-08-27 16:42:58 +07:00
devlikepro 65eabf6153 [core] Simplify /api/server/status 2024-08-27 16:42:58 +07:00
devlikepro cc9c9e2253 [core] /api/server swagger fix 2024-08-27 16:42:57 +07:00
devlikepro 8747ae9564 [core] logging for websocket 2024-08-27 16:42:56 +07:00
devlikepro 9253e54958 [core] API to restart server (actually it's /stop, but docker will handle restart) 2024-08-27 16:42:55 +07:00
devlikepro fb774f2caa [core] Adjust swagger for sendSeen
fixed #485
2024-08-27 16:42:55 +07:00
devlikepro ba120024a6 [core] Add metadata 2024-08-27 16:42:54 +07:00
devlikepro 1fe0e69914 [core] Make /start idempotent 2024-08-27 16:42:54 +07:00
devlikepro 0fe04e411c [core] 3s 2024-08-27 16:42:54 +07:00
devlikepro 35074f959f [core] check directory exists 2024-08-27 16:42:53 +07:00
devlikepro 0d698fbaf1 [core] fix log for unhandled rejection 2024-08-27 16:42:52 +07:00
devlikepro c9e2a52327 [core] check is running 2024-08-27 16:42:51 +07:00
devlikepro a58e06109b [core] PUT /api/sessions/{session} 2024-08-27 16:42:50 +07:00
devlikepro 65375e4836 [core] wait until, so we don't close a websocket on connecting 2024-08-27 16:42:49 +07:00
devlikepro edc517d33f [core] Add deprecated API to lock as well 2024-08-27 16:42:49 +07:00
devlikepro 354c82dc34 [core] timeout after stop a session 2024-08-27 16:42:48 +07:00
devlikepro fe2acd0665 [core] wait for a browser 2024-08-27 16:42:48 +07:00
devlikepro 19b5b1a90c [core] await for a client 2024-08-27 16:42:47 +07:00
devlikepro e7281e2118 [core] Add /api/sessions/{session}/restart 2024-08-27 16:42:45 +07:00
devlikepro 10f334cf15 [core] Log when session started 2024-08-27 16:42:45 +07:00
devlikepro a057fd6458 [core] Add timestamp run 2024-08-27 16:42:43 +07:00
devlikepro 3bafabeb0a [core] Add withLock for dangerous session operations 2024-08-27 16:42:43 +07:00
devlikepro edefbe17da [core] webjs log error 2024-08-27 16:42:42 +07:00
devlikepro a65041ffcd [core] DELETE /api/sessions/{session}/ 2024-08-27 16:42:42 +07:00
devlikepro 0962c60844 [core] DELETE /api/sessions/{session}/ 2024-08-27 16:42:42 +07:00
devlikepro 3d72eceac0 [core] Add /api/sessions/{session}/stop 2024-08-27 16:42:41 +07:00
devlikepro 57b5deff5b [core] Add /api/sessions/{session}/start 2024-08-27 16:42:40 +07:00
devlikepro 1163dee352 [core] uuid4 2024-08-27 16:42:39 +07:00
devlikepro f7fe562bba [core] Add POST /api/sessions
fixes #435
2024-08-27 16:42:39 +07:00
devlikepro 3394f98a8a [core] rm aka 2024-08-27 16:42:38 +07:00
devlikepro a575b35286 [core] Adjust session param 2024-08-27 16:42:36 +07:00
devlikepro 0f41e79e98 [core] Add sessions.deprecated.dto 2024-08-27 16:42:36 +07:00
devlikepro 24bf22a31f [core] Adjust sessions Swagger 2024-08-27 16:42:35 +07:00
devlikepro 05a1b8802e [core] Add swagger api key (forgot about it) 2024-08-27 16:42:34 +07:00
devlikepro 9c409d9507 [core] Simplify actions for manager 2024-08-27 16:42:34 +07:00
devlikepro 4ee7161c36 [core] Warning if client is not destroyed 2024-08-27 16:42:34 +07:00
devlikepro 4cd9ce0ff7 [core] Wait till the store is closed 2024-08-27 16:42:30 +07:00
devlikepro a2d0dfd8b2 [core] Add Old prefix for old methods 2024-08-27 16:42:30 +07:00
devlikepro d4164fe0ba [core] Add fs-extra 2024-08-27 16:42:29 +07:00
devlikepro 6bbecdd7c0 [core] Keep .waha.session. files in directory and remove it in LocalSessionConfigRepository.ts 2024-08-27 16:42:26 +07:00
devlikepro 0784c3ae05 [core] move getAll sessions to session config repo 2024-08-27 16:42:26 +07:00
devlikepro 679757ccfa [core] check is array object
fixes #470
2024-08-27 16:42:25 +07:00
devlikepro 63a4e693e3 [core] Move helpers to nestjs 2024-08-27 16:42:24 +07:00
devlikepro b21041d9e0 [core] Validate session config
fix #470
2024-08-27 16:42:24 +07:00
devlikepro f014bb4587 [core] Add /api/server/environment
fixes #319
2024-08-27 16:42:24 +07:00
devlikepro 9030f7c4ce [core] 2024.8.5
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-08-23 08:20:27 +07:00
devlikepro bde6c38bd4 [core] up NOWEB 2024-08-23 08:20:03 +07:00
devlikepro 0aefb6c6ec [core] 2024.8.4
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-08-18 16:45:05 +07:00
devlikepro da650ccdef [core] Fix get chats with limit offset properties
fixes #486
2024-08-18 14:21:33 +07:00
devlikepro 92d3e70c1f [core] 2024.8.3
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-08-14 15:49:36 +07:00
devlikepro cb5dfaf066 [core] Remove NEW from dashboard 2024-08-14 15:49:36 +07:00
devlikepro cd75e5e4cc [core] auto reconnection fix - reduce to 28 minutes and check if websocket is not connecting
fixes #483
2024-08-14 15:49:36 +07:00
devlikepro 7bd6ab5ec0 [core] 2024.8.2
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-08-07 17:29:11 +07:00
devlikepro 92f9c89cf1 [core] add WAHA_HTTP_LOG_LEVEL
fixed #466
2024-08-07 17:29:11 +07:00
devlikepro eb2632b23a [core] Fix noweb autorestart timing 2024-08-07 17:29:10 +07:00
devlikepro 8c90bc6808 [core] logger warning 2024-08-07 17:29:10 +07:00
devlikepro 66146532e1 [core] fix WEBJS constant restart 2024-08-07 17:29:10 +07:00
devlikepro dbf3a41c1d [core] Bump WEBJS 2024-08-07 17:29:10 +07:00
devlikepro 942bbf9c6c [core] Add sleep 2024-08-07 17:29:09 +07:00
devlikepro a9d7cc527c [core] Use SingleDelayedJobRunner in WEBJS 2024-08-07 17:29:09 +07:00
devlikepro 2d362722ed [core] Use SingleDelayedJobRunner 2024-08-07 17:29:09 +07:00
devlikepro f81638e625 [core] Use SinglePeriodicJobRunner to rerun session 2024-08-07 17:29:08 +07:00
devlikepro 8ae77df0ff [core] Add SingleDelayedJobRunner 2024-08-07 17:29:08 +07:00
devlikepro 110bd0e5f7 [core] Add SinglePeriodicJobRunner 2024-08-07 17:29:08 +07:00
devlikepro 1b3a366cb7 [core] Add test.* to ignore 2024-08-07 17:29:07 +07:00
devlikepro 3b5d9a145f [core] Rename WebsocketHeartbeatJob.ts 2024-08-07 17:29:07 +07:00
devlikepro fc37fc067a [core] Install zip and unzip in docker image 2024-08-07 17:29:07 +07:00
devlikepro bb18a28484 [core] Add pretty-bytes 2024-08-07 17:29:06 +07:00
devlikepro 86ca08b9aa [core] 2024.8.1
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-08-04 10:22:16 +07:00
devlikepro 9522df7835 [core] Bump dashboard 2024-08-04 10:22:16 +07:00
devlikepro 55e0fd0226 [core] rename .removed to .deleted 2024-08-04 10:22:16 +07:00
devlikepro ff9a986a2e [core] Fix for chat id in labels events 2024-08-04 10:09:44 +07:00
devlikepro df31fe2a8b [core] NOWEB labels 2024-08-04 10:09:32 +07:00
devlikepro 1aeaf996bc [core] make up-engine commands 2024-08-04 10:09:32 +07:00
devlikepro cb0e59e91a [core] Print original error, not pino one 2024-08-04 10:09:32 +07:00
devlikepro 5f02f49e9d [core] Add other /labels endpoints 2024-08-04 10:09:32 +07:00
devlikepro ce9f91fe2c [core] Use /api/{session}/labels 2024-08-04 10:09:32 +07:00
devlikepro ac37745721 [core] Add type 2024-08-04 10:09:31 +07:00
aziz e44aeefda8 [core] chore: Add LabelsController to handle label-related API requests 2024-08-04 10:08:58 +07:00
devlikepro dbff2b659a [core] Fix swagger docs 2024-08-04 10:07:09 +07:00
devlikepro 52ef8e8b76 [core] Add /ping 2024-08-04 10:07:08 +07:00
devlikepro b71567c754 [core] exclude path from api-key
fixes #451
2024-08-04 10:07:08 +07:00
devlikepro d1670c743f [core] Add "sessions.name" index for MongoDB
closes #447
2024-08-04 10:06:43 +07:00
devlikepro 009b38f471 [core] Add call.* events
closes #307
2024-08-04 10:06:43 +07:00
devlikepro 0cf5f30c0d [core] Add timestamp to chat.archive 2024-08-04 10:06:42 +07:00
devlikepro cd4e1f179d [core] Add chat.archive event
closes #434
2024-08-04 10:06:42 +07:00
devlikepro b89f9d6b35 [core] Add chats /archive and /unarchive
fixes #434
2024-08-04 10:06:42 +07:00
devlikepro c3ece96390 [core] Remove html 2024-08-02 09:05:31 +07:00
devlikepro 770739b44e [core] Add pdf example 2024-08-01 13:44:37 +07:00
devlikepro 84984c2cde [core] Up chrome version 2024-07-31 17:10:19 +07:00
devlikepro 86393c8674 [core] 2024.7.7
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-07-24 19:02:03 +03:00
devlikepro d4aed3bc45 [core] pin adm-zip 0.5.10
trying to work on #457
2024-07-24 19:01:44 +03:00
devlikepro 818cd77450 [core] key 2024-07-23 10:37:37 +03:00
devlikepro dc26c70400 [core] waha-run 2024-07-23 10:28:52 +03:00
devlikepro 6547d713ea [core] remove version from docker 2024-07-23 10:03:41 +03:00
devlikepro e8dcb0c242 [core] Add full docker-compose.yaml 2024-07-23 09:46:47 +03:00
devlikepro 100d0be513 [core] 2024.7.6
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-07-18 17:41:38 +03:00
devlikepro fc8db2d977 [core] WEBJS update 2024-07-18 17:41:31 +03:00
devlikepro e5d98d7889 [core] ignore /dashboard logs 2024-07-18 17:40:47 +03:00
devlikepro c7b1a05ed3 [core] Download dashboard 2024-07-15 18:46:43 +03:00
devlikepro 649a90bd5e [core] Keep dashboard 2024-07-15 17:56:04 +03:00
devlikepro 0fc880cf21 [core] Keep dashboard 2024-07-15 17:55:54 +03:00
devlikepro 0d82a4c2c6 [core] Remove dashboard 2024-07-15 17:54:38 +03:00
devlikepro fb3aa59683 [core] 2024.7.5
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-07-15 16:03:08 +03:00
devlikepro b938792ca8 [core] channels 2024-07-15 16:02:51 +03:00
devlikepro bb74946d54 [core] bump 2024.7.4
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-07-08 15:02:36 +03:00
devlikepro 3e78105509 [core] fix profile picture
closes #422
2024-07-08 15:02:36 +03:00
devlikepro c6adf0ac89 [core] console.log for webjs 2024-07-05 14:04:03 +03:00
devlikepro 219b4dca94 [core] pretty logs by default 2024-07-05 13:40:13 +03:00
devlikepro acec292b0f [core] 2024.7.3 2024-07-05 13:30:47 +03:00
devlikepro 7ba86cbd23 [core] logging 2024-07-05 13:30:08 +03:00
devlikepro 3002eaf479 [core] Init Logger in manager explicitly 2024-07-05 13:30:05 +03:00
devlikepro 15422ca504 [core] 2024.7.2
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-07-04 12:11:43 +03:00
devlikepro 7067f00bee [core] Up WEBJS engine 2024-07-04 12:11:43 +03:00
devlikepro a0616eb251 [core] 2024.7.1
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-07-03 10:58:33 +03:00
devlikepro 5d4da0e4c7 [core] No cache while waiting 2.3xx release 2024-07-03 10:56:33 +03:00
devlikepro 546e3475fb [core] mark GET sendText as deprecated
closes #406
2024-07-03 09:15:38 +03:00
devlikepro 56c44ebb58 [core] 2.3000
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-06-27 15:25:33 +07:00
devlikepro bd03bc730c [core] Remove 2.3000 2024-06-27 15:25:00 +07:00
devlikepro e0e1e58104 [core] 2024.6.8 2024-06-27 15:19:41 +07:00
devlikepro 940de662b6 [core] WEBJS 2.3000 2024-06-27 15:19:41 +07:00
devlikepro d151c1192b [core] update webjs 2024-06-27 15:19:41 +07:00
devlikepro 15ae10579c [core] use fork 2024-06-27 15:19:41 +07:00
devlikepro 359696408d [core] 2024.6.7
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-06-25 13:36:40 +07:00
devlikepro d3766368f8 [core] delete status endpoint 2024-06-25 13:36:40 +07:00
devlikepro 73af7451fc [core] Use NOWEB fork with fixes
fixes #390
2024-06-25 11:58:24 +07:00
devlikepro e27fcefe45 [core] fix #373 2024-06-24 19:50:22 +07:00
devlikepro aa5ade5517 [core] Remove link to project
Fix #373
2024-06-24 19:43:20 +07:00
devlikepro 94b6a66ce4 [core] dashboard 2024-06-24 19:16:28 +07:00
devlikepro a51e486fa6 [core] timeout 10ms 2024-06-24 19:10:07 +07:00
devlikepro 2b608daea4 update dashboard 2024-06-24 18:50:38 +07:00
devlikepro aa60c2afd1 [core] warning 2024-06-24 18:49:26 +07:00
devlikepro cff22c74a9 [core] Fix sock auth 2024-06-24 18:43:23 +07:00
devlikepro b77b8ee0da [core] timeout for getEngineInfo, logs 2024-06-24 18:41:42 +07:00
devlikepro 610aef2f14 [core] Make getSessionMeInfo sync 2024-06-24 18:41:42 +07:00
devlikepro e15ca41d6e [core] websockets 2024-06-24 17:38:44 +07:00
devlikepro 60e9e53af4 [core] issue session.status, not session.status.changed 2024-06-24 17:36:20 +07:00
devlikepro 9812000724 [core] debug by default in NOWEB 2024-06-21 12:17:12 +07:00
devlikepro d72401fc39 [core] Add msgRetryCounterCache 2024-06-20 14:21:00 +07:00
devlikepro 822eba7982 [core] keepAliveIntervalMs back to 30s 2024-06-19 16:20:01 +07:00
devlikepro 9327564e6e [core] set defaultQueryTimeoutMs to 120s 2024-06-19 16:20:01 +07:00
devlikepro 6e9fe42a83 [core] bump version 2024-06-19 12:55:14 +07:00
devlikepro a32cf28ccb [core] fix forever "typing" status
fix #379
2024-06-19 12:54:43 +07:00
devlikepro 55b101802a [core] no more ssh 2024-06-19 12:04:11 +07:00
devlikepro ecda8b4394 [core] set "trace" by default for noweb 2024-06-19 12:04:09 +07:00
devlikepro 6d4f8d4c26 [core] Add logger to NOWEB engine 2024-06-19 11:30:41 +07:00
devlikepro 26aa53f3fa Use webhook.site 2024-06-18 11:18:39 +07:00
devlikepro 2f7a94ea3f [core] dashboard update
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-06-18 11:02:16 +07:00
devlikepro 2b622b4ee9 [core] dashboard 2024-06-18 10:55:41 +07:00
devlikepro 3e280f1e08 [core] Bump version to 2024.6.5 2024-06-18 10:51:02 +07:00
devlikepro c54d52ad45 [core] built in ssl 2024-06-18 10:50:44 +07:00
devlikepro e54d3ea96b [core] fix for-swagger 2024-06-17 10:56:04 +07:00
devlikepro e07cb8257d [core] Bump to 2024.6.4
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-06-17 10:37:11 +07:00
devlikepro 74b6a8fdba [core] add chats limit and offset 2024-06-17 10:36:51 +07:00
devlikepro e48c76397c [core] downgrade better-sqlite3
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-06-14 13:52:39 +07:00
devlikepro 64aff5d041 [core] fix Dockerfile 2024-06-13 16:06:00 +07:00
devlikepro 87b24e35d0 [core] update dashboard 2024-06-13 15:58:37 +07:00
devlikepro fb48c81207 [core] rm dashboard 2024-06-13 15:57:36 +07:00
devlikepro cd9f302f8b [core] 2024.6.3 2024-06-13 15:46:43 +07:00
devlikepro df3bc97988 [core] noweb store 2024-06-13 15:46:43 +07:00
devlikepro 94191a2902 [core] noweb preview video 2024-06-13 15:46:43 +07:00
devlikepro a0dd540075 [core] webjs fix download media 2024-06-13 15:46:43 +07:00
devlikepro 5684665123 [core] Add getFilePath to LocalStore 2024-06-13 15:46:43 +07:00
devlikepro 5db407d750 [core] Fix docker pulls number 2024-06-08 17:02:30 +07:00
devlikepro 27a86f0dc1 [core] waha
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-06-04 12:55:58 +07:00
devlikepro 767ea23173 [core] bump 2024.6.2 2024-06-04 12:54:24 +07:00
devlikepro 85707508ed [core] waha 2024-06-04 12:54:03 +07:00
devlikepro e8bc59ff9e [core] Bump to 2024.6.1 2024-06-02 10:25:03 +07:00
devlikepro 7f9e622a64 [core] push version tags 2024-06-02 10:06:49 +07:00
devlikepro b22e37596b Revert "[core] Don't push each version"
This reverts commit 0e295bebde.
2024-06-02 10:04:12 +07:00
devlikepro 642e90b1c8 [core] poll response fix
fix #356
2024-06-02 10:01:40 +07:00
devlikepro 8402ab896a [core] Fix ack for status@broadcast
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
fix #329
2024-06-01 16:16:19 +07:00
devlikepro d6dc7edf66 [core] WEBJS enable io from chrome if debug enabled 2024-05-31 18:16:34 +07:00
devlikepro 8f6dbf70f7 [core] WEBJS auto restart on FAILED
fix #355
2024-05-31 18:16:34 +07:00
devlikepro bd14d9a71e [core] 2024.5.14 2024-05-31 13:32:57 +07:00
devlikepro 61a0a38dd2 [core] Restart NOWEB every 30 minutes 2024-05-31 12:50:38 +07:00
devlikepro 102f438a99 [core] NOWEB fix for creds.json
fix #347
2024-05-31 12:18:11 +07:00
devlikepro 586a2d1c79 [core] rm import 2024-05-31 11:54:49 +07:00
devlikepro 5b04c39107 [core] move get default engine to EngineConfigService.ts 2024-05-31 11:54:49 +07:00
devlikepro d96e91ea70 [core] Better logging 2024-05-31 11:54:49 +07:00
devlikepro 68ac209aae [core] 2024.5.13
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-05-30 13:21:34 +07:00
devlikepro 90b961f900 [core] Disable QR in console
Fix #351
2024-05-30 13:21:33 +07:00
devlikepro 9945fe0fd8 [core] Remove unused vars 2024-05-30 13:21:33 +07:00
devlikepro 1346ce0472 [core] Add tests jest
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-05-27 18:45:51 +07:00
devlikepro e914aaa961 [core] log 2024-05-27 17:19:44 +07:00
devlikepro 70e17250e8 [core] 2024.5.12 2024-05-27 17:19:44 +07:00
devlikepro 8c134904ba [core] log unhandled rejections 2024-05-27 17:19:44 +07:00
devlikepro bfa4b14c13 logo.png 2024-05-27 10:12:17 +07:00
devlikepro 36c7820d78 logo.svg 2024-05-27 10:08:38 +07:00
devlikepro 92e6530d3e [docs] rm docs 2024-05-27 10:08:29 +07:00
devlikepro 9e47af301e [docs] Reformat changelog.md 2024-05-24 14:52:19 +07:00
devlikepro b59eb57dce [core] fix dockerfile 2024-05-24 14:43:26 +07:00
devlikepro 158a557867 [core] 2024.5.11 2024-05-24 14:33:00 +07:00
devlikepro 5a95e9b1ee [core] Pin node 20.12.2 2024-05-24 14:31:30 +07:00
devlikepro 98d3ca31d7 [core] Set 16GB node memory 2024-05-24 14:29:52 +07:00
devlikepro 52bd5e7ae6 [docs] Add caption 2024-05-24 10:46:56 +07:00
devlikepro b883f0c9ef [docs] caption fix 2024-05-24 10:41:14 +07:00
devlikepro e61b808c3c [core] 2024.5.10 2024-05-24 10:41:14 +07:00
devlikepro 7bc049de68 [core] Detect document with caption, add caption
fix #345
2024-05-24 10:41:14 +07:00
devlikepro de3f859d98 [docs] Fix menu, add contact 2024-05-23 16:40:59 +07:00
devlikepro ea06277649 [docs] Sort it by weight 2024-05-22 18:42:05 +07:00
devlikepro 9a6bd67e43 [docs] Sort it by weight 2024-05-22 18:22:01 +07:00
devlikepro 01baee5cf2 [docs] Sort it by weight 2024-05-22 18:18:47 +07:00
devlikepro bc855bc089 [docs] Hide the list of docs 2024-05-22 18:07:25 +07:00
devlikepro 4bf1210651 [docs] Hide the list of docs 2024-05-22 18:06:24 +07:00
devlikepro a4f4398765 [docs] wide cards 2024-05-22 18:00:43 +07:00
devlikepro 0f343841a6 [core] bump to 2024.5.9 2024-05-22 16:00:20 +07:00
devlikepro 41d26799b2 [core] videofix 2024-05-22 16:00:20 +07:00
devlikepro a807d7647b [core] Ignore plus engine 2024-05-22 16:00:19 +07:00
devlikepro 7bcd2a6206 [core] WEBJS videofix 2024-05-22 16:00:19 +07:00
devlikepro a3c2c1bb22 [core] run :chrome in plus 2024-05-22 16:00:19 +07:00
devlikepro 355e47ec11 [core] pin exact Chrome version 2024-05-22 16:00:19 +07:00
devlikepro a01bee8330 [core] NOWEB update 2024-05-21 10:42:36 +07:00
devlikepro c4c020aaa6 [core] status show on mobile 2024-05-21 10:39:59 +07:00
devlikepro 35e92bebbd [core] Bump version to 2024.5.8
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-05-21 08:46:58 +07:00
devlikepro 2bd3e9f556 [core] Update NOWEB engine 2024-05-21 08:46:49 +07:00
devlikepro 60705d1558 [core] Crypto offer 2024-05-20 19:35:10 +07:00
devlikepro 2cbd08c470 [core] Crypto offer 2024-05-20 19:33:44 +07:00
devlikepro 51a501611d [docs] Compare 2024-05-20 15:32:37 +07:00
devlikepro 46bcfb5695 [docs] Live Helper Chat 2024-05-20 14:12:13 +07:00
devlikepro e44bd55df2 [core] geonode 2024-05-18 15:19:32 +07:00
devlikepro efaa090053 [core] geonode 2024-05-18 15:14:15 +07:00
devlikepro 8be13fbc5c [core] Proxy 2024-05-18 14:37:10 +07:00
devlikepro e0a1be1417 [core] Bump to 2024.5.7 2024-05-14 10:13:37 +07:00
devlikepro 7f841f6862 [core] Revert back video fix 2024-05-14 10:13:35 +07:00
devlikepro d1804996d7 [core] Fix send video
Fix #321 #328
2024-05-12 10:47:09 +07:00
devlikepro 34084a7ee8 [docs] Fix pricing 2024-05-12 10:11:00 +07:00
devlikepro fedde8bb87 [docs] 💅 2024-05-10 19:44:11 +07:00
devlikepro 7439e80eec [docs] note 2024-05-10 19:29:34 +07:00
devlikepro e388f361af [docs] note 2024-05-10 19:27:46 +07:00
devlikepro 2a9ed6bac7 [docs] WAHA 2024-05-10 19:25:59 +07:00
devlikepro 5936a86159 [core] Rm line 2024-05-10 18:50:12 +07:00
devlikepro 3b22911fb1 [core] Update NOWEB engine 2024-05-10 18:50:12 +07:00
devlikepro 0dd3762685 [core] Bump version to 2024.5.5 2024-05-10 18:50:12 +07:00
devlikepro fd9106e97e [core] /pricing 2024-05-10 18:50:06 +07:00
devlikepro 5a3d709e4f [core] up year 2024-05-10 18:50:06 +07:00
allburov c0c357dc39 [docs] Adjust header 2024-05-08 18:06:57 +07:00
allburov e76bec3d4f [docs] Fix patreon link 2024-05-08 15:03:18 +07:00
allburov 384b3974f7 [docs] Pricing 2024-05-08 15:02:39 +07:00
allburov 3c37044cd8 [docs] index 2024-05-08 15:00:32 +07:00
allburov 541112a9eb [docs] index 2024-05-08 14:54:55 +07:00
allburov 59d7613485 [docs] badges 2024-05-08 14:52:35 +07:00
allburov d1a579372d [docs] reorder text
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-05-08 11:20:57 +07:00
allburov 16cd247db8 [docs] Up swagger 2024-05-08 11:13:04 +07:00
allburov 872d6d9880 [docs] white label 2024-05-08 11:12:35 +07:00
allburov 79fe322d69 [docs] dashboard 2024-05-08 10:45:11 +07:00
allburov fe6f1cb547 [docs] dashboard video 2024-05-08 10:35:18 +07:00
allburov 8d7fcd0b84 [docs] dashboard video 2024-05-08 10:32:40 +07:00
allburov 46b0c3cee2 [docs] related links 2024-05-08 10:31:58 +07:00
allburov 1ad9c3017c [core] Swagger video 2024-05-08 10:20:46 +07:00
allburov 5d320fa22f [core] /videos 2024-05-08 10:13:40 +07:00
allburov 5e1d9b6463 [core] Add swagger page 2024-05-08 10:01:11 +07:00
allburov 175dfde0b8 [core] Adjust import 2024-05-07 19:20:58 +07:00
allburov 87717ae214 [core] Refactor SwaggerConfiguratorCore.ts 2024-05-07 19:18:47 +07:00
allburov 111c8f3160 [core] Adjust SwaggerConfiguratorCore.ts 2024-05-07 19:18:47 +07:00
allburov 6c756352cf [core] Add Dashboard config 2024-05-07 18:37:43 +07:00
allburov 97a5d11c1f [core] Add SwaggerConfigServiceCore 2024-05-07 18:36:54 +07:00
allburov 44415d824e [core] Detect boolean type 2024-05-07 18:34:36 +07:00
allburov 286e8f3afe [core] REST API 2024-05-07 17:04:46 +07:00
allburov 4c2e3db2d5 [core] No WAHA in text 2024-05-07 16:59:42 +07:00
allburov 6faf699fcc [docs] Changelog 2024-05-07 12:36:56 +07:00
allburov 80b765e56a [core] Bump version to 2024.5.3 2024-05-07 12:34:17 +07:00
allburov 3f9ebe5c8c [core] Use local cache, fix 2.2412.54 version
fix #316
2024-05-07 12:30:24 +07:00
allburov 481371fd03 [docs] Add Dashboard Overview 2024-05-06 12:45:03 +07:00
allburov 36c2165fc3 [docs] Add docs link 2024-05-06 11:31:55 +07:00
allburov 36402626e0 [docs] Add #315 to changelog 2024-05-06 10:55:13 +07:00
allburov 40c39e61e1 [docs] disclaimer 2024-05-06 10:51:03 +07:00
allburov 4e1b13e776 [docs] Feature first 2024-05-06 10:48:33 +07:00
allburov 7f355ff43a [docs] default password in docker-compose 2024-05-06 09:54:48 +07:00
allburov 22df449013 [docs] speacker 2024-05-04 12:34:17 +07:00
allburov 68303f5124 [docs] Add note about QR event
Fix #314
2024-05-04 12:32:54 +07:00
allburov 33babfef6b [docs] no soon 2024-05-04 12:25:52 +07:00
allburov 910a9185c7 [core] Bump to 2024.5.3 2024-05-04 12:24:58 +07:00
allburov f5bd74dfa1 [core] Prevent starting two sessions with the same name #314 2024-05-04 12:24:58 +07:00
allburov b982640c85 [docs] Dashboard changelog 2024-05-04 10:50:19 +07:00
allburov 245bcc46ed [docs] waha hub 2024-05-04 09:32:52 +07:00
allburov 08a346bfa1 [docs] index 2024-05-04 09:30:51 +07:00
allburov 0cb4dd6d63 [docs] Edit page 2024-05-04 09:25:10 +07:00
allburov 1a7a78cc51 [docs] dashboard 2024-05-04 09:22:59 +07:00
allburov 9b69875b78 [docs] dashboard 2024-05-04 09:22:33 +07:00
allburov 999ae4782b [docs] index 2024-05-04 09:21:07 +07:00
allburov 3c61ca8c94 [docs] No dark mode 2024-05-04 09:21:02 +07:00
allburov 0790e0a0ef [docs] Dashboard 2024-05-04 09:19:01 +07:00
allburov 0a2d77b699 [docs] Fix weigth 2024-05-04 09:17:17 +07:00
allburov 051ada3f21 [docs] index open in new tab 2024-05-03 18:19:17 +07:00
allburov faf8d053dd [docs] Index
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-05-03 18:00:12 +07:00
allburov 5ece56f9b0 [docs] Add WAHA Dashboard, Hub 2024-05-03 17:44:37 +07:00
allburov c4d9474f34 [docs] update swagger 2024-05-03 16:37:55 +07:00
allburov 3b8481ccac [docs] Dashboard stub 2024-05-03 16:33:41 +07:00
allburov a31d0215f5 [core] Correct plus docker-compose.yaml 2024-05-03 16:31:25 +07:00
allburov f6cce68553 [core] Bump version 2024.5.2 2024-05-03 16:31:25 +07:00
allburov 636b100b9f [core] Bump version to 2024.5.1 2024-05-03 11:56:29 +07:00
allburov 7a3574eaa0 [core] Update WEBJS version 2024-05-03 11:56:29 +07:00
allburov 9cd6176e60 [core] Change default password to waha/waha 2024-05-03 11:56:29 +07:00
allburov f2641029cb [core] nest cli 2024-05-02 14:39:18 +07:00
allburov 6350e191f8 [core] Ignore dashboard 2024-05-02 14:38:54 +07:00
allburov c570ba3488 [core] Correct dashboard 2024-05-02 12:05:22 +07:00
allburov b64abd24c8 [core] Configure dashboard right 2024-05-02 12:03:46 +07:00
allburov 13c9ab3962 [core] Adjust dashboard stub 2024-05-02 12:03:46 +07:00
allburov b9f1c6ee79 [core] Adjust swagger 2024-05-02 12:03:46 +07:00
allburov 938170a957 [core] Add Dashboard 2024-05-02 12:03:46 +07:00
allburov ca0a28c0cf [core] Logout if logout is true 2024-05-02 09:42:25 +07:00
allburov c3967173a1 [core] Enable cors 2024-04-28 17:35:52 +07:00
allburov 9ebbd9a1fd [docs] no MOBILE yet 2024-04-23 11:03:39 +07:00
allburov 16e343ca19 [docs] Labels 2024-04-21 18:54:55 +07:00
allburov 1de9132f16 [core] Remove ignore 2024-04-21 18:49:53 +07:00
allburov dad54a8e47 [core] Pin WEBJS version to 2.2412.54 2024-04-21 17:30:16 +07:00
allburov 7d73b96b78 [core] Fix send voice 2024-04-21 17:08:08 +07:00
allburov 1260fe34aa [core] Bump version to 2024.4.4 2024-04-21 16:35:43 +07:00
allburov 3b4678e059 [core] Add GET /api/sessions/{session} endpoint 2024-04-21 16:35:28 +07:00
allburov ff8294b5db [core] Add patron portal link 2024-04-21 16:14:54 +07:00
allburov 7e94e19f5d [core] NOWEB - add GET /api/contacts/profile-picture 2024-04-21 16:14:54 +07:00
allburov ae18e2575a [docs] Add tier 2024-04-21 16:01:35 +07:00
allburov a5c493a29c [docs] Add tier 2024-04-17 13:45:14 +07:00
allburov 8ee89fe51c [docs] pro tier 2024-04-15 09:21:46 +07:00
allburov b4909847bf [docs] link 2024-04-15 09:16:32 +07:00
allburov 568be88127 [docs] tiers
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-04-14 19:15:59 +07:00
allburov 67144c1d08 [docs] 2024-04-14 18:56:20 +07:00
allburov 285c78d41a [docs] no row 2024-04-14 18:50:26 +07:00
allburov 7d15735444 [docs] discord 2024-04-14 18:18:05 +07:00
allburov 4191749564 [docs] Crypto 2024-04-12 21:34:44 +07:00
allburov 9e68dbbf09 [docs] No advanced 2024-04-12 13:36:53 +07:00
allburov f02ad5b051 [docs] Add http requests in index 2024-04-09 17:30:55 +07:00
allburov 08e20a25ed [core] Bump version to 2024.4.3 2024-04-09 11:45:44 +07:00
allburov ee0468038d [core] Update puppetter 2024-04-09 11:45:44 +07:00
allburov 04afc297d9 [core] Update WEBJS 2024-04-09 11:45:43 +07:00
allburov ed06ca76e0 [core] Bump to 2024.4.2 2024-04-08 18:17:04 +07:00
allburov a68510a814 [core] Fix NOWEB india 2024-04-08 18:16:35 +07:00
allburov 4040efab01 [docs] Alway show sidebar 2024-04-06 13:14:59 +07:00
allburov f08cc1061e [docs] Fix favicon 2024-04-06 13:01:40 +07:00
allburov 3b5b11891e [docs] Fix logo 2024-04-06 12:52:22 +07:00
allburov 72427c9309 [docs] Fix logo 2024-04-06 12:51:29 +07:00
allburov befe2068fd [docs] Fix send file example 2024-04-05 13:54:24 +07:00
allburov c7a3ef32fa [core] Add mongodb example 2024-04-02 17:42:30 +07:00
allburov 51d394f4ef [core] Bump version to 2024.4.1 2024-04-02 14:22:03 +07:00
allburov 8db341dd70 [core] Fix NOWEB engine restart 2024-04-02 14:22:02 +07:00
allburov 5cd7fec3ab [docs] Add what can it do 2024-04-01 16:06:08 +07:00
allburov f672ecbb45 [docs] try it now 2024-04-01 13:33:20 +07:00
allburov 9a12b2c9b6 [docs] Add prices at the top 2024-04-01 10:12:27 +07:00
allburov c31407fd87 [docs] add caption 2024-04-01 10:03:25 +07:00
allburov 646c81f136 [docs] message.reactions 2024-04-01 09:44:01 +07:00
allburov aca6232d2a [docs] changelog 2024-04-01 09:37:14 +07:00
allburov c61da10523 [core] Pin Web version
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-04-01 09:31:08 +07:00
allburov 1f53d65ac2 [docs] fix card in article 2024-03-31 18:43:31 +07:00
allburov 844ab1287e [docs] fix links 2024-03-31 18:39:39 +07:00
allburov d6d318b23b [docs] Are you a visual 2024-03-31 16:04:26 +07:00
allburov 7504ffd934 [docs] quick start second 2024-03-31 16:00:06 +07:00
allburov e8078908c9 [docs] http api 2024-03-31 15:56:37 +07:00
allburov 431848280f [docs] Fix debug 2024-03-29 16:06:31 +07:00
allburov 2e0c575512 [core] Bump version to 2024.3.14 2024-03-29 15:57:15 +07:00
allburov ebf0d99417 [core] Add "debug" flag to session config 2024-03-29 15:56:50 +07:00
allburov 423d893fee [docs] No hover 2024-03-29 14:37:21 +07:00
allburov 56fe0d3b04 [docs] Limit 2024-03-29 14:22:36 +07:00
allburov 7172d9d203 [docs] Green icons 2024-03-29 14:21:20 +07:00
allburov bd770a6902 [docs] Fix index 2024-03-29 14:06:56 +07:00
allburov 628508faed [docs] ktor 2024-03-29 13:55:27 +07:00
allburov 826634f061 [docs] Add js, php for future 2024-03-29 13:37:23 +07:00
allburov c7ed959a71 [docs] Add kotlin 2024-03-29 13:32:15 +07:00
allburov aea6befc1e [docs] Add NOWEB feedback 2024-03-29 10:08:30 +07:00
allburov 7bb3484788 [docs] Add python example 2024-03-28 08:51:38 +07:00
allburov 4eafc67a7e [core] Bump 2024.3.13 2024-03-27 17:09:29 +07:00
allburov b5197b6f20 [core] log page logs 2024-03-27 17:09:29 +07:00
allburov d306304195 [core] One line log 2024-03-27 17:09:29 +07:00
allburov 35f47dae4f [docs] Boosty instead of Patreon 2024-03-27 13:52:00 +07:00
allburov f1be4810d5 [core] Bump to 2024.3.12 2024-03-27 13:27:39 +07:00
allburov d4f9406869 [core] Update NOWEB 2024-03-27 13:27:36 +07:00
allburov a41b81d724 [docs] Add funding 2024-03-26 16:54:09 +07:00
allburov da56b86102 [docs] Boosty first 2024-03-26 16:51:58 +07:00
allburov f12d2c9be0 [docs] Add gtag 2024-03-25 11:54:21 +07:00
allburov 322b9b4c25 [docs] Correct changelog 2024-03-24 20:52:26 +07:00
allburov fb7fe410f9 [core] Bump to 2024.3.11 2024-03-24 20:43:27 +07:00
allburov ee392a079c [core] Update swagger 2024-03-24 20:43:27 +07:00
allburov 0502579d50 [core] Edit and delete messages 2024-03-24 20:43:27 +07:00
allburov f10f3175d9 [core] add new swagger 2024-03-24 18:00:36 +07:00
allburov f155af99f1 [core] Bump 2024.3.10 2024-03-24 17:58:32 +07:00
allburov 0fbf3575a6 [core] NOWEB sendVCard 2024-03-24 17:58:30 +07:00
allburov f6b9b5f54e [core] Bump to 2024.3.9 2024-03-22 18:56:54 +07:00
allburov 2dadd9d8c9 [docs] Add caption to sendfile 2024-03-22 18:56:40 +07:00
allburov 5786b3cdfe [docs] Adjust cards style 2024-03-22 10:18:26 +07:00
allburov 769fc30c0c [docs] Adjust cards style 2024-03-22 10:09:21 +07:00
allburov fb2dad9c6f [core] bump version to 2024.3.8 2024-03-22 09:47:04 +07:00
allburov c43d308a2d [core] Add star unstar
Fix #240
2024-03-22 09:46:25 +07:00
allburov 742a12ce6a [core] Fix reactions 2024-03-22 09:25:23 +07:00
allburov d953f27865 [core] Update openapi.json 2024-03-20 12:18:53 +07:00
allburov 4719cded95 [core] get engine info 2024-03-19 14:16:45 +07:00
allburov 9d489bdb69 [core] add Patron Portal 2024-03-18 18:37:20 +07:00
allburov 537c307550 [core] No mobile engine anymore 2024-03-18 18:27:11 +07:00
allburov d5575e0323 [core] Fix index 2024-03-18 18:22:38 +07:00
allburov 592962bbc8 [core] Use vars.DOCKER_IMAGE 2024-03-18 15:25:39 +07:00
allburov 7a371c86dc [core] Images 2024-03-18 15:19:20 +07:00
allburov 0e295bebde [core] Don't push each version 2024-03-18 15:06:19 +07:00
allburov 8d98759be6 Revert "[core] Update WEBJS with 2.2300 fix"
This reverts commit 924317b01b.
2024-03-18 14:56:07 +07:00
allburov 924317b01b [core] Update WEBJS with 2.2300 fix 2024-03-18 14:55:50 +07:00
allburov a08a601dc3 [core] manual push 2024-03-18 14:54:22 +07:00
allburov e652c15d6c [core] Add manual jobs 2024-03-18 14:45:57 +07:00
allburov 4534eb60de [core] Add manual jobs 2024-03-18 14:44:43 +07:00
allburov 54c6c0c24c [core] Read more about Security 2024-03-18 14:21:49 +07:00
allburov 393694ae96 [core] Rm even 2024-03-18 14:17:57 +07:00
allburov 818bb730e4 Revert "[core] fix CI"
This reverts commit 61bd35a192.
2024-03-18 14:05:54 +07:00
allburov 61bd35a192 [core] fix CI 2024-03-18 14:02:59 +07:00
allburov 81f9df000a [core] fix CI
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-03-18 13:48:46 +07:00
allburov 0dcb31c108 [core] Bump to 2024.3.6 2024-03-18 13:46:32 +07:00
allburov cd4140fda9 [core] Add exact version (tag) 2024-03-18 13:46:30 +07:00
allburov 117cc25cdb [core] Bump version to 2024.3.5 2024-03-17 19:17:32 +07:00
allburov 832ad26151 [core] Add /messages-admin-only
fix #274
2024-03-17 19:17:14 +07:00
allburov 5a344cd8ad [core] Bump version to 2024.3.4 2024-03-15 17:45:23 +07:00
allburov 0b0a67cdad [core] Update WEBJS engine 2024-03-15 17:45:21 +07:00
allburov a326a240f0 [core] Bump version 2024.3.3 2024-03-15 15:15:13 +07:00
allburov dfdb033769 [core] Add message.reaction webhook 2024-03-15 15:14:48 +07:00
allburov a31af45d97 [core] Change code on main 2024-03-13 17:49:52 +07:00
allburov cae955c483 [core] Bump to 2024.3.2
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-03-07 19:28:12 +07:00
allburov 0bfff5259e [core] Use ubuntu in NOWEB 2024-03-07 19:27:45 +07:00
allburov 0fa83e603b [core] No more MOBILE engine 2024-03-04 23:14:28 +07:00
allburov 906b03804f [core] Update WEBJS
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-03-02 18:08:52 +07:00
allburov 1ed7a61bea [core] Use fork for WEBJS in Makefile 2024-03-02 18:08:31 +07:00
allburov ad6ae7ab05 [core] Bump version to 2024.3.1 2024-03-02 18:02:30 +07:00
allburov 5e2de1d47d [core] Bump to 2024.2.4
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-02-25 17:57:29 +07:00
allburov 591ca51104 [core] add GET /health 2024-02-25 17:56:58 +07:00
allburov b210841158 [core] Fix documentation for message.revoked 2024-02-21 10:31:54 +07:00
allburov a223a3985b [core] Self-hosted solution 2024-02-19 14:52:23 +07:00
allburov 8baa6a73cd [core] Self-hosted 2024-02-19 14:52:07 +07:00
allburov 508efac2ea [core] Add links on index 2024-02-19 14:51:59 +07:00
allburov b6eed9e228 [core] Rewrite tiers 2024-02-19 14:46:17 +07:00
allburov b62cad07f0 [core] Icons on main page 2024-02-19 14:28:18 +07:00
allburov 6d552d27ac [core] Bold 2024-02-19 14:11:24 +07:00
allburov 39d0f2a060 [core] Fix doc about WEBJS
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
2024-02-18 20:22:45 +07:00
allburov 0b03abee91 [core] Fix delete file when it doesn't exist anymore 2024-02-18 20:22:41 +07:00
allburov b4fb69d0ee [core] Use extends instead of implements for LocalStoreCore.ts 2024-02-18 19:55:54 +07:00
allburov 5b9ed029b3 [core] NOWEB - fix stop session 2024-02-18 19:42:32 +07:00
allburov c29397371b [core] Use network host in mongo example 2024-02-18 19:37:45 +07:00
allburov fe47e27788 [core] Fix yarn file 2024-02-18 19:37:33 +07:00
allburov a14c702c79 [core] Bump to 2024.2.3 2024-02-18 19:25:12 +07:00
allburov fe4246036d [core] Support MongoDB 2024-02-18 19:21:19 +07:00
allburov 074063b814 [core] Fix set presence documentation 2024-02-12 11:34:15 +07:00
allburov 0271a8b721 [core] Fix changelog version
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2024-02-10 15:09:16 +07:00
allburov 08617383be [core] Listen for page close event
fix #262
2024-02-10 15:08:03 +07:00
allburov 3840459b0a [core] add noweb engine performance 2024-02-09 15:11:36 +07:00
Sunil Sankar aee7ac28bc [core] Fix the image name (#260)
The image name is wrongly mentioned
2024-02-05 14:02:21 +07:00
allburov 9e6cd39b2d [core] fix types
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
2024-02-01 16:23:42 +03:00
allburov 8898429046 [core] Update engines 2024-02-01 16:23:36 +03:00
allburov a74def6dbd [core] Add Patron Portal link 2024-02-01 16:15:42 +03:00
allburov 9f783cd35e [core] Add Patron Portal link 2024-02-01 16:14:04 +03:00
allburov 9d2f061d81 [core] Pass other parameters to requestCode, like locale 2024-01-27 15:11:16 +07:00
allburov a6045b2d54 [core] Add badge example 2024-01-27 13:58:50 +07:00
allburov 6142b2b564 [core] Link fixes 2024-01-27 13:56:30 +07:00
allburov ed53ccb919 [core] One more PRO tier perk 2024-01-27 13:54:38 +07:00
allburov 1ab45c6cfd [core] Add MOBILE engine note 2024-01-27 13:40:10 +07:00
allburov c2fdb090e1 [core] build via ssh 2024-01-27 13:40:10 +07:00
allburov a10b47eb7e [core] Dockerfile - mount ssh in case of private repositories 2024-01-27 13:40:10 +07:00
allburov 7b234e2e37 [core] make build-ssh 2024-01-27 13:40:10 +07:00
allburov 90d45a4698 [core] Add captcha API endpoints 2024-01-27 13:40:10 +07:00
allburov 5e40b70e19 [core] NOWEB - Listen connection events from the start 2024-01-27 13:40:10 +07:00
allburov a27d0c3efb [core] Add MOBILE engine 2024-01-27 13:40:10 +07:00
allburov 46ed506b35 [core] start stop typing in the example 2024-01-27 13:01:52 +07:00
allburov 0ad813a1fe [core] Add links 2024-01-08 18:58:44 +07:00
allburov e57e42f47a [core] Add tiers 2024-01-08 18:53:31 +07:00
Alex cc58157d37 [core] Add badges for patreons 2024-01-08 11:55:34 +07:00
Alex 9b5bb0a339 [core] Create gh-team-labels.yml 2024-01-07 16:34:03 +07:00
Alex 84ebbea287 Delete .github/.github/gh-team-labels.yml 2024-01-07 16:33:44 +07:00
Alex 1c2021f54b Update gh-team-labels.yml 2024-01-07 16:33:09 +07:00
Alex 98a7f00d7d [core] Update gh-team-labels.yml 2024-01-07 16:29:14 +07:00
Alex 60d97d0e67 [core] Create gh-team-labels.yml 2024-01-07 16:28:17 +07:00
allburov 03f4a07cbe [core] Update NOWEB 2023-12-26 18:33:53 +07:00
allburov 3fbe526793 [core] log phone 2023-12-26 17:54:34 +07:00
allburov a892f03382 [core] Bump version to 2023.12.3 2023-12-26 17:20:12 +07:00
allburov 8db69f6e69 [core] Update WEBJS 2023-12-26 17:20:00 +07:00
allburov f9037ff9fc [core] Add github link to authroize-code 2023-12-26 17:10:37 +07:00
allburov 366ddffa2b [core] Add more about How to not get Banned 2023-12-22 16:05:25 +07:00
allburov b8468588de [core] Add note about wa.me link 2023-12-18 21:12:43 +07:00
allburov 62dd6f7f4a [core] No --rm 2023-12-11 13:26:33 +07:00
allburov 858202f1bb [core] Add chatId to changelog 2023-12-02 16:36:20 +07:00
allburov db7900dc26 [core] Bump version to 2023.12.2 2023-12-02 16:34:20 +07:00
allburov aa87e437dc [core] Add note for Brazilian phone number 2023-12-02 16:33:50 +07:00
allburov 741e5e86f8 [core] Reformat send messages documentation 2023-12-02 16:28:44 +07:00
allburov 390a171891 [core] Document check exists changes 2023-12-02 16:23:00 +07:00
allburov 1fc5e2b47c [core] Add chatId to check exists result 2023-12-02 16:13:23 +07:00
allburov 8926dc7cc6 [core] update swagger 2023-12-01 09:38:52 +07:00
allburov 5c3d3c0d70 [core] No null in swagger 2023-12-01 09:38:52 +07:00
allburov 41b29cbf60 [core] Update swagger
Release / amd64 - chrome - chrome (push) Waiting to run
Release / amd64 - chromium - latest (push) Waiting to run
Release / linux/arm64 - chromium - arm (push) Waiting to run
Release / amd64 - none - noweb (push) Waiting to run
Release / linux/arm64 - none - noweb-arm (push) Waiting to run
2023-12-01 09:34:25 +07:00
allburov 44463c199a [core] Try to fix swagger for redoc 2023-12-01 09:33:56 +07:00
allburov 9071adcdcc [core] Update NOWEB engine 2023-12-01 09:32:11 +07:00
allburov 21cd92ca13 [core] Update WEBJS engine 2023-12-01 09:30:02 +07:00
allburov d8a3e8dc43 [core] Bump version to 2023.12.1 2023-12-01 09:25:23 +07:00
allburov 3f5707952c [core] Update swagger 2023-12-01 09:25:06 +07:00
allburov 38a9590be0 [core] Add screenshot and QR to changelog
Fix #177
2023-11-30 18:01:51 +07:00
allburov a7ce117b87 [core] VENOM supports /qr 2023-11-30 18:01:51 +07:00
allburov c3b24a243c [core] document QR code formats 2023-11-30 18:01:51 +07:00
allburov cb2c11df43 [core] screenshot base64 2023-11-30 18:01:50 +07:00
allburov 98f88dcf68 [core] screenshot doc 2023-11-30 18:01:50 +07:00
allburov 9fb12e0e23 [core] Add base64 to screenshot 2023-11-30 18:01:49 +07:00
allburov 0ca106f16b [core] Fix swagger 2023-11-30 18:01:49 +07:00
allburov 33210c6374 [core] Get raw QR value 2023-11-30 18:01:49 +07:00
allburov 045ab67f5d [core] Add BufferResponseInterceptor 2023-11-30 18:01:49 +07:00
allburov 19259c93ea [core] Return json or binary based on Accept header 2023-11-30 18:01:49 +07:00
allburov 9b6784a018 [core] Use "default" session by default 2023-11-30 18:01:49 +07:00
allburov 2fe3706e9c [core] Add base64 file 2023-11-30 18:01:49 +07:00
allburov a4e310a7f8 [core] Get screenshot return only buffer 2023-11-30 18:01:49 +07:00
allburov 802da9f3b2 [core] Use StreamableFile 2023-11-30 18:01:49 +07:00
allburov 0692979b19 [core] Add swagger to config page 2023-11-25 20:43:05 +07:00
allburov fb8b146bc4 [core] Add hide swagger doc 2023-11-25 20:33:35 +07:00
allburov fdbaa43ec9 [core] Add WHATSAPP_SWAGGER_ENABLED environment variable 2023-11-25 20:33:35 +07:00
allburov 4a807530c1 [core] Remove unused method 2023-11-25 20:33:35 +07:00
allburov 84784faa1e [core] eslint no warnings 2023-11-25 20:03:34 +07:00
allburov bd40978dee [core] Apply prettier to other files too 2023-11-25 19:56:32 +07:00
allburov d4d94ffe0e [core] Add empty line linter 2023-11-25 19:44:16 +07:00
allburov d984382a33 [core] Run linter in pre-commit hook 2023-11-25 19:41:41 +07:00
allburov 02d05812d2 [core] Update prettier 2023-11-25 19:09:25 +07:00
allburov 1dbf568bac [core] Add more props 2023-11-25 19:09:25 +07:00
allburov 6bc3aed348 [core] print width 2023-11-25 19:03:58 +07:00
allburov c1e8e0f09c [core] tab 2023-11-25 19:03:58 +07:00
allburov 8f8bcfc474 [core] Don't use tabs 2023-11-25 19:03:58 +07:00
allburov b386df982d [core] bracketSpacing 2023-11-25 19:03:58 +07:00
allburov fa846ddf9b [core] arrowParens always 2023-11-25 19:03:58 +07:00
allburov 16685ed8ea [core] Add endOfLine 2023-11-25 19:03:53 +07:00
allburov 4addccbd55 [core] Update node version in nvm 2023-11-25 19:03:53 +07:00
allburov e9a20c4326 [core] Run eslint 2023-11-25 19:03:53 +07:00
Alex f073aeef13 Update issue templates 2023-11-25 18:43:22 +07:00
allburov eb08739eea [core] Send 404 if file does not exist
fix #134
2023-11-25 18:16:51 +07:00
allburov aff3b01e39 [core] Hide mentions 2023-11-25 18:03:49 +07:00
allburov 2d64b26e86 [core] Hide mentions from send message 2023-11-25 17:37:38 +07:00
allburov 7b7bd02503 [core] Media improvements
- Disable downloading files
- Add 'media' field
2023-11-25 17:25:19 +07:00
allburov 7904516c97 [core] Changelog for filename 2023-11-24 17:47:29 +07:00
allburov 6e0bafdd89 [core] Add doc about new filename field 2023-11-24 17:47:29 +07:00
allburov 2b1e605e5f [core] Add filename property - NOWEB 2023-11-24 17:47:29 +07:00
allburov f454310a09 [core] Add filename property - WEBJS 2023-11-24 17:47:29 +07:00
allburov b6579b5b96 [core] Add filename property 2023-11-24 17:47:29 +07:00
allburov 4ef06d7b92 [docs] Add doc for GET /info-admin-only 2023-11-20 16:25:21 +07:00
allburov e0c594a71b [core] Add GET /info-admin-only 2023-11-20 16:23:23 +07:00
allburov a48d386d8b [core] Update WEBJS 2023-11-20 16:23:21 +07:00
allburov d592858a90 [core] Add name to job 2023-11-05 20:19:42 +07:00
allburov a3cb3e983a [core] No chrome on arm
Release / docker-build (chrome, amd64, buildjet-4vcpu-ubuntu-2204, chrome) (push) Waiting to run
Release / docker-build (chromium, amd64, buildjet-4vcpu-ubuntu-2204, latest) (push) Waiting to run
Release / docker-build (chromium, linux/arm64, buildjet-4vcpu-ubuntu-2204-arm, arm) (push) Waiting to run
Release / docker-build (none, amd64, buildjet-4vcpu-ubuntu-2204, noweb) (push) Waiting to run
Release / docker-build (none, linux/arm64, buildjet-4vcpu-ubuntu-2204-arm, noweb-arm) (push) Waiting to run
2023-11-05 20:16:02 +07:00
allburov 4eb9029b2c [core] Add build-all 2023-11-05 18:28:34 +07:00
allburov b3835b0aa0 [core] echo USE_BROWSER 2023-11-05 18:28:29 +07:00
allburov b2db58a922 [core] Document docker images 2023-11-05 18:24:03 +07:00
allburov acb6b8e0d3 [core] Install fonts if using a browser 2023-11-05 18:14:28 +07:00
allburov 21c6e1e860 [core] Add chrome\noweb builds 2023-11-05 18:10:11 +07:00
allburov 571b65c423 [core] Specify browser args 2023-11-05 18:08:33 +07:00
allburov 1631a62abe [core] Bump version to 2023.11.1 2023-11-05 18:01:09 +07:00
allburov e88a7ca8ce [core] Use github actions matrix 2023-11-05 17:59:44 +07:00
allburov d54f64a9cc [core] Add changelog record for send video 2023-11-05 17:44:30 +07:00
allburov 03dbd5db82 [core] Add docs for send video 2023-11-05 17:31:43 +07:00
allburov 2446c292bf [core] Add /sendVideo API 2023-11-05 17:31:40 +07:00
allburov 5ab99dfd69 [core] Add video example 2023-11-05 16:04:13 +07:00
allburov 605f46fda8 [core] Bump version to 2023.10.18
Release / docker-amd64 (push) Waiting to run
Release / docker-arm (push) Waiting to run
2023-10-18 14:55:32 +07:00
allburov e53f1eafe8 [core] up WEBJS engine 2023-10-18 14:55:16 +07:00
allburov 1457185e84 [core] Add session.status as default event 2023-10-15 00:18:00 +07:00
allburov ad43bec18d [core] Bump version to 2023.10.15 2023-10-15 00:03:16 +07:00
allburov c0a4b223ea [core] add session.status 2023-10-15 00:03:13 +07:00
allburov 65917e1957 [core] Add types for environment (aka version) 2023-10-13 18:54:30 +07:00
allburov a19cede60d [core] Document revoked webhook in swagger 2023-10-13 18:54:30 +07:00
allburov a3ead95ea4 [core] Add engine to version (fix #156) 2023-10-13 18:54:30 +07:00
allburov c46bc1b923 [core] Add me and version to webhook 2023-10-12 16:54:45 +07:00
allburov b327212cbe [core] Bump versio nto 2023.10.12 2023-10-12 16:40:10 +07:00
allburov 4f348c7e48 [core][webjs] Add message.revoked (fix #190) 2023-10-12 16:38:43 +07:00
allburov f2d0001b11 [core] Update openapi.json 2023-09-18 11:55:50 +07:00
allburov 66a224a0e3 [core] Patreon first 2023-09-18 11:54:49 +07:00
allburov 1fa1206568 [core] Adjust header for swagger 2023-09-18 11:54:41 +07:00
allburov 87eea28ac2 [core] Mention feature matrix in docs 2023-09-18 11:42:26 +07:00
allburov 29ca0217b3 [core] Remove "only" engines 2023-09-18 11:31:53 +07:00
allburov 306f75ff3b [core] Fix text 2023-09-18 11:20:29 +07:00
allburov 6ecb203570 [core] Add webhooks 2023-09-18 11:17:22 +07:00
allburov 2e7a3a6b61 [core] Add presence endpoints 2023-09-18 11:13:18 +07:00
allburov 86bc4a92ba [core] Add groups endpoints 2023-09-18 11:11:48 +07:00
allburov f652277e18 [core] Init features by engines 2023-09-18 11:05:53 +07:00
allburov 14a3535439 [core] throw NotImplemented by default 2023-09-18 10:39:21 +07:00
allburov edce7424de [core] Update static swagger for site 2023-09-17 19:09:45 +07:00
allburov 0fa121bbe2 [core] Update openapi.json 2023-09-17 18:50:37 +07:00
allburov 9c046a92be [core] Document webhooks in Swagger 2023-09-17 18:48:23 +07:00
allburov e4506e14da [core] Update next/swagger 2023-09-17 17:31:26 +07:00
allburov 515a00346c [core] Adjust current engine doc 2023-09-17 16:44:06 +07:00
allburov 399e27e24e [core] Name endpoints and webhooks 2023-09-17 15:59:27 +07:00
allburov 9413376138 [core] Bump WAHA version 2023-09-11 15:26:24 +07:00
allburov 3caec14783 [core] Update swagger 2023-09-11 15:26:14 +07:00
allburov 6e427a0a34 [core] Update yarn, engines
Release / docker-amd64 (push) Waiting to run
Release / docker-arm (push) Waiting to run
2023-09-07 17:33:27 +07:00
allburov 40c5e95d93 [core] Up version 2023-09-07 17:33:18 +07:00
allburov ab70e27266 [core] fix for QR scanning 2023-09-07 16:47:17 +07:00
allburov 301b6f57d3 [core] Add changelog note 2023-09-07 13:54:06 +07:00
allburov 4c9f5ed907 [core] Add personal key to Pro 2023-09-07 13:49:22 +07:00
allburov 04d65150ed [core] Add install doc 2023-09-07 13:47:41 +07:00
allburov d29165c9a5 [core] Remove buttons API 2023-09-07 13:11:49 +07:00
allburov 30db175d52 No more semver build, only latest 2023-09-04 18:42:54 +07:00
allburov 5c666c0dd4 Use buildjet with arm
Release / docker-amd64 (push) Waiting to run
Release / docker-arm (push) Waiting to run
2023-09-04 18:39:57 +07:00
allburov 3ccc0469c0 Use buildjet 2023-09-04 18:39:55 +07:00
allburov 5ab3244d6a adjust CI 2023-09-04 18:39:52 +07:00
allburov 05bc8abbee [core] Bump version to 2023.9.3 2023-09-03 19:30:47 +07:00
allburov 8e9056a0cd [core] Add /api/sessions/{session}/me endpoint
Fix #191
2023-09-03 19:30:16 +07:00
allburov ea75b357a7 [core] Log engine events if DEBUG enabled for NOWEB 2023-09-03 16:33:08 +07:00
allburov 2b607e9b44 [core] Bump version to 2023.8.29 2023-08-29 07:49:13 +03:00
allburov 57d3528a96 [core] Apply code review suggestions 2023-08-29 07:48:51 +03:00
allburov 660a04aa52 [core] Document polls 2023-08-29 07:48:51 +03:00
allburov d0a408001d [core] poll.vote.failed 2023-08-29 07:48:51 +03:00
allburov 48391533a6 [core] poll.vote 2023-08-29 07:48:51 +03:00
allburov f2113adbbc [core] Send poll 2023-08-29 07:48:51 +03:00
allburov abfcbc7397 [core] Update WEBJS
Release / deploy-docker (push) Waiting to run
2023-08-23 16:40:46 +03:00
allburov 96f2982325 [core] Bump to 2023.8.23 2023-08-23 12:15:06 +03:00
allburov 3a521bc06c [core] Update WEBJS engine 2023-08-23 12:14:51 +03:00
allburov 6fbaec0083 [core] Bump to 2023.8.21 2023-08-21 14:25:06 +03:00
allburov cae94c7b5c [core] catch error while handling incoming message NOWEB 2023-08-21 14:24:51 +03:00
allburov bce012f692 [core] Bump version to 2023.8.19
Release / deploy-docker (push) Waiting to run
2023-08-19 12:36:08 +03:00
allburov b23b639a8b [core] Support message.ack for NOWEB, add ackName 2023-08-19 12:35:44 +03:00
allburov 5a628907ed [core] Add pairing auth method for NOWEB, add QR endpoint 2023-08-13 16:08:56 +03:00
allburov 6da479c0d7 [core] Update WEBJS engine
Release / deploy-docker (push) Waiting to run
2023-08-10 10:45:40 +03:00
allburov cbb321df6d [core] Bump to 2023.8.10 2023-08-10 07:27:36 +03:00
allburov 0a7beb6909 [core] Update webjs engine
Fix TypeError: Cannot read properties of undefined (reading 'CallCollection')
2023-08-10 07:27:33 +03:00
allburov 2105094ac3 [core] Bump version to 2023.8.8
Release / deploy-docker (push) Waiting to run
2023-08-08 08:57:31 +03:00
allburov d8fee686f8 [core] Update WEBJS and NOWEB engines 2023-08-08 08:56:23 +03:00
allburov 75fc1fd7e0 [docs] Update swagger (openapi) 2023-08-07 08:06:36 +03:00
allburov e718652491 [docs] Keep only versions as headers 2023-08-07 08:05:01 +03:00
allburov bcb49f2be7 [docs] Fix changelog for stories 2023-08-06 18:52:56 +03:00
allburov dab63e4060 [example] Send message and reply 2023-08-06 18:02:36 +03:00
allburov 3fdacbb6ac [core] set defaultQueryTimeoutMs to undefined 2023-08-01 16:42:16 +07:00
allburov f02b62e620 [plus] Show macos by default 2023-08-01 15:42:59 +07:00
allburov 51acce14a0 [plus] Add session to what's next? 2023-08-01 15:28:26 +07:00
allburov b63f6ac39e [core] Add status endpoints 2023-07-25 17:42:44 +07:00
allburov 9e107a8a76 [core] Update noweb engine 2023-07-23 16:49:21 +07:00
allburov 8c083242d3 [core] add documentation and changelog for info-admin-only 2023-07-21 16:08:04 +07:00
gqlxj1987 2a068d561f [core] Add PUT /api/groups/:id/settings/security/info-admin-only endpoint 2023-07-21 13:24:23 +07:00
allburov ef96fbf8c5 [core] Fix chatId bracket 2023-07-16 16:51:50 +07:00
allburov 2c381a0b9c [core] Add openapi json link 2023-07-16 16:41:37 +07:00
allburov fef2bcb6e2 [core] create directory before saving file
Release / deploy-docker (push) Waiting to run
2023-07-16 16:25:41 +07:00
allburov 2f6ed2fb58 [core] Add chats endpoints
Release / deploy-docker (push) Waiting to run
2023-07-16 16:14:12 +07:00
allburov 4eb23d2c09 [core] Bump version to 2023.7.16 2023-07-16 16:14:08 +07:00
allburov ec3de8dbcf [core] Init folder for a session 2023-07-16 13:30:40 +07:00
allburov f6f09747dc [core] pin node:20-bullseye
Release / deploy-docker (push) Waiting to run
2023-07-14 10:10:28 +07:00
allburov 27a534a605 [core] add set session presence endpoint 2023-07-12 16:46:15 +07:00
allburov 3cbd940843 [core] Add swagger image at the top of quick start 2023-07-07 14:26:23 +07:00
allburov e728eec01a [core] Move tiers
Release / deploy-docker (push) Waiting to run
2023-07-05 10:29:10 +07:00
allburov d06d2b78a8 [core] Move donations to top, add links 2023-07-05 10:27:32 +07:00
allburov 5878a9196e [core] Pin yarn version to 3.6.1 2023-07-03 21:52:32 +07:00
allburov 85dd061f96 [core] ignore .yaml folder 2023-07-03 21:52:29 +07:00
allburov 8381c3e946 [core] Set retention days 5 2023-07-03 11:01:51 +07:00
allburov 6ff8a9705d [core] Add cleanup github script 2023-07-03 10:59:56 +07:00
allburov fb5819b966 [core] Create folder if there's no yet
Release / deploy-docker (push) Waiting to run
2023-06-29 19:05:26 +07:00
allburov 5cc1af3f82 [core] Bump to 2023.7.1 2023-06-29 18:56:12 +07:00
allburov c279de694c [core] Update NOWEB engine 2023-06-29 18:55:20 +07:00
allburov f7a1787f1f [core] Add command to update NOWEB 2023-06-29 18:55:20 +07:00
allburov 5442fd6e93 [core] Update WEBJS engine 2023-06-29 18:55:20 +07:00
allburov b8c8ca7653 [core] Use yarn v2 commands to update package 2023-06-29 18:55:20 +07:00
allburov 5ca7dbc84b [core] Update swagger 2023-06-29 18:38:41 +07:00
allburov d836c9706f [core] Add for-swagger make command 2023-06-29 18:38:34 +07:00
allburov 318be43a4f [core] fix start\stop issue with NOWEB engine 2023-06-29 18:31:36 +07:00
allburov 95bebce731 [core] fix sessions with no config 2023-06-29 18:31:34 +07:00
allburov 27b8c9d058 [core] Make config optional 2023-06-29 18:14:23 +07:00
allburov 10d4d24526 [core] Place Boosty first 2023-06-29 18:07:14 +07:00
allburov b19917bd3d [core] Always logout from session 2023-06-29 18:06:07 +07:00
allburov 4b6774b1db [core] WAHA Plus links last 2023-06-26 11:29:31 +07:00
allburov 360e0a7951 [core] All tiers 2023-06-26 11:28:01 +07:00
allburov 171f516eee [core] Patreon first 2023-06-26 11:17:58 +07:00
allburov 01943f6970 [core] Remove global env.varilabels from webhooks 2023-06-25 14:01:22 +07:00
allburov 953d48ee1f [core] Add links to Quick Start 2023-06-25 14:00:51 +07:00
allburov 2b6028bcb1 [core] Make alert dismissible 2023-06-25 13:51:36 +07:00
allburov 79b7b7d2a2 [core] Adjust headers 2023-06-25 13:34:11 +07:00
allburov 93a6a7b87f [core] Remove youtube video from other pages 2023-06-25 13:14:30 +07:00
allburov 3b499d6af5 [core] Change headers to mobile first 2023-06-23 15:04:22 +07:00
allburov 6481919597 [core] Change swagger title to WAHA 2023-06-23 14:57:17 +07:00
allburov 228f6ec8c5 [core] No one-time 2023-06-23 14:48:03 +07:00
allburov 6723f201b7 [core] Add make start-proxy command 2023-06-23 14:45:22 +07:00
allburov c250bb49f0 [core] Make proxy per session 2023-06-23 14:44:14 +07:00
allburov 3b607662e5 [core] Flexible webhooks 2023-06-22 18:20:27 +07:00
allburov f2d7041cb0 [core] Fix Dockerfile with yarn v2 2023-06-19 13:10:43 +07:00
allburov afc06794c2 [core] No mobile yet 2023-06-19 12:16:52 +07:00
allburov 33eaafcff1 [core] update NOWEB engine, use yarn v2 2023-06-18 17:38:06 +07:00
allburov e5a8743b9a [core] Remove Get on links 2023-06-18 15:17:44 +07:00
allburov 3322c4e2a5 [core] Add eslint fix import plugin 2023-06-16 16:17:31 +07:00
allburov aa39aaf489 [core] You can run, not configure 2023-06-16 15:01:30 +07:00
allburov a238581f44 [core] Add presence event 2023-06-16 15:00:44 +07:00
allburov 00814ef64e [core] Add dedicated webhooks page 2023-06-16 14:56:35 +07:00
allburov 6362d2966b [core] Add active link to docker-compose.yaml file 2023-06-14 12:36:44 +07:00
allburov 4e181a82b6 [core] Use plus image in sessions 2023-06-14 12:35:45 +07:00
allburov 374199905d [core][noweb] Add presence endpoints and webhook 2023-06-14 12:27:39 +07:00
allburov 642079ab1f [core] Add changelog about mentions 2023-06-12 15:31:35 +07:00
allburov 215c9d96b9 [core] Add mentions
Fix #105
2023-06-12 15:27:53 +07:00
allburov 5369eda705 [core] Fix engine field 2023-06-09 16:25:31 +07:00
allburov 5e42bbe1eb [core] ignore webjs cache 2023-06-09 16:25:26 +07:00
allburov 79dd2ee03e [core] bump version to 2023.6.9 2023-06-09 16:25:24 +07:00
allburov 78d3eae44b [core] Fix storage issue 2023-06-09 16:25:22 +07:00
allburovandPierluca Lino a9ee68fe1a [core] Add proxy support
Co-authored-by: Pierluca Lino <pierluca.lino@dontouch.ch>

Co-authored-by: puntolino <pierluca.lino@dontouch.ch>
2023-06-07 17:02:18 +07:00
allburov ee5678ccfb [core] yarn upgrade instead of add 2023-06-07 17:02:18 +07:00
allburov 248a675c1a [core] No core images 2023-06-05 17:14:21 +07:00
allburov 6b1d84cf38 [core] Show core features first 2023-06-05 16:59:52 +07:00
allburov c0977538ff [core] change header 2023-06-03 18:51:23 +07:00
allburov c8727e8b2f [core] Add a link to PLUS 2023-06-03 18:49:01 +07:00
allburov 55a41e19f4 [core] Rename to WAHA Plus 2023-06-03 18:47:09 +07:00
allburov 6096c0b158 [core] Move help's files to overview 2023-06-03 18:44:35 +07:00
allburov 161c6dfd95 [core] Receive message 2023-06-03 18:39:16 +07:00
allburov 078bcf7652 [core] env variables block 2023-06-03 18:33:47 +07:00
allburov 57c6df3970 [core] Adjust sessions how to 2023-06-03 18:27:58 +07:00
allburov 1130ee1b21 [core] Add docker run on index 2023-06-01 13:15:02 +07:00
allburov c9c0a29740 Use 2023 year in changelog 2023-06-01 12:10:37 +07:00
allburov e60d972bff [core] Bump version to 2023.6.1
Release / deploy-docker (push) Waiting to run
2023-06-01 11:54:08 +07:00
allburov 3c4a139f52 [core] Update venom engine 2023-05-21 18:41:06 +07:00
allburov bf615efa96 [core] Apply pre-commit with prettier 2023-05-21 18:09:25 +07:00
allburov 2af3940be7 [core] Add prettier to pre-commit 2023-05-21 18:09:12 +07:00
allburov 64e145909e [core] Advanced sessions control 2023-05-21 18:01:04 +07:00
allburov e90f34cc96 [core] Pin markupsafe version
Release / deploy-docker (push) Waiting to run
Fix #97
2023-05-20 18:25:18 +07:00
allburov a23cf2dd26 [docs] Add port to receive message docker run command 2023-05-20 18:17:21 +07:00
allburov 7b623d0faa [core] Bump version 2023-05-20 18:11:36 +07:00
allburov 14788b1d53 [core] Update webjs engine 2023-05-20 18:11:33 +07:00
allburov e1bf8cf735 [core] Update swagger 2023-05-12 11:45:20 +07:00
allburov 2117731b46 [core] Add variables to Swagger 2023-05-12 11:44:29 +07:00
allburov 74f8fe1caf [core] bump version to 2023.5.11 2023-05-11 10:27:44 +07:00
allburov 9388a3b277 [core] Add caption to file 2023-05-11 10:27:41 +07:00
allburov 13e7a05e1b [core] Fix provide extended option dist/main.js:29:38 error 2023-05-07 10:31:23 +07:00
allburov 885fa25c0c [core] Add make build-plus command 2023-05-07 10:31:05 +07:00
allburov 966b35094f Bump version to 2023.5.3
Release / deploy-docker (push) Waiting to run
2023-05-03 09:17:44 +07:00
allburov 65607bf3b3 Handle extendedTextMessage
Fix #90
2023-05-03 09:17:24 +07:00
allburov 5fcba7a7db [core][docs] Remove the icon from headers 2023-04-27 18:37:05 +07:00
allburov f9ec3cb753 [core] Bump version 2023.4.27
Release / deploy-docker (push) Waiting to run
2023-04-27 09:13:03 +07:00
allburov bf6ffd65a9 [core] ignore all *sessions 2023-04-26 18:15:04 +07:00
allburov d680b6b43a [core] Add noweb engine 2023-04-26 18:14:38 +07:00
allburov 3ead3a0ba3 [core] Add GET /messages request
Fix #31
2023-04-26 18:14:08 +07:00
allburov 4c5c977310 [core][docs] No delay in bugfixes 2023-04-15 17:58:15 +07:00
allburov 89a9ce87da [core] Use the main branch in whatsapp webjs
Release / deploy-docker (push) Waiting to run
2023-04-14 10:43:02 +07:00
allburov 52e469f6ac [core] Bump version - 2023.4.14 2023-04-14 10:38:58 +07:00
allburov 4f275de8d4 [core] close session properly
Fix #83
2023-04-14 10:38:56 +07:00
allburov d9de41e350 [core] bump version - 2023.3.28 2023-04-14 10:38:54 +07:00
allburov a4c279ba25 [core] Add short description about webhooks
Release / deploy-docker (push) Waiting to run
2023-04-01 19:04:13 +07:00
allburov e68282a9e4 [core] Add video on the index 2023-04-01 18:53:37 +07:00
allburov 8613206c3a [core] Move video to introduction page 2023-04-01 18:50:30 +07:00
allburov 31b8cde8bf [core] Add youtube video 2023-04-01 18:46:19 +07:00
allburov 2f2f9520db [core] add session to webhook data
fix #80
2023-03-28 15:37:53 +07:00
allburov 2501ae836e [core] bump version 2023-03-28 15:37:53 +07:00
allburov 2c8bf91e77 [plus] Increase body limit for files - fix #79 2023-03-28 15:37:52 +07:00
allburov 0ac063498e [core] Fix addParticipans issue - https://github.com/pedroslopez/whatsapp-web.js/pull/2087 2023-03-28 15:37:52 +07:00
allburov 2bf672f0cd [core] Downgrade venom-bot 2023-03-22 19:14:12 +07:00
allburov ca209adca0 [core] bump version - 2023.3.21 2023-03-22 19:14:12 +07:00
allburov dd10c82c5e [core] Update engines - venom, whatsapp webjs 2023-03-22 19:14:12 +07:00
allburov c3ad2a0931 [core] Make update-dependencies - use yarn 2023-03-22 19:14:12 +07:00
allburov 30aacc8946 [core] Fix features 2023-03-22 19:13:23 +07:00
allburov 723a644937 Use "" for * in env variable 2023-02-28 16:59:28 +07:00
allburov 165eeb5bf2 Add note how to start ARM docker image 2023-02-28 10:00:06 +07:00
allburov f1776d4a26 Support only amd64
Release / deploy-docker (push) Waiting to run
2023-02-28 09:38:48 +07:00
allburov 2f2a1b3182 Use yarn 2023-02-28 09:03:30 +07:00
allburov 0477cf7db5 Update build-and-push action 2023-02-27 19:47:10 +07:00
allburov 2d7c7986aa Add changelog for Chromium 2023-02-27 19:27:22 +07:00
allburov bf84ea8fca [core] fix chromium path 2023-02-27 19:15:37 +07:00
allburov f3ef8a7f96 [core] fix version file 2023-02-27 19:08:56 +07:00
allburov ec214f610a [core] Install chromium by default 2023-02-27 19:04:27 +07:00
allburov 013fd46722 [core] Install fonts separately 2023-02-27 18:51:50 +07:00
allburov 32d583b9ef [core] Skip chromium download 2023-02-27 18:51:27 +07:00
allburov df6e201ba5 [core] Choose between chrome and chromium 2023-02-27 18:47:02 +07:00
allburov 789b613b82 [core] Build docker for ARM 64 2023-02-27 18:13:53 +07:00
allburov b698342db4 [core] Build docker for ARM v7\v8 2023-02-27 18:09:07 +07:00
allburov d853f2fe99 [core] Build docker for ARM 2023-02-27 17:57:14 +07:00
allburov 20d66b5b31 [core][doc] Split examples to echo bot and download files bot 2023-02-27 11:00:53 +07:00
allburov da7264c5e8 [core] Bump version 2023-02-24 19:57:50 +07:00
allburov f3299f78d9 [core] Update swagger 2023-02-24 19:57:49 +07:00
allburov 7ef0805c91 [core] Add group endpoints docs and changelog 2023-02-24 19:57:48 +07:00
allburov ba1afa2569 [core] Add group endpoints 2023-02-24 19:57:48 +07:00
allburov 936e2d0863 [core] Add sendLocation to webjs.
It doesn't work tho because of https://github.com/pedroslopez/whatsapp-web.js/issues/1591
2023-02-24 19:57:41 +07:00
Aleksey 166410f66a Use main webjs
Release / deploy-docker (push) Waiting to run
2023-02-11 13:39:11 +00:00
Aleksey f8c9298694 Update package lock
Release / deploy-docker (push) Waiting to run
2023-02-11 12:58:38 +07:00
Aleksey b0b642b6bb ^1.19.3 2023-02-11 08:40:48 +07:00
allburov 5fa20343da [core] Remove one time mark 2023-01-22 14:18:36 +07:00
allburov bbbf181011 [core] does not cache layers to install new Chrome
Release / deploy-docker (push) Waiting to run
2023-01-22 14:07:19 +07:00
allburov 6af547d2af [core] Quick fix for webjs engine.
Release / deploy-docker (push) Waiting to run
Fix #46
2023-01-15 14:52:17 +07:00
allburov d72b1822cb [core][2023.1] Add checkNumberStatus for webjs engine 2023-01-15 14:37:15 +07:00
allburov d34df18da8 [core][2023.1] Add contacts endpoints 2023-01-15 14:37:14 +07:00
allburov 27cb247760 [core][docs] Add contact api changelog 2023-01-09 09:31:00 +07:00
allburov 7a66d6fccd [core][docs] Add changelog.md 2023-01-09 09:31:00 +07:00
allburov f1cb372339 [core][docs] Add contacts page 2023-01-09 09:31:00 +07:00
allburov 46d65e6fc0 [core][docs] Reorder guides 2023-01-09 09:31:00 +07:00
allburov 6168298b5e [core][docs] Move engines doc to config 2023-01-09 09:31:00 +07:00
allburov d5fef413ca [core] Add swagger authentication to changelog 2022-12-19 12:35:36 +07:00
allburov 0802ee6106 [core][docs] Add GET /messages request. Fix #31 2022-12-19 12:32:55 +07:00
allburov 65d0f87eeb Use -plus docker image in security
Release / deploy-docker (push) Waiting to run
2022-12-11 17:01:47 +07:00
allburov 488868d80e Add WHATSAPP_SWAGGER_USERNAME, WHATSAPP_SWAGGER_PASSWORD to config.md 2022-12-11 16:58:12 +07:00
allburov 154965efcb [core] bump version to 2022.12.11 2022-12-11 16:52:36 +07:00
allburov f364f0b495 [core] Authentication for swagger panel (available in plus only) 2022-12-11 16:52:34 +07:00
allburov 82e2f5bcb9 [core] Authentication for swagger panel (available in plus only) 2022-12-11 16:52:28 +07:00
dependabot[bot] f7a2228925 Bump venom-bot from 4.3.6 to 4.3.7
Bumps [venom-bot](https://github.com/orkestral/venom) from 4.3.6 to 4.3.7.
- [Release notes](https://github.com/orkestral/venom/releases)
- [Changelog](https://github.com/orkestral/venom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/orkestral/venom/compare/v4.3.6...v4.3.7)

---
updated-dependencies:
- dependency-name: venom-bot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-11 16:52:17 +07:00
allburov dadc9d4efd Up version 2022-12-11 16:52:11 +07:00
allburov df59867431 Up dependencies 2022-12-11 16:52:11 +07:00
dependabot[bot] a7c6e9dc00 Bump whatsapp-web.js from 1.18.3 to 1.18.4
Bumps [whatsapp-web.js](https://github.com/pedroslopez/whatsapp-web.js) from 1.18.3 to 1.18.4.
- [Release notes](https://github.com/pedroslopez/whatsapp-web.js/releases)
- [Commits](https://github.com/pedroslopez/whatsapp-web.js/compare/v1.18.3...v1.18.4)

---
updated-dependencies:
- dependency-name: whatsapp-web.js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-11 16:52:11 +07:00
allburov 6b51cfd448 Bump version to 2022.11.20
Release / deploy-docker (push) Waiting to run
2022-11-20 16:31:12 +07:00
allburov 98b86ca527 [core] Fix checkNumberStatus issue #26 2022-11-20 16:30:56 +07:00
allburov 9a2ef4c52a [core] Use session instead of sessionName 2022-11-20 16:30:56 +07:00
allburov d69d4bd29d [core] update venom to 4.3.5 2022-11-20 16:30:56 +07:00
allburov 97cdc56c26 [core] Update dependencies script 2022-11-20 16:30:56 +07:00
allburov c2440b9c79 Rearange blocks a little 2022-11-20 15:55:04 +07:00
allburov f0b69d089a No tokens folder 2022-11-20 15:32:41 +07:00
allburov ac79549934 Add link to example for python 2022-11-20 15:09:37 +07:00
allburov e6b8b5e904 examples not draft 2022-11-20 15:03:03 +07:00
allburov 5a22e5b2b2 Typo 2022-11-20 14:58:13 +07:00
allburov 431d7bf9d9 Add CPU and memory to Faq 2022-11-20 14:56:30 +07:00
allburov 865ea6e66b Set Plus subscription to $19 always 2022-11-20 14:28:07 +07:00
allburov 2f787d6a53 Add quick start to readme 2022-11-20 14:20:04 +07:00
allburov 939ac28d00 Remove nl language 2022-11-20 14:13:16 +07:00
allburov 76068add09 [core] Add chrome optimization arguments 2022-11-19 13:26:03 +07:00
allburov 0730dd6756 Add api key to run command 2022-11-19 13:25:59 +07:00
allburov 64cce8e8be Fix few mistakes on index 2022-11-16 14:51:34 +07:00
allburov 2d12dc0f3e How to guides 2022-11-16 14:50:42 +07:00
allburov 82a60e99cc Ignore tokens too 2022-11-16 14:49:26 +07:00
allburov 1cbd18db76 Mark faq as draft 2022-11-15 14:18:04 +07:00
allburov 48ccd636cd Add yandex metrics 2022-11-15 10:22:46 +07:00
allburov 573dd0da7e Special new year offer 2022-11-15 10:18:28 +07:00
allburov df8583801f Add engines info 2022-11-15 10:08:15 +07:00
allburov ff2b434133 Add run commands 2022-11-15 10:00:22 +07:00
allburov 30cae74d50 Update webjs to 1.18.3 2022-11-15 10:00:18 +07:00
allburov a896d32d37 Update venom to 4.3.3 2022-11-15 10:00:17 +07:00
allburov d9d4527894 add functions for getCatchQR and buildClient 2022-11-15 10:00:08 +07:00
allburov e93caac34b Do not use toWAMessage 2022-11-15 09:59:26 +07:00
allburov cd5182f8ee Set waha site base url 2022-11-11 12:48:08 +07:00
allburov b185c02252 Publish right path 2022-11-11 12:41:42 +07:00
allburov 58aa10be9c Build pages
Release / deploy-docker (push) Waiting to run
2022-11-11 12:37:22 +07:00
allburov 5d3d3bf03a Revert "Update build.yaml"
This reverts commit 983e8dbbd3.
2022-11-11 12:31:31 +07:00
allburov 11af1cb390 Use fixed webjs 2022-11-11 12:31:07 +07:00
allburov 32057573b7 Ignore plus module 2022-11-11 12:31:07 +07:00
allburov 0b6058654e Big changes - change engine, split core\plus version 2022-11-11 12:31:07 +07:00
Aleksey a7fe444166 Create CNAME 2022-11-11 10:51:40 +07:00
Aleksey Burov f4f734d8ff Install stable
Release / deploy-docker (push) Waiting to run
2022-10-28 20:25:28 +07:00
Aleksey Burov 983e8dbbd3 Update build.yaml
Release / deploy-docker (push) Waiting to run
2022-10-28 20:20:56 +07:00
Aleksey Burov b2150477d7 Add telegram dm link 2022-10-23 18:05:28 +07:00
Aleksey Burov f83eeac33a Delete docker-compose.yaml
Fix #19
2022-10-23 17:49:44 +07:00
191 changed files with 27575 additions and 45403 deletions

No files matched your search

+7 -1
View File
@@ -1,11 +1,17 @@
Dockerfile
tokens
.*sessions
files
venv
.wwebjs_auth
docs
examples
.github
.git
# compiled output
/dist
/node_modules
.yarn
# Logs
logs
+33 -22
View File
@@ -1,25 +1,36 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'simple-import-sort'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
root: true,
env: {
node: true,
jest: true,
},
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'lines-between-class-members': [
'error',
'always',
{ exceptAfterSingleLine: true },
],
root: true,
env: {
node: true,
jest: true,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
};
+14
View File
@@ -0,0 +1,14 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: wa_http_api
open_collective: # doks Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom:
- https://boosty.to/wa-http-api
- https://portal.devlike.pro/
+61
View File
@@ -0,0 +1,61 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG][WEBJS] - '
labels: bug
assignees: ''
---
**Describe the bug**
> A clear and concise description of what the bug is. Feel free to remove
> sections that you don't feel to make the text shorter!
**Version**
```json
{
"version": "2023.11.1",
"engine": "NOWEB",
"tier": "PLUS",
"browser": "/usr/bin/google-chrome-stable"
}
```
> You can get the WAHA version by calling `GET /api/version` Try to update to
> [the latest version](https://github.com/devlikeapro/waha/releases) before
> creating an issue!
**To Reproduce** Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
> A clear and concise description of what you expected to happen.
**Engine** I'm using **WEBJS** engine.
> If you set `WHATSAPP_DEFAULT_ENGINE` explicitly to
> [one of the engine](https://waha.devlike.pro/docs/how-to/engines/) - please
> provide that information here and in the issue title.
**Requests - Responses**
> Please attach all sent requests, responses that you sent.
**Docker Logs**
> Collect and attach related docker logs if you have any
> https://waha.devlike.pro/docs/how-to/deploy/#viewing-the-logs
**Screenshots**
> If applicable, add screenshots to help explain your problem.
**Additional context**
> Add any other context about the problem here.
+24
View File
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[Feature Request]'
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.** I'm always
frustrated when [...]
> A clear and concise description of what the problem is. Ex.
**Describe the solution you'd like**
> A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
> A clear and concise description of any alternative solutions or features
> you've considered.
**Additional context** Add any other context or screenshots about the feature
request here.
+18
View File
@@ -0,0 +1,18 @@
# Idea from
# https://stackoverflow.com/a/65539398/6753144
#
OWNER=devlikeapro
REPO=waha-plus
# list workflows
gh api -X GET /repos/$OWNER/$REPO/actions/workflows | jq '.workflows[] | .name,.id'
# copy the ID of the workflow you want to clear and set it
WORKFLOW_ID=40218610
# list runs
gh api -X GET /repos/$OWNER/$REPO/actions/workflows/$WORKFLOW_ID/runs --paginate | jq '.workflow_runs[] | .id'
# delete runs
gh api -X GET /repos/$OWNER/$REPO/actions/workflows/$WORKFLOW_ID/runs --paginate | jq '.workflow_runs[] | .id' | xargs -I{} gh api -X DELETE /repos/$OWNER/$REPO/actions/runs/{} --silent
+10
View File
@@ -0,0 +1,10 @@
teamLabels:
- team: waha-patrons-pro
label: patron:PRO
comment: '[![patron:PRO](https://img.shields.io/badge/patron-PRO-188a42)](https://waha.devlike.pro/docs/how-to/plus-version/#tiers)'
- team: waha-patrons-advanced
label: patron:ADVANCED
comment: '[![patron:ADVANCED](https://img.shields.io/badge/patron-ADVANCED-4cd07d)](https://waha.devlike.pro/docs/how-to/plus-version/#tiers)'
- team: waha-patrons-plus
label: patron:PLUS
comment: '[![patron:PLUS](https://img.shields.io/badge/patron-PLUS-a0e6ba)](https://waha.devlike.pro/docs/how-to/plus-version/#tiers)'
+43 -10
View File
@@ -3,16 +3,47 @@ name: Release
on:
push:
tags:
- "*"
- '*'
jobs:
deploy-docker:
runs-on: ubuntu-latest
docker-build:
runs-on: ${{ matrix.runner }}
name: ${{ matrix.platform }} - ${{ matrix.browser }} - ${{ matrix.tag }}
strategy:
matrix:
include:
# Chromium
- runner: 'buildjet-4vcpu-ubuntu-2204'
tag: 'latest'
platform: 'amd64'
browser: 'chromium'
- runner: 'buildjet-4vcpu-ubuntu-2204-arm'
tag: 'arm'
platform: 'linux/arm64'
browser: 'chromium'
# Chrome
- runner: 'buildjet-4vcpu-ubuntu-2204'
tag: 'chrome'
platform: 'amd64'
browser: 'chrome'
# Chrome is not supported on arm64
# - runner: "buildjet-4vcpu-ubuntu-2204-arm"
# tag: "chrome-arm"
# platform: "linux/arm64"
# browser: "chrome"
# No browser
- runner: 'buildjet-4vcpu-ubuntu-2204'
tag: 'noweb'
platform: 'amd64'
browser: 'none'
- runner: 'buildjet-4vcpu-ubuntu-2204-arm'
tag: 'noweb-arm'
platform: 'linux/arm64'
browser: 'none'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
@@ -20,10 +51,11 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: allburov/whatsapp-http-api
flavor: latest=true
images: ${{ vars.DOCKER_IMAGE }}
flavor: latest=false
tags: |
type=semver,pattern={{version}}
type=raw,value=${{ matrix.tag }}
type=raw,value=${{ matrix.tag }}-{{tag}}
- name: Login to image repository
if: github.ref_type == 'tag'
@@ -33,12 +65,13 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: ${{ matrix.platform }}
build-args: |
USE_BROWSER=${{ matrix.browser }}
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha
+84
View File
@@ -0,0 +1,84 @@
name: Manual push
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to push'
required: true
default: 'dev'
push:
description: 'Push to registry'
required: true
type: boolean
default: true
jobs:
docker-build:
runs-on: ${{ matrix.runner }}
name: ${{ matrix.platform }} - ${{ matrix.browser }} - ${{ matrix.tag }}
strategy:
matrix:
include:
# Chromium
- runner: 'buildjet-4vcpu-ubuntu-2204'
tag: 'latest'
platform: 'amd64'
browser: 'chromium'
- runner: 'buildjet-4vcpu-ubuntu-2204-arm'
tag: 'arm'
platform: 'linux/arm64'
browser: 'chromium'
# Chrome
- runner: 'buildjet-4vcpu-ubuntu-2204'
tag: 'chrome'
platform: 'amd64'
browser: 'chrome'
# Chrome is not supported on arm64
# - runner: "buildjet-4vcpu-ubuntu-2204-arm"
# tag: "chrome-arm"
# platform: "linux/arm64"
# browser: "chrome"
# No browser
- runner: 'buildjet-4vcpu-ubuntu-2204'
tag: 'noweb'
platform: 'amd64'
browser: 'none'
- runner: 'buildjet-4vcpu-ubuntu-2204-arm'
tag: 'noweb-arm'
platform: 'linux/arm64'
browser: 'none'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ vars.DOCKER_IMAGE }}
flavor: latest=false
tags: |
type=raw,value=${{ inputs.tag }}-${{ matrix.tag }}
- name: Login to image repository
if: github.ref_type == 'tag'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: ${{ matrix.platform }}
build-args: |
USE_BROWSER=${{ matrix.browser }}
push: ${{ inputs.push }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+13
View File
@@ -1,6 +1,19 @@
.yarn
example.ts
.*sessions
.secrets
.minio
.media
tokens
files
venv
.wwebjs_auth
src/test.ts
src/test.js
test.js
.wwebjs_cache
src/dashboard
.eslintcache
# compiled output
/dist
+1
View File
@@ -0,0 +1 @@
v20.5.0
+69
View File
@@ -1,5 +1,74 @@
exclude: |
(?x)^(
^src/dashboard/.*|
^src/core/engines/webjs/.*html|
^src/plus/engines/webjs/.*html
)$
repos:
- repo: local
hooks:
- id: commit-message-prefix
name: Validate Commit Message for src/plus Changes
entry: python ./.precommit/validate_commit_message.py
language: python
stages: [commit-msg]
- repo: local
hooks:
- id: lint
stages: [pre-commit]
name: lint
language: system
entry: bash -c '$HOME/.nvm/nvm-exec npm run lint-cache'
pass_filenames: false
files: |
(?x)^(
src/.*|
)$
- repo: https://github.com/pre-commit/mirrors-prettier
rev: 'v3.1.0'
hooks:
- id: prettier
stages: [pre-commit]
exclude: |
(?x)^(
docs/.*|
README.md|
)$
- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
rev: v1.1.2
hooks:
- id: markdown-toc
stages: [pre-commit]
name: README.md
files: ^README.md$
- repo: local
hooks:
- id: no-plus-in-core
stages: [pre-commit]
name: No "plus" in core
language: pygrep
entry: 'plus'
files: |
(?x)^(
src/api/.*|
src/core/.*|
src/structures/.*|
src/config.service.ts|
)$
- repo: local
hooks:
- id: no-console-log
stages: [pre-commit]
name: No console.log() calls
language: pygrep
entry: 'console\.log'
exclude: |
(?x)^(
entrypoint.sh|
.pre-commit-config.yaml|
^src/core/engines/webjs/session.webjs.core.ts|
)$
+38
View File
@@ -0,0 +1,38 @@
import subprocess
import sys
def get_staged_files():
result = subprocess.run(["git", "diff", "--cached", "--name-only"], stdout=subprocess.PIPE, text=True)
files = result.stdout.splitlines()
return files
def get_commit_message(commit_msg_filepath):
with open(commit_msg_filepath, 'r') as f:
return f.readline().strip()
def main():
commit_msg_filepath = sys.argv[1]
commit_message = get_commit_message(commit_msg_filepath)
staged_files = get_staged_files()
has_plus_changes = any(f.startswith('src/plus') for f in staged_files)
print(commit_message)
starts_with_plus = commit_message.startswith('[PLUS]')
if has_plus_changes and not starts_with_plus:
print("'[PLUS]' not found in commit message, but there's changes are from 'src/plus'.")
return 1
if starts_with_plus and not all(f.startswith('src/plus') for f in staged_files):
print("'[PLUS]' found in commit message, but there's changes from other directories. \n"
"Changes MUST be only from 'src/plus'.")
return 1
return 0
if __name__ == "__main__":
sys.exit(main())
+11 -2
View File
@@ -1,4 +1,13 @@
{
"singleQuote": true,
"trailingComma": "all"
}
"trailingComma": "all",
"endOfLine": "auto",
"arrowParens": "always",
"bracketSpacing": true,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"quoteProps": "as-needed",
"proseWrap": "always",
"printWidth": 80
}
+1
View File
@@ -0,0 +1 @@
network-timeout 60000
+3
View File
@@ -0,0 +1,3 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.6.3.cjs
+4
View File
@@ -0,0 +1,4 @@
# Changelog
You can find changelog on
[the changelog page](https://waha.devlike.pro/docs/help/changelog/)
+1
View File
@@ -0,0 +1 @@
waha.devlike.pro
+94 -18
View File
@@ -1,24 +1,100 @@
FROM node:15
# Chrome
RUN apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
#
# Build
#
ARG NODE_VERSION=20.12.2-bullseye
FROM node:${NODE_VERSION} as build
ENV PUPPETEER_SKIP_DOWNLOAD=True
# npm packages
WORKDIR /app
WORKDIR /src
COPY package.json .
COPY package-lock.json .
RUN npm install
COPY yarn.lock .
RUN yarn set version 3.6.3
RUN yarn install
# App
WORKDIR /app
ADD . /app
RUN npm run build
EXPOSE 3000
WORKDIR /src
ADD . /src
RUN yarn install
RUN yarn build && find ./dist -name "*.d.ts" -delete
CMD npm run start:prod
#
# Dashboard
#
FROM node:${NODE_VERSION} as dashboard
# Download WAHA Dashboard
ENV WAHA_DASHBOARD_SHA c1a91f879a35f0ae32d46ddb2e061ac1819a3d4f
RUN \
wget https://github.com/devlikeapro/dashboard/archive/${WAHA_DASHBOARD_SHA}.zip \
&& unzip ${WAHA_DASHBOARD_SHA}.zip -d /tmp/dashboard \
&& mkdir -p /dashboard \
&& mv /tmp/dashboard/dashboard-${WAHA_DASHBOARD_SHA}/* /dashboard/ \
&& rm -rf ${WAHA_DASHBOARD_SHA}.zip \
&& rm -rf /tmp/dashboard/dashboard-${WAHA_DASHBOARD_SHA}
#
# Final
#
FROM node:${NODE_VERSION} as release
ENV PUPPETEER_SKIP_DOWNLOAD=True
# Quick fix for memory potential memory leaks
# https://github.com/devlikeapro/waha/issues/347
ENV NODE_OPTIONS="--max-old-space-size=16384"
ARG USE_BROWSER=chromium
RUN echo "USE_BROWSER=$USE_BROWSER"
# Install ffmpeg to generate previews for videos
RUN apt-get update && apt-get install -y ffmpeg --no-install-recommends && rm -rf /var/lib/apt/lists/*
# Install zip and unzip
RUN apt-get update && apt-get install -y zip unzip --no-install-recommends && rm -rf /var/lib/apt/lists/*
# Install fonts if using either chromium or chrome
RUN if [ "$USE_BROWSER" = "chromium" ] || [ "$USE_BROWSER" = "chrome" ]; then \
apt-get update \
&& apt-get install -y fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*; \
fi
# Install Chromium
RUN if [ "$USE_BROWSER" = "chromium" ]; then \
apt-get update \
&& apt-get update \
&& apt-get install -y chromium \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*; \
fi
# Install Chrome
# Available versions:
# https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
ARG CHROME_VERSION="126.0.6478.182-1"
RUN if [ "$USE_BROWSER" = "chrome" ]; then \
wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& apt-get update \
&& apt install -y /tmp/chrome.deb \
&& rm /tmp/chrome.deb \
&& rm -rf /var/lib/apt/lists/*; \
fi
# Attach sources, install packages
WORKDIR /app
COPY package.json ./
COPY --from=build /src/node_modules ./node_modules
COPY --from=build /src/dist ./dist
COPY --from=dashboard /dashboard ./dist/dashboard
COPY entrypoint.sh /entrypoint.sh
# Chokidar options to monitor file changes
ENV CHOKIDAR_USEPOLLING=1
ENV CHOKIDAR_INTERVAL=5000
# WAHA variables
ENV WAHA_ZIPPER=ZIPUNZIP
# Run command, etc
EXPOSE 3000
CMD ["/entrypoint.sh"]
+37 -4
View File
@@ -1,8 +1,41 @@
build:
docker build . -t allburov/whatsapp-http-api
docker build . -t devlikeapro/waha
run:
docker run --rm -v `pwd`/tokens:/app/tokens -p 127.0.0.1:3000:3000/tcp --name whatsapp-http-api allburov/whatsapp-http-api
build-chrome:
docker build . -t devlikeapro/waha-plus:chrome --build-arg USE_BROWSER=chrome
build-noweb:
docker build . -t devlikeapro/waha:noweb --build-arg USE_BROWSER=none
build-all: build build-chrome build-noweb
build-plus:
docker build . -t devlikeapro/waha-plus
build-ssh:
# check IMAGE provided
@[ "${IMAGE}" ] || ( echo "Add APP: make build-ssh image=devlikeapro/waha"; exit 1 );
eval $(ssh-agent) && \
ssh-add ~/.ssh/id_rsa && \
docker buildx build --ssh default=${SSH_AUTH_SOCK} . -t ${IMAGE} --build-arg USE_BROWSER=none
stop:
docker stop waha
clean: stop
sudo rm -rf .sessions
push:
docker push allburov/whatsapp-http-api
docker push devlikeapro/waha
for-swagger:
WHATSAPP_SWAGGER_CONFIG_ADVANCED=true . ${NVM_DIR}/nvm.sh && nvm exec yarn start
up-noweb:
. ${NVM_DIR}/nvm.sh && nvm exec yarn up @adiwajshing/baileys@github:devlikeapro/Baileys#fork-master-channels-2
up-webjs:
. ${NVM_DIR}/nvm.sh && nvm exec yarn up whatsapp-web.js@github:devlikeapro/whatsapp-web.js#fork-webpack-exodus-channels
start-proxy:
docker run --rm -d --name squid-container -e TZ=UTC -p 3128:3128 ubuntu/squid:5.2-22.04_beta
+160 -147
View File
@@ -1,184 +1,197 @@
# WhatsApp HTTP API Free
# WAHA
WhatsApp HTTP API that you can configure in a click! It's really Free! :)
<p align="center">
<img src="./logo.png" style='border-radius: 50%' width='150'/>
</p>
The project provides you HTTP API for Whatsapp that you can use to send and receive messages. You can
go [through currently supported methods in Swagger](https://allburov.github.io/whatsapp-http-api/)
**WAHA** - **W**hats**A**pp **H**TTP **A**PI (REST API) that you can install on your own server and run in less than 5 minutes!
The project is an HTTP API wrapper around https://github.com/orkestral/venom
[![Docker Pulls](https://img.shields.io/docker/pulls/devlikeapro/whatsapp-http-api)](https://hub.docker.com/r/devlikeapro/waha)
- Documentation: [https://waha.devlike.pro/](https://waha.devlike.pro/)
- Swagger Example: [https://waha.devlike.pro/swagger](https://waha.devlike.pro/swagger)
# Tables of Contents
<!-- toc -->
- [Installation](#installation)
- [First Steps](#first-steps)
* [Run WhatsAPP HTTP API](#run-whatsapp-http-api)
* [Create a new session and login](#create-a-new-session-and-login)
* [Send a text message](#send-a-text-message)
- [Receive messages](#receive-messages)
+ [Python echo server](#python-echo-server)
- [Environment variables](#environment-variables)
* [Common](#common)
* [Webhooks](#webhooks)
* [File storage](#file-storage)
- [How to](#how-to)
* [How to build the newest Docker image locally](#how-to-build-the-newest-docker-image-locally)
- [Support](#support)
- [Features](#features)
* [Messages](#messages)
* [Sessions](#sessions)
* [Security](#security)
* [Updates](#updates)
* [Groups](#groups)
* [Contacts](#contacts)
- [Quick start](#quick-start)
* [Requirements](#requirements)
* [Send your first message](#send-your-first-message)
+ [1. Download image](#1-download-image)
+ [2. Run WhatsApp HTTP API](#2-run-whatsapp-http-api)
+ [3. Start a new session](#3-start-a-new-session)
+ [4. Get and scan QR](#4-get-and-scan-qr)
+ [5. Get the screenshot](#5-get-the-screenshot)
+ [6. Send a text message](#6-send-a-text-message)
* [What is next?](#what-is-next)
<!-- tocstop -->
# Installation
# Features
## Messages
- Send messages
- Receive messages
- Message replies
- Send location
- Receive location
- React to messages
- Send media (images/documents/files)
- Send voice messages
- Receive media (images/audio/video/documents)
- Receive messages - webhook retries
## Sessions
- Multi Device
- Get the screenshot
- Session saving (don't have to scan QR on every restart)
- Single WhatsApp account running inside one container
- Multiple WhatsApp account running inside one container
## Security
- Swagger panel authentication
- API authentication
## Updates
- Bug fixes and updates come as soon as they are implemented.
## Groups
- Create a group
- Get invite for group
- Modify group info (subject, description)
- Add group participants
- Kick group participants
- Promote/demote group participants
## Contacts
- Mute/unmute chats
- Block/unblock contacts
- Get contact info
- Get profile pictures
- Get presence (online\offline\typing) status
# Quick start
## Requirements
Only thing that you must have - installed docker. Please follow the original
instruction [how to install docker](https://docs.docker.com/get-docker/)
instruction <a href="https://docs.docker.com/get-docker/" target="_blank" rel="noopener">how to install docker -></a>.
When you are ready - come back and follows the below steps to send the first text message to WhatsApp via HTTP API!
{{< details "Why Docker?" >}}
Docker makes it easy to ship all-in-one solution with the runtime and dependencies. You don't have to worry about
language-specific libraries or chrome installation.
Also Docker makes installation and update processes so simple, just one command!
{{< /details >}}
## Send your first message
Let's go over steps that allow you to send your first text message via WhatsApp HTTP API!
### 1. Download image
Assuming you have installed [Docker](https://docs.docker.com/get-docker/), let's download the image.
```bash
docker pull allburov/whatsapp-http-api
docker pull devlikeapro/waha
```
# First Steps
We're going to go through basic steps and send a text message at the end!
```bash
docker login -u devlikeapro -p {KEY}
docker pull devlikeapro/waha-plus
docker logout
```
## Run WhatsAPP HTTP API
Read more about how to get `PASSWORD` for [Plus Version →]({{< relref "plus-version" >}})
### 2. Run WhatsApp HTTP API
Run WhatsApp HTTP API:
```bash
docker run -it --rm -v `pwd`/tokens:/app/tokens -p 127.0.0.1:3000:3000/tcp --name whatsapp-http-api allburov/whatsapp-http-api
docker run -it --rm -p 3000:3000/tcp --name waha devlikeapro/waha
# It prints logs and the last line must be
# It prints logs and the last line must be
# WhatsApp HTTP API is running on: http://[::1]:3000
```
Open the link in your browser: http://localhost:3000/
Open the link in your browser [http://localhost:3000/](http://localhost:3000/) and you'll see API documentation
(Swagger).
Note: We don't recommend expose the API outside the world because it does not
support ([yet](https://github.com/allburov/whatsapp-http-api/issues/4)) authorization!
## Create a new session and login
### 3. Start a new session
1. To start a new session you should have your mobile phone with installed WhatsApp application close to you. Please go
and read how what we'll need to a bit
later: [How to log in - the instruction on WhatsApp site](https://faq.whatsapp.com/381777293328336/?helpref=hc_fnav)
1. Open API documentation at http://localhost:3000/
1. **Start a new session with a name** (you can use `default` for the start) - find `POST /api/session/start`, click
on **Try it out**, then **Execute** a bit below.
![](./docs/images/session-start.png)
1. **Scan QR Code** - find `GET /api/screenshot` and execute it, it'll show you QR code that you must scan with your
device.
![](./docs/images/qr.png)
1. **Get a screenshot again** - it'll show you the screenshot of you Whatsapp instance. If you can get the actual
screenshot - then you're ready to start sending messages!
![](./docs/images/screenshot.png)
To start a new session you should have your mobile phone with installed WhatsApp application close to you.
## Send a text message
Please go and read how what we'll need to a bit
later:
<a href="https://faq.whatsapp.com/381777293328336/?helpref=hc_fnav" target="_blank">
How to log in - the instruction on WhatsApp site
</a>
Let's try to send a message - you can either find `POST /api/sendText` in swagger (http://localhost:3000/) or
use `curl` or just open a link in a browser (change the phone
before!) http://localhost:3000/api/sendText?phone=79776772457&text=Hello+from+WhatsApp+HTTP+API+Free!
When your ready - find `POST /api/sessions`, click on **Try it out**, then **Execute** a bit below.
The example payload:
```json
{
"name": "default"
}
```
By using the request with `name` values you can start multiple session (WhatsApp accounts) inside the single docker container in Plus
### 4. Get and scan QR
Find `GET /api/screenshot` and execute it, it shows you QR code.
**Scan the QR with your cell phone's WhatsApp app.**
### 5. Get the screenshot
Execute `GET /api/screenshot` after a few seconds after scanning the QR - it'll show you the screenshot of you Whatsapp
instance. If you can get the actual screenshot - then you're ready to start sending messages!
### 6. Send a text message
Let's send a text message - find `POST /api/sendText` in [swagger](http://localhost:3000/) and change `chatId` this
way: use a phone international phone number without `+` symbol and add `@c.us` at the end.
For phone number `12132132131` the `chatId` is `12132132131@c.us`.
The example payload:
```json
{
"chatId": "12132132130@c.us",
"text": "Hi there!",
"session": "default"
}
```
Also, you can use `curl` and send POST request like this:
```bash
# Phone without +
# Using GET
curl "http://localhost:3000/api/sendText?phone=79776772457&text=Hello+from+WhatsApp+HTTP+API+Free!"
# Using POST
export PHONE=79776772457
curl -d "{\"chatId\": \"${PHONE}@c.us\", \"text\": \"Hello from WhatsApp HTTP API Free\" }" -H "Content-Type: application/json" -X POST http://localhost:3000/api/sendText
export PHONE=12132132130
curl -d "{\"chatId\": \"${PHONE}@c.us\", \"text\": \"Hello from WhatsApp HTTP API\" }" -H "Content-Type: application/json" -X POST http://localhost:3000/api/sendText
```
# Receive messages
To show how to receive messages we'll create a simple "echo" server with two functions:
1. When we receive a text message - just send the text back
2. When we receive a message with a file (an image, a voice message) - download it and send the path back
In order to send you messages we use **Webhooks** (look at them below) and configure them via environments variables. So
what you need to
create "echo" server is HTTP server that will receive JSON POST request and then call back WhatsApp HTTP API
via `POST /api/sendText` endpoint with JSON body.
### Python echo server
We use Python. Feel free to create your favorite language example and contribute to the project!
Run "echo" server in one terminal and leave it working:
```bash
# if you haven't already
git clone https://github.com/allburov/whatsapp-http-api.git
cd whatsapp-http-api
python -mpip install -r examples/requirements.txt
export FLASK_APP=examples/echo.py
flask run
```
Visit http://localhost:5000 and check that we are good to go further.
Let's start WhatsApp HTTP API and configure the "on message" webhook and point it on our "http://localhost:5000/message"
endpoint:
```bash
docker run -it -v `pwd`/tokens:/app/tokens --network=host -e WHATSAPP_HOOK_ONMESSAGE=http://localhost:5000/message allburov/whatsapp-http-api
```
Now go ahead, open the second whatsapp and send to our WhatsApp HTTP API a text message! It must reply the same text.
If you try to send an image the "echo server" will send a path to the downloaded file.
# Environment variables
## Common
- `DEBUG` - show debug and verbose logs, set in any value
- `WHATSAPP_API_PORT` - listen port for HTTP server (default: `3000`)
- `WHATSAPP_API_HOSTNAME` - Hostname for HTTP server (default: `localhost`)
- `WHATSAPP_START_SESSION` - start session with that name right after launching the app
## Webhooks
The description of [webhooks you can in Venom README.md, section Events](https://github.com/orkestral/venom#events)
All webhooks are disabled by default:
- `WHATSAPP_HOOK_ONANYMESSAGE=http://localhost/uri`
- `WHATSAPP_HOOK_ONMESSAGE=http://localhost/uri`
- `WHATSAPP_HOOK_ONSTATECHANGE=http://localhost/uri`
- `WHATSAPP_HOOK_ONACK=http://localhost/uri`
- `WHATSAPP_HOOK_ONADDEDTOGROUP=http://localhost/uri`
If you want to look at the payload of the webhooks - use the url for that `https://httpbin.org/post`.
```bash
docker run -it -v `pwd`/tokens:/app/tokens --network=host -e WHATSAPP_HOOK_ONMESSAGE=https://httpbin.org/post allburov/whatsapp-http-api
```
## File storage
- `WHATSAPP_FILES_FOLDER` - folder where will be stored files from chats (images, voice messages) (
default: `/tmp/whatsapp-files`)
- `WHATSAPP_FILES_MIMETYPES` - download only these mimetypes from messages (download all files be default). Mimetypes
must be separated by a comma, without spaces: `audio,image/png,image/gif`. In order to choose type use prefix (
like `audio,image`).
- `WHATSAPP_FILES_LIFETIME`- to keep free space files will be removed after this time (default: `180`, in seconds)
# How to
## How to build the newest Docker image locally
If the changes haven't been released yet from `main` branch - you can build your own version from the git repository
```bash
git clone https://github.com/allburov/whatsapp-http-api.git
cd whatsapp-http-api
docker build . -t allburov/whatsapp-http-api
```
# Support
If you want to support the project - you can either:
1. Create a Pull Request for desired functionality
2. Support [the project one time, every month or get access to telegram channel on Boosty](https://boosty.to/allburov)
## What is next?
[Go and read the full documentation!](https://waha.devlike.pro/docs/overview/introduction/)
+114
View File
@@ -0,0 +1,114 @@
services:
waha:
# Check available Docker images:
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
image: devlikeapro/waha
container_name: waha
ports:
- '3000:3000/tcp'
environment:
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
# https://docs.webhook.site/
- WHATSAPP_HOOK_URL=https://webhook.site/11111111-1111-1111-1111-11111111
- WHATSAPP_HOOK_EVENTS=message
- WHATSAPP_DEFAULT_ENGINE=WEBJS
restart: always
waha-plus:
# Check available Docker images:
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
image: devlikeapro/waha-plus:chrome
container_name: waha-plus
ports:
- '3000:3000/tcp'
volumes:
- './.sessions:/app/.sessions'
environment:
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
# - WHATSAPP_RESTART_ALL_SESSIONS=True
# - WHATSAPP_HOOK_URL=https://webhook.site/11111111-1111-1111-1111-11111111
# - WHATSAPP_HOOK_EVENTS=message
# - WHATSAPP_API_HOSTNAME=localhost
- WHATSAPP_DEFAULT_ENGINE=WEBJS
- WHATSAPP_API_KEY=321
# Username and password for Swagger
- WHATSAPP_SWAGGER_USERNAME=swagger
- WHATSAPP_SWAGGER_PASSWORD=admin
# Username and password for WAHA Dashboard
# you can use the same username and password for both Swagger and Dashboard
# Default - waha / waha
- WAHA_DASHBOARD_USERNAME=waha
- WAHA_DASHBOARD_PASSWORD=waha
# Engine specific environment variables
# - WAHA_WEBJS_WEB_VERSION=2.2412.54-videofix
restart: always
waha-plus--mongodb:
# Check available Docker images:
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
image: devlikeapro/waha-plus:chrome
container_name: waha-plus--mongodb
ports:
- '3000:3000/tcp'
volumes:
- './.sessions:/app/.sessions'
environment:
# Environment variables from https://waha.devlike.pro/docs/how-to/config/
# - WHATSAPP_RESTART_ALL_SESSIONS=True
# - WHATSAPP_HOOK_URL=https://webhook.site/11111111-1111-1111-1111-11111111
# - WHATSAPP_HOOK_EVENTS=message
# - WHATSAPP_API_KEY=321
# - WHATSAPP_SWAGGER_USERNAME=admin
# - WHATSAPP_SWAGGER_PASSWORD=123
# - WAHA_DASHBOARD_USERNAME=admin
# - WAHA_DASHBOARD_PASSWORD=123
# - WHATSAPP_API_HOSTNAME=localhost
- WHATSAPP_DEFAULT_ENGINE=WEBJS
- WHATSAPP_SESSIONS_MONGO_URL=mongodb://mongodb:27017
restart: always
# Let's Encrypt + Certbot
# https://waha.devlike.pro/docs/how-to/security/#https
waha-https--certbot:
image: devlikeapro/waha-plus
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- './.sessions:/app/.sessions'
- '/etc/letsencrypt:/etc/letsencrypt'
environment:
- DOMAIN=waha.example.pro
- WHATSAPP_API_HOSTNAME=${DOMAIN}
- WAHA_HTTPS_ENABLED=true
- WAHA_HTTPS_PATH_KEY=/etc/letsencrypt/live/${DOMAIN}/privkey.pem
- WAHA_HTTPS_PATH_CERT=/etc/letsencrypt/live/${DOMAIN}/cert.pem
- WAHA_HTTPS_PATH_CA=/etc/letsencrypt/live/${DOMAIN}/chain.pem
# Self-signed certificates example
# https://waha.devlike.pro/docs/how-to/security/#https
waha-https--self-signed:
image: devlikeapro/waha-plus
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- './.sessions:/app/.sessions'
- './.secrets:/app/.secrets'
environment:
- WAHA_HTTPS_ENABLED=true
- WAHA_HTTPS_PATH_KEY=.secrets/privkey.pem
- WAHA_HTTPS_PATH_CERT=.secrets/cert.pem
- WAHA_HTTPS_PATH_CA=.secrets/chain.pem
mongodb:
image: mongo
container_name: mongodb
ports:
- '27017:27017/tcp'
volumes:
- mongodb_data:/data/db
restart: always
volumes:
mongodb_data: {}
+237 -9
View File
@@ -1,15 +1,243 @@
version: '3.4'
#
# https://waha.devlike.pro/docs/how-to/install/
# Here's we provide a simple example of how to install WAHA using Docker Compose.
#
# We're assuming you have Docker and Docker Compose installed.
# If you don't have Docker Compose installed, you can follow the official guide:
# https://docs.docker.com/compose/install/
#
services:
whatsapp-http-api:
build: .
image: allburov/whatsapp-http-api
waha:
# Always restart the container on failure
restart: always
#
# Image
#
image: devlikeapro/waha-plus:latest # or devlikeapro/waha:latest if you're using WAHA Core
#
# We strongly recommend using the pinned version of WAHA
# https://waha.devlike.pro/docs/how-to/engines/#versions
# image: devlikeapro/waha-plus:latest-2024.7.6 # 'latest' is not mistaken here
#
# Multiple images are available
# https://waha.devlike.pro/docs/how-to/engines/#docker-images
# image: devlikeapro/waha-plus:chrome
#
# The first port can be any free port you want
# The second port must be the same as WHATSAPP_API_PORT or 3000 by default
# Consider using the same port for simplicity
ports:
- '3000:3000/tcp'
# NOTE: if you're using HTTP, you can use the following port mapping
#- '80:3000/tcp'
# NOTE: if you're using HTTPS, you can use the following port mapping
#- '443:3000/tcp'
volumes:
# Store sessions in the .sessions folder (comment it if you're using MongoDB)
# Doesn't work with WAHA Core
- './.sessions:/app/.sessions'
# https://waha.devlike.pro/docs/how-to/storages/#save-media-files-between-the-container-restarts
- './.media:/app/.media'
# If you're using certbot for HTTPS, you can use the following volume mapping
# https://waha.devlike.pro/blog/setting-up-https-for-waha/#lets-encrypt-certbot--waha
# - '/etc/letsencrypt:/etc/letsencrypt'
# WAHA Configuration
# https://waha.devlike.pro/docs/how-to/config/
environment:
#
# Common
#
# If you know the right URL, you can use it here.
# Use any port in WHATSAPP_API_PORT and domain in WHATSAPP_API_HOSTNAME
# https://waha.devlike.pro/docs/how-to/config/#common
#- WHATSAPP_API_SCHEMA=http
#- WHATSAPP_API_PORT=3000
#- WHATSAPP_API_HOSTNAME=localhost
#
# Security
#
# https://waha.devlike.pro/docs/how-to/security/
#
- WHATSAPP_API_KEY=321
- WAHA_DASHBOARD_USERNAME=waha
- WAHA_DASHBOARD_PASSWORD=waha
#- WHATSAPP_SWAGGER_USERNAME=admin
#- WHATSAPP_SWAGGER_PASSWORD=admin
#
# Dashboard
#
# https://waha.devlike.pro/docs/how-to/waha-dashboard/#configuration
# Enabled by default
#- WAHA_DASHBOARD_ENABLED=true
#- WAHA_DASHBOARD_USERNAME=waha
#- WAHA_DASHBOARD_PASSWORD=waha
#
# Logging
# https://waha.devlike.pro/docs/how-to/observability/#logging
#
- WAHA_LOG_FORMAT=PRETTY
# Set log format to JSON if you consume logs with log management systems
#- WAHA_LOG_FORMAT=JSON
- WAHA_LOG_LEVEL=info
# If you want to see more logs, you can set the log level to debug
#- WAHA_LOG_LEVEL=debug
# DEBUG=1 # shortcut for setting log level to debug
#
# Engine
#
# Choose the right engine for your needs (WEBJS by default)
# https://waha.devlike.pro/docs/how-to/engines/
- WHATSAPP_DEFAULT_ENGINE=WEBJS
# Use NOWEB engine for the fastest performance
#- WHATSAPP_DEFAULT_ENGINE=NOWEB
#
# Sessions
#
# https://waha.devlike.pro/docs/how-to/config/#sessions
# Restart all sessions when container starts
- WHATSAPP_RESTART_ALL_SESSIONS=True
# Do not print QR codes in logs
- WAHA_PRINT_QR=False
#
# OR you can specify sessions by name, if you have handful amount of sessions
#- WHATSAPP_START_SESSION=session1,session2
# Do not use both WHATSAPP_RESTART_ALL_SESSIONS and WHATSAPP_START_SESSION parameters
#
#
# Swagger
#
# https://waha.devlike.pro/docs/how-to/swagger/
#- WHATSAPP_SWAGGER_USERNAME=admin
#- WHATSAPP_SWAGGER_PASSWORD=admin
# Disable Swagger
#- WHATSAPP_SWAGGER_ENABLED=false
# Enable advanced Swagger configuration
#- WHATSAPP_SWAGGER_CONFIG_ADVANCED=true
#
# Swagger White Label customization
# https://waha.devlike.pro/docs/how-to/swagger/#white-label
#- WHATSAPP_SWAGGER_TITLE=WAHA API
#
#
# Global Proxy Settings
# https://waha.devlike.pro/docs/how-to/config/#global-proxy-configuration
# You can also set proxy settings for each session later when starting it
# https://waha.devlike.pro/docs/how-to/sessions/#configure-proxy
#- WHATSAPP_PROXY_SERVER=proxy.example.com:3128
#-WHATSAPP_PROXY_SERVER_USERNAME=user
#-WHATSAPP_PROXY_SERVER_PASSWORD=pass
#
#
# HTTPS Configuration
#
# https://waha.devlike.pro/docs/how-to/config/#https
# Consider using certbot for HTTPS
# https://waha.devlike.pro/blog/setting-up-https-for-waha/#lets-encrypt-certbot--waha
#- WAHA_HTTPS_ENABLED=true
#- WAHA_HTTPS_PATH_KEY=/etc/letsencrypt/live/waha.example.pro/privkey.pem
#- WAHA_HTTPS_PATH_CERT=/etc/letsencrypt/live/waha.example.pro/cert.pem \
#- WAHA_HTTPS_PATH_CA=/etc/letsencrypt/live/waha.example.pro/chain.pem
#- WHATSAPP_API_SCHEMA=https
#- WHATSAPP_API_PORT=3000
#- WHATSAPP_API_HOSTNAME=waha.example.pro
#
#
# Media Configuration
#
# https://waha.devlike.pro/docs/how-to/config/#files
#
# Disable media (images, videos, files) download for incoming messages
#- WHATSAPP_DOWNLOAD_MEDIA=false
#
# Download only specific media types
#- WHATSAPP_FILES_MIMETYPES=image/jpeg,image/png
#
# Media - Local Storage
# https://waha.devlike.pro/docs/how-to/storages/#media---local
#
# Set to 0 to keep media files forever
# https://waha.devlike.pro/docs/how-to/storages/#save-media-files-between-the-container-restarts
- WAHA_MEDIA_STORAGE=LOCAL
- WHATSAPP_FILES_LIFETIME=0
- WHATSAPP_FILES_FOLDER=/app/.media
# Keep media files for 180 seconds (3 minutes)
#- WHATSAPP_FILES_LIFETIME=180
#
# Media - S3 Storage
# https://waha.devlike.pro/docs/how-to/storages/#media---s3
#- WAHA_MEDIA_STORAGE=S3
#- WAHA_S3_REGION=eu-west-2
#- WAHA_S3_BUCKET=waha
#- WAHA_S3_ACCESS_KEY_ID=minioadmin
#- WAHA_S3_SECRET_ACCESS_KEY=minioadmin
#- WAHA_S3_ENDPOINT=http://minio:9000 # Not required if you're using AWS S3
#- WAHA_S3_FORCE_PATH_STYLE=True # Required for Minio
#- WAHA_S3_PROXY_FILES=True # Required for docker-compose setup
#
# Global Webhooks
#
# https://waha.devlike.pro/docs/how-to/config/#webhooks
# https://waha.devlike.pro/docs/how-to/webhooks/
#- WHATSAPP_HOOK_URL=https://webhook.site/11111111-1111-1111-1111-11111111
#- WHATSAPP_HOOK_EVENTS=session.status,message,message.reaction
#
#
# MongoDB Configuration
# https://waha.devlike.pro/docs/how-to/storages/#sessions---mongodb
#- WHATSAPP_SESSIONS_MONGO_URL=mongodb://mongodb:27017
#
# NOTE: Only if you're using MongoDB
# https://waha.devlike.pro/docs/how-to/storages/#sessions---mongodb
# Comment this block if you're using MongoDB
mongodb:
image: mongo
container_name: mongodb
ports:
- '27017:27017/tcp'
volumes:
- mongodb_data:/data/db
restart: always
# NOTE: Only if you're using S3 to save media files
# https://waha.devlike.pro/docs/how-to/storages/#media---s3
# Comment this block if you're using AWS S3
minio:
image: quay.io/minio/minio
container_name: minio
restart: always
ports:
- 3000:3000
shm_size: "1gb"
- '9000:9000'
- '9001:9001'
environment:
- WHATSAPP_DOWNLOADS_FOLDER=/app/files/downloads
MINIO_REGION: 'eu-west-2'
MINIO_ROOT_USER: 'minioadmin'
MINIO_ROOT_PASSWORD: 'minioadmin'
volumes:
- ./tokens:/app/tokens
- ./files:/app/files
- minio_data:/data
command: server /data --console-address ":9001"
volumes:
# NOTE: Only if you're using MongoDB
mongodb_data: {}
minio_data: {}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

-57
View File
@@ -1,57 +0,0 @@
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>allburov/whatsapp-http-api</title>
<link href="./swagger-ui.css" rel="stylesheet" type="text/css">
<link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/>
<link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/>
<style>
html {
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
background: #fafafa;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script charset="UTF-8" src="./swagger-ui-bundle.js"></script>
<script charset="UTF-8" src="./swagger-ui-standalone-preset.js"></script>
<script>
window.onload = function () {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: "openapi.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
// End Swagger UI call region
window.ui = ui
}
</script>
</body>
</html>
-77
View File
@@ -1,77 +0,0 @@
<!doctype html>
<html lang="en-US">
<head>
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
</body>
</html>
<script>
'use strict';
function run() {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1);
} else {
qp = location.search.substring(1);
}
arr = qp.split("&")
arr.forEach(function (v, i, _arr) {
_arr[i] = '"' + v.replace('=', '":"') + '"';
})
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value)
}
) : {}
isValid = qp.state === sentState
if ((
oauth2.auth.schema.get("flow") === "accessCode" ||
oauth2.auth.schema.get("flow") === "authorizationCode"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
});
}
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg
if (qp.error) {
oauthErrorMsg = "[" + qp.error + "]: " +
(qp.error_description ? qp.error_description + ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: " + qp.error_uri : "");
}
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}
window.addEventListener('DOMContentLoaded', function () {
run();
});
</script>
-908
View File
@@ -1,908 +0,0 @@
{
"openapi": "3.0.0",
"paths": {
"/api/sessions/start": {
"post": {
"operationId": "SessionsController_start",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"201": {
"description": ""
}
},
"tags": [
"sessions"
]
}
},
"/api/sessions/stop": {
"post": {
"operationId": "SessionsController_stop",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"201": {
"description": ""
}
},
"tags": [
"sessions"
]
}
},
"/api/sessions": {
"get": {
"operationId": "SessionsController_list",
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"sessions"
]
}
},
"/api/sendContactVcard": {
"post": {
"operationId": "ChattingController_sendContactVcard",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageContactVcard"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/sendText": {
"get": {
"operationId": "ChattingController_sendTextGet",
"summary": "Send a text message",
"parameters": [
{
"name": "phone",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "text",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "sessionName",
"required": true,
"in": "query",
"schema": {
"default": "default",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"chatting"
]
},
"post": {
"operationId": "ChattingController_sendText",
"summary": "Send a text message",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageText"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/sendLocation": {
"post": {
"operationId": "ChattingController_sendLocation",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageLocation"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/sendLinkPreview": {
"post": {
"operationId": "ChattingController_sendLinkPreview",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageLinkPreview"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/sendImage": {
"post": {
"operationId": "ChattingController_sendImage",
"summary": "NOT IMPLEMENTED YET",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageImage"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/sendFile": {
"post": {
"operationId": "ChattingController_sendFile",
"summary": "NOT IMPLEMENTED YET",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageFile"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/reply": {
"post": {
"operationId": "ChattingController_reply",
"summary": "Reply to a text message",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageReply"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/sendSeen": {
"post": {
"operationId": "ChattingController_sendSeen",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatRequest"
}
}
}
},
"responses": {
"201": {
"description": ""
}
},
"tags": [
"chatting"
]
}
},
"/api/startTyping": {
"post": {
"operationId": "ChattingController_startTyping",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatRequest"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "boolean"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/stopTyping": {
"post": {
"operationId": "ChattingController_stopTyping",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatRequest"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "boolean"
}
}
}
}
},
"tags": [
"chatting"
]
}
},
"/api/killServiceWorker": {
"post": {
"operationId": "DeviceController_killServiceWorker",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "boolean"
}
}
}
}
},
"tags": [
"device"
]
}
},
"/api/restartService": {
"post": {
"operationId": "DeviceController_restartService",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "boolean"
}
}
}
}
},
"tags": [
"device"
]
}
},
"/api/getHostDevice": {
"get": {
"operationId": "DeviceController_getHostDevice",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"device"
]
}
},
"/api/getConnectionState": {
"get": {
"operationId": "DeviceController_getConnectionState",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"200": {
"description": ""
}
},
"tags": [
"device"
]
}
},
"/api/getBatteryLevel": {
"get": {
"operationId": "DeviceController_getBatteryLevel",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "number"
}
}
}
}
},
"tags": [
"device"
]
}
},
"/api/isConnected": {
"get": {
"operationId": "DeviceController_isConnected",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "boolean"
}
}
}
}
},
"tags": [
"device"
]
}
},
"/api/getWAVersion": {
"get": {
"operationId": "DeviceController_getWAVersion",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionRequest"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
},
"tags": [
"device"
]
}
},
"/api/screenshot": {
"get": {
"operationId": "ScreenshotController_screenshot",
"parameters": [
{
"name": "sessionName",
"required": true,
"in": "query",
"schema": {
"default": "default",
"type": "string"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"screenshot"
]
}
}
},
"info": {
"title": "WhatsApp HTTP API",
"description": "WhatsApp HTTP API that you can configure in a click!",
"version": "1.0",
"contact": {}
},
"tags": [
{
"name": "sessions",
"description": "Control your WhatsApp sessions"
},
{
"name": "screenshot",
"description": "Get screenshot of WhatsApp and show QR code"
},
{
"name": "chatting",
"description": "Chat methods"
},
{
"name": "device",
"description": "Device information"
}
],
"servers": [],
"components": {
"securitySchemes": {
"api_key": {
"type": "apiKey",
"in": "header",
"name": "X-VENOM-TOKEN",
"description": "Your secret key"
}
},
"schemas": {
"SessionRequest": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
}
},
"required": [
"sessionName"
]
},
"MessageContactVcard": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
},
"chatId": {
"type": "string",
"example": "791231234567@c.us"
},
"contactsId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"sessionName",
"chatId",
"contactsId",
"name"
]
},
"MessageText": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
},
"chatId": {
"type": "string",
"example": "791231234567@c.us"
},
"text": {
"type": "string"
}
},
"required": [
"sessionName",
"chatId",
"text"
]
},
"MessageLocation": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
},
"chatId": {
"type": "string",
"example": "791231234567@c.us"
},
"latitude": {
"type": "string"
},
"longitude": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"sessionName",
"chatId",
"latitude",
"longitude",
"title"
]
},
"MessageLinkPreview": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
},
"chatId": {
"type": "string",
"example": "791231234567@c.us"
},
"url": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"sessionName",
"chatId",
"url",
"title"
]
},
"MessageImage": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
},
"chatId": {
"type": "string",
"example": "791231234567@c.us"
},
"path": {
"type": "string"
},
"filename": {
"type": "string"
},
"caption": {
"type": "string"
}
},
"required": [
"sessionName",
"chatId",
"path",
"filename",
"caption"
]
},
"MessageFile": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
},
"chatId": {
"type": "string",
"example": "791231234567@c.us"
},
"path": {
"type": "string"
},
"filename": {
"type": "string"
},
"caption": {
"type": "string"
}
},
"required": [
"sessionName",
"chatId",
"path",
"filename",
"caption"
]
},
"MessageReply": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
},
"chatId": {
"type": "string",
"example": "791231234567@c.us"
},
"reply_to": {
"type": "string",
"example": "message.id"
},
"text": {
"type": "string"
}
},
"required": [
"sessionName",
"chatId",
"reply_to",
"text"
]
},
"ChatRequest": {
"type": "object",
"properties": {
"sessionName": {
"type": "string",
"default": "default"
},
"chatId": {
"type": "string",
"example": "791231234567@c.us"
}
},
"required": [
"sessionName",
"chatId"
]
}
}
},
"externalDocs": {
"description": "Github WhatsApp HTTP API",
"url": "https://github.com/allburov/whatsapp-http-api"
}
}
-3
View File
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=544)}([function(e,t,n){"use strict";e.exports=n(129)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return s(e)?e:K(e)}function o(e){return u(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[p])}function s(e){return!(!e||!e[f])}function u(e){return!(!e||!e[h])}function c(e){return s(e)||u(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=u,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<<v,y=g-1,b={},_={value:!1},w={value:!1};function x(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function S(){}function C(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function A(e){return void 0===e.size&&(e.size=e.__iterate(O)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function O(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return N(e,t,0)}function I(e,t){return N(e,t,t)}function N(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var P=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function U(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function q(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:ue(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=P,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return pe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return pe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Z,X,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Z||(Z=new te([]))}function se(e){var t=Array.isArray(Line truncated
//# sourceMappingURL=swagger-ui-bundle.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUIBundle/webpack/universalModuleDefinition","webpack://SwaggerUIBundle/webpack/bootstrap","webpack://SwaggerUIBundle/./node_modules/react/react.js","webpack://SwaggerUIBundle/./node_modules/immutable/dist/immutable.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createClass.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","webpack://SwaggerUIBundle/./src/core/utils.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/inherits.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createSuper.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUIBundle/./node_modules/prop-types/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUIBundle/./node_modules/reselect/es/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/assign.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectSpread2.js","webpack://SwaggerUIBundle/./node_modules/fbjs/lib/invariant.js","webpack://SwaggerUIBundle/./src/core/window.js","webpack://SwaggerUIBundle/./node_modules/react-immutable-proptypes/dist/ImmutablePropTypes.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/extends.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js","webpack://SwaggerUIBundle/./node_modules/react-dom/lib/reactProdInvariant.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUIBundle/./node_modules/fbjs/lib/warning.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js","webpack://SwaggerUIBundle/./src/core/plugins/oas3/helpers.jsx","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/object-assign/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/regenerator/index.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUIBundle/./node_modules/react-dom/lib/ReactDOMComponentTree.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUIBundle/./node_modules/lodash/get.js","webpack://SwaggerUIBundle/./src/core/plugins/spec/actions.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/js-yaml/lib/js-yaml/type.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createForOfIteratorHelper.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/has.js","webpack://SwaggerUIBundle/./node_modules/lodash/isArray.js","webpack://SwaggerUIBundle/(webpack)/buildin/global.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectWithoutProperties.js","webpack://SwaggerUIBundle/./node_modules/fbjs/lib/ExecutionEnvironment.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3Line truncated
-3
View File
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui-es-bundle-core.js.LICENSE.txt */
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=410)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("immutable")},function(e,t,n){e.exports=n(449)},function(e,t,n){var r=n(191);e.exports=function(e,t,n){return t in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports=n(452)},function(e,t,n){var r=n(191);function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),r(e,a.key,a)}}e.exports=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";(function(e){n.d(t,"t",(function(){return me})),n.d(t,"A",(function(){return ve})),n.d(t,"i",(function(){return ge})),n.d(t,"w",(function(){return ye})),n.d(t,"r",(function(){return be})),n.d(t,"u",(function(){return Ee})),n.d(t,"s",(function(){return xe})),n.d(t,"p",(function(){return Se})),n.d(t,"v",(function(){return we})),n.d(t,"y",(function(){return je})),n.d(t,"z",(function(){return Ce})),n.d(t,"K",(function(){return Oe})),n.d(t,"f",(function(){return _e})),n.d(t,"n",(function(){return Ae})),n.d(t,"h",(function(){return ke})),n.d(t,"E",(function(){return Ie})),n.d(t,"L",(function(){return Fe})),n.d(t,"o",(function(){return Ye})),n.d(t,"D",(function(){return Ke})),n.d(t,"a",(function(){return Ge})),n.d(t,"I",(function(){return Ze})),n.d(t,"b",(function(){return Xe})),n.d(t,"H",(function(){return Qe})),n.d(t,"G",(function(){return et})),n.d(t,"F",(function(){return tt})),n.d(t,"k",(function(){return nt})),n.d(t,"d",(function(){return rt})),n.d(t,"g",(function(){return at})),n.d(t,"m",(function(){return ot})),n.d(t,"l",(function(){return it})),n.d(t,"e",(function(){return ct})),n.d(t,"J",(function(){return st})),n.d(t,"x",(function(){return ut})),n.d(t,"B",(function(){return lt})),n.d(t,"C",(function(){return pt})),n.d(t,"j",(function(){return ft})),n.d(t,"c",(function(){return dt})),n.d(t,"q",(function(){return mt}));var r=n(82),a=n.n(r),o=n(130),i=n.n(o),c=n(50),s=n.n(c),u=n(13),l=n.n(u),p=n(30),f=n.n(p),d=n(17),h=n.n(d),m=(n(34),n(32)),v=n.n(m),g=(n(24),n(15),n(157)),y=n.n(g),b=n(21),E=n.n(b),x=n(22),S=n.n(x),w=(n(29),n(16)),j=n.n(w),C=n(12),O=n.n(C),_=n(18),A=n.n(_),k=n(2),I=n.n(k),P=n(45),T=n.n(P),N=n(71),R=n.n(N),M=n(4),D=n.n(M),q=n(14),L=n.n(q),B=n(20),U=n.n(B),V=n(1),z=n.n(V),F=n(375),J=n(376),W=n.n(J),H=n(207),$=n.n(H),Y=n(208),K=n.n(Y),G=n(158),Z=n.n(G),X=n(266),Q=n.n(X),ee=n(102),te=n.n(ee),ne=n(58),re=n.n(ne),ae=n(112),oe=n(26),ie=n(378),ce=n.n(ie),se=n(114),ue=n(379),le=n.n(ue),pe=n(380),fe=n.n(pe),de="default",he=function(e){return z.a.Iterable.isIterable(e)};function me(e){try{var t=JSON.parse(e);if(t&&"object"===U()(t))return t}catch(e){}return!1}function ve(e){return Ee(e)?he(e)?e.toJS():e:{}}function ge(e){var t,n;if(he(e))return e;if(e instanceof oe.a.File)return e;if(!Ee(e))return e;if(L()(e))return D()(n=z.a.Seq(e)).call(n,ge).toList();if(re()(R()(e))){var r,a=function(e){if(!re()(R()(e)))return e;var t,n={},r="_**[]",a={},o=T()(R()(e).call(e));try{for(o.s();!(t=o.n()).done;){var i=t.value;if(n[i[0]]||a[i[0]]&&a[i[0]].containsMultiple){var c,s,u,l;if(!a[i[0]])a[i[0]]={containsMultiple:!0,length:1},n[I()(u=I()(l="".concat(i[0])).call(l,r)).call(u,a[i[0]].length)]=n[i[0]],delete n[i[0]];a[i[0]].length+=1,n[I()(c=I()(s="".concat(i[0])).call(s,r)).call(c,a[i[0]].length)]=i[1]}else n[i[0]]=i[1]}}catch(e){o.e(e)}finally{o.f()}return n}(e);return D()(r=z.a.OrderedMap(a)).call(r,ge)}return D()(t=z.a.OrderedMap(e)).call(t,ge)}function ye(e){return L()(e)?e:[e]}function be(e){return"function"==typeof e}function Ee(e){return!!e&&"object"===U()(e)}function xe(e){return"function"==typeof e}function Se(e){return L()(e)}var we=K.a;function je(e,t){var n;return S()(n=j()(e)).call(n,(function(n,r){return n[r]=t(e[r],r),n}),{})}function Ce(e,t){var n;return S()(n=j()(e)).call(n,(function(n,r){var a=t(e[r],r);return a&&"object"===U()(a)&&E()(n,a),n}),{})}function Oe(e){return function(t){t.dispatch,t.getStateLine truncated
//# sourceMappingURL=swagger-ui-es-bundle-core.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUIBundle/webpack/bootstrap","webpack://SwaggerUIBundle/external \"react\"","webpack://SwaggerUIBundle/external \"immutable\"","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createClass.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","webpack://SwaggerUIBundle/./src/core/utils.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/inherits.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createSuper.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUIBundle/external \"prop-types\"","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUIBundle/external \"reselect\"","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/assign.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectSpread2.js","webpack://SwaggerUIBundle/./src/core/window.js","webpack://SwaggerUIBundle/external \"react-immutable-proptypes\"","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/extends.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js","webpack://SwaggerUIBundle/./src/core/plugins/oas3/helpers.jsx","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/regenerator/index.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUIBundle/./node_modules/lodash/get.js","webpack://SwaggerUIBundle/./src/core/plugins/spec/actions.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createForOfIteratorHelper.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/has.js","webpack://SwaggerUIBundle/./node_modules/lodash/isArray.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectWithoutProperties.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js","webpack://SwaggerUIBundle/./src/core/plugins/oas3/actions.js","webpack://SwaggerUIBundle/./node_modules/lodash/isObject.js","webpack://SwaggerUIBundle/./node_modules/swagger-client/es/helpers.js","webpack://SwaggerUIBundle/./src/core/plugins/err/actions.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/object-define-property.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/array-method-uses-to-length.js","webpack://SwaggerUIBundle/external \"classnames\"","webpack://SwaggerUIBundle/./node_modules/lodash/isFunction.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/promise.js","webpack://SwagLine truncated
-3
View File
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui-es-bundle.js.LICENSE.txt */
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=544)}([function(e,t,n){"use strict";e.exports=n(129)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return s(e)?e:K(e)}function o(e){return u(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[p])}function s(e){return!(!e||!e[f])}function u(e){return!(!e||!e[h])}function c(e){return s(e)||u(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=u,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<<v,y=g-1,b={},_={value:!1},w={value:!1};function x(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function S(){}function C(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function A(e){return void 0===e.size&&(e.size=e.__iterate(O)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function O(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return N(e,t,0)}function I(e,t){return N(e,t,t)}function N(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var P=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function U(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function q(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:ue(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=P,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return pe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return pe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Z,X,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Z||(Z=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():V(e)?new oe(e).fromEntrySeq():z(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ue(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return tLine truncated
//# sourceMappingURL=swagger-ui-es-bundle.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUIBundle/webpack/bootstrap","webpack://SwaggerUIBundle/./node_modules/react/react.js","webpack://SwaggerUIBundle/./node_modules/immutable/dist/immutable.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createClass.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","webpack://SwaggerUIBundle/./src/core/utils.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/inherits.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createSuper.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUIBundle/./node_modules/prop-types/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUIBundle/./node_modules/reselect/es/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/object/assign.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectSpread2.js","webpack://SwaggerUIBundle/./node_modules/fbjs/lib/invariant.js","webpack://SwaggerUIBundle/./src/core/window.js","webpack://SwaggerUIBundle/./node_modules/react-immutable-proptypes/dist/ImmutablePropTypes.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/extends.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js","webpack://SwaggerUIBundle/./node_modules/react-dom/lib/reactProdInvariant.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUIBundle/./node_modules/fbjs/lib/warning.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js","webpack://SwaggerUIBundle/./src/core/plugins/oas3/helpers.jsx","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/object-assign/index.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/regenerator/index.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUIBundle/./node_modules/react-dom/lib/ReactDOMComponentTree.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUIBundle/./node_modules/lodash/get.js","webpack://SwaggerUIBundle/./src/core/plugins/spec/actions.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUIBundle/./node_modules/js-yaml/lib/js-yaml/type.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/createForOfIteratorHelper.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/has.js","webpack://SwaggerUIBundle/./node_modules/lodash/isArray.js","webpack://SwaggerUIBundle/(webpack)/buildin/global.js","webpack://SwaggerUIBundle/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/helpers/objectWithoutProperties.js","webpack://SwaggerUIBundle/./node_modules/fbjs/lib/ExecutionEnvironment.js","webpack://SwaggerUIBundle/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js","webpack://SwaggerUIBundle/.Line truncated
-3
View File
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui-standalone-preset.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(function(){try{return require("esprima")}catch(t){}}()):"function"==typeof define&&define.amd?define(["esprima"],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e(function(){try{return require("esprima")}catch(t){}}()):t.SwaggerUIStandalonePreset=e(t.esprima)}(this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist",n(n.s=241)}([function(t,e,n){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function n(t){return u(t)?t:J(t)}function r(t){return s(t)?t:Z(t)}function i(t){return a(t)?t:V(t)}function o(t){return u(t)&&!c(t)?t:X(t)}function u(t){return!(!t||!t[l])}function s(t){return!(!t||!t[p])}function a(t){return!(!t||!t[h])}function c(t){return s(t)||a(t)}function f(t){return!(!t||!t[d])}e(r,n),e(i,n),e(o,n),n.isIterable=u,n.isKeyed=s,n.isIndexed=a,n.isAssociative=c,n.isOrdered=f,n.Keyed=r,n.Indexed=i,n.Set=o;var l="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",y="delete",v=5,g=1<<v,w=g-1,M={},m={value:!1},_={value:!1};function L(t){return t.value=!1,t}function x(t){t&&(t.value=!0)}function b(){}function j(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i<n;i++)r[i]=t[i+e];return r}function N(t){return void 0===t.size&&(t.size=t.__iterate(D)),t.size}function S(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?N(t)+e:e}function D(){return!0}function I(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function A(t,e){return C(t,e,0)}function E(t,e){return C(t,e,e)}function C(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var O=0,T=1,z=2,k="function"==typeof Symbol&&Symbol.iterator,U="@@iterator",Y=k||U;function P(t){this.next=t}function R(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function Q(){return{value:void 0,done:!0}}function F(t){return!!W(t)}function B(t){return t&&"function"==typeof t.next}function G(t){var e=W(t);return e&&e.call(t)}function W(t){var e=t&&(k&&t[k]||t[U]);if("function"==typeof e)return e}function q(t){return t&&"number"==typeof t.length}function J(t){return null==t?ut():u(t)?t.toSeq():ct(t)}function Z(t){return null==t?ut().toKeyedSeq():u(t)?s(t)?t.toSeq():t.fromEntrySeq():st(t)}function V(t){return null==t?ut():u(t)?s(t)?t.entrySeq():t.toIndexedSeq():at(t)}function X(t){return(null==t?ut():u(t)?s(t)?t.entrySeq():t:at(t)).toSetSeq()}P.prototype.toString=function(){return"[Iterator]"},P.KEYS=O,P.VALUES=T,P.ENTRIES=z,P.prototype.inspect=P.prototype.toSource=function(){return this.toString()},P.prototype[Y]=function(){return this},e(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(t,e){return lt(this,t,e,!0)},J.prototype.__iterator=function(t,e){return pt(this,t,e,!0)},e(Z,J),Z.prototype.toKeyedSeq=function(){return this},e(V,J),V.of=function(){return V(arguments)},V.prototype.toIndexedSeq=function(){return this},V.prototype.toString=function(){return this.__toString("Seq [","]")},V.prototype.__iterate=function(t,e){return lt(this,t,e,!1)},V.prototype.__iterator=function(t,e){return pt(this,t,e,!1)},e(X,J),X.of=function(){return X(arguments)},X.prototype.toSetSeq=function(){return this},J.isSeq=ot,J.Keyed=Z,J.Set=X,J.Indexed=V;var H,K,$,tt="@@__IMMUTABLE_SEQ__@@";function et(t){this._array=t,this.size=t.length}function nt(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function rt(t){this._iterable=t,this.size=t.length||t.size}function it(t){this._iterator=t,this._iteratorCache=[]}function ot(t){return!(!t||!t[tt])}function ut(){return H||(H=new et([]))}function st(t){var e=Array.isArray(t)?new et(t).fromEntrySeq()Line truncated
//# sourceMappingURL=swagger-ui-standalone-preset.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUIStandalonePreset/webpack/universalModuleDefinition","webpack://SwaggerUIStandalonePreset/webpack/bootstrap","webpack://SwaggerUIStandalonePreset/./node_modules/immutable/dist/immutable.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUIStandalonePreset/./node_modules/react/react.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUIStandalonePreset/./node_modules/js-yaml/lib/js-yaml/type.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUIStandalonePreset/./node_modules/inherits/inherits_browser.js","webpack://SwaggerUIStandalonePreset/./node_modules/safe-buffer/index.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/has.js","webpack://SwaggerUIStandalonePreset/./src/core/utils.js","webpack://SwaggerUIStandalonePreset/(webpack)/buildin/global.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/to-object.js","webpack://SwaggerUIStandalonePreset/./node_modules/lodash/isArray.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/create-non-enumerable-property.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/array-method-uses-to-length.js","webpack://SwaggerUIStandalonePreset/./node_modules/lodash/_root.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUIStandalonePreset/./node_modules/es5-ext/object/valid-callable.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUIStandalonePreset/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/to-indexed-object.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/object-define-property.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/to-length.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/iterators.js","webpack://SwaggerUIStandalonePreset/./node_modules/process/browser.js","webpack://SwaggerUIStandalonePreset/./node_modules/readable-stream/lib/_stream_duplex.js","webpack://SwaggerUIStandalonePreset/./node_modules/es5-ext/object/is-value.js","webpack://SwaggerUIStandalonePreset/./node_modules/es5-ext/number/to-pos-integer.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/require-object-coercible.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/classof.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/modules/web.dom-collections.iterator.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/array-iteration.js","webpack://SwaggerUIStandalonePreset/./node_modules/react/lib/ReactElement.js","webpack://SwaggerUIStandalonePreset/./node_modules/lodash/_getNative.js","webpack://SwaggerUIStandalonePreset/./node_modules/es5-ext/object/valid-value.js","webpack://SwaggerUIStandalonePreset/./node_modules/sha.js/hash.js","webpack://SwaggerUIStandalonePreset/./node_modules/js-yaml/lib/js-yaml/common.js","webpack://SwaggerUIStandalonePreset/./node_modules/js-yaml/lib/js-yaml/schema.js","webpack://SwaggerUIStandalonePreset/./node_modules/lodash/eq.js","webpack://SwaggerUIStandalonePreset/./node_modules/lodash/isEmpty.js","webpack://SwaggerUIStandalonePreset/./node_modules/core-js-pure/internals/create-property-descriptor.js","webpack://SwaggerUIStandalonePreset/./node_moduLine truncated
-11057
View File
File diff suppressed because it is too large. Load diff
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack:///./src/style/main.scss","webpack:///./node_modules/tachyons-sass/scss/_normalize.scss","webpack:///./src/style/_type.scss","webpack:///./node_modules/tachyons-sass/scss/_debug-children.scss","webpack:///./node_modules/tachyons-sass/scss/_debug-grid.scss","webpack:///./node_modules/tachyons-sass/scss/_box-sizing.scss","webpack:///./node_modules/tachyons-sass/scss/_aspect-ratios.scss","webpack:///./node_modules/tachyons-sass/scss/_images.scss","webpack:///./node_modules/tachyons-sass/scss/_background-size.scss","webpack:///./node_modules/tachyons-sass/scss/_background-position.scss","webpack:///./node_modules/tachyons-sass/scss/_outlines.scss","webpack:///./node_modules/tachyons-sass/scss/_borders.scss","webpack:///./node_modules/tachyons-sass/scss/_border-colors.scss","webpack:///./node_modules/tachyons-sass/scss/_border-radius.scss","webpack:///./node_modules/tachyons-sass/scss/_border-style.scss","webpack:///./node_modules/tachyons-sass/scss/_border-widths.scss","webpack:///./node_modules/tachyons-sass/scss/_box-shadow.scss","webpack:///./node_modules/tachyons-sass/scss/_code.scss","webpack:///./node_modules/tachyons-sass/scss/_coordinates.scss","webpack:///./node_modules/tachyons-sass/scss/_clears.scss","webpack:///./node_modules/tachyons-sass/scss/_flexbox.scss","webpack:///./node_modules/tachyons-sass/scss/_display.scss","webpack:///./node_modules/tachyons-sass/scss/_floats.scss","webpack:///./node_modules/tachyons-sass/scss/_font-family.scss","webpack:///./node_modules/tachyons-sass/scss/_font-style.scss","webpack:///./node_modules/tachyons-sass/scss/_font-weight.scss","webpack:///./node_modules/tachyons-sass/scss/_forms.scss","webpack:///./node_modules/tachyons-sass/scss/_heights.scss","webpack:///./node_modules/tachyons-sass/scss/_letter-spacing.scss","webpack:///./node_modules/tachyons-sass/scss/_line-height.scss","webpack:///./node_modules/tachyons-sass/scss/_links.scss","webpack:///./node_modules/tachyons-sass/scss/_lists.scss","webpack:///./node_modules/tachyons-sass/scss/_max-widths.scss","webpack:///./node_modules/tachyons-sass/scss/_widths.scss","webpack:///./node_modules/tachyons-sass/scss/_overflow.scss","webpack:///./node_modules/tachyons-sass/scss/_position.scss","webpack:///./node_modules/tachyons-sass/scss/_opacity.scss","webpack:///./node_modules/tachyons-sass/scss/_rotations.scss","webpack:///./node_modules/tachyons-sass/scss/_skins.scss","webpack:///./node_modules/tachyons-sass/scss/_skins-pseudo.scss","webpack:///./node_modules/tachyons-sass/scss/_spacing.scss","webpack:///./node_modules/tachyons-sass/scss/_variables.scss","webpack:///./node_modules/tachyons-sass/scss/_negative-margins.scss","webpack:///./node_modules/tachyons-sass/scss/_tables.scss","webpack:///./node_modules/tachyons-sass/scss/_text-decoration.scss","webpack:///./node_modules/tachyons-sass/scss/_text-align.scss","webpack:///./node_modules/tachyons-sass/scss/_text-transform.scss","webpack:///./node_modules/tachyons-sass/scss/_type-scale.scss","webpack:///./node_modules/tachyons-sass/scss/_typography.scss","webpack:///./node_modules/tachyons-sass/scss/_utilities.scss","webpack:///./node_modules/tachyons-sass/scss/_visibility.scss","webpack:///./node_modules/tachyons-sass/scss/_white-space.scss","webpack:///./node_modules/tachyons-sass/scss/_vertical-align.scss","webpack:///./node_modules/tachyons-sass/scss/_hovers.scss","webpack:///./node_modules/tachyons-sass/scss/_z-index.scss","webpack:///./node_modules/tachyons-sass/scss/_nested.scss","webpack:///./src/style/_layout.scss","webpack:///./src/style/_variables.scss","webpack:///./src/style/_buttons.scss","webpack:///./src/style/_mixins.scss","webpack:///./src/style/_form.scss","webpack:///./src/style/_modal.scss","webpack:///./src/style/_models.scss","webpack:///./src/style/_servers.scss","webpack:///./src/style/_table.scss","webpack:///./src/style/_topbar.scss","webpack:///./src/style/_information.scss","webpack:///./src/style/_authorize.scss","webpack:///./src/style/_errors.scss","webpack:///./src/style/_split-pane-mode.scss","webpack:///./src/style/_markdown.scss"],"names":[],"mappings":"AAAA;ECOA,4ECLI,sBAAuB,CAEvB,aFmhCJ,CAvhCA,iBCmBE,gBAAiB,CACjB,yBAA0B,CAC1B,6BD2gCF,CAhiCA,iBCgCE,QDogCF,CApiCA,gHC6CE,aDggCF,CA7iCA,eCsDE,aAAc,CACd,cD2/BF,CAljCA,2DCqEE,aDo/BF,CAzjCA,mBC6EE,eDg/BF,CA7jCA,eCsFE,sBAAuB,CACvB,QAAS,CACT,gBD8+BF,CAtkCA,gBCiGE,+BAAiC,CACjC,aD2+BF,CA7kCA,cC8GE,4BAA6B,CAC7B,oCDq+BF,CAplCA,wBCwHE,kBAAmB,CACnB,yBAA0B,CAC1B,wCAAiC,CAAjC,gCDm+BF,CA7lCA,iCCmIE,mBAAoB,CASpB,kBDs9BF,CAlmCA,kDCuJE,+BAAiC,CACjC,aDw9BF,CAhnCA,gBCgKE,iBDo9BF,CApnCA,iBCwKE,qBAAsB,CACtB,UDg9BF,CAznCA,kBCiLE,aD48BF,CA7nCA,gCC2LE,aAAc,CACd,aAAc,CACd,iBAAkB,CAClB,uBDu8BF,CAroCA,gBCkME,aDu8BF,CAzoCA,gBCsME,SDu8BF,CA7oCA,oCCkNE,oBDg8BF,CAlpCA,kCC0NE,YAAa,CACb,QD47BF,CAvpCA,gBCmOE,iBDw7BF,CA3pCA,2BC2OE,eDo7BF,CA/pCA,kGC2PE,sBAAuB,CACvB,cAAe,CACf,gBAAiB,CACjB,QDg7BF,CA9qCA,qCCwQE,gBD46BF,CAprCA,sCCkRE,mBDw6BF,CA1rCA,qGC+RE,yBDm6BF,CAlsCA,wKC0SE,iBAAkB,CACLine truncated
-3
View File
@@ -1,3 +0,0 @@
/*! For license information please see swagger-ui.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUICore=t():e.SwaggerUICore=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=410)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("immutable")},function(e,t,n){e.exports=n(449)},function(e,t,n){var r=n(191);e.exports=function(e,t,n){return t in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports=n(452)},function(e,t,n){var r=n(191);function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),r(e,a.key,a)}}e.exports=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";(function(e){n.d(t,"t",(function(){return me})),n.d(t,"A",(function(){return ve})),n.d(t,"i",(function(){return ge})),n.d(t,"w",(function(){return ye})),n.d(t,"r",(function(){return be})),n.d(t,"u",(function(){return Ee})),n.d(t,"s",(function(){return xe})),n.d(t,"p",(function(){return Se})),n.d(t,"v",(function(){return we})),n.d(t,"y",(function(){return je})),n.d(t,"z",(function(){return Ce})),n.d(t,"K",(function(){return Oe})),n.d(t,"f",(function(){return _e})),n.d(t,"n",(function(){return Ae})),n.d(t,"h",(function(){return ke})),n.d(t,"E",(function(){return Ie})),n.d(t,"L",(function(){return Fe})),n.d(t,"o",(function(){return Ye})),n.d(t,"D",(function(){return Ke})),n.d(t,"a",(function(){return Ge})),n.d(t,"I",(function(){return Ze})),n.d(t,"b",(function(){return Xe})),n.d(t,"H",(function(){return Qe})),n.d(t,"G",(function(){return et})),n.d(t,"F",(function(){return tt})),n.d(t,"k",(function(){return nt})),n.d(t,"d",(function(){return rt})),n.d(t,"g",(function(){return at})),n.d(t,"m",(function(){return ot})),n.d(t,"l",(function(){return it})),n.d(t,"e",(function(){return ct})),n.d(t,"J",(function(){return st})),n.d(t,"x",(function(){return ut})),n.d(t,"B",(function(){return lt})),n.d(t,"C",(function(){return pt})),n.d(t,"j",(function(){return ft})),n.d(t,"c",(function(){return dt})),n.d(t,"q",(function(){return mt}));var r=n(82),a=n.n(r),o=n(130),i=n.n(o),c=n(50),s=n.n(c),u=n(13),l=n.n(u),p=n(30),f=n.n(p),d=n(17),h=n.n(d),m=(n(34),n(32)),v=n.n(m),g=(n(24),n(15),n(157)),y=n.n(g),b=n(21),E=n.n(b),x=n(22),S=n.n(x),w=(n(29),n(16)),j=n.n(w),C=n(12),O=n.n(C),_=n(18),A=n.n(_),k=n(2),I=n.n(k),P=n(45),T=n.n(P),N=n(71),R=n.n(N),M=n(4),D=n.n(M),q=n(14),L=n.n(q),B=n(20),U=n.n(B),V=n(1),z=n.n(V),F=n(375),J=n(376),W=n.n(J),H=n(207),$=n.n(H),Y=n(208),K=n.n(Y),G=n(158),Z=n.n(G),X=n(266),Q=n.n(X),ee=n(102),te=n.n(ee),ne=n(58),re=n.n(ne),ae=n(112),oe=n(26),ie=n(378),ce=n.n(ie),se=n(114),ue=n(379),le=n.n(ue),pe=n(380),fe=n.n(pe),de="default",he=function(e){return z.a.Iterable.isIterable(e)};function me(e){try{var t=JSON.parse(e);if(t&&"object"===U()(t))return t}catch(e){}return!1}function ve(e){return Ee(e)?he(e)?e.toJS():e:{}}function ge(e){var t,n;if(he(e))return e;if(e instanceof oe.a.File)return e;if(!Ee(e))return e;if(L()(e))return D()(n=z.a.Seq(e)).call(n,ge).toList();if(re()(R()(e))){var r,a=function(e){if(!re()(R()(e)))return e;var t,n={},r="_**[]",a={},o=T()(R()(e).call(e));try{for(o.s();!(t=o.n()).done;){var i=t.value;if(n[i[0]]||a[i[0]]&&a[i[0]].containsMultiple){var c,s,u,l;if(!a[i[0]])a[i[0]]={containsMultiple:!0,length:1},n[I()(u=I()(l="".concat(i[0])).call(l,r)).call(u,a[i[0]].length)]=n[i[0]],delete n[i[0]];a[i[0]].length+=1,n[I()(c=I()(s="".concat(i[0])).call(s,r)).call(c,a[i[0]].length)]=i[1]}else n[i[0]]=i[1]}}catch(e){o.e(e)}finally{o.f()}return n}(e);return D()(r=z.a.OrderedMap(a)).call(r,ge)}return D()(t=z.a.OrderedMap(e)).call(t,ge)}function ye(e){return L()(e)?e:[e]}function be(e){return"function"==typeof e}function Ee(e){return!!e&&"object"===U()(e)}function xe(e){return"function"==typeof e}function Se(e){return L()(e)}var we=K.a;function je(e,t){var n;return S()(n=j()(e)).call(n,(function(n,Line truncated
//# sourceMappingURL=swagger-ui.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack://SwaggerUICore/webpack/universalModuleDefinition","webpack://SwaggerUICore/webpack/bootstrap","webpack://SwaggerUICore/external \"react\"","webpack://SwaggerUICore/external \"immutable\"","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/createClass.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","webpack://SwaggerUICore/./src/core/utils.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/inherits.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/createSuper.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","webpack://SwaggerUICore/external \"prop-types\"","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js","webpack://SwaggerUICore/external \"reselect\"","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/typeof.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/object/assign.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/export.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/objectSpread2.js","webpack://SwaggerUICore/./src/core/window.js","webpack://SwaggerUICore/external \"react-immutable-proptypes\"","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/extends.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/path.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/fails.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/includes.js","webpack://SwaggerUICore/./src/core/plugins/oas3/helpers.jsx","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/well-known-symbol.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/regenerator/index.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/global.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/entry-virtual.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/is-object.js","webpack://SwaggerUICore/./node_modules/lodash/get.js","webpack://SwaggerUICore/./src/core/plugins/spec/actions.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/descriptors.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/define-well-known-symbol.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/createForOfIteratorHelper.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/has.js","webpack://SwaggerUICore/./node_modules/lodash/isArray.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/an-object.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/helpers/objectWithoutProperties.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js","webpack://SwaggerUICore/./src/core/plugins/oas3/actions.js","webpack://SwaggerUICore/./node_modules/lodash/isObject.js","webpack://SwaggerUICore/./node_modules/swagger-client/es/helpers.js","webpack://SwaggerUICore/./src/core/plugins/err/actions.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/object-define-property.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/array-method-uses-to-length.js","webpack://SwaggerUICore/external \"classnames\"","webpack://SwaggerUICore/./node_modules/lodash/isFunction.js","webpack://SwaggerUICore/./node_modules/@babel/runtime-corejs3/core-js-stable/promise.js","webpack://SwaggerUICore/./node_modules/core-js-pure/internals/to-indexed-objLine truncated
Executable
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# Calculate UV_THREADPOOL_SIZE based on number of CPUs
cpus=$(node -e "const os = require('os'); console.log(os.cpus().length);")
uv_threadpool_size=$(($cpus * 2))
# Set UV_THREADPOOL_SIZE as an environment variable
export UV_THREADPOOL_SIZE="${UV_THREADPOOL_SIZE:-$uv_threadpool_size}"
# Start your application using yarn
yarn start:prod
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.
-40
View File
@@ -1,40 +0,0 @@
from pprint import pprint
import requests
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def whatsapp_echo():
return "WhatsApp HTTP API Echo server is ready!"
@app.route("/message", methods=["GET", "POST"])
def whatsapp_webhook():
data = request.get_json()
if not data:
return "WhatsApp HTTP API Echo server is ready!"
pprint(data)
# The text
text = data["body"]
# Number in format 791111111@c.us
from_ = data["from"]
if data.get("clientUrl", None):
# Download file and set text to path
client_url = data["clientUrl"]
filename = client_url.split("/")[-1]
path = "/tmp/" + filename
r = requests.get(client_url)
open(path, "wb").write(r.content)
text = f"We have downloaded file here: {path}"
# Send a text back via WhatsApp HTTP API
response = requests.post(
"http://localhost:3000/api/sendText", json={"chatId": from_, "text": text}
)
response.raise_for_status()
return "OK"
Binary file not shown.
+128
View File
@@ -0,0 +1,128 @@
# WAHA (WhatsApp HTTP API) Python examples
## Installation
We assume that you have installed software:
1. Python 3
2. Docker
### Download and start image
First of all, you must run WhatsApp HTTP API locally (which under the hood it
runs real WhatsApp Web instance and expose HTTP API for interaction).
Here are the steps from
[Quick Start](https://waha.devlike.pro/docs/overview/quick-start/):
Download and start WhatsApp HTTP API docker container
```bash
# Download the image
docker pull devlikeapro/waha
# Run the docker container
docker run -it --rm --network=host -e WHATSAPP_HOOK_URL=http://localhost:5000/bot -e "WHATSAPP_HOOK_EVENTS=*" --name waha devlikeapro/waha
# It prints logs and the last line must be
# WhatsApp HTTP API is running on: http://[::1]:3000
```
#### Download image - ARM
If you're using ARM (like Apple Silicon, Apple M1, etc.) - use following
commands to download the image
![](/images/versions/core.png) For Core version the command is
```bash
# Download the image
docker pull devlikeapro/waha:arm
# Rename it, so you can use devlikeapro/waha image in other place
docker tag devlikeapro/waha:arm devlikeapro/waha
# Run the docker container
docker run -it --rm --network=host -e WHATSAPP_HOOK_URL=http://localhost:5000/bot -e "WHATSAPP_HOOK_EVENTS=*" --name waha devlikeapro/waha
# It prints logs and the last line must be
# WhatsApp HTTP API is running on: http://[::1]:3000
```
### Start session and scan QR
2. Open Swagger API in the browser http://localhost:3000/
3. Start session and scan QR code in swagger
1. Find `POST /api/sessions/` request press **Try it out** and **Execute** it
with `default` session name
2. Find `GET /api/screenshot` and execute it - it must show QR code
3. Scan QR code on your mobile WhatsApp application (that installed on your
phone)
4. Execute `GET /api/screenshot` once again - it must show the screenshot
from WhatsApp Web.
4. Send test text message - find `POST /api/sendText` and execute it with
payload (change `12132132130` in the `chatId` to phone number that is
registered in WhatsApp).
```json
{
"chatId": "12132132130@c.us",
"text": "Hi there!",
"session": "default"
}
```
If you see **Hi there!** message then you're ready to run bots!
## WhatsApp Echo Bot
The WhatsApp Echo Bot is a sample flask webhook server application that echoes
back to you whatever you send it. It can serve as a basic reference for how to
set up webhooks and reply to incoming messages.
```bash
# Clone the git repository with example
git clone https://github.com/devlikeapro/waha.git
# Open python example folder
cd waha/examples/python
# Install requirements
python -mpip install -r requirements.txt
# Run the bot
FLASK_APP=whatsapp_echo_bot.py flask run
```
Open http://127.0.0.1:5000/bot - if you see **WhatsApp Echo Bot is ready!** then
the bot is ready to receive message!
Send message to the WhatsApp (that you used to scan QR code) and it'll echo text
back to you!
## WhatsApp Download Files Bot
The WhatsApp Download Image Bot downloads all files people send to your WhatsApp
and log the path for the file.
**The bot works only with WAHA Plus version** available with donations. Visit
[read more about difference between Core and Plus versions](https://waha.devlike.pro/docs/how-to/plus-version/).
Download **WAHA Plus** version:
```bash
# Download the image
docker pull devlikeapro/waha-plus
# Run the docker container
docker run -it --rm --network=host -e WHATSAPP_HOOK_URL=http://localhost:5000/bot -e "WHATSAPP_HOOK_EVENTS=*" --name waha devlikeapro/waha-plus
```
Run the WhatsApp Download Files bot:
```bash
# Clone the git repository with example
git clone https://github.com/devlikeapro/waha.git
# Open python example folder
cd waha/examples/python
# Install requirements
python -mpip install -r requirements.txt
# Run the bot
FLASK_APP=whatsapp_download_files_bot.py flask run
```
Open http://127.0.0.1:5000/bot - if you see **WhatsApp Download Files Bot!**
then the bot is ready to receive message with files!
+3
View File
@@ -0,0 +1,3 @@
flask~=1.0
requests~=2.0
markupsafe==2.0.1
@@ -0,0 +1,84 @@
from os.path import abspath
from pprint import pprint
import requests
from flask import Flask
from flask import request
app = Flask(__name__)
def send_message(chat_id, text):
"""
Send message to chat_id.
:param chat_id: Phone number + "@c.us" suffix - 1231231231@c.us
:param text: Message for the recipient
"""
# Send a text back via WhatsApp HTTP API
response = requests.post(
"http://localhost:3000/api/sendText",
json={
"chatId": chat_id,
"text": text,
"session": "default",
},
)
response.raise_for_status()
def send_seen(chat_id, message_id, participant):
response = requests.post(
"http://localhost:3000/api/sendSeen",
json={
"session": "default",
"chatId": chat_id,
"messageId": message_id,
"participant": participant,
},
)
response.raise_for_status()
@app.route("/")
def whatsapp_echo():
return "WhatsApp Download Files Bot is ready!"
@app.route("/bot", methods=["GET", "POST"])
def whatsapp_webhook():
if request.method == "GET":
return "WhatsApp Download Files Bot is ready!"
data = request.get_json()
pprint(data)
if data["event"] != "message":
# We can't process other event yet
return f"Unknown event {data['event']}"
payload = data["payload"]
# Ignore messages without files
if not payload.get("mediaUrl", None):
return "No files in the message"
# Number in format 791111111@c.us
chat_id = payload["from"]
# Message ID - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
message_id = payload['id']
# For groups - who sent the message
participant = payload.get('participant')
# IMPORTANT - Always send seen before sending new message
send_seen(chat_id=chat_id, message_id=message_id, participant=participant)
# Download the file and download it to the current folder
client_url = payload["mediaUrl"]
filename = client_url.split("/")[-1]
path = abspath("./" + filename)
r = requests.get(client_url)
with open(path, "wb") as f:
f.write(r.content)
# Send a text back via WhatsApp HTTP API
text = f"We have downloaded file here: {path}"
print(text)
send_message(chat_id=chat_id, text=text)
# Send OK back
return "OK"
+123
View File
@@ -0,0 +1,123 @@
import random
from pprint import pprint
from time import sleep
import requests
from flask import Flask
from flask import request
app = Flask(__name__)
def send_message(chat_id, text):
"""
Send message to chat_id.
:param chat_id: Phone number + "@c.us" suffix - 1231231231@c.us
:param text: Message for the recipient
"""
# Send a text back via WhatsApp HTTP API
response = requests.post(
"http://localhost:3000/api/sendText",
json={
"chatId": chat_id,
"text": text,
"session": "default",
},
)
response.raise_for_status()
def reply(chat_id, message_id, text):
response = requests.post(
"http://localhost:3000/api/reply",
json={
"chatId": chat_id,
"text": text,
"reply_to": message_id,
"session": "default",
},
)
response.raise_for_status()
def send_seen(chat_id, message_id, participant):
response = requests.post(
"http://localhost:3000/api/sendSeen",
json={
"session": "default",
"chatId": chat_id,
"messageId": message_id,
"participant": participant,
},
)
response.raise_for_status()
def start_typing(chat_id):
response = requests.post(
"http://localhost:3000/api/startTyping",
json={
"session": "default",
"chatId": chat_id,
},
)
response.raise_for_status()
def stop_typing(chat_id):
response = requests.post(
"http://localhost:3000/api/stopTyping",
json={
"session": "default",
"chatId": chat_id,
},
)
response.raise_for_status()
def typing(chat_id, seconds):
start_typing(chat_id=chat_id)
sleep(seconds)
stop_typing(chat_id=chat_id)
@app.route("/")
def whatsapp_echo():
return "WhatsApp Echo Bot is ready!"
@app.route("/bot", methods=["GET", "POST"])
def whatsapp_webhook():
if request.method == "GET":
return "WhatsApp Echo Bot is ready!"
data = request.get_json()
pprint(data)
if data["event"] != "message":
# We can't process other event yet
return f"Unknown event {data['event']}"
# Payload that we've got
payload = data["payload"]
# The text
text = payload.get("body")
if not text:
# We can't process non-text messages yet
print("No text in message")
print(payload)
return "OK"
# Number in format 1231231231@c.us or @g.us for group
chat_id = payload["from"]
# Message ID - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
message_id = payload['id']
# For groups - who sent the message
participant = payload.get('participant')
# IMPORTANT - Always send seen before sending new message
send_seen(chat_id=chat_id, message_id=message_id, participant=participant)
# Send a text back via WhatsApp HTTP API
typing(chat_id=chat_id, seconds=random.random() * 3)
send_message(chat_id=chat_id, text=text)
# OR reply on the message
typing(chat_id=chat_id, seconds=random.random() * 3)
reply(chat_id=chat_id, message_id=message_id, text=text)
# Send OK back
return "OK"
-2
View File
@@ -1,2 +0,0 @@
flask
requests
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

+4 -4
View File
@@ -2,8 +2,8 @@
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"plugins": [
"@nestjs/swagger/plugin"
]
"plugins": ["@nestjs/swagger"],
"assets": ["dashboard/**", "core/engines/webjs/*", "plus/engines/webjs/*"],
"watchAssets": true
}
}
}
-31599
View File
File diff suppressed because it is too large. Load diff
+57 -13
View File
@@ -1,5 +1,5 @@
{
"name": "whatsapp-http-api",
"name": "waha",
"version": "0.0.1",
"description": "",
"author": "",
@@ -12,9 +12,10 @@
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node --unhandled-rejections=none dist/main",
"start:prod": "node dist/main",
"start:prod-exit": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix --max-warnings=0",
"lint-cache": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix --cache --max-warnings=0",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
@@ -22,21 +23,62 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@adiwajshing/baileys": "github:devlikeapro/Baileys#fork-master-channels-2",
"@adiwajshing/keyed-db": "^0.2.4",
"@aws-sdk/client-s3": "^3.633.0",
"@aws-sdk/s3-request-presigner": "^3.633.0",
"@nestjs/axios": "^3.0.2",
"@nestjs/common": "^9.0.9",
"@nestjs/config": "^0.5.0",
"@nestjs/config": "^3.2.3",
"@nestjs/core": "^9.0.9",
"@nestjs/passport": "^9.0.0",
"@nestjs/platform-express": "^9.0.9",
"@nestjs/platform-ws": "^9.0.9",
"@nestjs/serve-static": "^2.1.3",
"@nestjs/swagger": "^6.0.5",
"class-validator": "^0.12.2",
"@nestjs/swagger": "^7.1.11",
"@nestjs/terminus": "^10.2.3",
"@nestjs/websockets": "^9.0.9",
"@types/better-sqlite3": "^7.6.10",
"@types/lodash": "^4.14.194",
"@types/ws": "^8.5.4",
"adm-zip": "0.5.10",
"async-lock": "^1.4.1",
"better-sqlite3": "9.6.0",
"check-disk-space": "^3.4.0",
"chokidar": "^3.6.0",
"class-transformer": "^0.5.1",
"class-validator": "0.14.0",
"del": "^6.0.0",
"express-basic-auth": "^1.2.1",
"file-type": "16.5.4",
"fs-extra": "^11.2.0",
"https-proxy-agent": "^7.0.0",
"joi": "^17.13.3",
"knex": "^3.1.0",
"libphonenumber-js": "^1.10.36",
"link-preview-js": "^3.0.4",
"lodash": "^4.17.21",
"mime-types": "^2.1.27",
"mongodb": "^6.3.0",
"nestjs-pino": "^4.1.0",
"passport": "^0.6.0",
"passport-headerapikey": "^1.2.2",
"pino-http": "^10.2.0",
"pino-pretty": "^11.2.1",
"pretty-bytes": "5.6.0",
"promise-retry": "^2.0.1",
"puppeteer": "^21.0.0",
"qrcode": "^1.5.1",
"qrcode-terminal": "^0.12.0",
"reflect-metadata": "^0.1.13",
"request": "^2.88.2",
"requestretry": "^4.1.1",
"rimraf": "^3.0.2",
"rxjs": "^7.1.0",
"sharp": "^0.33.4",
"swagger-ui-express": "^4.1.4",
"venom-bot": "^4.3.0"
"venom-bot": "5.0.1",
"whatsapp-web.js": "github:devlikeapro/whatsapp-web.js#fork-webpack-exodus-channels"
},
"devDependencies": {
"@nestjs/cli": "^9.0.0",
@@ -44,21 +86,22 @@
"@nestjs/testing": "^9.0.9",
"@types/express": "^4.17.3",
"@types/jest": "26.0.10",
"@types/node": "^13.9.1",
"@types/node": "^18.14.2",
"@types/supertest": "^2.0.8",
"@typescript-eslint/eslint-plugin": "3.9.1",
"@typescript-eslint/parser": "3.9.1",
"eslint": "7.7.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
"jest": "26.4.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"jest": "^29.7.0",
"prettier": "^1.19.1",
"supertest": "^4.0.2",
"ts-jest": "26.2.0",
"ts-jest": "^29.1.3",
"ts-loader": "^6.2.1",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.0",
"typescript": "4.7.4"
"typescript": "^4.8.4"
},
"jest": {
"moduleFileExtensions": [
@@ -67,11 +110,12 @@
"ts"
],
"rootDir": "src",
"testRegex": ".spec.ts$",
"testRegex": ".test.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
},
"packageManager": "yarn@3.6.3"
}
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
set -e
echo "Starting WAHA..."
docker run -d \
--restart=always \
--name waha \
-p 3000:3000/tcp \
-v ./.sessions:/app/.sessions \
-v ./.media:/app/.media \
--env WHATSAPP_API_KEY=321 \
--env WAHA_DASHBOARD_USERNAME=waha \
--env WAHA_DASHBOARD_PASSWORD=waha \
--env WAHA_LOG_FORMAT=PRETTY \
--env WAHA_LOG_LEVEL=info \
--env WHATSAPP_DEFAULT_ENGINE=WEBJS \
--env WHATSAPP_RESTART_ALL_SESSIONS=True \
--env WAHA_PRINT_QR=False \
--env WHATSAPP_FILES_LIFETIME=0 \
--env WHATSAPP_FILES_FOLDER=/app/.media \
devlikeapro/waha-plus:latest
echo "WAHA started."
+21
View File
@@ -0,0 +1,21 @@
set -e
echo "Updating WAHA..."
echo "Logging in to Docker..."
docker login -u devlikeapro # -p {KEY} - you can hard code key here https://portal.devlike.pro/
echo "Pulling the latest image..."
docker pull devlikeapro/waha-plus
echo "Logging out of Docker..."
docker logout
# Just pull if you're using WAHA Core
# docker pull devlikeapro/waha
echo "Stopping the current container..."
docker stop waha || true
echo "Removing the current container..."
docker rm waha || true
echo "Running WAHA..."
sh ./waha-run.sh
-91
View File
@@ -1,91 +0,0 @@
import {ApiProperty} from "@nestjs/swagger";
import {IsNotEmpty, IsString} from "class-validator";
export const WHATSAPP_DEFAULT_SESSION_NAME = "default"
//
// Queries
//
export class SessionQuery {
@IsNotEmpty()
sessionName: string = WHATSAPP_DEFAULT_SESSION_NAME;
}
export class CheckNumberStatusQuery extends SessionQuery {
@IsString()
phone: string
}
export class MessageTextQuery extends SessionQuery {
@IsString()
phone: string
@IsString()
text: string
}
//
// Requests
//
const chatIdProperty = ApiProperty({
example: '791231234567@c.us'
})
const sessionNameProperty = ApiProperty({
default: WHATSAPP_DEFAULT_SESSION_NAME,
})
export class SessionRequest {
@sessionNameProperty
sessionName: string;
}
export class ChatRequest extends SessionRequest {
@chatIdProperty
chatId: string;
}
export class MessageContactVcard extends ChatRequest {
contactsId: string;
name: string
}
export class MessageText extends ChatRequest {
text: string;
}
export class MessageTextButtons extends ChatRequest {
text: string;
title: string;
buttons: any[];
}
export class MessageReply extends ChatRequest {
text: string;
@ApiProperty({
example: 'message.id',
})
reply_to: string;
}
export class MessageLocation extends ChatRequest {
latitude: string;
longitude: string;
title: string;
}
export class MessageImage extends ChatRequest {
path: string;
filename: string;
caption: string;
}
export class MessageFile extends ChatRequest {
path: string;
filename: string;
caption: string;
}
export class MessageLinkPreview extends ChatRequest {
url: string;
title: string;
}
+108
View File
@@ -0,0 +1,108 @@
import {
Body,
Controller,
Get,
Post,
Query,
UseInterceptors,
} from '@nestjs/common';
import { UnprocessableEntityException } from '@nestjs/common/exceptions/unprocessable-entity.exception';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { ApiFileAcceptHeader } from '@waha/nestjs/ApiFileAcceptHeader';
import {
SessionApiParam,
SessionParam,
} from '@waha/nestjs/params/SessionApiParam';
import { SessionManager } from '../core/abc/manager.abc';
import { WhatsappSession } from '../core/abc/session.abc';
import { BufferResponseInterceptor } from '../nestjs/BufferResponseInterceptor';
import {
CaptchaBody,
OTPRequest,
QRCodeFormat,
QRCodeQuery,
QRCodeValue,
RequestCodeRequest,
} from '../structures/auth.dto';
import { WAHASessionStatus } from '../structures/enums.dto';
import { Base64File } from '../structures/files.dto';
@ApiSecurity('api_key')
@Controller('api/:session/auth')
@ApiTags('🔑 Auth')
class AuthController {
constructor(private manager: SessionManager) {}
@Get('qr')
@ApiOperation({
summary: 'Get QR code for pairing WhatsApp API.',
})
@SessionApiParam
@ApiFileAcceptHeader(Base64File, QRCodeValue)
@UseInterceptors(new BufferResponseInterceptor())
async getQR(
@SessionParam session: WhatsappSession,
@Query() query: QRCodeQuery,
): Promise<Buffer | QRCodeValue> {
if (session.status != WAHASessionStatus.SCAN_QR_CODE) {
const err = `Can get QR code only in SCAN_QR_CODE status. The current status is '${session.status}'`;
throw new UnprocessableEntityException(err);
}
const qr = session.getQR();
if (query.format == QRCodeFormat.RAW) {
return { value: qr.raw };
}
return qr.get();
}
@Post('request-code')
@SessionApiParam
@ApiOperation({
summary: 'Request authentication code.',
})
requestCode(
@SessionParam session: WhatsappSession,
@Body() request: RequestCodeRequest,
) {
return session.requestCode(request.phoneNumber, request.method, request);
}
@Post('authorize-code')
@SessionApiParam
@ApiOperation({
summary: 'Send OTP authentication code.',
})
authorizeCode(
@SessionParam session: WhatsappSession,
@Body() request: OTPRequest,
) {
return session.authorizeCode(request.code);
}
@Get('captcha')
@SessionApiParam
@ApiFileAcceptHeader()
@UseInterceptors(new BufferResponseInterceptor())
@ApiOperation({
summary: 'Get captcha image.',
})
async getCaptcha(@SessionParam session: WhatsappSession): Promise<Buffer> {
const image = await session.getCaptcha();
return image.get();
}
@Post('captcha')
@SessionApiParam
@ApiOperation({
summary: 'Enter captcha code.',
})
saveCaptcha(
@SessionParam session: WhatsappSession,
@Body() body: CaptchaBody,
) {
return session.saveCaptcha(body.code);
}
}
export { AuthController };
+125
View File
@@ -0,0 +1,125 @@
import {
Body,
Controller,
Delete,
Get,
Param,
Post,
Query,
} from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import {
SessionApiParam,
SessionParam,
} from '@waha/nestjs/params/SessionApiParam';
import {
Channel,
CreateChannelRequest,
ListChannelsQuery,
NewsletterIdApiParam,
NewsletterIdOrInviteCodeApiParam,
} from '@waha/structures/channels.dto';
import { SessionManager } from '../core/abc/manager.abc';
import { isNewsletter, WhatsappSession } from '../core/abc/session.abc';
@ApiSecurity('api_key')
@Controller('api/:session/channels')
@ApiTags('📢 Channels')
export class ChannelsController {
constructor(private manager: SessionManager) {}
@Get('')
@SessionApiParam
@ApiOperation({ summary: 'Get list of know channels' })
async list(
@SessionParam session: WhatsappSession,
@Query() query: ListChannelsQuery,
): Promise<Channel[]> {
return session.channelsList(query);
}
@Post('')
@SessionApiParam
@ApiOperation({ summary: 'Create a new channel.' })
create(
@SessionParam session: WhatsappSession,
@Body() request: CreateChannelRequest,
): Promise<Channel> {
return session.channelsCreateChannel(request);
}
@Delete(':id')
@SessionApiParam
@NewsletterIdApiParam
@ApiOperation({ summary: 'Delete the channel.' })
delete(@SessionParam session: WhatsappSession, @Param('id') id: string) {
return session.channelsDeleteChannel(id);
}
@Get(':id')
@SessionApiParam
@NewsletterIdOrInviteCodeApiParam
@ApiOperation({
summary: 'Get the channel info',
description:
'You can use either id (123@newsletter) ' +
'OR invite code (https://www.whatsapp.com/channel/123)',
})
get(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<Channel> {
if (isNewsletter(id)) {
return session.channelsGetChannel(id);
} else {
// https://www.whatsapp.com/channel/123 => 123
const inviteCode = id.split('/').pop();
return session.channelsGetChannelByInviteCode(inviteCode);
}
}
@Post('follow')
@SessionApiParam
@NewsletterIdApiParam
@ApiOperation({ summary: 'Follow the channel.' })
follow(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<void> {
return session.channelsFollowChannel(id);
}
@Post('unfollow')
@SessionApiParam
@NewsletterIdApiParam
@ApiOperation({ summary: 'Unfollow the channel.' })
unfollow(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<void> {
return session.channelsUnfollowChannel(id);
}
@Post('mute')
@SessionApiParam
@NewsletterIdApiParam
@ApiOperation({ summary: 'Mute the channel.' })
mute(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<void> {
return session.channelsMuteChannel(id);
}
@Post('unmute')
@SessionApiParam
@NewsletterIdApiParam
@ApiOperation({ summary: 'Unmute the channel.' })
unmute(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<void> {
return session.channelsUnmuteChannel(id);
}
}
+129
View File
@@ -0,0 +1,129 @@
import {
Body,
Controller,
Delete,
Get,
Param,
Post,
Put,
Query,
UsePipes,
ValidationPipe,
} from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { ChatIdApiParam } from '@waha/nestjs/params/ChatIdApiParam';
import { MessageIdApiParam } from '@waha/nestjs/params/MessageIdApiParam';
import {
SessionApiParam,
SessionParam,
} from '@waha/nestjs/params/SessionApiParam';
import { SessionManager } from '../core/abc/manager.abc';
import { WhatsappSession } from '../core/abc/session.abc';
import { parseBool } from '../helpers';
import { GetChatMessagesQuery, GetChatsQuery } from '../structures/chats.dto';
import { EditMessageRequest } from '../structures/chatting.dto';
@ApiSecurity('api_key')
@Controller('api/:session/chats')
@ApiTags('💬 Chats')
@UsePipes(new ValidationPipe({ transform: true }))
class ChatsController {
constructor(private manager: SessionManager) {}
@Get('')
@SessionApiParam
@ApiOperation({ summary: 'Get chats' })
getChats(
@SessionParam session: WhatsappSession,
@Query() query: GetChatsQuery,
) {
return session.getChats(query);
}
@Delete(':chatId')
@SessionApiParam
@ApiOperation({ summary: 'Deletes the chat' })
@ChatIdApiParam
deleteChat(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
) {
return session.deleteChat(chatId);
}
@Get(':chatId/messages')
@SessionApiParam
@ApiOperation({ summary: 'Gets messages in the chat' })
@ChatIdApiParam
getChatMessages(
@Query() query: GetChatMessagesQuery,
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
) {
const downloadMedia = parseBool(query.downloadMedia);
return session.getChatMessages(chatId, query.limit, downloadMedia);
}
@Delete(':chatId/messages')
@SessionApiParam
@ApiOperation({ summary: 'Clears all messages from the chat' })
@ChatIdApiParam
clearMessages(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
) {
return session.clearMessages(chatId);
}
@Delete(':chatId/messages/:messageId')
@SessionApiParam
@ChatIdApiParam
@MessageIdApiParam
@ApiOperation({ summary: 'Deletes a message from the chat' })
deleteMessage(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
@Param('messageId') messageId: string,
) {
return session.deleteMessage(chatId, messageId);
}
@Put(':chatId/messages/:messageId')
@SessionApiParam
@ChatIdApiParam
@MessageIdApiParam
@ApiOperation({ summary: 'Edits a message in the chat' })
editMessage(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
@Param('messageId') messageId: string,
@Body() body: EditMessageRequest,
) {
return session.editMessage(chatId, messageId, body);
}
@Post(':chatId/archive')
@SessionApiParam
@ChatIdApiParam
@ApiOperation({ summary: 'Archive the chat' })
archiveChat(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
) {
return session.chatsArchiveChat(chatId);
}
@Post(':chatId/unarchive')
@SessionApiParam
@ChatIdApiParam
@ApiOperation({ summary: 'Unarchive the chat' })
unarchiveChat(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
) {
return session.chatsUnarchiveChat(chatId);
}
}
export { ChatsController };
+170 -110
View File
@@ -1,128 +1,188 @@
import {Body, Controller, Get, NotImplementedException, Post, Query} from '@nestjs/common';
import {ApiOperation, ApiTags} from "@nestjs/swagger";
import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { SessionManager } from '../core/abc/manager.abc';
import {
ChatRequest,
CheckNumberStatusQuery,
MessageContactVcard,
MessageFile,
MessageImage,
MessageLinkPreview,
MessageLocation,
MessageReply,
MessageText,
MessageTextButtons,
MessageTextQuery
} from "./all.dto";
import {ensureSuffix, WhatsappSessionManager} from "../whatsapp.service";
ChatRequest,
CheckNumberStatusQuery,
GetMessageQuery,
MessageContactVcardRequest,
MessageFileRequest,
MessageImageRequest,
MessageLinkPreviewRequest,
MessageLocationRequest,
MessagePollRequest,
MessageReactionRequest,
MessageReplyRequest,
MessageStarRequest,
MessageTextQuery,
MessageTextRequest,
MessageVideoRequest,
MessageVoiceRequest,
SendSeenRequest,
WANumberExistResult,
} from '../structures/chatting.dto';
import { WAMessage } from '../structures/responses.dto';
@ApiSecurity('api_key')
@Controller('api')
@ApiTags('chatting')
@ApiTags('📤 Chatting')
export class ChattingController {
constructor(private whatsappSessionManager: WhatsappSessionManager) {
}
constructor(private manager: SessionManager) {}
@Get('/checkNumberStatus')
@ApiOperation({summary: 'Check number status'})
async checkNumberStatus(
@Query() request: CheckNumberStatusQuery,
) {
const whatsapp = this.whatsappSessionManager.getSession(request.sessionName)
try {
const result = await whatsapp.checkNumberStatus(ensureSuffix(request.phone))
return {numberExists: result['numberExists']}
} catch (error) {
// We need to "touch" the error in order to get unhandled rejections
// It logs out the session and stop the app
console.log(typeof error)
console.log(error)
return {numberExists: false}
}
}
@Post('/sendText')
@ApiOperation({ summary: 'Send a text message' })
sendText(@Body() request: MessageTextRequest): Promise<WAMessage> {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendText(request);
}
@Post('/sendContactVcard')
sendContactVcard(@Body() message: MessageContactVcard) {
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.sendContactVcard(message.chatId, message.contactsId, message.name)
}
@Post('/sendImage')
@ApiOperation({
summary: 'Send an image',
description:
'Either from an URL or base64 data - look at the request schemas for details.',
})
sendImage(@Body() request: MessageImageRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendImage(request);
}
@Get('/sendText')
@ApiOperation({summary: 'Send a text message'})
sendTextGet(
@Query() message: MessageTextQuery,
) {
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.sendText(ensureSuffix(message.phone), message.text)
}
@Post('/sendFile')
@ApiOperation({
summary: 'Send a file',
description:
'Either from an URL or base64 data - look at the request schemas for details.',
})
sendFile(@Body() request: MessageFileRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendFile(request);
}
@Post('/sendText')
@ApiOperation({summary: 'Send a text message'})
sendText(@Body() message: MessageText) {
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.sendText(ensureSuffix(message.chatId), message.text)
}
@Post('/sendVoice')
@ApiOperation({
summary: 'Send an voice message',
description:
'Either from an URL or base64 data - look at the request schemas for details.',
})
sendVoice(@Body() request: MessageVoiceRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendVoice(request);
}
@Post('/sendTextButtons')
@ApiOperation({summary: 'Send a text message with buttons'})
sendTextButtons(@Body() message: MessageTextButtons) {
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.sendButtons(ensureSuffix(message.chatId), message.title, message.buttons, message.text)
}
@Post('/sendVideo')
@ApiOperation({
summary: 'Send a video',
description:
'Either from an URL or base64 data - look at the request schemas for details.',
})
sendVideo(@Body() request: MessageVideoRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendVideo(request);
}
@Post('/sendLocation')
sendLocation(@Body() message: MessageLocation) {
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.sendLocation(message.chatId, message.latitude, message.longitude, message.title)
}
@Post('/sendSeen')
sendSeen(@Body() chat: SendSeenRequest) {
const whatsapp = this.manager.getSession(chat.session);
return whatsapp.sendSeen(chat);
}
@Post('/sendLinkPreview')
sendLinkPreview(@Body() message: MessageLinkPreview) {
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.sendLinkPreview(message.chatId, message.url, message.title)
}
@Post('/startTyping')
async startTyping(@Body() chat: ChatRequest) {
// It's infinitive action
const whatsapp = this.manager.getSession(chat.session);
await whatsapp.startTyping(chat);
return { result: true };
}
@Post('/sendImage')
@ApiOperation({summary: 'NOT IMPLEMENTED YET'})
sendImage(@Body() message: MessageImage) {
throw new NotImplementedException();
// TODO: Accept image URL, download it and then send with path
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.sendImage(message.chatId, message.path, message.filename, message.caption)
}
@Post('/stopTyping')
async stopTyping(@Body() chat: ChatRequest) {
const whatsapp = this.manager.getSession(chat.session);
await whatsapp.stopTyping(chat);
return { result: true };
}
@Post('/sendFile')
@ApiOperation({summary: 'NOT IMPLEMENTED YET'})
sendFile(@Body() message: MessageFile) {
throw new NotImplementedException();
// TODO: Accept File URL, download it and then send with path
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.sendFile(message.chatId, message.path, message.filename, message.caption)
}
@Put('/reaction')
@ApiOperation({ summary: 'React to a message with an emoji' })
setReaction(@Body() request: MessageReactionRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.setReaction(request);
}
@Post('/reply')
@ApiOperation({summary: 'Reply to a text message'})
reply(@Body() message: MessageReply) {
const whatsapp = this.whatsappSessionManager.getSession(message.sessionName)
return whatsapp.reply(message.chatId, message.text, message.reply_to)
}
@Put('/star')
@ApiOperation({ summary: 'Star or unstar a message' })
async setStar(@Body() request: MessageStarRequest) {
const whatsapp = this.manager.getSession(request.session);
await whatsapp.setStar(request);
return;
}
@Post('/sendSeen')
sendSeen(@Body() chat: ChatRequest) {
const whatsapp = this.whatsappSessionManager.getSession(chat.sessionName)
return whatsapp.sendSeen(chat.chatId)
}
@Post('/sendPoll')
@ApiOperation({
summary: 'Send a poll with options',
description: 'You can use it as buttons or list replacement',
})
sendPoll(@Body() request: MessagePollRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendPoll(request);
}
@Post('/startTyping')
startTyping(@Body() chat: ChatRequest) {
// It's infinitive action
const whatsapp = this.whatsappSessionManager.getSession(chat.sessionName)
whatsapp.startTyping(chat.chatId)
return true
}
@Post('/sendLocation')
sendLocation(@Body() request: MessageLocationRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendLocation(request);
}
@Post('/stopTyping')
stopTyping(@Body() chat: ChatRequest) {
const whatsapp = this.whatsappSessionManager.getSession(chat.sessionName)
whatsapp.stopTyping(chat.chatId)
return true
}
@Post('/sendLinkPreview')
sendLinkPreview(@Body() request: MessageLinkPreviewRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendLinkPreview(request);
}
@Get('/messages')
@ApiOperation({ summary: 'Get messages in a chat' })
getMessages(@Query() query: GetMessageQuery) {
const whatsapp = this.manager.getSession(query.session);
return whatsapp.getMessages(query);
}
@Get('/sendText')
@ApiOperation({ summary: 'Send a text message', deprecated: true })
sendTextGet(@Query() query: MessageTextQuery) {
const whatsapp = this.manager.getSession(query.session);
const msg = new MessageTextRequest();
msg.chatId = query.phone;
msg.text = query.text;
return whatsapp.sendText(msg);
}
@Post('/sendContactVcard')
sendContactVcard(@Body() request: MessageContactVcardRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.sendContactVCard(request);
}
@Get('/checkNumberStatus')
@ApiOperation({
summary: 'Check number status',
description: 'DEPRECATED. Use "POST /contacts/check-exists" instead',
deprecated: true,
})
async DEPRECATED_checkNumberStatus(
@Query() request: CheckNumberStatusQuery,
): Promise<WANumberExistResult> {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.checkNumberStatus(request);
}
@Post('/reply')
@ApiOperation({
summary:
'DEPRECATED - you can set "reply_to" field when sending text, image, etc',
deprecated: true,
})
reply(@Body() request: MessageReplyRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.reply(request);
}
}
+80
View File
@@ -0,0 +1,80 @@
import { Body, Controller, Get, Post, Query } from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { SessionManager } from '../core/abc/manager.abc';
import { SessionQuery } from '../structures/base.dto';
import {
CheckNumberStatusQuery,
WANumberExistResult,
} from '../structures/chatting.dto';
import { ContactQuery, ContactRequest } from '../structures/contacts.dto';
@ApiSecurity('api_key')
@Controller('api/contacts')
@ApiTags('👤 Contacts')
export class ContactsController {
constructor(private manager: SessionManager) {}
@Get('/')
@ApiOperation({
summary: 'Get contact basic info',
description:
'The method always return result, even if the phone number is not registered in WhatsApp. For that - use /contacts/check-exists endpoint below.',
})
get(@Query() query: ContactQuery) {
const whatsapp = this.manager.getSession(query.session);
return whatsapp.getContact(query);
}
@Get('/all')
@ApiOperation({ summary: 'Get all contacts' })
getAll(@Query() query: SessionQuery) {
const whatsapp = this.manager.getSession(query.session);
return whatsapp.getContacts();
}
@Get('/check-exists')
@ApiOperation({ summary: 'Check phone number is registered in WhatsApp.' })
async checkExists(
@Query() request: CheckNumberStatusQuery,
): Promise<WANumberExistResult> {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.checkNumberStatus(request);
}
@Get('/about')
@ApiOperation({
summary: 'Gets the Contact\'s "about" info',
description:
'Returns null if you do not have permission to read their status.',
})
getAbout(@Query() query: ContactQuery) {
const whatsapp = this.manager.getSession(query.session);
return whatsapp.getContactAbout(query);
}
@Get('/profile-picture')
@ApiOperation({
summary: "Get contact's profile picture URL",
description:
'If privacy settings do not allow to get the picture, the method will return null.',
})
getProfilePicture(@Query() query: ContactQuery) {
const whatsapp = this.manager.getSession(query.session);
return whatsapp.getContactProfilePicture(query);
}
@Post('/block')
@ApiOperation({ summary: 'Block contact' })
block(@Body() request: ContactRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.blockContact(request);
}
@Post('/unblock')
@ApiOperation({ summary: 'Unblock contact' })
unblock(@Body() request: ContactRequest) {
const whatsapp = this.manager.getSession(request.session);
return whatsapp.unblockContact(request);
}
}
-58
View File
@@ -1,58 +0,0 @@
import {Body, Controller, Get, Post} from '@nestjs/common';
import {ApiTags} from "@nestjs/swagger";
import {SessionRequest} from "./all.dto";
import {WhatsappSessionManager} from "../whatsapp.service";
@Controller('api')
@ApiTags('device')
export class DeviceController {
constructor(private whatsappSessionManager: WhatsappSessionManager) {
}
@Post('/killServiceWorker')
killServiceWorker(@Body() request: SessionRequest) {
const whatsapp = this.whatsappSessionManager.getSession(request.sessionName)
return whatsapp.killServiceWorker()
}
@Post('/restartService')
restartService(@Body() request: SessionRequest) {
const whatsapp = this.whatsappSessionManager.getSession(request.sessionName)
return whatsapp.restartService()
}
@Get('/getHostDevice')
getHostDevice(@Body() request: SessionRequest) {
const whatsapp = this.whatsappSessionManager.getSession(request.sessionName)
return whatsapp.getHostDevice()
}
@Get('/getConnectionState')
getConnectionState(@Body() request: SessionRequest) {
const whatsapp = this.whatsappSessionManager.getSession(request.sessionName)
return whatsapp.getConnectionState()
}
@Get('/getBatteryLevel')
getBatteryLevel(@Body() request: SessionRequest) {
const whatsapp = this.whatsappSessionManager.getSession(request.sessionName)
return whatsapp.getBatteryLevel()
}
@Get('/isConnected')
isConnected(@Body() request: SessionRequest) {
const whatsapp = this.whatsappSessionManager.getSession(request.sessionName)
return whatsapp.isConnected()
}
@Get('/getWAVersion')
getWAVersion(@Body() request: SessionRequest) {
const whatsapp = this.whatsappSessionManager.getSession(request.sessionName)
return whatsapp.getWAVersion()
}
}
-30
View File
@@ -1,30 +0,0 @@
import {ArgumentsHost, Catch, ExceptionFilter, HttpException, HttpStatus,} from '@nestjs/common';
import {Request, Response} from 'express';
@Catch()
export class AllExceptionsFilter implements ExceptionFilter {
catch(exception: HttpException | Error, host: ArgumentsHost): void {
const ctx = host.switchToHttp();
const response = ctx.getResponse<Response>();
const request = ctx.getRequest<Request>();
if (exception instanceof HttpException) {
response
.status(exception.getStatus())
.json(exception.getResponse());
return
}
const httpStatus = HttpStatus.INTERNAL_SERVER_ERROR
response
.status(httpStatus)
.json({
statusCode: httpStatus,
timestamp: new Date().toISOString(),
path: request.url,
error: exception.message,
stack: exception.stack,
});
}
}
+252
View File
@@ -0,0 +1,252 @@
import {
Body,
Controller,
Delete,
Get,
Param,
Post,
Put,
} from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { GroupIdApiParam } from '@waha/nestjs/params/ChatIdApiParam';
import {
SessionApiParam,
SessionParam,
} from '@waha/nestjs/params/SessionApiParam';
import { SessionManager } from '../core/abc/manager.abc';
import { WhatsappSession } from '../core/abc/session.abc';
import {
CreateGroupRequest,
DescriptionRequest,
ParticipantsRequest,
SettingsSecurityChangeInfo,
SubjectRequest,
} from '../structures/groups.dto';
@ApiSecurity('api_key')
@Controller('api/:session/groups')
@ApiTags('👥 Groups')
export class GroupsController {
constructor(private manager: SessionManager) {}
@Post('')
@SessionApiParam
@ApiOperation({ summary: 'Create a new group.' })
createGroup(
@SessionParam session: WhatsappSession,
@Body() request: CreateGroupRequest,
) {
return session.createGroup(request);
}
@Get('')
@SessionApiParam
@ApiOperation({ summary: 'Get all groups.' })
getGroups(@SessionParam session: WhatsappSession) {
return session.getGroups();
}
@Get(':id')
@GroupIdApiParam
@SessionApiParam
@ApiOperation({ summary: 'Get the group.' })
getGroup(@SessionParam session: WhatsappSession, @Param('id') id: string) {
return session.getGroup(id);
}
@Put(':id/settings/security/info-admin-only')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({
summary: 'Updates the group "info admin only" settings.',
description:
'You can allow only admins to edit group info (title, description, photo).',
})
setInfoAdminOnly(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
@Body() request: SettingsSecurityChangeInfo,
) {
return session.setInfoAdminsOnly(id, request.adminsOnly);
}
@Get(':id/settings/security/info-admin-only')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({
summary: "Get the group's 'info admin only' settings.",
description:
'You can allow only admins to edit group info (title, description, photo).',
})
getInfoAdminOnly(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<SettingsSecurityChangeInfo> {
return session.getInfoAdminsOnly(id);
}
@Put(':id/settings/security/messages-admin-only')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({
summary: 'Update settings - who can send messages',
description:
'Updates the group settings to only allow admins to send messages.',
})
setMessagesAdminOnly(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
@Body() request: SettingsSecurityChangeInfo,
) {
return session.setMessagesAdminsOnly(id, request.adminsOnly);
}
@Get(':id/settings/security/messages-admin-only')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({
summary: 'Get settings - who can send messages',
description: 'The group settings to only allow admins to send messages.',
})
getMessagesAdminOnly(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<SettingsSecurityChangeInfo> {
return session.getMessagesAdminsOnly(id);
}
@Delete(':id')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({ summary: 'Delete the group.' })
deleteGroup(@SessionParam session: WhatsappSession, @Param('id') id: string) {
return session.deleteGroup(id);
}
@Post(':id/leave')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({ summary: 'Leave the group.' })
leaveGroup(@SessionParam session: WhatsappSession, @Param('id') id: string) {
return session.leaveGroup(id);
}
@Put(':id/description')
@ApiOperation({
summary: 'Updates the group description.',
description:
'Returns "true" if the subject was properly updated. This can return "false" if the user does not have the necessary permissions.',
})
@SessionApiParam
@GroupIdApiParam
setDescription(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
@Body() request: DescriptionRequest,
) {
return session.setDescription(id, request.description);
}
@Put(':id/subject')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({
summary: 'Updates the group subject',
description:
'Returns "true" if the subject was properly updated. This can return "false" if the user does not have the necessary permissions.',
})
setSubject(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
@Body() request: SubjectRequest,
) {
return session.setSubject(id, request.subject);
}
@Get(':id/invite-code')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({ summary: 'Gets the invite code for the group.' })
getInviteCode(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<string> {
return session.getInviteCode(id);
}
@Post(':id/invite-code/revoke')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({
summary:
'Invalidates the current group invite code and generates a new one.',
})
revokeInviteCode(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
): Promise<string> {
return session.revokeInviteCode(id);
}
@Get(':id/participants/')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({ summary: 'Get participants' })
getParticipants(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
) {
return session.getParticipants(id);
}
@Post(':id/participants/add')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({ summary: 'Add participants' })
addParticipants(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
@Body() request: ParticipantsRequest,
) {
return session.addParticipants(id, request);
}
@Post(':id/participants/remove')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({
summary: 'Remove participants',
})
removeParticipants(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
@Body() request: ParticipantsRequest,
) {
return session.removeParticipants(id, request);
}
@Post(':id/admin/promote')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({ summary: 'Promote participants to admin users.' })
promoteToAdmin(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
@Body() request: ParticipantsRequest,
) {
return session.promoteParticipantsToAdmin(id, request);
}
@Post(':id/admin/demote')
@SessionApiParam
@GroupIdApiParam
@ApiOperation({ summary: 'Demotes participants to regular users.' })
demoteToAdmin(
@SessionParam session: WhatsappSession,
@Param('id') id: string,
@Body() request: ParticipantsRequest,
) {
return session.demoteParticipantsToUser(id, request);
}
}
+23
View File
@@ -0,0 +1,23 @@
import { Controller, Get } from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { HealthCheck } from '@nestjs/terminus';
import { WAHAHealthCheckService } from '../core/abc/WAHAHealthCheckService';
@ApiSecurity('api_key')
@Controller('health')
@ApiTags('🔍 Observability')
export class HealthController {
constructor(private wahaHealth: WAHAHealthCheckService) {}
@Get()
@HealthCheck()
@ApiOperation({
summary: 'Check the health of the server',
description:
"Perform all health checks and return the server's health status.",
})
async check() {
return this.wahaHealth.check();
}
}
+58
View File
@@ -0,0 +1,58 @@
import { Body, Controller, Get, Param, Put } from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { WhatsappSession } from '@waha/core/abc/session.abc';
import { ChatIdApiParam } from '@waha/nestjs/params/ChatIdApiParam';
import {
SessionApiParam,
SessionParam,
} from '@waha/nestjs/params/SessionApiParam';
import { Label, SetLabelsRequest } from '@waha/structures/labels.dto';
import { SessionManager } from '../core/abc/manager.abc';
@ApiSecurity('api_key')
@Controller('api/:session/labels')
@ApiTags('🏷️ Labels')
export class LabelsController {
constructor(private manager: SessionManager) {}
@Get('/')
@SessionApiParam
@ApiOperation({ summary: 'Get all labels' })
getAll(@SessionParam session: WhatsappSession): Promise<Label[]> {
return session.getLabels();
}
@Get('/chats/:chatId')
@SessionApiParam
@ChatIdApiParam
@ApiOperation({ summary: 'Get labels for the chat' })
getChatLabels(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
): Promise<Label[]> {
return session.getChatLabels(chatId);
}
@Put('/chats/:chatId')
@SessionApiParam
@ChatIdApiParam
@ApiOperation({ summary: 'Save labels for the chat' })
putChatLabels(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
@Body() request: SetLabelsRequest,
) {
return session.putLabelsToChat(chatId, request.labels);
}
@Get('/:labelId/chats')
@SessionApiParam
@ApiOperation({ summary: 'Get chats by label' })
getChatsByLabel(
@SessionParam session: WhatsappSession,
@Param('labelId') labelId: string,
) {
return session.getChatsByLabelId(labelId);
}
}
+17
View File
@@ -0,0 +1,17 @@
import { Controller, Get } from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { PingResponse } from '@waha/structures/ping.dto';
@ApiSecurity('api_key')
@Controller('ping')
@ApiTags('🔍 Observability')
export class PingController {
@Get()
@ApiOperation({
summary: 'Ping the server',
description: 'Check if the server is alive and responding to requests.',
})
ping(): PingResponse {
return { message: 'pong' };
}
}
+95
View File
@@ -0,0 +1,95 @@
import {
BadRequestException,
Body,
Controller,
Get,
Param,
Post,
} from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { ChatIdApiParam } from '@waha/nestjs/params/ChatIdApiParam';
import {
SessionApiParam,
SessionParam,
} from '@waha/nestjs/params/SessionApiParam';
import { SessionManager } from '../core/abc/manager.abc';
import { WhatsappSession } from '../core/abc/session.abc';
import { WAHAPresenceStatus } from '../structures/enums.dto';
import {
WAHAChatPresences,
WAHASessionPresence,
} from '../structures/presence.dto';
@ApiSecurity('api_key')
@Controller('api/:session/presence')
@ApiTags('✅ Presence')
export class PresenceController {
constructor(private manager: SessionManager) {}
@Post('')
@SessionApiParam
@ApiOperation({ summary: 'Set session presence' })
setPresence(
@SessionParam session: WhatsappSession,
@Body() request: WAHASessionPresence,
) {
// Validate request
const presencesWithoutChatId = [
WAHAPresenceStatus.ONLINE,
WAHAPresenceStatus.OFFLINE,
];
const requiresNoChatId = presencesWithoutChatId.includes(request.presence);
const requiresChatId = !requiresNoChatId;
if (requiresNoChatId && request.chatId) {
const msg = {
detail: `'${request.presence}' presence works on the global scope and doesn't require 'chatId' field.`,
};
throw new BadRequestException(msg);
} else if (requiresChatId && !request.chatId) {
const msg = {
detail: `'${request.presence}' presence requires 'chatId' field.`,
};
throw new BadRequestException(msg);
}
return session.setPresence(request.presence, request.chatId);
}
@Get('')
@SessionApiParam
@ApiOperation({ summary: 'Get all subscribed presence information.' })
getPresenceAll(
@SessionParam session: WhatsappSession,
): Promise<WAHAChatPresences[]> {
return session.getPresences();
}
@Get(':chatId')
@SessionApiParam
@ChatIdApiParam
@ApiOperation({
summary:
"Get the presence for the chat id. If it hasn't been subscribed - it also subscribes to it.",
})
getPresence(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
): Promise<WAHAChatPresences> {
return session.getPresence(chatId);
}
@Post(':chatId/subscribe')
@SessionApiParam
@ChatIdApiParam
@ApiOperation({
summary: 'Subscribe to presence events for the chat.',
})
subscribe(
@SessionParam session: WhatsappSession,
@Param('chatId') chatId: string,
): Promise<void> {
return session.subscribePresence(chatId);
}
}
+27 -27
View File
@@ -1,33 +1,33 @@
import {Controller, Get, Query, Res} from '@nestjs/common';
import {ApiTags} from "@nestjs/swagger";
import {Readable} from "stream";
import {Response} from 'express';
import {WhatsappSessionManager} from "../whatsapp.service";
import {SessionQuery} from "./all.dto";
import {
Controller,
Get,
Query,
Res,
StreamableFile,
UseInterceptors,
} from '@nestjs/common';
import { ApiSecurity, ApiTags } from '@nestjs/swagger';
import { ApiFileAcceptHeader } from '@waha/nestjs/ApiFileAcceptHeader';
import { Response } from 'express';
import { SessionManager } from '../core/abc/manager.abc';
import { BufferResponseInterceptor } from '../nestjs/BufferResponseInterceptor';
import { SessionQuery } from '../structures/base.dto';
@ApiSecurity('api_key')
@Controller('api')
@ApiTags('screenshot')
@ApiTags('🖼️ Screenshot')
export class ScreenshotController {
constructor(private whatsappSessionManager: WhatsappSessionManager) {
}
constructor(private manager: SessionManager) {}
@Get('/screenshot')
async screenshot(
@Res() res: Response,
@Query() sessionQuery: SessionQuery,
) {
const whatsappService = this.whatsappSessionManager.getService(sessionQuery.sessionName)
const buffer = await whatsappService.getScreenshotOrQRCode();
const stream = new Readable();
stream.push(buffer);
stream.push(null);
res.set({
'Content-Type': 'image/png',
'Content-Length': buffer.length,
});
stream.pipe(res)
}
@Get('/screenshot')
@UseInterceptors(new BufferResponseInterceptor())
@ApiFileAcceptHeader()
async screenshot(
@Res({ passthrough: true }) res: Response,
@Query() sessionQuery: SessionQuery,
) {
const whatsappService = this.manager.getSession(sessionQuery.session);
return await whatsappService.getScreenshot();
}
}
+107
View File
@@ -0,0 +1,107 @@
import * as process from 'node:process';
import {
Body,
Controller,
Get,
Logger,
Post,
Query,
UsePipes,
} from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { getApp } from '@waha/main';
import { WAHAValidationPipe } from '@waha/nestjs/pipes/WAHAValidationPipe';
import { WAHAEnvironment } from '@waha/structures/environment.dto';
import {
EnvironmentQuery,
ServerStatusResponse,
StopRequest,
} from '@waha/structures/server.dto';
import { VERSION } from '@waha/version';
import * as lodash from 'lodash';
@ApiSecurity('api_key')
@Controller('api/server')
@ApiTags('🔍 Observability')
export class ServerController {
private logger: Logger;
constructor() {
this.logger = new Logger('ServerController');
}
@Get('version')
@ApiOperation({ summary: 'Get the version of the server' })
get(): WAHAEnvironment {
return VERSION;
}
@Get('environment')
@ApiOperation({ summary: 'Get the server environment' })
environment(
@Query(new WAHAValidationPipe()) query: EnvironmentQuery,
// eslint-disable-next-line @typescript-eslint/ban-types
): object {
let result = process.env;
if (!query.all) {
result = lodash.pickBy(result, (value, key) => {
return (
key.startsWith('WAHA_') ||
key.startsWith('WHATSAPP_') ||
key === 'DEBUG'
);
});
}
const map = new Map<string, string>();
// sort and set
Object.keys(result)
.sort()
.forEach((key) => {
map.set(key, result[key]);
});
return Object.fromEntries(map);
}
@Get('status')
@ApiOperation({ summary: 'Get the server status' })
async status(): Promise<ServerStatusResponse> {
const now = Date.now();
const uptime = Math.floor(process.uptime() * 1000);
const startTimestamp = now - uptime;
return {
startTimestamp: startTimestamp,
uptime: uptime,
};
}
@Post('stop')
@ApiOperation({
summary: 'Stop (and restart) the server',
description:
"If you're using docker, after calling this endpoint Docker will start a new container, " +
'so you can use this endpoint to restart the server',
})
@UsePipes(new WAHAValidationPipe())
async stop(@Body() request: StopRequest) {
const timeout = 1_000;
if (request.force) {
this.logger.log(`Force stopping the server in ${timeout}ms`);
setTimeout(() => {
this.logger.log('Force stopping the server');
process.kill(process.pid, 'SIGKILL');
}, timeout);
} else {
this.logger.log(`Gracefully stopping the server in ${timeout}ms`);
setTimeout(async () => {
this.logger.log('Gracefully closing the application...');
const app = getApp();
if (app) {
await app.close();
}
this.logger.log('Application closed');
process.exit(0);
}, timeout);
}
}
}
+291 -20
View File
@@ -1,30 +1,301 @@
import {Body, Controller, Get, Post} from '@nestjs/common';
import {ApiTags} from "@nestjs/swagger";
import {WhatsappSessionManager} from "../whatsapp.service";
import {SessionRequest} from "./all.dto";
import {
Body,
Controller,
Delete,
Get,
NotFoundException,
Param,
Post,
Put,
Query,
UsePipes,
} from '@nestjs/common';
import { UnprocessableEntityException } from '@nestjs/common/exceptions/unprocessable-entity.exception';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import {
SessionApiParam,
SessionParam,
} from '@waha/nestjs/params/SessionApiParam';
import { WAHAValidationPipe } from '@waha/nestjs/pipes/WAHAValidationPipe';
import { WAHASessionStatus } from '@waha/structures/enums.dto';
import {
SessionLogoutDeprecatedRequest,
SessionStartDeprecatedRequest,
SessionStopDeprecatedRequest,
} from '@waha/structures/sessions.deprecated.dto';
import { generatePrefixedId } from '@waha/utils/ids';
import { sleep } from '@waha/utils/promiseTimeout';
import { SessionManager } from '../core/abc/manager.abc';
import { WhatsappSession } from '../core/abc/session.abc';
import {
ListSessionsQuery,
MeInfo,
SessionCreateRequest,
SessionDTO,
SessionInfo,
SessionUpdateRequest,
} from '../structures/sessions.dto';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const AsyncLock = require('async-lock');
@ApiSecurity('api_key')
@Controller('api/sessions')
@ApiTags('sessions')
export class SessionsController {
constructor(private whatsappSessionManager: WhatsappSessionManager) {
@ApiTags('🖥️ Sessions')
class SessionsController {
private lock: any;
constructor(private manager: SessionManager) {
this.lock = new AsyncLock({ maxPending: Infinity });
}
private withLock(name: string, fn: () => any) {
return this.lock.acquire(name, fn);
}
@Get('/')
@ApiOperation({ summary: 'List all sessions' })
list(
@Query(new WAHAValidationPipe()) query: ListSessionsQuery,
): Promise<SessionInfo[]> {
return this.manager.getSessions(query.all);
}
@Get('/:session')
@ApiOperation({ summary: 'Get session information' })
@SessionApiParam
@UsePipes(new WAHAValidationPipe())
async get(@Param('session') name: string): Promise<SessionInfo> {
const session = this.manager.getSessionInfo(name);
if (session === null) {
throw new NotFoundException('Session not found');
}
return session;
}
@Get(':session/me')
@SessionApiParam
@ApiOperation({ summary: 'Get information about the authenticated account' })
getMe(@SessionParam session: WhatsappSession): MeInfo | null {
return session.getSessionMeInfo();
}
@Post('')
@ApiOperation({
summary: 'Create a session',
description:
'Create session a new session (and start it at the same time if required).',
})
@UsePipes(new WAHAValidationPipe())
async create(@Body() request: SessionCreateRequest): Promise<SessionDTO> {
const name = request.name || generatePrefixedId('session');
await this.withLock(name, async () => {
if (await this.manager.exists(name)) {
const msg = `Session '${name}' already exists. Use PUT to update it.`;
throw new UnprocessableEntityException(msg);
}
const config = request.config;
const start = request.start || false;
await this.manager.upsert(name, config);
if (start) {
await this.manager.start(name);
}
});
return await this.manager.getSessionInfo(name);
}
@Put(':session')
@ApiOperation({
summary: 'Update a session',
description: '',
})
@SessionApiParam
@UsePipes(new WAHAValidationPipe())
async update(
@Param('session') name: string,
@Body() request: SessionUpdateRequest,
): Promise<SessionDTO> {
await this.withLock(name, async () => {
if (!(await this.manager.exists(name))) {
throw new NotFoundException('Session not found');
}
const config = request.config;
const isRunning = this.manager.isRunning(name);
await this.manager.stop(name, true);
await this.manager.upsert(name, config);
if (isRunning) {
await this.manager.start(name);
}
});
return await this.manager.getSessionInfo(name);
}
@Delete(':session')
@SessionApiParam
@ApiOperation({
summary: 'Delete the session',
description:
'Delete the session with the given name. Stop and logout as well. Idempotent operation.',
})
@UsePipes(new WAHAValidationPipe())
async delete(@Param('session') name: string): Promise<void> {
await this.withLock(name, async () => {
await this.manager.stop(name, true);
await this.manager.logout(name);
await this.manager.delete(name);
});
}
@Post(':session/start')
@SessionApiParam
@ApiOperation({
summary: 'Start the session',
description:
'Start the session with the given name. The session must exist. Identity operation.',
})
@UsePipes(new WAHAValidationPipe())
async start(@Param('session') name: string): Promise<SessionDTO> {
await this.withLock(name, async () => {
const exists = await this.manager.exists(name);
if (!exists) {
throw new NotFoundException('Session not found');
}
const isRunning = this.manager.isRunning(name);
if (!isRunning) {
await this.manager.start(name);
}
});
return await this.manager.getSessionInfo(name);
}
@Post(':session/stop')
@SessionApiParam
@ApiOperation({
summary: 'Stop the session',
description: 'Stop the session with the given name. Idempotent operation.',
})
@UsePipes(new WAHAValidationPipe())
async stop(@Param('session') name: string): Promise<SessionDTO> {
await this.withLock(name, async () => {
const exists = await this.manager.exists(name);
if (!exists) {
throw new NotFoundException('Session not found');
}
await this.manager.stop(name, false);
});
return await this.manager.getSessionInfo(name);
}
@Post(':session/logout')
@SessionApiParam
@ApiOperation({
summary: 'Logout from the session',
description: 'Logout the session, restart a session if it was not STOPPED',
})
@UsePipes(new WAHAValidationPipe())
async logout(@Param('session') name: string): Promise<SessionDTO> {
await this.withLock(name, async () => {
const exists = await this.manager.exists(name);
if (!exists) {
throw new NotFoundException('Session not found');
}
const isRunning = this.manager.isRunning(name);
await this.manager.stop(name, true);
await this.manager.logout(name);
if (isRunning) {
await this.manager.start(name);
}
});
return await this.manager.getSessionInfo(name);
}
@Post(':session/restart')
@SessionApiParam
@ApiOperation({
summary: 'Restart the session',
description: 'Restart the session with the given name.',
})
@UsePipes(new WAHAValidationPipe())
async restart(@Param('session') name: string): Promise<SessionDTO> {
await this.withLock(name, async () => {
const exists = await this.manager.exists(name);
if (!exists) {
throw new NotFoundException('Session not found');
}
await this.manager.stop(name, true);
await this.manager.start(name);
});
return await this.manager.getSessionInfo(name);
}
@Post('/start/')
@ApiOperation({
summary: 'Upsert and Start session',
description:
'Create session (if not exists) or update a config (if exists) and start it.',
deprecated: true,
})
async DEPRACATED_start(
@Body() request: SessionStartDeprecatedRequest,
): Promise<SessionDTO> {
const name = request.name;
if (this.manager.isRunning(name)) {
const msg = `Session '${name}' is already started.`;
throw new UnprocessableEntityException(msg);
}
return await this.withLock(name, async () => {
const config = request.config;
await this.manager.upsert(name, config);
return await this.manager.start(name);
});
}
@Post('/start/')
async start(@Body() request: SessionRequest) {
// Do not wait it, because we get venom instance only after scanning QR code
this.whatsappSessionManager.startSession(request.sessionName)
@Post('/stop/')
@ApiOperation({
summary: 'Stop (and Logout if asked) session',
description: 'Stop session and Logout by default.',
deprecated: true,
})
async DEPRECATED_stop(
@Body() request: SessionStopDeprecatedRequest,
): Promise<void> {
const name = request.name;
if (request.logout) {
// Old API did remove the session complete
await this.withLock(name, async () => {
await this.manager.stop(name, true);
await this.manager.logout(name);
await this.manager.delete(name);
});
} else {
await this.withLock(name, async () => {
await this.manager.stop(name, false);
});
}
return;
}
@Post('/stop/')
async stop(@Body() request: SessionRequest) {
await this.whatsappSessionManager.stopSession(request.sessionName)
}
@Get('/')
async list() {
return this.whatsappSessionManager.getAllSessions()
}
@Post('/logout/')
@ApiOperation({
summary: 'Logout and Delete session.',
description: 'Stop, Logout and Delete session.',
deprecated: true,
})
async DEPRECATED_logout(
@Body() request: SessionLogoutDeprecatedRequest,
): Promise<void> {
const name = request.name;
await this.withLock(name, async () => {
await this.manager.stop(name, true);
await this.manager.logout(name);
await this.manager.delete(name);
});
return;
}
}
export { SessionsController };
+75
View File
@@ -0,0 +1,75 @@
import { Body, Controller, Post } from '@nestjs/common';
import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger';
import {
SessionApiParam,
SessionParam,
} from '@waha/nestjs/params/SessionApiParam';
import { SessionManager } from '../core/abc/manager.abc';
import { WhatsappSession } from '../core/abc/session.abc';
import {
DeleteStatusRequest,
ImageStatus,
TextStatus,
VideoStatus,
VoiceStatus,
} from '../structures/status.dto';
@ApiSecurity('api_key')
@Controller('api/:session/status')
@ApiTags('🟢 Status')
class StatusController {
constructor(private manager: SessionManager) {}
@Post('text')
@SessionApiParam
@ApiOperation({ summary: 'Send text status' })
sendTextStatus(
@SessionParam session: WhatsappSession,
@Body() status: TextStatus,
) {
return session.sendTextStatus(status);
}
@Post('image')
@SessionApiParam
@ApiOperation({ summary: 'Send image status' })
sendImageStatus(
@SessionParam session: WhatsappSession,
@Body() status: ImageStatus,
) {
return session.sendImageStatus(status);
}
@Post('voice')
@SessionApiParam
@ApiOperation({ summary: 'Send voice status' })
sendVoiceStatus(
@SessionParam session: WhatsappSession,
@Body() status: VoiceStatus,
) {
return session.sendVoiceStatus(status);
}
@Post('video')
@SessionApiParam
@ApiOperation({ summary: 'Send video status' })
sendVideoStatus(
@SessionParam session: WhatsappSession,
@Body() status: VideoStatus,
) {
return session.sendVideoStatus(status);
}
@Post('delete')
@SessionApiParam
@ApiOperation({ summary: 'DELETE sent status' })
deleteStatus(
@SessionParam session: WhatsappSession,
@Body() status: DeleteStatusRequest,
) {
return session.deleteStatus(status);
}
}
export { StatusController };
+25
View File
@@ -0,0 +1,25 @@
import { Controller, Get } from '@nestjs/common';
import {
ApiExtraModels,
ApiOperation,
ApiSecurity,
ApiTags,
} from '@nestjs/swagger';
import { WAHAEnvironment } from '../structures/environment.dto';
import { VERSION } from '../version';
@ApiSecurity('api_key')
@Controller('api/version')
@ApiTags('🔍 Observability')
export class VersionController {
@Get('')
@ApiOperation({
summary: 'Get the server version ',
deprecated: true,
description: "Use 'GET /api/server/version' instead ",
})
get(): WAHAEnvironment {
return VERSION;
}
}
-37
View File
@@ -1,37 +0,0 @@
import {ConsoleLogger, Module} from '@nestjs/common';
import {WhatsappSessionManager} from "./whatsapp.service";
import {ScreenshotController} from "./api/screenshot.controller";
import {ConfigModule} from "@nestjs/config";
import {WhatsappConfigService} from "./config.service";
import {ServeStaticModule} from "@nestjs/serve-static";
import {SessionsController} from "./api/sessions.controller";
import {ChattingController} from "./api/chatting.controller";
import {DeviceController} from "./api/device.controller";
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
}),
ServeStaticModule.forRootAsync({
imports: [],
extraProviders: [WhatsappConfigService],
inject: [WhatsappConfigService],
useFactory: (config: WhatsappConfigService) => {
return [{
rootPath: config.filesFolder,
serveRoot: config.files_uri,
}]
},
}),
],
controllers: [
SessionsController,
ChattingController,
DeviceController,
ScreenshotController,
],
providers: [WhatsappSessionManager, ConsoleLogger, WhatsappConfigService],
})
export class AppModule {
}
+123 -40
View File
@@ -1,56 +1,139 @@
import {Injectable} from "@nestjs/common";
import {ConfigService} from "@nestjs/config";
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { WAHAEvents } from '@waha/structures/enums.dto';
import { parseBool } from './helpers';
import { WebhookConfig } from './structures/webhooks.config.dto';
@Injectable()
export class WhatsappConfigService {
public files_uri = '/api/files'
public schema = "http"
constructor(private configService: ConfigService) {}
constructor(private configService: ConfigService) {
}
get schema() {
return this.configService.get('WHATSAPP_API_SCHEMA', 'http');
}
get filesURL(): string {
return `${this.schema}://${this.hostname}:${this.port}${this.files_uri}/`
}
get hostname(): string {
return this.configService.get('WHATSAPP_API_HOSTNAME', 'localhost');
}
get hostname(): string {
return this.configService.get(
'WHATSAPP_API_HOSTNAME',
'localhost',
)
}
get port(): string {
return this.configService.get('WHATSAPP_API_PORT', '3000');
}
get port(): string {
return this.configService.get(
'WHATSAPP_API_PORT',
'3000',
)
get mimetypes(): string[] {
if (!this.shouldDownloadMedia) {
return ['mimetype/ignore-all-media'];
}
const types = this.configService.get('WHATSAPP_FILES_MIMETYPES', '');
return types ? types.split(',') : [];
}
get filesFolder(): string {
return this.configService.get(
'WHATSAPP_FILES_FOLDER',
'/tmp/whatsapp-files',
)
}
get shouldDownloadMedia(): boolean {
const value = this.configService.get('WHATSAPP_DOWNLOAD_MEDIA', 'true');
return parseBool(value);
}
get filesLifetime(): number {
return this.configService.get<number>(
'WHATSAPP_FILES_LIFETIME',
180,
)
get startSessions(): string[] {
const value: string = this.configService.get('WHATSAPP_START_SESSION', '');
if (!value) {
return [];
}
return value.split(',');
}
get mimetypes(): string[] | null {
const types = this.configService.get('WHATSAPP_FILES_MIMETYPES', "")
return types ? types.split(',') : null
}
get shouldRestartAllSessions(): boolean {
const value: string = this.configService.get(
'WHATSAPP_RESTART_ALL_SESSIONS',
'false',
);
return parseBool(value);
}
get startSession(): string | undefined {
return this.configService.get('WHATSAPP_START_SESSION', undefined)
}
get proxyServer(): string[] | string | undefined {
const single = this.configService.get<string>(
'WHATSAPP_PROXY_SERVER',
undefined,
);
const multipleValues = this.configService.get<string>(
'WHATSAPP_PROXY_SERVER_LIST',
undefined,
);
const multiple = multipleValues ? multipleValues.split(',') : undefined;
return single ? single : multiple;
}
get(name: string): any {
return this.configService.get(name)
get proxyServerIndexPrefix(): string | undefined {
return this.configService.get(
'WHATSAPP_PROXY_SERVER_INDEX_PREFIX',
undefined,
);
}
get proxyServerUsername(): string | undefined {
return this.configService.get('WHATSAPP_PROXY_SERVER_USERNAME', undefined);
}
get proxyServerPassword(): string | undefined {
return this.configService.get('WHATSAPP_PROXY_SERVER_PASSWORD', undefined);
}
getWebhookConfig(): WebhookConfig | undefined {
const url = this.getWebhookUrl();
const events = this.getWebhookEvents();
if (!url || events.length === 0) {
return undefined;
}
return { url: url, events: events };
}
private getWebhookUrl(): string | undefined {
return this.get('WHATSAPP_HOOK_URL');
}
private getWebhookEvents(): WAHAEvents[] {
const value = this.get('WHATSAPP_HOOK_EVENTS', '');
return value ? value.split(',') : [];
}
getSessionMongoUrl(): string | undefined {
return this.configService.get('WHATSAPP_SESSIONS_MONGO_URL', undefined);
}
get(name: string, defaultValue: any = undefined): any {
return this.configService.get(name, defaultValue);
}
getApiKey(): string | undefined {
return this.configService.get('WHATSAPP_API_KEY', '');
}
getExcludedPaths(): string[] {
const value = this.configService.get('WHATSAPP_API_KEY_EXCLUDE_PATH', '');
if (!value) {
return [];
}
return value.split(',');
}
getHealthMediaFilesThreshold(): number {
return this.configService.get<number>(
'WHATSAPP_HEALTH_MEDIA_FILES_THRESHOLD_MB',
100,
);
}
getHealthSessionFilesThreshold(): number {
return this.configService.get<number>(
'WHATSAPP_HEALTH_SESSION_FILES_THRESHOLD_MB',
100,
);
}
getHealthMongoTimeout(): number {
return this.configService.get<number>(
'WHATSAPP_HEALTH_MONGO_TIMEOUT_MS',
3000,
);
}
}
+13
View File
@@ -0,0 +1,13 @@
export class QR {
private base64: string;
public raw?: string;
save(base64: string, raw?: string) {
this.base64 = base64.replace(/^data:image\/png;base64,/, '');
this.raw = raw;
}
get(): Buffer {
return Buffer.from(this.base64, 'base64');
}
}
+166
View File
@@ -0,0 +1,166 @@
import { INestApplication } from '@nestjs/common';
import { DocumentBuilder, OpenAPIObject, SwaggerModule } from '@nestjs/swagger';
import { DECORATORS } from '@nestjs/swagger/dist/constants';
import { Logger } from 'nestjs-pino';
import { WhatsappConfigService } from '../config.service';
import { VERSION } from '../version';
import { SwaggerConfigServiceCore } from './config/SwaggerConfigServiceCore';
export class SwaggerConfiguratorCore {
protected logger: any;
constructor(protected app: INestApplication) {
this.logger = app.get(Logger);
}
get title() {
return 'WAHA - WhatsApp HTTP API';
}
get description() {
return (
'WhatsApp HTTP API that you can run in a click!<br/>' +
'<br/>' +
'Learn more:' +
'<ul>' +
'<li><a href="https://waha.devlike.pro/" target="_blank">Documentation</a></li>' +
'<li><a href="https://waha.devlike.pro/docs/how-to/engines/#features" target="_blank">Supported features in engines</a></li>' +
'<li><a href="https://github.com/devlikeapro/waha" target="_blank">GitHub - WAHA Core</a></li>' +
'<li><a href="https://github.com/devlikeapro/waha-plu' + // Separate line to pass pre-commit check
's" target="_blank">GitHub - WAHA Plus</a></li>' +
'<li><a href="/dashboard">WAHA Dashboard</a></li>' +
'<li><a href="https://waha.devlike.pro/docs/how-to/waha-dashboard">WAHA Dashboard Documentation</a></li>' +
'</ul>' +
'<p>Support the project and get WAHA Plus version!</p>' +
'<ul>' +
'<li><a href="https://waha.devlike.pro/docs/how-to/plu' + // Separate line to pass pre-commit check
's-version/" target="_blank">WAHA Plus</a></li>' +
'<li><a href="https://patreon.com/wa_http_api/" target="_blank">Patreon</a></li>' +
'<li><a href="https://boosty.to/wa-http-api/" target="_blank">Boosty</a></li>' +
'<li><a href="https://portal.devlike.pro/" target="_blank">Patron Portal</a></li>' +
'</ul>'
);
}
get externalDocUrl() {
return 'https://waha.devlike.pro/';
}
configure(webhooks: any[]) {
const app = this.app;
const builder = new DocumentBuilder();
builder
.setTitle(this.title)
.setDescription(this.description)
.setExternalDoc(this.title, this.externalDocUrl)
.setVersion(VERSION.version)
.addTag('🖥️ Sessions', 'Control WhatsApp sessions (accounts)')
.addTag('🔑 Auth', 'Authentication')
.addTag('🖼️ Screenshot', 'Get screenshot of WhatsApp and show QR code')
.addTag('📤 Chatting', 'Chatting methods')
.addTag('📢 Channels', 'Channels (newsletters) methods')
.addTag(
'🟢 Status',
'Status (aka stories) methods. <b>NOWEB</b> engine only!',
)
.addTag('💬 Chats', `Chats methods`)
.addTag(
'👤 Contacts',
`Contacts methods.<br>
Use phone number (without +) or phone number and \`@c.us\` at the end as \`contactId\`.<br>
'E.g: \`12312312310\` OR \`12312312310@c.us\`<br>`,
)
.addTag('👥 Groups', `Groups methods.<br>`)
.addTag('✅ Presence', `Presence information`)
.addTag(
'🏷️ Labels',
'Labels - available only for WhatsApp Business accounts',
)
.addTag('🔍 Observability', 'Other methods')
.addTag('🗄️ Storage', 'Storage methods')
.addApiKey({
type: 'apiKey',
description: 'Your secret api key',
name: 'X-Api-Key',
});
const config = app.get(WhatsappConfigService);
const swaggerConfig = app.get(SwaggerConfigServiceCore);
if (swaggerConfig.advancedConfigEnabled) {
builder.addServer('{protocol}://{host}:{port}/{baseUrl}', '', {
protocol: {
default: 'http',
enum: ['http', 'https'],
description: 'The protocol used to access the server.',
},
host: {
default: config.hostname,
description: 'The hostname or IP address of the server.',
},
port: {
default: config.port,
description:
'The port number on which the server is listening for requests',
},
baseUrl: {
default: '',
description:
'The base URL path for all API endpoints. This can be used to group related endpoints together under a common path.',
},
});
}
const swaggerDocumentConfig = builder.build();
const swaggerDocumentOptions = {
extraModels: webhooks,
};
let document = SwaggerModule.createDocument(
app,
swaggerDocumentConfig,
swaggerDocumentOptions,
);
document = this.configureWebhooks(document, webhooks);
SwaggerModule.setup('', app, document, {
customSiteTitle: this.title,
});
}
private configureWebhooks(document: OpenAPIObject, supportedWebhooks) {
document.openapi = '3.1.0';
const webhooks = {};
for (const webhook of supportedWebhooks) {
const eventMetadata = Reflect.getMetadata(
DECORATORS.API_MODEL_PROPERTIES,
webhook.prototype,
'event',
);
const event = new webhook().event;
const schemaName = webhook.name;
webhooks[event] = {
post: {
summary: eventMetadata.description,
requestBody: {
content: {
'application/json': {
schema: {
$ref: `#/components/schemas/${schemaName}`,
},
},
},
},
responses: {
'200': {
description:
'Return a 200 status to indicate that the data was received successfully',
},
},
},
};
}
// @ts-ignore
document.webhooks = webhooks;
return document;
}
}
+3
View File
@@ -0,0 +1,3 @@
export abstract class DataStore {
abstract init(sessionName?: string): Promise<void>;
}
+20
View File
@@ -0,0 +1,20 @@
import { Injectable, Logger, LoggerService } from '@nestjs/common';
import { HealthCheckService } from '@nestjs/terminus';
import type { HealthCheckResult } from '@nestjs/terminus/dist/health-check/health-check-result.interface';
import { WhatsappConfigService } from '../../config.service';
import { SessionManager } from './manager.abc';
@Injectable()
export abstract class WAHAHealthCheckService {
protected logger: LoggerService;
constructor(
protected sessionManager: SessionManager,
protected health: HealthCheckService,
protected config: WhatsappConfigService,
) {
this.logger = new Logger('WAHAHealthCheckService');
}
abstract check(): Promise<HealthCheckResult>;
}
+72
View File
@@ -0,0 +1,72 @@
import { BeforeApplicationShutdown } from '@nestjs/common';
import { WAHAWebhook } from '@waha/structures/webhooks.dto';
import { VERSION } from '@waha/version';
import { EventEmitter } from 'events';
import { WAHAEngine, WAHAEvents } from '../../structures/enums.dto';
import {
SessionConfig,
SessionDTO,
SessionInfo,
} from '../../structures/sessions.dto';
import { ISessionAuthRepository } from '../storage/ISessionAuthRepository';
import { ISessionConfigRepository } from '../storage/ISessionConfigRepository';
import { WhatsappSession } from './session.abc';
import { WebhookConductor } from './webhooks.abc';
export abstract class SessionManager implements BeforeApplicationShutdown {
public store: any;
public sessionAuthRepository: ISessionAuthRepository;
public sessionConfigRepository: ISessionConfigRepository;
public events: EventEmitter;
protected abstract getEngine(engine: WAHAEngine): typeof WhatsappSession;
protected abstract get EngineClass(): typeof WhatsappSession;
protected abstract get WebhookConductorClass(): typeof WebhookConductor;
abstract beforeApplicationShutdown(signal?: string);
//
// API Methods
//
/**
* Either create or update
*/
abstract exists(name: string): Promise<boolean>;
abstract isRunning(name: string): boolean;
abstract upsert(name: string, config?: SessionConfig): Promise<void>;
abstract delete(name: string): Promise<void>;
abstract start(name: string): Promise<SessionDTO>;
abstract stop(name: string, silent: boolean): Promise<void>;
abstract logout(name: string): Promise<void>;
abstract getSession(name: string): WhatsappSession;
abstract getSessionInfo(name: string): Promise<SessionInfo | null>;
abstract getSessions(all: boolean): Promise<SessionInfo[]>;
handleSessionEvent(event: WAHAEvents, session: WhatsappSession) {
return (payload: any) => {
const me = session.getSessionMeInfo();
const data: WAHAWebhook = {
event: event,
session: session.name,
metadata: session.sessionConfig?.metadata,
me: me,
payload: payload,
engine: session.engine,
environment: VERSION,
};
this.events.emit(event, data);
};
}
}
+601
View File
@@ -0,0 +1,601 @@
import {
Channel,
CreateChannelRequest,
ListChannelsQuery,
} from '@waha/structures/channels.dto';
import { GetChatsQuery } from '@waha/structures/chats.dto';
import { Label, LabelID } from '@waha/structures/labels.dto';
import { LoggerBuilder } from '@waha/utils/logging';
import { EventEmitter } from 'events';
import * as fs from 'fs';
import { Logger } from 'pino';
import { MessageId } from 'whatsapp-web.js';
import {
ChatRequest,
CheckNumberStatusQuery,
EditMessageRequest,
GetMessageQuery,
MessageContactVcardRequest,
MessageFileRequest,
MessageImageRequest,
MessageLinkPreviewRequest,
MessageLocationRequest,
MessagePollRequest,
MessageReactionRequest,
MessageReplyRequest,
MessageStarRequest,
MessageTextRequest,
MessageVideoRequest,
MessageVoiceRequest,
} from '../../structures/chatting.dto';
import { ContactQuery, ContactRequest } from '../../structures/contacts.dto';
import {
WAHAEngine,
WAHAEvents,
WAHAPresenceStatus,
WAHASessionStatus,
} from '../../structures/enums.dto';
import {
CreateGroupRequest,
ParticipantsRequest,
SettingsSecurityChangeInfo,
} from '../../structures/groups.dto';
import { WAHAChatPresences } from '../../structures/presence.dto';
import {
MeInfo,
ProxyConfig,
SessionConfig,
} from '../../structures/sessions.dto';
import {
DeleteStatusRequest,
ImageStatus,
TextStatus,
VideoStatus,
VoiceStatus,
} from '../../structures/status.dto';
import { WASessionStatusBody } from '../../structures/webhooks.dto';
import { NotImplementedByEngineError } from '../exceptions';
import { IMediaManager } from '../media/IMediaManager';
import { QR } from '../QR';
import { DataStore } from './DataStore';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const qrcode = require('qrcode-terminal');
const CHROME_PATH = '/usr/bin/google-chrome-stable';
const CHROMIUM_PATH = '/usr/bin/chromium';
export function getBrowserExecutablePath() {
if (fs.existsSync(CHROME_PATH)) {
return CHROME_PATH;
}
return CHROMIUM_PATH;
}
export function ensureSuffix(phone) {
const suffix = '@c.us';
if (phone.includes('@')) {
return phone;
}
return phone + suffix;
}
export enum WAHAInternalEvent {
ENGINE_START = 'engine.start',
}
export interface SessionParams {
name: string;
printQR: boolean;
mediaManager: IMediaManager;
loggerBuilder: LoggerBuilder;
sessionStore: DataStore;
proxyConfig?: ProxyConfig;
sessionConfig?: SessionConfig;
engineConfig?: any;
}
export abstract class WhatsappSession {
public events: EventEmitter;
public engine: WAHAEngine;
public name: string;
protected mediaManager: IMediaManager;
public loggerBuilder: LoggerBuilder;
protected logger: Logger;
protected sessionStore: DataStore;
protected proxyConfig?: ProxyConfig;
public sessionConfig?: SessionConfig;
protected engineConfig?: any;
private _status: WAHASessionStatus;
private shouldPrintQR: boolean;
public constructor({
name,
printQR,
loggerBuilder,
sessionStore,
proxyConfig,
mediaManager,
sessionConfig,
engineConfig,
}: SessionParams) {
this.events = new EventEmitter();
this.name = name;
this.proxyConfig = proxyConfig;
this.loggerBuilder = loggerBuilder;
this.logger = loggerBuilder.child({ name: 'WhatsappSession' });
this.sessionStore = sessionStore;
this.mediaManager = mediaManager;
this.sessionConfig = sessionConfig;
this.engineConfig = engineConfig;
this.shouldPrintQR = printQR;
}
protected set status(value: WAHASessionStatus) {
this._status = value;
const body: WASessionStatusBody = { name: this.name, status: value };
this.events.emit(WAHAEvents.SESSION_STATUS, body);
}
public get status() {
return this._status;
}
getBrowserExecutablePath() {
return getBrowserExecutablePath();
}
getBrowserArgsForPuppeteer() {
// Run optimized version of Chrome
// References:
// https://github.com/pedroslopez/whatsapp-web.js/issues/1420
// https://github.com/wppconnect-team/wppconnect/issues/1326
// https://www.bannerbear.com/blog/ways-to-speed-up-puppeteer-screenshots/
return [
'--aggressive-cache-discard',
'--disable-accelerated-2d-canvas',
'--disable-application-cache',
'--disable-background-networking',
'--disable-cache',
'--disable-client-side-phishing-detection',
'--disable-component-update',
'--disable-default-apps',
'--disable-dev-shm-usage',
'--disable-extensions',
'--disable-gpu',
'--disable-offer-store-unmasked-wallet-cards',
'--disable-offline-load-stale-cache',
'--disable-popup-blocking',
'--disable-setuid-sandbox',
'--disable-speech-api',
'--disable-sync',
'--disable-translate',
'--disable-web-security',
'--disk-cache-size=0',
'--hide-scrollbars',
'--ignore-certificate-errors',
'--ignore-ssl-errors',
'--metrics-recording-only',
'--mute-audio',
'--no-default-browser-check',
'--no-first-run',
'--no-pings',
'--no-sandbox',
'--no-zygote',
'--password-store=basic',
'--safebrowsing-disable-auto-update',
'--single-process',
'--use-mock-keychain',
];
}
protected isDebugEnabled() {
return this.logger.isLevelEnabled('debug');
}
/** Start the session */
abstract start();
/** Stop the session */
abstract stop(): Promise<void>;
/** Subscribe the handler to specific hook */
subscribeSessionEvent(
hook: WAHAEvents | string,
handler: (message) => void,
): boolean {
switch (hook) {
case WAHAEvents.SESSION_STATUS:
this.events.on(WAHAEvents.SESSION_STATUS, handler);
return true;
default:
return false;
}
}
abstract subscribeEngineEvent(
hook: WAHAEvents | string,
handler: (message) => void,
): boolean;
/**
* START - Methods for API
*/
/**
* Auth methods
*/
public getQR(): QR {
throw new NotImplementedByEngineError();
}
public requestCode(phoneNumber: string, method: string, params?: any) {
throw new NotImplementedByEngineError();
}
public authorizeCode(code: string) {
throw new NotImplementedByEngineError();
}
abstract getScreenshot(): Promise<Buffer>;
public getSessionMeInfo(): MeInfo | null {
return null;
}
public getCaptcha(): Promise<QR> {
throw new NotImplementedByEngineError();
}
public saveCaptcha(code: string) {
throw new NotImplementedByEngineError();
}
/**
* Other methods
*/
abstract checkNumberStatus(request: CheckNumberStatusQuery);
abstract sendText(request: MessageTextRequest);
sendContactVCard(request: MessageContactVcardRequest) {
throw new NotImplementedByEngineError();
}
sendPoll(request: MessagePollRequest) {
throw new NotImplementedByEngineError();
}
abstract sendLocation(request: MessageLocationRequest);
sendLinkPreview(request: MessageLinkPreviewRequest) {
throw new NotImplementedByEngineError();
}
abstract sendImage(request: MessageImageRequest);
abstract sendFile(request: MessageFileRequest);
abstract sendVoice(request: MessageVoiceRequest);
sendVideo(request: MessageVideoRequest) {
throw new NotImplementedByEngineError();
}
abstract reply(request: MessageReplyRequest);
abstract sendSeen(chat: ChatRequest);
abstract startTyping(chat: ChatRequest);
abstract stopTyping(chat: ChatRequest);
getMessages(query: GetMessageQuery) {
throw new NotImplementedByEngineError();
}
abstract setReaction(request: MessageReactionRequest);
setStar(request: MessageStarRequest): Promise<void> {
throw new NotImplementedByEngineError();
}
/**
* Chats methods
*/
public getChats(query: GetChatsQuery) {
throw new NotImplementedByEngineError();
}
public deleteChat(chatId) {
throw new NotImplementedByEngineError();
}
public getChatMessages(
chatId: string,
limit: number,
downloadMedia: boolean,
) {
throw new NotImplementedByEngineError();
}
public deleteMessage(chatId: string, messageId: string) {
throw new NotImplementedByEngineError();
}
public editMessage(
chatId: string,
messageId: string,
request: EditMessageRequest,
) {
throw new NotImplementedByEngineError();
}
public clearMessages(chatId) {
throw new NotImplementedByEngineError();
}
public chatsArchiveChat(chatId: string): Promise<any> {
throw new NotImplementedByEngineError();
}
public chatsUnarchiveChat(chatId: string): Promise<any> {
throw new NotImplementedByEngineError();
}
/**
* Labels methods
*/
public getLabels(): Promise<Label[]> {
throw new NotImplementedByEngineError();
}
public getChatsByLabelId(labelId: string) {
throw new NotImplementedByEngineError();
}
public getChatLabels(chatId: string): Promise<Label[]> {
throw new NotImplementedByEngineError();
}
public putLabelsToChat(chatId: string, labels: LabelID[]) {
throw new NotImplementedByEngineError();
}
/**
* Contacts methods
*/
public getContact(query: ContactQuery) {
throw new NotImplementedByEngineError();
}
public getContacts() {
throw new NotImplementedByEngineError();
}
public getContactAbout(query: ContactQuery) {
throw new NotImplementedByEngineError();
}
public getContactProfilePicture(query: ContactQuery) {
throw new NotImplementedByEngineError();
}
public blockContact(request: ContactRequest) {
throw new NotImplementedByEngineError();
}
public unblockContact(request: ContactRequest) {
throw new NotImplementedByEngineError();
}
/**
* Group methods
*/
public createGroup(request: CreateGroupRequest) {
throw new NotImplementedByEngineError();
}
public getGroups() {
throw new NotImplementedByEngineError();
}
public getGroup(id) {
throw new NotImplementedByEngineError();
}
public getInfoAdminsOnly(id): Promise<SettingsSecurityChangeInfo> {
throw new NotImplementedByEngineError();
}
public setInfoAdminsOnly(id, value) {
throw new NotImplementedByEngineError();
}
public getMessagesAdminsOnly(id): Promise<SettingsSecurityChangeInfo> {
throw new NotImplementedByEngineError();
}
public setMessagesAdminsOnly(id, value) {
throw new NotImplementedByEngineError();
}
public deleteGroup(id) {
throw new NotImplementedByEngineError();
}
public leaveGroup(id) {
throw new NotImplementedByEngineError();
}
public setDescription(id, description) {
throw new NotImplementedByEngineError();
}
public setSubject(id, description) {
throw new NotImplementedByEngineError();
}
public getInviteCode(id): Promise<string> {
throw new NotImplementedByEngineError();
}
public revokeInviteCode(id): Promise<string> {
throw new NotImplementedByEngineError();
}
public getParticipants(id) {
throw new NotImplementedByEngineError();
}
public addParticipants(id, request: ParticipantsRequest) {
throw new NotImplementedByEngineError();
}
public removeParticipants(id, request: ParticipantsRequest) {
throw new NotImplementedByEngineError();
}
public promoteParticipantsToAdmin(id, request: ParticipantsRequest) {
throw new NotImplementedByEngineError();
}
public demoteParticipantsToUser(id, request: ParticipantsRequest) {
throw new NotImplementedByEngineError();
}
public setPresence(presence: WAHAPresenceStatus, chatId?: string) {
throw new NotImplementedByEngineError();
}
public getPresences(): Promise<WAHAChatPresences[]> {
throw new NotImplementedByEngineError();
}
public getPresence(id: string): Promise<WAHAChatPresences> {
throw new NotImplementedByEngineError();
}
public subscribePresence(id: string): Promise<void> {
throw new NotImplementedByEngineError();
}
/**
* Channels methods
*/
public channelsList(query: ListChannelsQuery): Promise<Channel[]> {
throw new NotImplementedByEngineError();
}
public channelsCreateChannel(
request: CreateChannelRequest,
): Promise<Channel> {
throw new NotImplementedByEngineError();
}
public channelsGetChannel(id: string): Promise<Channel> {
throw new NotImplementedByEngineError();
}
public channelsGetChannelByInviteCode(inviteCode: string): Promise<Channel> {
throw new NotImplementedByEngineError();
}
public channelsDeleteChannel(id: string): Promise<void> {
throw new NotImplementedByEngineError();
}
public channelsFollowChannel(id: string): Promise<void> {
throw new NotImplementedByEngineError();
}
public channelsUnfollowChannel(id: string): Promise<void> {
throw new NotImplementedByEngineError();
}
public channelsMuteChannel(id: string): Promise<void> {
throw new NotImplementedByEngineError();
}
public channelsUnmuteChannel(id: string): Promise<void> {
throw new NotImplementedByEngineError();
}
/**
* Status methods
*/
public sendTextStatus(status: TextStatus) {
throw new NotImplementedByEngineError();
}
public sendImageStatus(status: ImageStatus) {
throw new NotImplementedByEngineError();
}
public sendVoiceStatus(status: VoiceStatus) {
throw new NotImplementedByEngineError();
}
public sendVideoStatus(status: VideoStatus) {
throw new NotImplementedByEngineError();
}
public deleteStatus(request: DeleteStatusRequest) {
throw new NotImplementedByEngineError();
}
public async getEngineInfo(): Promise<any> {
return {};
}
/**
* END - Methods for API
*/
/**
* Add WhatsApp suffix (@c.us) to the phone number if it doesn't have it yet
* @param phone
*/
protected ensureSuffix(phone) {
return ensureSuffix(phone);
}
protected deserializeId(messageId: string): MessageId {
const parts = messageId.split('_');
return {
fromMe: parts[0] === 'true',
remote: parts[1],
id: parts[2],
_serialized: messageId,
};
}
protected printQR(qr: QR) {
if (!this.shouldPrintQR) {
return;
}
if (!qr.raw) {
this.logger.error(
'QR.raw is not available, can not print it in the console',
);
return;
}
this.logger.info(
"You can disable QR in console by setting 'WAHA_PRINT_QR=false' in your environment variables.",
);
qrcode.generate(qr.raw, { small: true });
}
}
export function isNewsletter(jid: string) {
return jid.endsWith('@newsletter');
}
export function getChannelInviteLink(code: string) {
return `https://whatsapp.com/channel/${code}`;
}
+24
View File
@@ -0,0 +1,24 @@
import { LoggerBuilder } from '@waha/utils/logging';
import { Logger } from 'pino';
import { WebhookConfig } from '../../structures/webhooks.config.dto';
import { WhatsappSession } from './session.abc';
export abstract class WebhookSender {
protected url: string;
protected logger: Logger;
constructor(
loggerBuilder: LoggerBuilder,
protected webhookConfig: WebhookConfig,
) {
this.url = webhookConfig.url;
this.logger = loggerBuilder.child({ name: WebhookSender.name });
}
abstract send(json);
}
export abstract class WebhookConductor {
abstract configure(session: WhatsappSession, webhooks: WebhookConfig[]);
}
+140
View File
@@ -0,0 +1,140 @@
import {
BeforeApplicationShutdown,
Logger,
LoggerService,
} from '@nestjs/common';
import { sleep } from '@nestjs/terminus/dist/utils';
import {
OnGatewayConnection,
OnGatewayDisconnect,
OnGatewayInit,
WebSocketGateway,
WebSocketServer,
} from '@nestjs/websockets';
import { SessionManager } from '@waha/core/abc/manager.abc';
import { WebsocketHeartbeatJob } from '@waha/nestjs/ws/WebsocketHeartbeatJob';
import { WebSocket } from '@waha/nestjs/ws/ws';
import { WAHAEvents } from '@waha/structures/enums.dto';
import { generatePrefixedId } from '@waha/utils/ids';
import { IncomingMessage } from 'http';
import * as lodash from 'lodash';
import * as url from 'url';
import { Server } from 'ws';
@WebSocketGateway({
path: '/ws',
cors: true,
})
export class WebsocketGatewayCore
implements
OnGatewayInit,
OnGatewayConnection,
OnGatewayDisconnect,
BeforeApplicationShutdown
{
HEARTBEAT_INTERVAL = 10_000;
@WebSocketServer()
server: Server;
private listeners: Map<WebSocket, { session: string; events: string[] }> =
new Map();
private readonly logger: LoggerService;
private heartbeat: WebsocketHeartbeatJob;
constructor(private manager: SessionManager) {
this.logger = new Logger('WebsocketGateway');
this.heartbeat = new WebsocketHeartbeatJob(
this.logger,
this.HEARTBEAT_INTERVAL,
);
}
handleConnection(socket: WebSocket, request: IncomingMessage, ...args): any {
// wsc - websocket client
const id = generatePrefixedId('wsc');
socket.id = id;
this.logger.debug(`New client connected: ${request.url}`);
const params = this.getParams(id, request, socket);
if (!params) {
return;
}
const { session, events } = params;
this.logger.debug(
`Client connected to session: '${session}', events: ${events}, ${id}`,
);
this.listeners.set(socket, { session, events });
}
private getParams(id: string, request: IncomingMessage, socket: WebSocket) {
const query = url.parse(request.url, true).query;
const session = (query.session as string) || '*';
if (session !== '*') {
this.logger.warn(
`Only connecting to all sessions is allowed for now, use session=*, ${id}`,
);
const error =
'Only connecting to all sessions is allowed for now, use session=*';
socket.close(4001, JSON.stringify({ error }));
return null;
}
const events = ((query.events as string) || '*').split(',');
if (
!lodash.isEqual(events, ['*']) &&
!lodash.isEqual(events, [WAHAEvents.SESSION_STATUS])
) {
this.logger.warn(
`Only \'session.status\' event is allowed for now, use events=session.status or events=*, ${id}`,
);
const error =
"Only 'session.status' event is allowed for now, use events=session.status or events=*";
socket.close(4001, JSON.stringify({ error }));
return null;
}
return { session, events };
}
handleDisconnect(socket: WebSocket): any {
this.logger.debug(`Client disconnected - ${socket.id}`);
this.listeners.delete(socket);
}
async beforeApplicationShutdown(signal?: string) {
this.logger.log('Shutting down websocket server');
// Allow pending messages to be sent, it can be even 1ms, just to release the event loop
await sleep(100);
this.server?.clients.forEach((options, client) => {
// @ts-ignore
this.logger.debug(`Closing client connection - ${client.id}...`);
client.close(1001, 'Server is shutting down');
});
// Do not turn off heartbeat service here,
// it's responsible for terminating the connection that is not alive
this.logger.log('Websocket server is down');
}
afterInit(server: Server) {
this.logger.debug('Websocket server initialized');
this.manager.events.on(
WAHAEvents.SESSION_STATUS,
this.sendToAll.bind(this),
);
this.logger.debug('Subscribed to manager events');
this.logger.debug('Starting heartbeat service...');
this.heartbeat.start(server);
this.logger.debug('Heartbeat service started');
}
sendToAll(data: any) {
this.listeners.forEach((options, client) => {
if (options.events.length === 0) {
return;
}
this.logger.debug('Sending data to client', data);
client.send(JSON.stringify(data));
});
}
}
+157
View File
@@ -0,0 +1,157 @@
import { INestApplication, Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { PassportModule } from '@nestjs/passport';
import { ServeStaticModule } from '@nestjs/serve-static';
import { TerminusModule } from '@nestjs/terminus';
import { ChannelsController } from '@waha/api/channels.controller';
import { ServerController } from '@waha/api/server.controller';
import { WebsocketGatewayCore } from '@waha/core/api/websocket.gateway.core';
import { MediaLocalStorageConfig } from '@waha/core/media/local/MediaLocalStorageConfig';
import { BufferJsonReplacerInterceptor } from '@waha/nestjs/BufferJsonReplacerInterceptor';
import {
getPinoHttpUseLevel,
getPinoLogLevel,
getPinoTransport,
} from '@waha/utils/logging';
import * as Joi from 'joi';
import { LoggerModule } from 'nestjs-pino';
import { join } from 'path';
import { Logger } from 'pino';
import { AuthController } from '../api/auth.controller';
import { ChatsController } from '../api/chats.controller';
import { ChattingController } from '../api/chatting.controller';
import { ContactsController } from '../api/contacts.controller';
import { GroupsController } from '../api/groups.controller';
import { HealthController } from '../api/health.controller';
import { LabelsController } from '../api/labels.controller';
import { PingController } from '../api/ping.controller';
import { PresenceController } from '../api/presence.controller';
import { ScreenshotController } from '../api/screenshot.controller';
import { SessionsController } from '../api/sessions.controller';
import { StatusController } from '../api/status.controller';
import { VersionController } from '../api/version.controller';
import { WhatsappConfigService } from '../config.service';
import { SessionManager } from './abc/manager.abc';
import { WAHAHealthCheckService } from './abc/WAHAHealthCheckService';
import { DashboardConfigServiceCore } from './config/DashboardConfigServiceCore';
import { EngineConfigService } from './config/EngineConfigService';
import { SwaggerConfigServiceCore } from './config/SwaggerConfigServiceCore';
import { WAHAHealthCheckServiceCore } from './health/WAHAHealthCheckServiceCore';
import { SessionManagerCore } from './manager.core';
export const IMPORTS = [
LoggerModule.forRoot({
renameContext: 'name',
pinoHttp: {
quietReqLogger: true,
level: getPinoLogLevel(),
useLevel: getPinoHttpUseLevel(),
transport: getPinoTransport(),
autoLogging: {
ignore: (req) => {
return (
req.url.startsWith('/dashboard/') ||
req.url.startsWith('/api/files/') ||
req.url.startsWith('/api/s3/')
);
},
},
serializers: {
req: (req) => ({
id: req.id,
method: req.method,
url: req.url,
query: req.query,
params: req.params,
}),
res: (res) => ({
statusCode: res.statusCode,
}),
},
},
}),
ConfigModule.forRoot({
isGlobal: true,
validationSchema: Joi.object({
WHATSAPP_API_SCHEMA: Joi.string().valid('http', 'https').default('http'),
}),
}),
ServeStaticModule.forRootAsync({
imports: [],
extraProviders: [DashboardConfigServiceCore],
inject: [DashboardConfigServiceCore],
useFactory: (dashboardConfig: DashboardConfigServiceCore) => {
if (!dashboardConfig.enabled) {
return [];
}
return [
{
rootPath: join(__dirname, '..', 'dashboard'),
serveRoot: dashboardConfig.dashboardUri,
},
];
},
}),
PassportModule,
TerminusModule,
];
export const CONTROLLERS = [
AuthController,
SessionsController,
ChattingController,
ChatsController,
ChannelsController,
StatusController,
LabelsController,
ContactsController,
GroupsController,
PresenceController,
ScreenshotController,
PingController,
HealthController,
ServerController,
VersionController,
];
const PROVIDERS = [
{
provide: SessionManager,
useClass: SessionManagerCore,
},
{
provide: WAHAHealthCheckService,
useClass: WAHAHealthCheckServiceCore,
},
{
provide: APP_INTERCEPTOR,
useClass: BufferJsonReplacerInterceptor,
},
DashboardConfigServiceCore,
SwaggerConfigServiceCore,
WhatsappConfigService,
EngineConfigService,
WebsocketGatewayCore,
MediaLocalStorageConfig,
];
@Module({
imports: IMPORTS,
controllers: CONTROLLERS,
providers: PROVIDERS,
})
export class AppModuleCore {
public startTimestamp: number;
constructor(protected config: WhatsappConfigService) {
this.startTimestamp = Date.now();
}
static getHttpsOptions(logger: Logger) {
return undefined;
}
static appReady(app: INestApplication, logger: Logger) {
return;
}
}
@@ -0,0 +1,21 @@
import { Injectable, Logger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { InjectPinoLogger, PinoLogger } from 'nestjs-pino';
import { parseBool } from '../../helpers';
@Injectable()
export class DashboardConfigServiceCore {
public dashboardUri = '/dashboard';
constructor(
protected configService: ConfigService,
@InjectPinoLogger('DashboardConfigService')
protected logger: PinoLogger,
) {}
get enabled(): boolean {
const value = this.configService.get('WAHA_DASHBOARD_ENABLED', 'true');
return parseBool(value);
}
}
+31
View File
@@ -0,0 +1,31 @@
import { Injectable, Logger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { parseBool } from '../../helpers';
import { WAHAEngine } from '../../structures/enums.dto';
import { getEngineName } from '../../version';
@Injectable()
export class EngineConfigService {
private logger: Logger;
constructor(protected configService: ConfigService) {
this.logger = new Logger('EngineConfigService');
}
getDefaultEngineName(): WAHAEngine {
const value = getEngineName();
if (value in WAHAEngine) {
return WAHAEngine[value];
}
this.logger.warn(
`Unknown WhatsApp default engine WHATSAPP_DEFAULT_ENGINE=${value}. Using WEBJS`,
);
return WAHAEngine.WEBJS;
}
get shouldPrintQR(): boolean {
const value = this.configService.get('WAHA_PRINT_QR', true);
return parseBool(value);
}
}
@@ -0,0 +1,22 @@
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { InjectPinoLogger, PinoLogger } from 'nestjs-pino';
import { parseBool } from '../../helpers';
@Injectable()
export class SwaggerConfigServiceCore {
constructor(
protected configService: ConfigService,
@InjectPinoLogger('SwaggerConfigService')
protected logger: PinoLogger,
) {}
get advancedConfigEnabled(): boolean {
const value = this.configService.get(
'WHATSAPP_SWAGGER_CONFIG_ADVANCED',
false,
);
return parseBool(value);
}
}
@@ -0,0 +1,17 @@
import { DataStore } from '../../abc/DataStore';
import { LocalStore } from '../../storage/LocalStore';
import { useMultiFileAuthState } from './useMultiFileAuthState';
export class NowebAuthFactoryCore {
buildAuth(store: DataStore, name: string) {
if (store instanceof LocalStore) return this.buildLocalAuth(store, name);
throw new Error(`Unsupported store type '${store.constructor.name}'`);
}
protected async buildLocalAuth(store: LocalStore, name: string) {
await store.init(name);
const authFolder = store.getSessionDirectory(name);
const { state, saveCreds } = await useMultiFileAuthState(authFolder);
return { state, saveCreds };
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,17 @@
import { Chat } from '@adiwajshing/baileys';
export interface IChatRepository {
getAll(): Promise<Chat[]>;
getAllByIds(ids: string[]): Promise<Chat[]>;
getAllWithMessages(limit?: number, offset?: number): Promise<Chat[]>;
getById(id: string): Promise<Chat | null>;
deleteAll(): Promise<void>;
deleteById(id: string): Promise<void>;
save(chat: Chat): Promise<void>;
}
@@ -0,0 +1,13 @@
import { Contact } from '@adiwajshing/baileys';
export interface IContactRepository {
getAll(): Promise<Contact[]>;
getById(id: string): Promise<Contact | null>;
deleteAll(): Promise<void>;
deleteById(id: string): Promise<void>;
save(contact: Contact): Promise<void>;
}
@@ -0,0 +1,19 @@
import {
LabelAssociation,
LabelAssociationType,
} from '@adiwajshing/baileys/lib/Types/LabelAssociation';
export interface ILabelAssociationRepository {
deleteOne(association: LabelAssociation): Promise<void>;
save(association: LabelAssociation): Promise<void>;
deleteByLabelId(labelId: string): Promise<void>;
getAssociationsByLabelId(
labelId: string,
type: LabelAssociationType,
): Promise<LabelAssociation[]>;
getAssociationsByChatId(chatId: string): Promise<LabelAssociation[]>;
}
@@ -0,0 +1,14 @@
import { Contact } from '@adiwajshing/baileys';
import { Label } from '@adiwajshing/baileys/lib/Types/Label';
export interface ILabelsRepository {
getById(id: string): Promise<Label | null>;
getAll(): Promise<Label[]>;
getAllByIds(ids: string[]): Promise<Label[]>;
deleteById(id: string): Promise<void>;
save(label: Label): Promise<void>;
}
@@ -0,0 +1,17 @@
export interface IMessagesRepository {
deleteAll(): Promise<void>;
upsert(messages: any[]): Promise<void>;
upsertOne(message: any): Promise<void>;
getAllByJid(jid: string, limit: number): Promise<any[]>;
getByJidById(jid: string, id: string): Promise<any | null>;
updateByJidAndId(jid: string, id: string, update: any): Promise<boolean>;
deleteByJidByIds(jid: string, ids: string[]): Promise<void>;
deleteAllByJid(jid: string): Promise<void>;
}
@@ -0,0 +1,40 @@
import { WAMessage } from '@adiwajshing/baileys';
import { LabelAssociation } from '@adiwajshing/baileys/lib/Types/LabelAssociation';
import { ILabelAssociationRepository } from '@waha/core/engines/noweb/store/ILabelAssociationsRepository';
import { ILabelsRepository } from '@waha/core/engines/noweb/store/ILabelsRepository';
import { IChatRepository } from './IChatRepository';
import { IContactRepository } from './IContactRepository';
import { IMessagesRepository } from './IMessagesRepository';
export abstract class INowebStorage {
abstract init(): Promise<void>;
abstract close(): Promise<void>;
abstract getContactsRepository(): IContactRepository;
abstract getChatRepository(): IChatRepository;
abstract getMessagesRepository(): IMessagesRepository;
abstract getLabelsRepository(): ILabelsRepository;
abstract getLabelAssociationRepository(): ILabelAssociationRepository;
protected getMessagesMetadata(): Map<string, any> {
return new Map()
.set('jid', (msg: WAMessage) => msg.key.remoteJid)
.set('id', (msg: WAMessage) => msg.key.id)
.set('messageTimestamp', (msg: WAMessage) => msg.messageTimestamp);
}
protected getLabelAssociationMetadata() {
return new Map().set(
'id',
(a: LabelAssociation) =>
// @ts-ignore
`${a.type}_${a.labelId}_${a.chatId}_${a.messageId}`,
);
}
}
Loaded 100 of 191 files, more files were not shown because too many files have changed in this diff. Show more